Advertisement

Beginner help: OpenGL Texture mapping

Started by March 30, 2003 08:58 PM
2 comments, last by Vivanco 21 years, 11 months ago
Hi all Recently just complete OpenGL tut 06 on NeHe site (Excellent site!!) I follow the tut to map a texture to a cube, I also had a pyamid in the same scene, but no texture on it just colors when I mapped the texture to the cube it came out fine but my pyamid was dark and barely visable, as if the texture had tried to map on that also? glBindTexture(GL_TEXTURE_2D, texture[0]); If I put the above line before the glBegin(GL_QUADS) shouldn't it only bind it to that quad? and not my pyramind which is drawn above the glBindTexture? Please clarify this me for Thanks Durr??....What i do now boss? [edited by - Vivanco on March 30, 2003 9:59:04 PM]
(o)..A Bee bit my bottom, now my bottom Big..(o)
Well, glbindtexture just sais which texture you are using. glen(or dis)able(GL_TEXTURE_2D) determines whether you are texturing or not. If you want to texture, you also need texture coordinates, which might explain a dark pyramid.

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-
Advertisement
Thanks for you reply

So does that mean that if in my InitGL() I have glEnable that all drawing done will be texture mapped and if I want to stop mapping I have to glDisable??

Thanks again

Durr??....What i do now boss?
(o)..A Bee bit my bottom, now my bottom Big..(o)
I think so

-~-The Cow of Darkness-~-
-~-The Cow of Darkness-~-

This topic is closed to new replies.

Advertisement