Texture Arrays VRAM allocation

This topic contains 1 reply, has 2 voices, and was last updated by  PaulL 2 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #31999


    Can I change the number of layer in a 2D Texture Array during the lifetime of the object?
    Is the VRAM allocated when first creating a 2D Texture Array or when uploading each layer?



    No, you can’t make any changes to the number of layers. Think of it as a fixed-length array.

    Calling glTexStorage2D() essentially calls glTexImage2D() several times, albeit with null data. Memory is allocated at this point, but because the image data is empty, there is no upload operation.

    You can read more in-depth information on Khronos’s documentation: https://www.khronos.org/opengles/sdk/docs/man3/html/glTexStorage2D.xhtml

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.