I use “int data” as teture data ,but it don’t work why?
I modify the example program of red book checker.c
To change the GLubyte to int and modify the :
glTexImage2D(GL_TEXTURE_2D, 0, 3, checkImageWidth,
checkImageHeight, 0, GL_RGB, GL_INT,
&checkImage[0][0][0]);
If i understand you correctly:
GL_INT requires each pixel to be of 32-bit precision. You are probably using the same 8-bit texture, which might be causing problems.