Lesson 8 question
Instead of enabling blending for all the faces of your cube just enable blending for the one face that you want blended. For example:
Draw Face 1
Draw Face 2
Draw Face 3
Draw face 4
Draw face 5
glEnable(GL_BLEND);
glBlendFunc(whatever you use);
Draw Face 6
glDisable(GL_BLEND);
This code should work, haven''t tried it out or anything. I don''t play with blending much. Hope this helps!
Draw Face 1
Draw Face 2
Draw Face 3
Draw face 4
Draw face 5
glEnable(GL_BLEND);
glBlendFunc(whatever you use);
Draw Face 6
glDisable(GL_BLEND);
This code should work, haven''t tried it out or anything. I don''t play with blending much. Hope this helps!
June 30, 2000 01:31 AM
I do...
if (materialList[curMat]->alpha < 1.0)
{
glEnable(GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(1.0f,1.0f,1.0f,materialList[curMat]->alpha);
}
else
{
glColor3f(1.0f,1.0f,1.0f);
}
...draw face....
if (materialList[curMat]->alpha < 1.0)
{
glDisable(GL_BLEND);
}
Hope this helps,
Spikus
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement