I am now working on android system using opengl es 2.0. I know that in order to get the number of the maximum number of textures available in a fragment shader, I can try to get the value of GL_MAX_TEXTURE_IMAGE_UNITS. However, I found that the value of this constant is 34930. But I read from a book that only 8 textures can be used in a fragment shader. I am wondering what does the value of 34930 mean?
Asked
Active
Viewed 2,390 times
1 Answers
7
That value is just the integer value of the OpenGL enum GL_MAX_TEXTURE_IMAGE_UNITS. It's not the number of texture units available.
To get the number of available texture units, you have to use
int[] max = new int[1];
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, max, 0);

Tim
- 35,413
- 11
- 95
- 121