pointer to buffer

hi,

is there any possibility to get a pointer to the color buffer (respectively to any buffer) for direct writing and reading?
this would avoid to call for every pixel the write function…

ciao,

hiasl

No, there isn’t. And just because you get a pointer to the framebuffer, doesn’t mean you can do it faster and/or better. And you don’t have to make a function call for each pixel. glDrawPixels can draw as many pixels as you like.

Have a look here

However, not very quickly. As far as I know, it would be faster to precreate a texture and upload the pixels you want to draw to that, and use multiple textures of various sizes to encompass larger areas of pixels. It would be a good idea to switch to an orthogonal matrix mode first, however