DSA Cube Map Setup

Hi, since this is my first post / question, please don’t kill me right away.

The documentation of OpenGL is more than chaotic, at least for someone relativly new to the matter. Especially what is new and should be used and what is old. Even in this forum people still use functions of archaic age, which doesn’t make things easier.
I want to use only the newest schematics and functions of OpenGL 4.5 Core.
So the question is how to set up a Cube Map Texture via DSA (Direct State Access).

  1. glCreateTextures
  2. glTextureParameter (or bind to Sampler)
  3. glTextureSubImage3D (image data exits or data may be changed later; mutable texture; mostly for shader read) or glTexStorage3D (no image data available at any time; immutable texture; mostly for shader write)
    optional 4. glGenerateTextureMipmap
    Right? :dejection:

But since glTextureImage3D or something similar does not exist yet, how do you set the internal format of a mutable cube map texture? (in glTextureSubImage3D you only specify the data format, not the internal data)
Can you give an example? This depth array layer stuff is quite weird and uses parameters and functions like a maniac.

You don’t.

ARB_DSA does not allow you to create mutable textures of any kind. 2D, 3D, Cubemap, arrays, nothing. The only way to use DSA to create storage for textures is with glTextureStorage*D. And that creates immutable storage.

Think of it as a big sign from the ARB saying, “Stop using mutable textures!”

Also:

glTextureSubImage3D (image data exits or data may be changed later; mutable texture; mostly for shader read)

This does not create mutable storage. It modifies existing storage.

Ok, so I do

  1. glCreateTextures
  2. glTextureParameter (or bind to Sampler)
  3. [STRIKE]glTextureStorage3D[/STRIKE] glTextureStorage2D
  4. glTextureSubImage3D (don’t pass NULL as pixel data pointer while not using a Buffer-based Texture)
    optional 4. glGenerateTextureMipmap

to setup a cube map texture?

Is there any kind of Website out there that consistently describes how to do things in OpenGL 4.5? (practical / example based)
Theory is no real help in the “real world” in many cases.