[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL texturing



On Wed, 2 Apr 2003 14:04:39 +0200
Francesco Orsenigo <xarvh@lombardiacom.it> wrote:

> I'd need to perform many pixel-by-pixel color transformations: is this 
> possible after the texture is loaded?
> 
> Example:
>     for(each pixel)
>           if(pixel->red != 0 || pixel->blue != 0)
> 	draw pixel;   //draw the original pixel as is
>           else 
>                    draw table[pixel->green];   //use the green value to
>                    draw 
> a different color

How big are the textures you are using for this? Is there a pattern to the
changes? If so, could you precalculate a set of textures in main memory and
use glTexSubImage2D to update the texture in video memory?

chris