• Advertisement

Archived

This topic is now archived and is closed to further replies.

why is my texture coloured ? (OGL)

This topic is 6350 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I`m trying to write a short demo in OpenGL that uses texture maps and normal solid colour polygons. But when I`ve set a colour using the color3f() command and then go to use a texture map - the colour tints the texture. I`ve tried setting the colour back to black (background colour) - but that just makes the entire texturemap black. Whats going on ??? Please help - Paul.

Share this post


Link to post
Share on other sites
Advertisement
Errr....wait up.

Are you just trying to display a texture map, on an object without any colours on the object.

If so then either remove the color3f() or change it to color3f(1.0, 1.0, 1.0).


IF you specify a colour with the object, it will tint the object and texturemaps that colour(i think).

Share this post


Link to post
Share on other sites
It sounds like your texture environment is set to GL_MODULATE. Try using GL_DECAL (is that right?) instead.

When you modulate, the texel is blended with the polygon colour, but in decal mode, it just overwrites it (or have I gone daft?... don''t answer that )

-------------
squirrels are a remarkable source of protein...

Share this post


Link to post
Share on other sites
Thanks for the help guys..

changing the colour to white seemed to do the trick !

While ive got your attention, how about this little problem (pretty please)

I`ve got a backdrop made up of a quad square with a texturemap on it far away in the background.

I`ve then got a ship that flys forward.. I`d like to add some fog making it look like its coming out of the dark space - BUT if I use the fog commands it hides the backdrop..

is there a way that I could use the fog but still have my backdrop showing ??

Edited by - pauljg on August 30, 2000 6:16:42 AM

Share this post


Link to post
Share on other sites
There''s probably a better way than this, but here goes:

Instead of using real fog. Start out with the space ship totaly translucent. Then, as it flies forward fade it in.

Share this post


Link to post
Share on other sites
disable writes to the depth buffer glDisable(GL_DEPTH_TEST) or glDepthMask(GL_FALSE); draw the background enable depthtesting again + draw eveything else

Share this post


Link to post
Share on other sites

  • Advertisement