DarkBASIC Professional Help File

DX11 CREATE CUBEMAP ARRAY FROM ARRAY

Creates an array of cubemaps. It can be treated as a texture array where every group of 6 images make up a separate cubemap, but can also be accessed as a
TextureCubeArray on the GPU (shader) side.
The specified subset of the provided array must consist of a even multiple of 6 images, which in turn are ordered like so:

East, West, Up, Down, North, South.

If the array contains merely 6 images, a single cubemap will be created and returned instead of an array.
Note that cubemap arrays are only supported by DXVERSION_10_1 and higher (ie. not by DXVERSION_10_0)!
*
Take note that in order to use an image from a cubemap array for rendering, you will have to write your own shader that makes use of a TextureCubeArray resource.
You cannot set a sub-image of a cubemap array as a "normal" Texture2D texture for an object or sprite.

Syntax

    Return Dword = DX11 CREATE CUBEMAP ARRAY FROM ARRAY(images(), [startIndex], [numElements], [accessMode])

Parameters

    images()

> Array
> A DWORD array containing references to the images whose pixel data to use to initialize the cubemap array. There may be null (zero) slots that will be initialized as blank images.

    [Optional] startIndex

> Dword
> You can optionally use this to start reading from the image array at another position than its beginning. Defaults to 0 for the first element.

    [Optional] numElements

> Dword
> You can also optionally set this to only read a set number of images from the input array. Defaults to zero which will use the entire array. Must be a multiple of 6 if not 0!

    [Optional] accessMode

> Dword
> Set to one of the ACCESSMODE_XXX constants. ACCESSMODE_DIRECT_CPUWRITABLE allows faster editing of the image from the CPU (but slower read times by the GPU), ACCESSMODE_GPUWRITABLE is needed to create a images that can be used as read/write resources in a shader.

Returns

The created cubemap array image.

See also

IMAGE Functions Menu
DX11 Function Categories