V12Games

Member
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

100 Neutral

About V12Games

  • Rank
    Newbie
  1. Massive brain fade on my part...Was calling glBindTexture within glBegin/glEnd calls. Taking the calls outside fixed it. I'll post this for the benefit of any googlers/forum searchers who might find their way to this thread with similar problems...
  2. I am currently trying to incorporate the NeHe GLaux replacement code into a little game I'm working on, and I am wanting to load more than one texture. I am currently using the following (I won't reproduce the "NeHeLoadBitmap" function) code: In the opening declarations: GLuint texture[2]; In the OpenGL init function: if (!NeHeLoadBitmap("Data/img1.bmp", texture[0])) { return false; } if (!NeHeLoadBitmap("Data/img2.bmp", texture[1])) { return false; } Then in the display code, I am calling... glBindTexture(GL_TEXTURE_2D, texture[i]); ...whenever I want a certain texture to be applied to the subsequent triangles I draw, Where "i" is the ID of the texture created. However it is always the most recent texture to be loaded (via the NeHeLoadBitmap function) that is applied to every triangle I draw, regardless of what I do with the later glBindTexture calls. I am obviously missing something obvious and doing something wrong, I was wondering if anyone who has experience with the GLaux replacement code could point me in the right direction. Any assistance will be much appreciated, thanks.