Anish
08-13-2005, 02:00 AM
Hai,
In my quad i wnat to draw a texture in front and back faces and all other faces fill with different colors.
Is it possible
i wrote this way
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glBindTexture(GL_TEXTURE_2D, texBr[0]);
glBegin(GL_QUADS);
if( face==FRONT or face BACK)
{
//Draw the texture
}
else
{
glColor3f(0,1,0);
//Draw the face
}
But the faces didn't fill with the specified color. it always appears the texture color.
Anyone have any idea??
:rolleyes:
Thanks :)
Anish
In my quad i wnat to draw a texture in front and back faces and all other faces fill with different colors.
Is it possible
i wrote this way
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL );
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
glBindTexture(GL_TEXTURE_2D, texBr[0]);
glBegin(GL_QUADS);
if( face==FRONT or face BACK)
{
//Draw the texture
}
else
{
glColor3f(0,1,0);
//Draw the face
}
But the faces didn't fill with the specified color. it always appears the texture color.
Anyone have any idea??
:rolleyes:
Thanks :)
Anish