if (texture!=NULL)
glBindTexture(GL_TEXTURE_2D, texture->texture);
for(i=0;i<3;i++)
{
if (texture==NULL)
glColor4f(v.r,v.g,v.b,v.a);
glTexCoord2f(v.u, v.v);
glVertex3f(v.x, v.y, v.z);
}
</pre> </i>
Bunnies At War - A new wave in bunnydom! http://users.moscow.com/rikhowe/baw/bunny.html
OpenGL texture mapping
Hi all. I''m having some troubles with OGL texture mapping. Mainly, it seems not to be displaying the texture on polygons I render. In this following code, ''texture'' is an instance of a class that has a member also named ''texture'' that is a GLuint and holds the texture number/id. ''v'' is an instance of a vertex class that holds color/texture/position info. Any ideas on why this isn''t working? (note, this is a member function, and, glBegin, etc, have been called b4 it''s called. It displays a triangle on the screen, it''s simply not textured.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement