dynamic transparency

Hi folks,

i seek some information about the most efficient (fastest) way to dynamically set some texels (random ammount and order)transparent (or opaqu depending on there previous state).
I first thought about modifying the alpha value of the texels and then recreate the whole texture again. - but i doubt that i can do this in realtime.

Please let me know how you would solve the problem.
Thank’s in advance.

GL_ALPHA texture format - and then use glTexSubImage2D to upload a new texture. You will need to combine the alpha map with any diffuse texture you want to use (with multi-texture).

I assume you want the alpha test, rather than a blend operation?

Hi again,

Robbo, thanks for the hint with glTexSubImage2D.
Just a few more questions. Can i use glTexSubImage2D to change only the alpha values of an existing rgba texture? Or do i have to create a texture that only contains alpha values? ( but, ahm… how can i combine the alpha texture with the “image texture”?)
If both would be possible, what would be faster?

Blending would be a good idea, because i could fade the texels in/out (would certainly look nice) but for now i just like to get it to work - anyway.

Thank’s in advance for any information…