Hey guys, ive got vc++ 6.0 and im using their opengl libraries...i created a new win32 app (as per Genesis I : Windows Game Programming guide) but im having trouble drawing anything to the screen...the window shows up fine and all the menu funtionality works ( set up pixel format, proper window styles for opengl, the rendering context ect), but all my gl function calls dont show up in the window..someone take a look please, thanks!
I haave the main loop going infinitly, and as long as there is no message in the queue, I draw a scene, something like this (in main):
while (!done) {
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
if (msg.message == WM_QUIT) {
done = TRUE;
} else {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} else {
//printf("Hello, World!");
DrawScene();
}
}
and DrawScene is like:
glClearColor(0.0, 0.0, 1.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glBegin(GL_POLYGON);
glVertex2f(-0.5, -0.5);
glVertex2f(-0.5, 0.5);
glVertex2f(0.5, 0.5);
glVertex2f(0.5, -0.5);
glEnd();
glFlush();
why isn't anything showing up?
[Edited by - dj_unforgetable on November 18, 2006 10:59:53 PM]