I am programming a 2D Game Engine, I am using OpenGL (pure, I am not using glut or any other).
If I print this macro: MAX_TEXTURE_UNITS I get 8, and obviously, when I try to bind more than 8 textures, nothing appear in the render area. I was wondering if it is possible to link more than 8 textures?
The function I use to bind a texture is glBindTexture(GL_TEXTURE_2D, texID)
.
GL_MAX_TEXTURE_UNITS
gives the maximum number of multi-texturing texture units using the old fixed function pipeline. If you are looking to get the maximum number of texture units usable on shaders (Eg samplers
), call glGetIntegerv
with GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
or GL_MAX_TEXTURE_IMAGE_UNITS
. The last one is the preferred value for OpenGL version 3+ and must be at least 16.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.