I'm making a sprite system for opengl; I can load the bitmaps (plural bitmaps, because there's an alpha mask) ok. I can make the quad ok. Then I render it. What is not ok is what happens when I try to draw other things on the screen. Even with an "alpha" component of 255 (completly on) weird things happen. For example, when I display a brown 16x16 quad after drawing a white rectangle, the white quad turns brown too. Here's the important parts of my code (tell me if there's something else I should include as important):
This is in my initalization code:
W and H are the width and heigth of the screen, respectivly.
This is how I create the texture:
w and h are the width and heigth of the texture, final_bmp is a pointer to the color+alpha chanel. f->tex is the tex id thingy.
/*Make the texture*/
Finally, I draw the texture like this:
x and y are the positions on the screen; they are representative of the upper left corner of the texture. f->h and f->w are the heigth and width of the texture, respectivly.
Please help me. I'm really lost right now.