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. ...

learn more… | top users | synonyms

1
vote
1answer
144 views

Firing bullets with a time interval between them [duplicate]

How can I make my enemies shoot bullets in intervals? I already have the enemy shooting bullets, however my problem is that it shoots the next bullet instantly, making it look like a line instead of ...
1
vote
1answer
41 views

moving from Glut to SDL2

I'm using Glut with OpenGL for drawing. Glut is very simple and straightforward but I have to give up Glut and move on toward SDL2. I'm reading SDL for Game Development, good book. I need to speed up ...
0
votes
1answer
36 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 when I click on the object the ...
0
votes
1answer
48 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
1answer
285 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 ...
1
vote
2answers
484 views

glGenVertexArrays causes crash

My code keeps crashing at runtime, I have done some creative debugging and determined that it was the glGenVertexArrays that was causing the crash, I've looked around and come across some answers that ...
1
vote
1answer
236 views

Why am I not getting an sRGB default framebuffer?

I'm trying to make my OpenGL Haskell program gamma correct by making appropriate use of sRGB framebuffers and textures, but I'm running into issues making the default framebuffer sRGB. Consider the ...
1
vote
1answer
111 views

Is there a way to use other fonts, besides the default ones in OpenGLUT?

I'm using OpenGLUT functions like glutBitmapString to render sentences and words in a game. However, there is a limited set of fonts to use and I need some bigger size fonts. Is there a way to add new ...
2
votes
1answer
164 views

Mouse Speed in GLUT and OpenGL?

I would like to simulate a point that moves in 2D. The input should be the speed of the mouse, so the new position will be computed as following new_position = old_position + ...
1
vote
0answers
86 views

FreeGLUT keyboard IO timing and synchronization

Using FreeGLut's keyboard callbacks, glutKeyboardFunc(); glutKeyboardUpFunc(); glutSpecialFunc(); glutSpecialUpFunc(); When in the glutMainLoop pipeline do these functions get called? In other ...
2
votes
1answer
201 views

Are ambient, diffuse and specular light or material properties?

Are ambient, diffuse and specular properties of light or material? I am doing ray casting in OpenGL, I've managed to create lit sphere using formula I = L Ka + L Kd (n . l) + L Ks (r . v)^n but I ...
0
votes
1answer
481 views

c++ most used libraries [closed]

I'm trying to find out whether or not I want to switch from Java to c++ for my OpenGL game programming. I now have setup a test project in VS 11 professional, with GLUT. I created my windows with ...
0
votes
2answers
97 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
2k 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 ...
2
votes
1answer
238 views

Proportional speed movement between mouse and cube

Hi i´m trying to move a cube with the freeglut mouse "glutMotionFunc(processMouseActiveMotion)" callback, my problem is that the movement is not proportional between the mouse speed movement and the ...
0
votes
1answer
1k views

Keyboard and Mouse callbacks in GLUT

I'm using OpenGL via GLUT in Ubuntu. While writing text in a text editor, the first keystroke is printed immediately. But if we keep pressing the key, it waits for a moment and then prints a trail of ...
0
votes
1answer
669 views

OpenGL resize problems

I'm developing a minesweeper game. I'm having a problem with reshaping(resize) the window. I'm using Ubuntu Linux. Following are the code snippets and the entire code is here: This is my initializing ...
3
votes
1answer
209 views

rotating objects in a double orbit

I have a object at the center. Other set of objects rotating around center in first orbit. Now i want other objects to rotate around the objects in 1st orbit. In the above fig, set of triangles are ...
0
votes
1answer
541 views

How do I orbit one object around another?

I am trying to do animation using glut. I have 2 squares overlapping to each other and i want other square to rotate around this central object without rotating themselves. I want to rotate in orbit ...
0
votes
1answer
92 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 ...
-5
votes
1answer
237 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
vote
1answer
231 views

GLUT Window not responding

I'm trying to calculate the delta time of my program. In main, I call: glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(250, 250); ...
2
votes
2answers
2k views

Frame timing for GLFW versus GLUT

I need a library which ensures me that the timing between frames are more constant as possible during an experiment of visual psychophics. This is usually done synchronizing the refresh rate of the ...
9
votes
3answers
5k views

What animation technique is used in 'Dont Starve'? [closed]

While playing a few games in my personal time off development I've stumbled across a survival 2D/3D survival game. The game was apparently made in SDL and GLUT (Dont starve) but what really amazed me ...
1
vote
2answers
2k views

Rotating 2D Object

Well I am trying to learn openGL and want to make a triangle move one unit (0.1) everytime I press one of the keyboard arrows. However i want the triangle to turn first pointing the direction where i ...
7
votes
1answer
9k views

How does gluLookAt work?

From my understanding, gluLookAt( eye_x, eye_y, eye_z, center_x, center_y, center_z, up_x, up_y, up_z ); is equivalent to: glRotatef(B, 0.0, 0.0, 1.0); ...
2
votes
2answers
888 views

Simple OpenGL program major slow down at high resolution

I have created a small OpenGL 3.3 (Core) program using freeglut. The whole geometry is two boxes and one plane with some textures. I can move around like in an FPS and that's it. The problem is I face ...
0
votes
2answers
907 views

OpenGL align grid like glOrtho but with gluPerspective?

Using gluPerspective makes OpenGL's grid really messy and rather hard to use especially when trying to do mouse input. The grid that perspective uses is completely messed up compared to the grid you ...
0
votes
2answers
2k views

OpenGL: glGetError() returns invalid enum after call to glewInit()

I use GLEW and freeglut. For some reason, after a call to glewInit(), glGetError() returns error code 1280. Reinstalling the drivers didn't help. I tried to disable glewExperimental, it had no effect. ...
2
votes
2answers
624 views

VBO triangle not rendered using Freeglut Opengl 3.x, not understanding the weird fixes

I've just started to learn OpenGL 3 and I'm using freeglut for the context. I ask for a 3.3 context using: glutInitContextVersion(3,3); glutInitContextFlags(GLUT_FORWARD_COMPATIBLE | GLUT_DEBUG); I ...
0
votes
2answers
113 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 ...
6
votes
1answer
169 views

Excluding Background from Color Picking

I've implemented picking based on color coding, but I don't want the background color to be pickable. Is there any way in openGL (2.x) to exclude the background color? For some reason, doing ...
1
vote
1answer
619 views

Countdown Timer for Racing Game

I want to make a countdown timer for my racing game such as "3... 2... 1... GO!" I'm using GLUT, OpenGL, and C++. I was wondering what the most appropriate method to handle this in C++. clock()? ...
0
votes
1answer
508 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 ...
5
votes
3answers
762 views

Rotate a particle system

Languages / Libraries in use: C++, OpenGL, GLUT Okay, here's the deal. I've got a particle system which shoots out alpha blended textures to produce a flame. The system only keeps track of very ...
8
votes
5answers
3k views

Is GLUT obsolete?

A question was asked about good, up-to date OpenGL resources, one of the answers was a link to a tutorial about modern OpenGL programming. The tutorial in question uses GLUT and GLEW, but I have read ...
1
vote
1answer
289 views

Change flag if mousepress while on loop

I have this program that starts a loop when the key is pressed The problem is that when i start the loop, i want to be able to stop it halfway with my mousepress. The problem is that it doesn't ...
7
votes
2answers
4k views

Why should I not use glTools/glut when developing complete applications?

I've started learning how to use OpenGL a while back, using the OpenGL SuperBible, Fifth Edition, and I've had people arguing about the fact that the book doesn't really teach how to use OpenGL but ...
7
votes
1answer
15k views

How to get and use delta time

I have mice looking and walking in my game, but they are very slow and hard to use. I think it's because I'm using fixed speed. I heard that in big projects developers use delta time. How do I ...
2
votes
1answer
3k views

Converting 3D coordinates to 2D and back?

I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction. I'm using OpenGL(GLUT) in my C++ project. I am also ...
1
vote
2answers
1k views

Having a slight problem moving my camera based on time passed using GLUT/OpenGL

Before anyone asks, this is for a university project and I have to use GLUT. I'm not tagging this as homework because this is not a requirement, nor will I have extra points for this. With GLUT, for ...
5
votes
3answers
3k views

Trapping mouse inside window in OpenGL with GLUT?

I perfectly understand that GLUT is limited and the following problem can't probably be solved with OpenGL/GLUT, but since I don't know exactly if it can or not, I better just ask. Maybe I'm doing ...
5
votes
2answers
5k views

Constant game speed independent of variable FPS in OpenGL with GLUT?

I've been reading Koen Witters detailed article about different game loop solutions but I'm having some problems implementing the last one with GLUT, which is the recommended one. After reading a ...
0
votes
2answers
275 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?