reckfellENGINE

TextureLayered

Base contract for 2D-layer arrays and cube maps.

On this page
class TextureLayeredReckfellSharpInherits Texture

TextureLayered groups dimension, format and data queries for Texture2DArray, Cubemap and CubemapArray. It is not Texture3D: layers do not form a continuous depth coordinate. Filtering within a layer or between mip levels does not imply blending adjacent layers.

GetLayers counts images/faces; GetLayerData reads one layer. Cube-map count is GetLayers()/6 for cube arrays. Create ordinary resources through a concrete subclass and CreateFromImages; underscored hooks serve custom implementations.

Native custom-subclass queries and concrete resource operations were checked in Windows Forward+/Vulkan. This does not establish every backend supports all types or arbitrary custom sampler correctness.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

TextureLayeredConstructor
# TextureLayered
C#
public TextureLayered();

Creates a base resource without uploaded layers. Normally instantiate Texture2DArray, Cubemap or CubemapArray and call CreateFromImages. A custom subclass must consistently supply type, dimensions, format and layer data.

Methods14

GetFormatImage.Format
# GetFormat
C#
public Image.Format GetFormat();

Returns the implementation common Image.Format for layers. Base Max without a provider is not a usable image format. Readback layers are not necessarily RGBA8.

Returns Image.Format

Common layer-image format.

GetHeightint
# GetHeight
C#
public int GetHeight();

Returns one layer base-level height; for a cubemap this is a square face height.

Returns int

One layer height in texels.

GetLayerDataImage
# GetLayerData
C#
public Image GetLayerData(int layer);

Reads one zero-based layer. Concrete ImageTextureLayered resources return a separate Image from GPU data; editing it does not update the texture, so use UpdateLayer. The Image includes its own mip chain when present. Readback can be costly; avoid unnecessary per-frame reads. A CubemapArray face index is 6 × cube index + face index.

Parameters
NameTypeDefault
layerint—
layer

Layer index from 0 through GetLayers() − 1; for cube arrays, 6 × cube index + face.

Returns Image

Selected layer Image; check data availability before reading pixels.

GetLayeredTypeTextureLayered.LayeredType
# GetLayeredType
C#
public TextureLayered.LayeredType GetLayeredType();

Returns the resource kind: Type2DArray, Cubemap or CubemapArray. This classifies the texture; it is neither a RID nor Image.Format.

Returns TextureLayered.LayeredType

Resource kind from LayeredType.

GetLayersint
# GetLayers
C#
public int GetLayers();

Returns layer count. Cubemap has 6; CubemapArray reports face count, a multiple of 6, rather than cube count. Mipmap levels are not added to this count.

Returns int

Layer count, including all cubemap faces.

GetWidthint
# GetWidth
C#
public int GetWidth();

Returns one layer base-level width rather than the total width of all images or an imported sheet.

Returns int

One layer width in texels.

HasMipmapsbool
# HasMipmaps
C#
public bool HasMipmaps();

Returns whether layers have mipmaps. ImageTextureLayered stores the chain inside each Image, unlike separate Texture3D mip slices. The flag does not generate missing levels.

Returns bool

Whether layers have mip chains according to the implementation.

_GetFormatImage.Format
# _GetFormat
C#
public virtual Image.Format _GetFormat();

Override for a custom TextureLayered. Returns the implementation common Image.Format for layers. Base Max without a provider is not a usable image format. Readback layers are not necessarily RGBA8.

Returns Image.Format

Common layer-image format.

_GetHeightint
# _GetHeight
C#
public virtual int _GetHeight();

Override for a custom TextureLayered. Returns one layer base-level height; for a cubemap this is a square face height.

Returns int

One layer height in texels.

_GetLayerDataImage
# _GetLayerData
C#
public virtual Image _GetLayerData(int layerIndex);

Custom TextureLayered Image provider used by native GetLayerData. Keep data consistent with format, dimensions and mipmaps. Handle index bounds in the implementation; arbitrary subclasses need not behave identically to GPU-backed ImageTextureLayered.

Parameters
NameTypeDefault
layerIndexint—
layerIndex

Layer index for which the custom implementation supplies an Image.

Returns Image

Requested layer Image, consistent with resource metadata.

_GetLayeredTypeuint
# _GetLayeredType
C#
public virtual uint _GetLayeredType();

Custom TextureLayered resource-kind provider. The C# hook returns uint: use the numeric value of the corresponding TextureLayered.LayeredType. Returning it does not automatically allocate a GPU texture.

Returns uint

Numeric uint LayeredType value.

_GetLayersint
# _GetLayers
C#
public virtual int _GetLayers();

Override for a custom TextureLayered. Returns layer count. Cubemap has 6; CubemapArray reports face count, a multiple of 6, rather than cube count. Mipmap levels are not added to this count.

Returns int

Layer count, including all cubemap faces.

_GetWidthint
# _GetWidth
C#
public virtual int _GetWidth();

Override for a custom TextureLayered. Returns one layer base-level width rather than the total width of all images or an imported sheet.

Returns int

One layer width in texels.

_HasMipmapsbool
# _HasMipmaps
C#
public virtual bool _HasMipmaps();

Override for a custom TextureLayered. Returns whether layers have mipmaps. ImageTextureLayered stores the chain inside each Image, unlike separate Texture3D mip slices. The flag does not generate missing levels.

Returns bool

Whether layers have mip chains according to the implementation.

TextureLayered.LayeredType

ValueDescription
Cubemap = 1

Texture is a Cubemap, with each side in its own layer (6 in total).

CubemapArray = 2

Texture is a CubemapArray, with each cubemap being made of 6 layers.

Type2DArray = 0

Texture is a generic Texture2DArray.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.