Texture Loading

nobody wrote on Thursday, December 07, 2006:

Hi People,

Thanks in advance for any help…

When loading a texture…I do this

if(glfwLoadTexture2D("Image1.tga",GLFW_ORIGIN_UL_BIT)==GL_FALSE)

This is all well and good, but I want to load several textures and then use them at will using:

int MyTexture = 0;

MyTexture=glfwLoadTexture2D("Image1.tga",GLFW_ORIGIN_UL_BIT);
glBindTexture(GL_TEXTURE_2D, MyTexture);

The glfwLoadTexture2D does not return the texture int for this kind of use…or am I really wrong?

Thanks

Jason

elmindreda wrote on Thursday, December 07, 2006:

The GLFW texture functions operate on the currently bound texture. It’s up to you to create and bind the texture ID you wish them to use.