my OpenGL window remains busy and white... why ?

I’ve got a problem with the GLUT tutorial… It seems like my OpenGL window is ‘stuck’… I mean, when the cursor is over it, it has the shape like when it is busy, and the window hardly refreshes itself, and whenever it does, it is all white… I can’t do anything (close, resize, move etc), and i need a while(!kbhit()); to prevent it from quitting…

Any help would be appreciate.

source code (vc++6, win98)

#include <gl/glut.h>
#include<gl/gl.h>
#include <conio.h>

void renderScene(void) {
glClear(GL_COLOR_BUFFER_BIT);
glBegin(GL_TRIANGLES);
glVertex3f(-0.5,-0.5,0.0);
glVertex3f(0.5,0.0,0.0);
glVertex3f(0.0,0.5,0.0);
glEnd();
glFlush();
}

void main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,100);
try {
glutCreateWindow(“3D Tech- GLUT Tutorial”);
glutDisplayFunc(renderScene);
glutMainLoop();
}
catch (…) {};
while (!kbhit()) ;
exit(0);
}

Me again… Well, does that source works on your computer at least ? … It is supposed to draw a triangle…

TIA

Where’s your window resize function? You’ll need it to choose a projection and setup a viewport.

Also glutMainLoop() never returns so you’ll need to set up a keyboard handler where you can determine when to quit. For this use glutKeyboardFunc() and check for a key (e.g. say ESC) that calls exit();

Originally posted by ipo:
[b]Where’s your window resize function? You’ll need it to choose a projection and setup a viewport.

Ok I try to add a resize function…


Also glutMainLoop() never returns so you’ll need to set up a keyboard handler where you can determine when to quit.

Yes, but my glutMainLoop does return !.. The display function is just called once… Maybe I should try to install better drivers.

… Additionnaly, when I download examples, they compile ok, but there’s a message box reading “A .DLL file, .DLL, wasn’t found” at run time… And so it can’t be launched… What DLL files could I need except from GLUT32.DLL, GLU32.DLL and OPENGL32.DLL which are all located in my windows\system\ ??

Thanks…

Me again…

I changed my libs for OpenGL and GLUT, and now it works…

Sorry for the inconvenient