With the code:

Code :

(tex2Darray pointing to a GLubyte array of the right dimension 512*512*2 bytes)

glGetError() gives the value 0x500 "GL_INVALID_ENUM"

Is there a problem with arrays of 2D texture with GL_LUMINANCE8?

Perhaps should I use glTexStorage3D() and glTexSubImage3D()? But what should be the "internalformat" of the first and the "format" and "type" of the second to accept GL_LUMINANCE8 texture?

Cathy L.