Questions tagged [glut]

GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, available for C, C++, FORTRAN, and Ada. GLUT is a window system independent toolkit for OpenGL that implements a simple windowing API. Because of its ease of use, it is often used to learn how to write programs with OpenGL. Since it is closed source, some people have gone on to create newer, open source alternatives (two examples of this are Freeglut, and GLFW).

Filter by
Sorted by
Tagged with
0
votes
2answers
314 views

view if GL_CULL_FACE is enabled/disabled

Im using GL_CULL_FACE, an i'm trying to map a key for enable/disable the gl_cull_face. Is there any posibility of viewing if it's enabled or not? Thanks
0
votes
1answer
270 views

Freeglut: Functions missing

I'm currently learning OpenGL (in class) and we're using freeglut 2.8.2, which works just fine (using Visual Studio 2012). As an additional learning resource I'm reading the "OpenGL Superbible, 5h ...
0
votes
2answers
384 views

Manually invoke key callback in (free)glut

I have to watch the keyboard during rendering. So, is there a way to force glut to invoke the Keyboard callback immediately?
0
votes
1answer
130 views

OpenGL 2D Game Render Help

I just recently started using C++ and OpenGL and I am running into an issue. I am not totally sure what I am doing so could you please tell me what I am doing wrong and what I could improve? Here is ...
0
votes
2answers
3k views

Drawing a simple triangular prism in opengl in 3D

Is there a simple way to draw a triangular prism in opengl? I'm using lighting and a non-orthographic camera. I basically need a 3d object, not just vertices. edit: well I've tried searching, and I ...
0
votes
1answer
6k views

How can I use keybord keys like W, A, S and D in GLUT and C++?

I want to use W, A, S and D keys like GLUT_KEY_LEFT. My Code: ...
0
votes
1answer
482 views

How do I implement object picking, using OBB in OpenGL?

I am trying to make 3D drawing software. I wanted to have the drag feature so I am using object picking using the OBB algorithm. I am facing problems in understanding the algorithm, and my ...
0
votes
1answer
677 views

Problem Rotating z-axis openGL c++

i am trying to rotate a quad at z-axis but the problem is , it is not rotating but translating towards some other direction rather than rotating at a particular point.I believe my display function is ...
0
votes
3answers
147 views

Text in game with not english alphabet

I need to render some special text in my game. Currently I can render any text that use classic letters of english alphabet, but I have some problems with special alphabets. How do I render text: I ...
0
votes
1answer
123 views

speed up the update of glutidle()

I have a client that sends data at 1KHz (i.e. 0.001 sec) to a master over Internet using UDP protocol. In Master, I need to draw an object, but the problem is that the update of GLUT is slower than ...
0
votes
2answers
195 views

Accessing struct in glut

I have to write a game for a uni project using openGL / glut. I am just going to use a generic example code as I'm just looking for a solution to one specific problem: Using glut, I have to call a ...
0
votes
1answer
934 views

Top-Down Racing Game C++

I'm creating a Top-Down Racing Game in C++ using GLUT/OPENGL and SOIL first of all I just wanted some opinions on how the track should be done. I was thinking about using a tile-map and so far I've ...
0
votes
1answer
451 views

OpenGL convert mouse position to world coordinates without gluUnproject in Python?

EDIT: I changed the bottom left to -1,-1 and the top right to 1,1, and while I can draw objects within this range, I cannot map the mouse x,y to the world space. I have been trying to learn OpenGL and ...
0
votes
1answer
180 views

GLUT multiple windows FPS drop sharply

When only the main window is created, the fps is able to reach above 1000.However creating 1 more window, resulted in the fps dropping significantly down to about 100. The draw callback draws a blank ...
0
votes
1answer
1k views

How to put the “camera” inside a cube in OpenGL

I'm really new to OpenGL and can't seem to figure out how to put the "camera" inside the cube I've created so that I can move in an FPS-like style. I tried to use gluLookAt and gluPerspective but I'm ...
0
votes
1answer
492 views

Invalid coordinates returned by glutMouseFunc()

I am using GLUT's glutMouseFunc() function to retrieve the coordinates of mouse clicks. I want to move the object on that coordinate to another coordinate. But ...
0
votes
1answer
2k views

C++ timer function acts as if time limit is instantly reached if it is less than 1 second [closed]

I'm trying to make a Snake clone with C++ and OpenGL/GLUT, but I've been having trouble with programming the timed input. I made a timer class, as you'll see below, to be used for the short time ...
0
votes
1answer
5k views

rotating 3D object around the center

I have object moving from A to B on x-axis and there is no translation of object apart from it. Now, while moving, i want to rotate it around y-axis and the motion should change accordingly, i mean if ...
0
votes
1answer
112 views

Can we flip znear and zfar so that positive z values increase away from the viewer?

I am confused about the projection matrix in OpenGL. i have a habit of writing the code as follows. ...
0
votes
3answers
734 views

I have my mouse coords converted to world coords. Now how do I detect objects with it? (C++, OpenGL, FreeGlut)

I found a way to convert my mouse coordinates to world coordinates that I can easily understand but now I need to know how to use it to check if the mouse is currently over any of my rendered objects. ...
0
votes
0answers
36 views

Having trouble running OpenGL on MSVC

I'm using the OpenGL Programming Guide, 8th Edition with MSVC 2013 but I can't get the triangles.cpp file to run. These are the errors popping up: http://puu.sh/jAokn/c07420cf46.png
-1
votes
0answers
12 views

How can I add one OPENGL page to another when ENTER key is pressed?

I created one GLUT project which has my project's introduction page. When I pressed ENTER key, it should redirect to my front page of project which I created as another project.
-2
votes
1answer
49 views

Models /textures/music corrupted!

I'm making a 3d rpg game. Everything seems to work on other computer. But when I open my game in my computer, the polygons gets crazy everywhere filled with random polygons. Textures will get rainbow ...
-6
votes
1answer
1k views

multiplayer game in openGL [closed]

what is the easiest way how to make network communication in openGL/glut? Does anybody know any good tutorial for beginners? thanks (or is there any simpler way then openGL?)

1
2