Differences in OpenGL on different machines?

BlitzMax Forums/OpenGL Module/Differences in OpenGL on different machines?

ImaginaryHuman(Posted 2005) [#1]
I seem to get some differences between what works in OpenGL on one machine and what works on another (both Mac's). On my ibook for example I can use glCopyPixels with a remapping of colors using tables (in glPixelTransfer GL_COLOR?) .. I try to copy the backbuffer on top of itself with color remapping. It works fine on the ibook (software opengl only), but it refuses to work on the imac. Also I found that in some cases I need to add extra glDisalble GL_TEXTURE_2D on the ibook but not on the imac. I don't know why it isn't consistent. Driver issues?


teamonkey(Posted 2005) [#2]
The contents of a backbuffer is undefined after a Flip. It might be black, it might be left untouched or it might be full of whatever temporary data the card's decided to store in it after the Flip. You can't assume that it will keep the contents of the last draw cycle.


ImaginaryHuman(Posted 2005) [#3]
Hmm ok, good to keep in mind. In that particular routine I do a clearscreen at the start, then I draw a bunch of objects, then I do a copypixels, so there is no flipping going on until everything is drawn.

I also made a new routine last night which seems to look different on the imac than on the ibook as well. I am wondering if there is maybe some command that I haven't called which is automatically initialized on the ibook but not on the imac. ... on the ibook it simply draws some GL_QUADS with texturing of a texture that I uploaded myself. It also does a readpixels from the RED component of the display, and then a writepixels of that same data to the stencil buffer. Then all I try to do is draw a filled untextured quad with blending on and the stencil test enabled. It looks right on the ibook but on the imac it comes out with strange white squares with what looks like some strange residual background showing up. Both systems have 8-bit stencil buffers and all the rest, so I don't know why it comes out differently.


ImaginaryHuman(Posted 2005) [#4]
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.