chicken8
May 17th, 2004, 10:02 PM
Hello, recently, i got problem about the opengl texture mapping,
i use the MODUATE mode to map the texture,
glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBindTexture(GL_TEXTURE_2D, m_texName);
glBegin(GL_QUADS);
for(int i=0; i<10; i++)
{
glColor4f(0.5, 0, 0, 0.1);
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, i);
glTexCoord2f(0.0, 2.0); glVertex3f(-2.0, 1.0, i);
glTexCoord2f(2, 2); glVertex3f(0.0, 1.0, i);
glTexCoord2f(2, 0); glVertex3f(0.0, -1.0, i);
}
glEnd();
glFlush();
but i can see nothing, then i changed the paramenter of glColor4f
into glColor4f(0.8, 0, 0, 0.3) and i see the alpha blended textures.
I wonder if it is my hardware that do not support precise rendering or i need extra configration to opengl.
my pc is ibm r40 with mobile radoen.
Please Help!!
i use the MODUATE mode to map the texture,
glEnable(GL_TEXTURE_2D);
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBindTexture(GL_TEXTURE_2D, m_texName);
glBegin(GL_QUADS);
for(int i=0; i<10; i++)
{
glColor4f(0.5, 0, 0, 0.1);
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, i);
glTexCoord2f(0.0, 2.0); glVertex3f(-2.0, 1.0, i);
glTexCoord2f(2, 2); glVertex3f(0.0, 1.0, i);
glTexCoord2f(2, 0); glVertex3f(0.0, -1.0, i);
}
glEnd();
glFlush();
but i can see nothing, then i changed the paramenter of glColor4f
into glColor4f(0.8, 0, 0, 0.3) and i see the alpha blended textures.
I wonder if it is my hardware that do not support precise rendering or i need extra configration to opengl.
my pc is ibm r40 with mobile radoen.
Please Help!!