Advertisement

texture mapping

Started by February 27, 2004 12:11 PM
1 comment, last by lecarlson 21 years ago
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();
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.
Advertisement
hmmm.. ok. but lesson 06 doesnt use glTexEnvi()... anyways.. where do I place this function..

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

This topic is closed to new replies.

Advertisement