Class WritableArrayTexture
The engines abstraction for OpenGL's Array Texture.
Inheritance
Inherited Members
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public class WritableArrayTexture : IWritableArrayTexture, IWritableTexture, IExposedTexture, ITextureBase, IDisposable
Constructors
WritableArrayTexture(Int32, RenderTargetTextureTypes, ImagePixelFormat, Int32, Int32, Boolean, TextureFilterMode, TextureWrapMode, TextureCompareMode, Compare)
Creates a new instance of type "WritableArrayTexture".
Declaration
public WritableArrayTexture(int layers, RenderTargetTextureTypes texType, ImagePixelFormat colorFormat, int width, int height, bool generateMipMaps = true, TextureFilterMode filterMode = TextureFilterMode.NearestMipmapLinear, TextureWrapMode wrapMode = TextureWrapMode.Repeat, TextureCompareMode compareMode = TextureCompareMode.None, Compare compareFunc = Compare.Less)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | layers | The number of sub-textures in this array texture. |
RenderTargetTextureTypes | texType | Defines the type of the render texture. |
ImagePixelFormat | colorFormat | The color format of the texture, ImagePixelFormat |
System.Int32 | width | Width in px. |
System.Int32 | height | Height in px. |
System.Boolean | generateMipMaps | Defines if mipmaps are created. |
TextureFilterMode | filterMode | Defines the filter mode TextureFilterMode. |
TextureWrapMode | wrapMode | Defines the wrapping mode TextureWrapMode. |
TextureCompareMode | compareMode | The textures compare mode. If uncertain, leaf on NONE, this is only important for depth (shadow) textures (TextureCompareMode). |
Compare | compareFunc | The textures compare function. If uncertain, leaf on LEESS, this is only important for depth (shadow) textures and if the CompareMode isn't NONE (Compare) |
Properties
CompareFunc
Specifies the texture's comparison function, see Compare.
Declaration
public Compare CompareFunc { get; }
Property Value
Type | Description |
---|---|
Compare |
CompareMode
Specifies the texture's comparison mode, see TextureCompareMode.
Declaration
public TextureCompareMode CompareMode { get; }
Property Value
Type | Description |
---|---|
TextureCompareMode |
DoGenerateMipMaps
Specifies if mipmaps are created for this texture.
Declaration
public bool DoGenerateMipMaps { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
FilterMode
Specifies the texture's filter mode, see TextureWrapMode.
Declaration
public TextureFilterMode FilterMode { get; }
Property Value
Type | Description |
---|---|
TextureFilterMode |
Height
Height in pixels.
Declaration
public int Height { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Layers
The number of layers the array texture has.
Declaration
public int Layers { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PixelFormat
PixelFormat provides additional information about pixel encoding.
Declaration
public ImagePixelFormat PixelFormat { get; }
Property Value
Type | Description |
---|---|
ImagePixelFormat |
SessionUniqueIdentifier
SessionUniqueIdentifier is used to verify a Textures's uniqueness in the current session.
Declaration
public Suid SessionUniqueIdentifier { get; }
Property Value
Type | Description |
---|---|
Suid |
TextureHandle
Opaque handle to the texture object on the gpu.
Declaration
public ITextureHandle TextureHandle { get; }
Property Value
Type | Description |
---|---|
ITextureHandle |
TextureType
Type of the render texture, RenderTargetTextureTypes.
Declaration
public RenderTargetTextureTypes TextureType { get; }
Property Value
Type | Description |
---|---|
RenderTargetTextureTypes |
Width
Width in pixels.
Declaration
public int Width { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
WrapMode
Specifies the texture's wrap mode, see TextureWrapMode.
Declaration
public TextureWrapMode WrapMode { get; }
Property Value
Type | Description |
---|---|
TextureWrapMode |
Methods
Dispose()
Fire dispose mesh event
Declaration
public void Dispose()
Dispose(Boolean)
Fire dispose mesh event
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Finalize()
Destructor calls Dispose(Boolean) in order to fire TextureChanged event.
Declaration
protected void Finalize()
Events
TextureChanged
TextureChanged event notifies observing TextureManager about property changes and the Texture's disposal.
Declaration
public event EventHandler<TextureEventArgs> TextureChanged
Event Type
Type | Description |
---|---|
System.EventHandler<TextureEventArgs> |