Archived

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

FatGarfield

texture and alpha blending

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
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