glGetMinmax without rendering

Hi,
I’m interested in obtaining the min and max color values in the GPU’s color buffer, without actually obtaining a window handle or rendering anything to the screen. I believe the code should look something like this.

glMinmax(GL_MINMAX, GL_RGB, GL_FALSE);
glEnable(GL_MINMAX);
glClearColor( 0.0f, 0.0f, 0.0f, 0.0f );
glClear( GL_COLOR_BUFFER_BIT );
glBegin( GL_TRIANGLES );
glColor3f( 0.5f, 0.5f, 0.5f );
glVertex3f(0.1f, 0.1f, 0.0f);
glVertex3f(0.1f, 0.7f, 0.0f);
glVertex3f(0.7f, 0.7f, 0.0f);
glVertex3f(0.7f, 0.1f, 0.0f);
glEnd();
glFlush();
glGetMinmax(GL_MINMAX, GL_TRUE, GL_RGB, GL_FLOAT, values);

If I execute this code alone, without rendering anything to the screen, I get all 0’s as my answer. If anyone can help with this, it’d be greatly appreciated,
Thanks,
Mike

You need to allocate an OpenGL context for any OpenGL API function to work.

Mikael

And the minmax operation, aswell as pretty much the entire imaging subset, applies to pixel transfers only, not to rendered objects.

Thanks, I seem to have figured out what I needed.
Mike