Generating Texture Name

I’m having a problem with calling glGenTextures(). It seems that the texture name does not get changed by the call.
Could somebody please tell me why that would be?
Thanks,
WES.

Texture name is not string object. It is a GLuint. Example:

  
GLuint MyTexHandle;
...
// gen name for 1 texture
glGenTextures(1, &MyTexHandle);
glBindTexture(GL_TEXTURE_2D, MyTexHandle);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, m_Xres, m_Yres, 0, GL_RGB, GL_UNSIGNED_BYTE, m_Data);

yooyo

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.