so damn irritated
I've been trying to load multiple textures for about 6hrs with no success.
GLuint GLTexture1, GLTexture2;
AUX_RGBImage *Texture1, Texture2;
Texture1 = auxDIBImageLoad("Data/Texture1.bmp")
glGenTextures(1, &GLTexture1);
glTexImage(GL_TEXTURE_2D_, 0, 3, Texture1->sizeX, Texture1->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, Texture1->data);
Texture2 = auxDIBImageLoad("Data/Texture2.bmp")
glGenTextures(1, &GLTexture2);
glTexImage(GL_TEXTURE_2D_, 0, 3, Texture2->sizeX, Texture2->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, Texture2->data);
Is this correct? if then; here's the next code snippet:
glBindTexture(GL_TEXTURE_2D, Texture1);
GlBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, +1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, +1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, +1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, +1.0f);
glEnd();
glBindTexture(GL_TEXTURE_2D, Texture2);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 0.0f); glVertex3f( 1.0f, -1.0f, -1.0f);
glTexCoord2f(1.0f, 1.0f); glVertex3f( 1.0f, 1.0f, -1.0f);
glTexCoord2f(0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, -1.0f);
glDisable(GL_QUADS);
is this ok?
Someone GOT to help me with this, I don't wanna quit because of this..
Edited by - Metus on August 1, 2001 5:58:31 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement