Archived

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

Texture isnt working

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

I cant map my texture for some reason, the one that came with the tutorial maps just fine though, is there something special that was done with this bitmap? Im trying to make my texture in MS Paint =P
int DrawGLScene(GLvoid)
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glLoadIdentity();

	glTranslatef( -29.4f, 20.7f, -50.0f);

	glBindTexture(GL_TEXTURE_2D, texture[0]);


	glBegin(GL_QUADS);
		glTexCoord2f(0.0f, 1.0f);		glVertex3f( 0.0f,  0.0f, 0.0f);		//TL
		glTexCoord2f(0.0f, 0.0f);		glVertex3f( 0.0f, -41.4f, 0.0f);	//BL
		glTexCoord2f(1.0f, 0.0f);		glVertex3f( 60.0f,-41.4f, 0.0f);	//BR
		glTexCoord2f(1.0f, 1.0f);		glVertex3f( 60.0f, 0.0f, 0.0f);		//TR
	glEnd();

	return true;
} 

Share this post


Link to post
Share on other sites
Have you enabled 2D texture mapping using glEnable(GL_TEXTURE_2D)?

--------------------------------------------------------

"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"

Corrail
corrail@gmx.at
ICQ#59184081

Share this post


Link to post
Share on other sites