glRect doesn't work

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.



Do you call glRect within a glBegin/glEnd block?

no my calling code is:

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