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;
}
Texture isnt working
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
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
--------------------------------------------------------
"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
Are you saving the image as a 8bit or 24 bit bmp, it should be 24.
And make shure your width and length is a power of two(1,2,4,8,16,32,64,128,256,512........).
And make shure your width and length is a power of two(1,2,4,8,16,32,64,128,256,512........).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement