PDA

View Full Version : editing a texure in openGL



queeroux
07-21-2004, 03:55 AM
Hi,
I work on a drawing software.
I load TGA files which are only characters outlines, and I want to paint this texture.
So how can I edit video memory, for changing pixels colour value for this texture ?
Is it possble ? Is there another way to achieve ?
Thanks

ZbuffeR
07-21-2004, 08:34 AM
Keep a copy of the texture in CPU memory, modify it, and update the texture on the videocard with glTexSubImage2D (faster than glTexImage2D, when the texture already exists)

Surgeon
07-21-2004, 10:04 AM
you may also use a devIL library www.devil.org (http://www.devil.org)