Skip to main content
added 25 characters in body
Source Link

Apparently everything works if I use:

glTexImage3D(GL_TEXTURE_2D_ARRAY,
             0,
             eFormat,
             uiWidth, uiHeight,
             uiNumTexturesstatic_cast<uint32>(vPixelData.size()),
             0,
             eFormat,
             GL_UNSIGNED_BYTE,
             NULL);

instead of:

glTexStorage3D(GL_TEXTURE_2D_ARRAY,
                    1,                      // Number of mipmaps
                    eInternalFormat,        // Internal format
                    uiWidth, uiHeight,      // width, height
                    static_cast<uint32>(vPixelData.size()));

Apparently everything works if I use:

glTexImage3D(GL_TEXTURE_2D_ARRAY,
             0,
             eFormat,
             uiWidth, uiHeight,
             uiNumTextures,
             0,
             eFormat,
             GL_UNSIGNED_BYTE,
             NULL);

instead of:

glTexStorage3D(GL_TEXTURE_2D_ARRAY,
                    1,                      // Number of mipmaps
                    eInternalFormat,        // Internal format
                    uiWidth, uiHeight,      // width, height
                    static_cast<uint32>(vPixelData.size()));

Apparently everything works if I use:

glTexImage3D(GL_TEXTURE_2D_ARRAY,
             0,
             eFormat,
             uiWidth, uiHeight,
             static_cast<uint32>(vPixelData.size()),
             0,
             eFormat,
             GL_UNSIGNED_BYTE,
             NULL);

instead of:

glTexStorage3D(GL_TEXTURE_2D_ARRAY,
                    1,                      // Number of mipmaps
                    eInternalFormat,        // Internal format
                    uiWidth, uiHeight,      // width, height
                    static_cast<uint32>(vPixelData.size()));
Source Link

Apparently everything works if I use:

glTexImage3D(GL_TEXTURE_2D_ARRAY,
             0,
             eFormat,
             uiWidth, uiHeight,
             uiNumTextures,
             0,
             eFormat,
             GL_UNSIGNED_BYTE,
             NULL);

instead of:

glTexStorage3D(GL_TEXTURE_2D_ARRAY,
                    1,                      // Number of mipmaps
                    eInternalFormat,        // Internal format
                    uiWidth, uiHeight,      // width, height
                    static_cast<uint32>(vPixelData.size()));