DarkBASIC Professional Help File

DX11 CREATE IMAGE FROM PIXELMAP

Creates an image from the provided pixelmap. This lets you create / recreate your own general-purpose images with relative ease.
Since the pixel maps are locked to the standard 32-bit BGRA format, the created image will be too.

Syntax

    Return Dword = DX11 CREATE IMAGE FROM PIXELMAP(pixelmap, [generateMipMaps], [accessMode])

Parameters

    pixelmap

> Dword
> The pixelmap to create the image from.

    [Optional] generateMipMaps

> Boolean
> Set to true to generate mip maps for the created image. Defaults to false.

    [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 an image that can be used as a read/write resource in a shader.

Returns

The created image.

See also

IMAGE Functions Menu
DX11 Function Categories