In my application I like to draw a line, which is following the mouse pointer. That’s working fine but as my scene is using several 1000 objects it is getting rather slow.
So I tried the following:
- allocate a buffer
when the mouse moved:
The pixels are drawn but the line doesn’t appear.
If the line with glDrawPixels is deleted, it’s working again.
Forgot to mention, that I’m using double buffering. Swapped buffers afterwards, tried inbetween, but no effect.
Tried glFlush and glFinish after glDrawPixels.
Then I moved the Rasterpos for the insertion a bit and realized, that glDrawPixels take effect, when the whole window is repainted (it’s a MS-Win-Application - so the WM_PAINT-event). But glDrawPixels is setting the pixels on top of all others, although my line-functions are invoked later.
I’m thankful for any hint or comment.