Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

CrackMonkeyT

What's with the damned flicker?!

This topic is 5556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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-~-

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!