Original Post
Hey, I've decided to make a Sonic game. But my background is getting weird, and I don't know why. I'm using mipmapping and the size of background is 511 x 249. Here's the loading code: Here's the code that makes the background: Here's the background that's loaded: Image And here's a pic of what's wrong with background: Image Thanks, Xano
if (TextureImage[0]=LoadBMP("Data/map/ghground.bmp"))
{
Status=TRUE; // Set The Status To TRUE
glGenTextures(1, &texture[1]); // Create The Texture
// Create MipMapped Texture
glBindTexture(GL_TEXTURE_2D, texture[1]);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); // ( NEW )
gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // ( NEW )
}
glBindTexture(GL_TEXTURE_2D, texture[0]);
glBegin(GL_QUADS);
// Front Face
glTexCoord2f(0.0f, 0.0f); glVertex3f(-100.0f, -1.5f, 1.5f);
glTexCoord2f(30.0f, 0.0f); glVertex3f( 100.0f, -1.5f, 1.5f);
glTexCoord2f(30.0f, 1.0f); glVertex3f( 100.0f, 1.5f, 1.5f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-100.0f, 1.5f, 1.5f);
glEnd();