PDA

View Full Version : Texture real time modification



openk3
03-18-2013, 05:40 PM
How is it possible to draw in an active texture (modify pixels, make it transparent, draw a bitmap line...) : glTexSubImage2D, FBO Frame Buffer Object...?? Is it possible to modify the bitmap data directly within the GPU and which operations are necessary to actualize the texture if necessary ? Thanks

aqnuep
03-18-2013, 08:49 PM
You can directly render to a texture by using framebuffer objects (ARB_framebuffer_object (http://www.opengl.org/registry/specs/ARB/framebuffer_object.txt)). That's the most efficient way.

However, if your source data comes from application data you might want to take a look at pixel unpack buffer (ARB_pixel_buffer_object (http://www.opengl.org/registry/specs/ARB/pixel_buffer_object.txt)) which allows you to upload your data into a buffer object (GPU memory) and then upload from there asynchronously using glTexSubImage2D.

openk3
03-27-2013, 03:31 AM
Thanks a lot, I'll try it!