texture and alpha blending

Started by
2 comments, last by FatGarfield 22 years, 4 months ago
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
Here I am.
Advertisement
glVertex3f is not a vertex color, but coordinate.
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 ?
Here I am.
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.

This topic is closed to new replies.

Advertisement