I’m using OS X, and am having two problems:
a) seems glRect* doesn’t draw anything. Lines work fine, I can draw a bitmap of a letter, and a gradient using a ByteBuffer. But it seems calling glRect* just doesn’t do anything. Tried disabling the texture, as suggested elsewhere. Is this an OS X bug?
b) I want to do double-buffering. Seems OS X likes drawing in back buffer, and seems to automatically swap buffers (eg calling swapbuffers has no effect). I assume from what I’m seeing (and read elsewhere), that OS X uses swap-copy - it copies the back buffer to the front, leaving the back untouched.
What I have is a rectanglular gradient I can drag around by moving the mouse.
It seems I can draw successive gradients, leaving “trails” on the screen, or I can erase the color buffer and redraw every time, but of course it flickers a bit. What I want to is kill the old gradient in the back buffer, but since glRect* doesn’t work, I can’t. (I suppose I could use a ByteBuffer of all black pixels if all else fails).
Am I missing something with double buffering, or are both of these problems the same problem - that glRect* simply doesn’t work on OS X?
