Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

FatGarfield

texture and alpha blending

This topic is 6029 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

Need Help, Please I just write down the important code Here the code from NeHe''s OpenGL lesson 9: glBlendFunc(GL_SRC_ALPHA,GL_ONE); //then load B&W texture from bitmap ... glColor4ub(120, 200,100, 255); ... glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f,-1.0f, 0.0f); ... so what do you think about the color of pixel( -1.0, -1.0, 0.0 ) Why? Please Help, Thanks

Share this post


Link to post
Share on other sites
Advertisement
Thanks for help, but I think you didn''t understand my question clearly.
when I want to draw a point P:
1. using glColor4ub() to specify a color to the point P
2. load a bitmap and map from one point in the bitmap called
Q to the point P
then the color of Q and the color specified by glColor4f() will
blend, why and how ?

Share this post


Link to post
Share on other sites
quote:
Original post by FatGarfield
Thanks for help, but I think you didn''t understand my question clearly.


I guess - because nothing is clear in this question..

quote:

when I want to draw a point P:
1. using glColor4ub() to specify a color to the point P
2. load a bitmap and map from one point in the bitmap called
Q to the point P
then the color of Q and the color specified by glColor4f() will
blend, why and how ?


Look at the Texture Function - it controls blending between texture and fragment color.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!