Jump to content
  • Advertisement

Archived

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

lecarlson

texture mapping

This topic is 5231 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

howcome my texture mapping code doesn''t work if I dont put color.. (im using multiple viewports) glLoadIdentity(); glBindTexture(GL_TEXTURE_2D, texture[0]); glColor3f(0.0f,1.0f,1.0f);<-----if I remove this I can''t see anything glBegin(GL_QUADS); glTexCoord2f(0.0f, 0.0f); glVertex2i(0,200); glTexCoord2f(1.0f, 0.0f); glVertex2i(200,200); glTexCoord2f(1.0f, 1.0f); glVertex2i(200,0); glTexCoord2f(0.0f, 1.0f); glVertex2i(0,0); glEnd();

Share this post


Link to post
Share on other sites
Advertisement
depends on the texture mode.

glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, _____);

if it is GL_MODULATE then the texture color is multiplied by the color (so 0,0,0 would never produce any output).

if it is GL_DECAL, then OGL should just paste the texture on without consulting the normal color.


lonesock

Piranha are people too.

Share this post


Link to post
Share on other sites
hmmm.. ok. but lesson 06 doesnt use glTexEnvi()... anyways.. where do I place this function..

Thanks for the reply.. just a newbie with ogl =)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!