12-28-2005, 07:38 PM
Hey,
I've been trying to draw images where the white bit is not drawn, and using the following code I get the white bits but not the coloured bits, but every other way I can combine this code in different orders gives me all black or no removal of white. Please, how do I do this to get rid of just the white.
glRasterPos2i(100, 100);
glDrawPixels(myImage.GetWidth(),myImage.GetHeight( ), GL_BGR_EXT, GL_UNSIGNED_BYTE, image);
glDrawPixels(myImage.GetWidth(),myImage.GetHeight( ), GL_ALPHA, GL_UNSIGNED_BYTE, al);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_NOTEQUAL, 0);
glutSwapBuffers();
I've been trying to draw images where the white bit is not drawn, and using the following code I get the white bits but not the coloured bits, but every other way I can combine this code in different orders gives me all black or no removal of white. Please, how do I do this to get rid of just the white.
glRasterPos2i(100, 100);
glDrawPixels(myImage.GetWidth(),myImage.GetHeight( ), GL_BGR_EXT, GL_UNSIGNED_BYTE, image);
glDrawPixels(myImage.GetWidth(),myImage.GetHeight( ), GL_ALPHA, GL_UNSIGNED_BYTE, al);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_NOTEQUAL, 0);
glutSwapBuffers();