Show / Hide Table of Contents

Class WritableMultisampleTexture

Use writable textures if you want to render into a texture. Does NOT offer access to the pixel data.

Inheritance
System.Object
WritableMultisampleTexture
Implements
IWritableTexture
IExposedTexture
ITextureBase
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Fusee.Engine.Core
Assembly: Fusee.Engine.Core.dll
Syntax
public class WritableMultisampleTexture : IWritableTexture, IExposedTexture, ITextureBase, IDisposable

Constructors

WritableMultisampleTexture(RenderTargetTextureTypes, ImagePixelFormat, Int32, Int32, Int32, TextureFilterMode, TextureWrapMode, TextureCompareMode, Compare)

Creates a new instance of type "WritableTexture".

Declaration
public WritableMultisampleTexture(RenderTargetTextureTypes texType, ImagePixelFormat colorFormat, int width, int height, int multisampleFactor = 4, TextureFilterMode filterMode = TextureFilterMode.NearestMipmapLinear, TextureWrapMode wrapMode = TextureWrapMode.Repeat, TextureCompareMode compareMode = TextureCompareMode.None, Compare compareFunc = Compare.Less)
Parameters
Type Name Description
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.Int32 multisampleFactor

Define how many samples are being used to sample this texture, default: 4

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

InternalResultTexture

Renderable result texture.

Declaration
public WritableTexture InternalResultTexture { get; }
Property Value
Type Description
WritableTexture

InternalTextureHandle

Opaque handle to texture, this is the internal handle, which can be used. However this is not yet sampled to one result texture This is done after rendering by blitting the result into a new WritableTexture object. To use the ITextureHandle with any OpenGL Texture2d method one needs to use the TextureHandle!

Declaration
public ITextureHandle InternalTextureHandle { get; }
Property Value
Type Description
ITextureHandle

MultisampleFactor

How many samples are being used for multi-sampling

Declaration
public int MultisampleFactor { 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

Resulting ITextureHandle after blitting and sampling is finished Can be used as any other WritableTexture, the content is sampled and ready to go.

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

CreateAlbedoTex(Int32, Int32, Int32)

Convenience method, creates a new instance of type "WritableTexture".

Declaration
public static WritableMultisampleTexture CreateAlbedoTex(int width, int height, int multisampleFactor = 4)
Parameters
Type Name Description
System.Int32 width

Width in px.

System.Int32 height

Height in px.

System.Int32 multisampleFactor

Define how many samples are being used to sample this texture, default: 4

Returns
Type Description
WritableMultisampleTexture

Dispose()

Fire dispose texture event

Declaration
public void Dispose()

Dispose(Boolean)

Fire dispose texture event

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Finalize()

Destructor calls Dispose() 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>

Implements

IWritableTexture
IExposedTexture
ITextureBase
System.IDisposable
Generated by DocFX
GitHub Repo
Back to top