If I have the following code:
unsigned char id;
glReadPixels (0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &id);
Why is it that I get a value 0 for id? Do I have to wait for the clear to actually happen? Is there a client state that needs to be enabled for the clear to function properly?