What's with the damned flicker?!
Hey everyone,
Okay, I wrote a simple little OpenGL "rendering engine" (at the moment, you give it a list of polygons, and it spits them out... in white... no textures.. no lights... no motion... kinda...). Here''s the issue: I''m using double buffering to do away with flicker, though it still is. The way that it is showing my (at the moment) one triangle, it looks like its rotating. For the sake of testing, I simply put into my display and idle functions code that tells where the camera is (0,0,-1) and where the polygon is. They remain constant, but it looks like the triangle is spinning. What''s the deal?!
Any help that anyone can offer, let me know. If you want source, let me know, and I''ll post it.
Peace,
--Thomas
quote:Original post by CrackMonkeyT
Hey everyone,
Okay, I wrote a simple little OpenGL "rendering engine" (at the moment, you give it a list of polygons, and it spits them out... in white... no textures.. no lights... no motion... kinda...). Here''s the issue: I''m using double buffering to do away with flicker, though it still is. The way that it is showing my (at the moment) one triangle, it looks like its rotating. For the sake of testing, I simply put into my display and idle functions code that tells where the camera is (0,0,-1) and where the polygon is. They remain constant, but it looks like the triangle is spinning. What''s the deal?!
Any help that anyone can offer, let me know. If you want source, let me know, and I''ll post it.
Peace,
--Thomas
You can''t use glFlush. You have to swap the buffers.
-~-The Cow of Darkness-~-
If your triangle really is spinning and it shouldn''t be, make sure you call glLoadIdentity at least once per frame, or at least push/pop the modelview matrix stack to that effect.
I''ll check through my code again, but as far as I know, I am using swapBuffers and no glFlush. Also, I am poppnig and pushing the matrix every frame, and I think (I''m at a differnt computer so I don''t have my code available) I am calling loadEntity as well. Would the two conflict? And if I am not, then I''ll try it that way and report back my results. If I can get this figured out, who knows, someone else may be able to learn something from it as well.
Also, if it matters, it''s not in a "window", I''m running in "game mode" at 1024x768:32.
Peace,
Thomas
Also, if it matters, it''s not in a "window", I''m running in "game mode" at 1024x768:32.
Peace,
Thomas
Yeah! I had loadEntity in there, but for reason I had it commented out. Taking out the // solved the problem. Thanx for everyone''s help!
Peace,
Thomas
Peace,
Thomas
It''s Identity, not Entity. If you have glLoadEntity in your code it won''t work at all...
-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
well, it works.. I don''t have the entire open gl api memorized (yet). Anywho, on to bigger and better things.. Its time for a BOX!!! I hope that this thread can help more people than just me.
Over and out,
Me.
Over and out,
Me.
Ehm, I''m pretty sure he has glLoadIdentity in there. glLoadEntity is NOT an OpenGL function. CrackMonkey, look closer at your code, I''m 100% sure it''s glLoadIdentity. The Identity matrix is a zeroed matrix with ones going diagonal, starting from m[0][0] to m[3][3]. There is no such thing as an "entity" matrix. lol.
-SirKnight
-SirKnight
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement