So use one glBegin()/glEnd() combo for the background, then change the settings and then use another glBegin()/glEnd() to draw the sprite. Also You are only allowed to use certain commands between glBegin() and glEnd, so use only glTexCoord glColor glVertex and other similar commands. It would be easier to set the Color to (1,1,1,1) and use the default GL_MODULATE. In this case, you'd want to leave the texture environment color to its default value of (0,0,0,0). Instead, you'd use glTeċnv(), and set the texture environment mode to GL_BLEND. However, if you want blending to occur when the primitive is texture mapped (i.e., you want parts of the texture map to allow the underlying color of the primitive to show through), then don't use OpenGL blending. If so, (GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) is always a good function to start with. You might want to use the alpha values that result from texture mapping in the blend function. Google gimp and background edit and you'll see the info and tools needed. If that's the case then use a program called gimp and then fuzzy select the background and delete then export it and close it but when it asks to save during export say no. It sounds like you want to remove backgrounds from sprites.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |