• Advertisement
Sign in to follow this  

OpenGL, *.bmp files, and eliminating a color

This topic is 1344 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Guys,

 

*.bmp files as far as I know don't support transparacy. I am going through NeHe's tutorials, in particular this one:

 

http://nehe.gamedev.net/tutorial/moving_bitmaps_in_3d_space/17001/

 

Where he loads a black and white .bmp star and does some cool effectis with it. However, when I run the code (ported to SDL and OpenGL) I am not able to get rid of the black border surrounding the star.

 

If anyone has any ideas please let me know.

 

 

Thanks,

 

Mike

Share this post


Link to post
Share on other sites
Advertisement

What exactly does your code look like? It's hard to say what causes it without seeing what you are doing.

Maybe you enabled border, maybe you are using the star from a texture atlas and you are seeing color bleeding into your sprite due to lerp.

 

Btw. this is some very outdated OpenGL. You should be using shaders at the earliest opportunity, just because it takes time to get good at using/exploiting them.

Edited by Kaptein

Share this post


Link to post
Share on other sites


bmp files as far as I know don't support transparacy.

Correct, but DIB files, according to this, have a version which supports an alpha channel. That link mentions Photoshop, but my old version doesn't support it.

Share this post


Link to post
Share on other sites

Thanks guys I just managed to solve the problem. In response to Kaptein, I have read in a couple of places (including Lazyfoo's site) that it's not a bad idead to first learn the non shader code first, just to get used to 3D coordinates, rendering and the basics before jumping into shaders.

 

Apperantly, there's a big jump in difficulty between what I am doing and the shaders (whatever those may be)

 

Mike

Share this post


Link to post
Share on other sites

Thanks guys I just managed to solve the problem. In response to Kaptein, I have read in a couple of places (including Lazyfoo's site) that it's not a bad idead to first learn the non shader code first, just to get used to 3D coordinates, rendering and the basics before jumping into shaders.

 

Apperantly, there's a big jump in difficulty between what I am doing and the shaders (whatever those may be)

 

Mike

 

I suppose that's true.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement