Jump to content

  • Log In with Google      Sign In   
  • Create Account


so damn irritated


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Metus   Members   -  Reputation: 168

Like
Likes
Like

Posted 01 August 2001 - 10:48 AM

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

Sponsor:

#2 terminate   Members   -  Reputation: 259

Like
Likes
Like

Posted 01 August 2001 - 01:46 PM

I think

AUX_RGBImage *Texture1, Texture2;


should be

AUX_RGBImage *Texture1, *Texture2;



#3 Kickpuncher   Members   -  Reputation: 361

Like
Likes
Like

Posted 01 August 2001 - 04:39 PM

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."

#4 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

Posted 01 August 2001 - 05:57 PM

also using glaux is not recommended (by 5the authors) it has known memory leaks




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS