so damn irritated

Started by
2 comments, last by Metus 22 years, 8 months ago
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
Ethereal
Advertisement
I think

AUX_RGBImage *Texture1, Texture2;


should be

AUX_RGBImage *Texture1, *Texture2;

Those who dance are considered insane by those who cannot hear the music.
also, on the second quat u draw, you forgot glEnd();

Scott

Email
Website

"If you try and don''t succeed, destroy all evidence that you tried."
also using glaux is not recommended (by 5the authors) it has known memory leaks

This topic is closed to new replies.

Advertisement