OpenGL, *.bmp files, and eliminating a color

Started by
3 comments, last by Kaptein 9 years, 11 months ago

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

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.


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.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

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

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.

This topic is closed to new replies.

Advertisement