1

Say I want a cube map array of 10 cube maps, each of 2048x2048 resolution and with only 1 mipmap level.

I am currently trying to initialize is as:

    glGenTextures(1, &shadowMapArray);

    glBindTexture(GL_TEXTURE_CUBE_MAP_ARRAY, shadowMapArray);
    glTexStorage3D(GL_TEXTURE_CUBE_MAP_ARRAY,1, GL_R8, 2048, 2048, 10);

Which returns a GL_INVALID_VALUE enumerator.

1 Answer 1

2

For cube map arrays, the depth is not the number of array layers. It is the number of layer-faces, which must be a multiple of 6. So if you want 10 cube map array layers, you ask for 60 layer faces.

Every OpenGL API that deals in cube map arrays takes layer-face indices/counts, not layers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.