• Advertisement

Archived

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

so damn irritated

This topic is 6050 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'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

Share this post


Link to post
Share on other sites
Advertisement
I think

AUX_RGBImage *Texture1, Texture2;


should be

AUX_RGBImage *Texture1, *Texture2;

Share this post


Link to post
Share on other sites
also using glaux is not recommended (by 5the authors) it has known memory leaks

Share this post


Link to post
Share on other sites

  • Advertisement