No errors but not updating window?

Started by
3 comments, last by griffenjam 22 years, 5 months ago
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 ------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
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
Ethereal
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
------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery
Are you calling SwapBuffers?
-----------------------"When I have a problem on an Nvidia, I assume that it is my fault. With anyone else's drivers, I assume it is their fault" - John Carmack
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
------------------------------
"The paths of glory lead but to the grave." - Thomas GrayMy Stupid BlogMy Online Photo Gallery

This topic is closed to new replies.

Advertisement