Jump to content

  • Log In with Google      Sign In   
  • Create Account

OpenGL, *.bmp files, and eliminating a color


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
4 replies to this topic

#1   Members   -  Reputation: 301

Like
0Likes
Like

Posted 17 May 2014 - 09:44 AM

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



#2   Prime Members   -  Reputation: 2216

Like
0Likes
Like

Posted 17 May 2014 - 10:06 AM

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, 17 May 2014 - 10:07 AM.


#3   GDNet+   -  Reputation: 10739

Like
0Likes
Like

Posted 17 May 2014 - 10:24 AM


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.


#4   Members   -  Reputation: 301

Like
0Likes
Like

Posted 17 May 2014 - 10:53 AM

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



#5   Prime Members   -  Reputation: 2216

Like
0Likes
Like

Posted 17 May 2014 - 12:21 PM

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.






Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.




PARTNERS