PDA

View Full Version : glDrawPixels



titan
03-01-2003, 03:20 PM
I am playing around an I want to replace my glClear() call with a glDrawPixels call as the FAQ (http://www.opengl.org/developers/faqs/technical/depthbuffer.htm) suggests. However I can not get this to work.

I am using


glDrawPixels(width, height, GL_DEPTH_COMPONENT, GL_FLOAT, data ); where data is an array of floats I've initialized with values between 0 and 1.

Unless I turn off colour writes the color buffer is filled with white, as if I had tried to fill the depth buffer with 1.0... And no matter what I try I can't get my values into the depth buffer.

If I change the raster pos I see the new position drawn correctly because of the white in i get in the colour buffer. But my depth changes never see to actually apply...

What could I be doing wrong?