I want to use more than one textures but if I use glTexImage2D(…); to change the texture it is to slow!!!
How can I precreate the textures and how can I select them?
(Is there something with glGenTextures(); and glBindTexture(); ?)
I want to use more than one textures but if I use glTexImage2D(…); to change the texture it is to slow!!!
How can I precreate the textures and how can I select them?
(Is there something with glGenTextures(); and glBindTexture(); ?)
use glGenTextures to fill an array with ‘texture objects’ then bind a different texture to each element of the array. To select a texture you just use the array position that you bound it to.
And what function could I use to select the texture?
glBindTexture(GL_TEXTURE_2D, yourTextureList[YOURTEXTURE]);