1

I am trying to make a cube and texture each of it's sides differently. After a bit of research I found out that texture arrays are the way to go, but I have no idea how to implement them. I've seen https://www.khronos.org/opengl/wiki/Array_Texture , but that didn't help. Could someone explain texture arrays to me?

genpfault
  • 51,148
  • 11
  • 85
  • 139
User-92
  • 374
  • 3
  • 13
  • I realize now that the link is on array textures, not texture arrays. I still can't find anything on texture arrays. – User-92 Sep 14 '20 at 18:14
  • Anyway you should use array textures. Don't use texture sampler arrays. If you would use texture sampler arrays then you would have to use a different texture unit for each texture in the array. Hence you are limited to the number of texture units (in worst case the number is 8). If you use a [`GL_TEXTURE_2D_ARRAY`](https://www.khronos.org/opengl/wiki/Sampler_(GLSL)), then you can specify the parts by [`glTexSubImage3D`](https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glTexSubImage3D.xhtml) and you have to specify 3 dimensional texture coordinates. – Rabbid76 Sep 14 '20 at 18:32

0 Answers0