Color-keying in OpenGL?
Is there an OpenGL texture equivalant to DirectDraw's color keying (i.e. all pixels of a specified color are not drawn)? I realize that this concept has been phased-out in favor of the much more flexable alpha blending but I would like a way that I can take an OpenGL texture that I've already established with glTexImage2D (internal format RGB), and later set all the pixels of a particular color to be transparent. Is it possible, or do I already need to have added alpha values to the pixel map that I pass to glTexImage2D?
Quote:Original post by Kelly G
Is there an OpenGL texture equivalant to DirectDraw's color keying (i.e. all pixels of a specified color are not drawn)? I realize that this concept has been phased-out in favor of the much more flexable alpha blending but I would like a way that I can take an OpenGL texture that I've already established with glTexImage2D (internal format RGB), and later set all the pixels of a particular color to be transparent. Is it possible, or do I already need to have added alpha values to the pixel map that I pass to glTexImage2D?
the color keying is not hardware accelerated and so directx converts your image before uploading it to agp memory, which is also what you will have to do in opengl.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement