ImageTextureLayered
Shared GPU texture implementation from matching layer images.
ImageTextureLayered supplies creation, updates and persistence for Texture2DArray, Cubemap and CubemapArray. Instantiate the required concrete type, prepare matching Images and call CreateFromImages. Resource kind determines whether images are array layers or cube faces.
Unlike ImageTexture3D, mipmaps live inside each Image here. UpdateLayer updates one existing position, while CreateFromImages can replace the complete layout. Editing either source CPU images or GetLayerData results does not itself upload pixels.
RGBA8 resources, per-layer mipmaps, independent readbacks, updates, layout replacement and binary reload were checked. Arbitrary formats, damaged data and memory limits were not checked.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Properties1
_ImagesProperty
public Reckfell.Collections.Array<Image> _Images { get; set; }Internal stored property. The getter reads one Image per layer including its mipmaps; the setter uses CreateFromImages. Prefer CreateFromImages, GetLayerData and UpdateLayer in ordinary code. Editing a returned Image does not automatically update the GPU. Do not interpret this array as separate mip levels.
Methods2
CreateFromImagesError
public Error CreateFromImages(Reckfell.Collections.Array<Image> images);Initializes or replaces all layers of a concrete Texture2DArray, Cubemap or CubemapArray. Supply a nonempty array of nonempty Images with matching dimensions, format and mipmap presence. Cubemap requires exactly 6 square images; CubemapArray requires a positive multiple of 6 square images. Each mipped Image already contains its chain: do not append separate mip images as new layers. Check Error and diagnostics. Valid replacement preserves the RID; the method does not promise automatic input repair.
| Name | Type | Default |
|---|---|---|
images | Reckfell.Collections.Array<Image> | — |
imagesNonempty Images with matching size/format and mipmaps; 6 faces per cubemap.
ErrorCreation Error; also inspect diagnostics.
UpdateLayervoid
public void UpdateLayer(Image image, int layer);Uploads a complete new Image into one existing layer. Dimensions, format and mipmap configuration must match the texture; index ranges from 0 through GetLayers() − 1. Other layers remain unchanged. This neither resizes nor appends a layer. No Error is returned; invalid input produces diagnostics. For CubemapArray use 6 × cube + face.
| Name | Type | Default |
|---|---|---|
image | Image | — |
layer | int | — |
imageNonempty Image matching existing layer dimensions, format and mipmaps.
layerLayer index from 0 through GetLayers() − 1; for cube arrays, 6 × cube index + face.