• Advertisement

Archived

This topic is now archived and is closed to further replies.

Blitting

This topic is 5983 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, does anyone know how to modify texture images once they have been created? The only way I can think of is to draw the texture to screen, draw the new image in top of it, then read the image back into the texture memory. A way of drawing images directly to texture images, like a DirectDraw blit would be nice. I know about the glsubtexture2D command thingy, but this requires reading the image from the system memory or from the screen buffer, and there seems no way to transfer data from one texture object to another. Any advice would be appreciated.

Share this post


Link to post
Share on other sites
Advertisement
Is it that I post stupid questions, so nobody can be bothered to answer, or is it that nobody knows the answer coz the questions are too difficult? Or is it that nobody likes me?

Share this post


Link to post
Share on other sites
all of the above
the way to update an image is
from system memory - glTexSubImage2D(..)
from the screen - glCopyTexSubImage2D(..)

to make the update as fast as possible minimize the conversion eg use a texture with the same bitdepth as the window (if updating from the window)
or dont store the image data as GL_FLOAT and then upload it to a RGBA texture store it as GLubyte. also often is byte ordering important eg BGRA instead of RGBA

Share this post


Link to post
Share on other sites

  • Advertisement