Jump to content

  • Log In with Google      Sign In   
  • Create Account


Blitting


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 DavidH   Members   -  Reputation: 122

Like
Likes
Like

Posted 30 August 2001 - 02:51 AM

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.

Sponsor:

#2 DavidH   Members   -  Reputation: 122

Like
Likes
Like

Posted 01 September 2001 - 11:02 PM

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?

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 02 September 2001 - 10:07 AM

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





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS