   White space in a .bmp
  A friend of mine made an aimer for my FPS and its saved as a .bmp file. It looks great and everything, but there's one problem. It's 64x64 and the aimer is in the middle, but there is a bunch of white space that fills up the rest of the bitmap. So when I load and draw the bitmap in OpenGL, the aimer gets drawn, but unfortunatly, so does the white space. I want just the aimer itself, and no white space out side of the aimer, or on the inside of the aimer. How do I take care of this?   
  go in photoshopmake 1 layer that is black.and the other layer should be the white bitmap.set the layer which holds the aimer then switch the blending mode to either darken or multiply. what this will do is remove the white and let the black show. the results may not be great but what you want is a black background bitmap and the aimer any other color then you would render it with additive blending mode. another thing you can do is in photoshop create an alpha mask by opening up the bitmap and making a new document then paste the bitmap into a layer then in the channels tab create a new channel. white is solid, black is invisible  in the alpha channel and you would then create a mask.   ;  i think he wants to know how to draw aimer in OpenGL using alpha ... i dont know :D   ;  You're going to want to add an alpha channel to the aimer image.  With this alpha channel, you can set the OpenGL blending equation to get the desired effect.  Look up the manpage for glBlendFunc or (probably better) the Red book for more detailed info.   ;BITMAPINFOHEADER bitmapInfoHeader2;unsigned char *bitmapData2;int InitGL(GLvoid){...bitmapData2 = LoadBitmapFile("MitchReticle.bmp", &bitmapInfoHeader2);...}int DrawGLScene(GLvoid){...glPushMatrix();glColor3f(1.0,1.0,1.0);glPixelStorei(GL_UNPACK_ALIGNMENT, 6);glRasterPos3f(0,0,-2);glDrawPixels(bitmapInfoHeader2.biWidth, bitmapInfoHeader2.biHeight, GL_RGB, GL_UNSIGNED_BYTE, bitmapData2);glPopMatrix();...}There's the code relevant to the .bmp file. He changed the alpha value in photoshop so that it would be transparent, but it didn't do anything. What should I add to this code so that only the relevant area in the .bmp file is shown?   ;  If you want to use a bitmap, you can write your own bitmap loader and for every white pixel you encounter, set the opacity of the texture to 0x00. Set it to 0xFF for any other.Then just do an alpha test.   ;  Hey check out this tutorial from nehe. I think it has what you needclickeythis is just the page for the tutorial, if you look at the screen shot you should see if it fits your needs.  BTW, it tutorial 20 - maskingscreen #20I've used this technique before so if you need any specific help just ask   ;Quote:Original post by bballmitch *** Source Snippet Removed ***There's the code relevant to the .bmp file. He changed the alpha value in photoshop so that it would be transparent, but it didn't do anything. What should I add to this code so that only the relevant area in the .bmp file is shown?I think the part that's really relevant to the BMP file loading is the code for the LoadBitmapFile function.Aside from that, BMP files don't support images with an alpha channel so you will either have to use a format that does (such as TGA or PNG) or use color-key transparency, which is what RuneLancer suggested.   