OpenGL/GLUT - glClear and glStencilMask NOT functioning as expected
===

first off I'm pretty new to OpenGL and GLUT. However, in Khronos OpenGL 2.1 Specs they say that glStencilMask should affect the operation of glClear, however, on my machine, this does not seem to be true. It must be something stupid that I'm just overlooking as a noob. The output I'm currently getting is "Stencil value: (0,0): 0xff", the output I'd expect is "Stencil value: (0,0): 0xf0". Here's my code:

    void renderScene(void) {

	char pix [1];
	int i [4];

	glClearStencil(0x0);
	glClear(GL_STENCIL_BUFFER_BIT);

	/* Applies the following: 1111 0000 & 1111 1111 */
	glStencilMask(0xF0);
	glClearStencil(0xFF);
	
	glGetIntegerv(GL_CURRENT_RASTER_POSITION, i);

	glClear(GL_STENCIL_BUFFER_BIT);

	glFlush();

	glReadPixels(i[0],i[1],1,1,GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, pix);
	printf("Stencil value (%d,%d): %x\n",i[0],i[1],pix[0]);

    }	

    int main(int argc, char **argv) {

	// init GLUT and create Window
	glutInit(&argc, argv);
	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_STENCIL );
	glutInitWindowPosition(500,500);
	glutInitWindowSize(320, 320);
	glutCreateWindow("Trial");
	
	// register callbacks
	glutDisplayFunc(renderScene);

	// enter GLUT event processing cycle
	glutMainLoop();

	return 1;
    }

(Obviously I was performing various other drawings etc, but this demonstrates the problem as I see it)