OpenGL texture mapping

Started by
0 comments, last by SeanHowe 24 years ago
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.)

		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
Advertisement
Ahh.. nevermind, solved the problem with the help of some people on the gdnet irc channel

Bunnies At War - A new wave in bunnydom! http://users.moscow.com/rikhowe/baw/bunny.html

This topic is closed to new replies.

Advertisement