Jump to content
  • Advertisement

Archived

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

Vivanco

Beginner help: OpenGL Texture mapping

This topic is 5652 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 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]

Share this post


Link to post
Share on other sites
Advertisement
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-~-

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!