Jump to content
  • Advertisement
Sign in to follow this  
Asem

OpenGL texID problem

This topic is 3690 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

[using opengl] I have a class that creates a texture. I generate the texID during a loadTex function. I create an array of 5 textures. the first 2 textures get a proper texID (though they are high numbers) while the rest of the 3 have the same texID of 0. I don't see why it would generate different texIDs for the first 2 textures but not for the rest? video: intel G33

class texBlock
{
   private:
     GLuint texID;

     ...
};

void texBlock::LoadTex(char *)
{
  ...

  glGenTextures(1, &texID);

  ...
}

void init()
{
 texBlock * arr = new texBlock[5];
 for(int i=0; i<5; i++)
   arr->LoadTex(str);

//when I print to console I get this for texIDs
t0: 157924868
t1: 157924868
t2: 0
t3: 0
t4: 0
 
}




Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!