I looked at the sample code in another thread for doing simple 2D drawing in opengl. I also noticed it's much the same as Mark's version in the GLMAX2D driver/module. So I set up the display right.
What I want to do is draw a bunch of textures, grab one component of what is drawn in the backbuffer off to main memory, then upload it into the stencil buffer. Then I want to draw a quad with blending on and the stencil test on so that only certain pixels are drawn in the color of the quad.
Can somebody come up with a short piece of code that achieves this or points in the right direction? I seem to get more or less what I would expect on my ibook but on the imac things definitely look different.
What I want to do is draw a bunch of textures, grab one component of what is drawn in the backbuffer off to main memory, then upload it into the stencil buffer. Then I want to draw a quad with blending on and the stencil test on so that only certain pixels are drawn in the color of the quad.
Can somebody come up with a short piece of code that achieves this or points in the right direction? I seem to get more or less what I would expect on my ibook but on the imac things definitely look different.