Jump to content
  • Advertisement

Archived

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

griffenjam

No errors but not updating window?

This topic is 6118 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

This is my rendering code void Render() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glColor3f(1.0f, 0.0f, 0.0f); glTranslatef(0.0f, 0.0f, 6.0f); glBegin(GL_QUADS); glVertex3f(0.0f, 0.0f, 1.0f); glVertex3f(0.5f, 0.0f, 1.0f); glVertex3f(0.5f, 0.5f, 1.0f); glVertex3f(0.0f, 0.5f, 1.0f); glEnd(); glTranslatef(0.0f, 0.0f, -6.0f); #ifdef DEBUG_MODE DebugOut(glGetError()); #endif glFlush(); } glGetError() is always 0. When my program runs the window doesn''t update at all, it doesn''t even clear. The worst part is that I have written other OpenGL programs before, I wrote a small Landscape program a while ago, but this project just doesn''t work. What could I be doing wrong/What could I have changed, the code is 90% the same. Jason Mickela ICQ : 873518 E-Mail: jmickela@sbcglobal.net ------------------------------ "Evil attacks from all sides but the greatest evil attacks from within." Me ------------------------------

Share this post


Link to post
Share on other sites
Advertisement
It seems that you moves your Quad 0.6 units on the positive Z-axis wich should be...behind the camera...try to move it on the negative Z-Axis (-0.6) so that it''ll move FROM the camera

Share this post


Link to post
Share on other sites
I changed it and nothing happened.
I think there is more than that going on, glClear(...) isn''t even clearing the window. The window is just showing what was behind the whole time.

Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------

Share this post


Link to post
Share on other sites
Well, I wansn''t before, I realized that the sample code I was looking at wasn''t double buffered, I looked at my Landscape code again and figured out I wasnt calling SwapBuffers(). Thanks for replying though.

Jason Mickela
ICQ : 873518
E-Mail: jmickela@sbcglobal.net
------------------------------
"Evil attacks from all sides
but the greatest evil attacks
from within." Me
------------------------------

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!