PDA

View Full Version : glRect doesn't work



laf
03-12-2002, 03:05 AM
I'm trying to write a screensaver on MacOS X. I have donwnloaded some examples. And the first thing I have done is to try to draw a Rectangle. But to my surprise, it isn't shown. the clear routine works, a example function that I have downloaded works but the glRect directive does not.

Any idea.

Thanks.

Iván

Bob
03-12-2002, 03:19 AM
Do you call glRect within a glBegin/glEnd block?

laf
03-12-2002, 02:18 PM
no my calling code is:


glNormal3f(0,0,100);
glColor3f(0.0f, 0.0f, 1.0f);
glRectf(20.0f, 20.0f, 40.0f, 40.0f);
error = glGetError();

if (error != GL_NO_ERROR)
[self escribirLog:"Hubo un error\n"];

glFlush();