PDA

View Full Version : Texture problem



Albert
09-22-2000, 12:56 AM
Hi,
I have set my texture in this way:
glBindTexture(GL_TEXTURE_2D, 6);

glPixelStorei(GL_UNPACK_ALIGNEMENT, 1);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_FLOAT, Image6);

The texture in the application result very dark although the image is good.

Could you help me ?

Nicolas Lelong
09-22-2000, 01:19 AM
How does it look if you set :

glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);

perhaps GL_MODULATE is responsible for the dark look of the textured object.

dans
09-22-2000, 05:02 AM
Use glColor3f(1.0,1.0,1.0) for your textured polygon, this way you can keep GL_MODULATE and have true texture color, if you want to make things darker fade your polys color from white to black and texture will fade to black along with it.

Ysaneya
09-23-2000, 02:19 AM
.. and make sure you have disabled lighting. If lighting is enabled, make sure your polygon is facing the light (else it'll be dark).

Y.