Interface IRenderTarget
Cross platform abstraction for the RenderTarget object. Use a RenderTarget if you want to render into buffer object, associated with one or more textures. If only a single texture is needed, the usage of a IWritableTexture as a render target is preferred.
Inherited Members
Namespace: Fusee.Engine.Common
Assembly: Fusee.Engine.Common.dll
Syntax
public interface IRenderTarget : IDisposable
Properties
DepthBufferHandle
The gpu handle that represents the depth render buffer object.
Declaration
IBufferHandle DepthBufferHandle { get; set; }
Property Value
Type | Description |
---|---|
IBufferHandle |
GBufferHandle
The gpu handle that represents the G-buffer object.
Declaration
IBufferHandle GBufferHandle { get; set; }
Property Value
Type | Description |
---|---|
IBufferHandle |
IsDepthOnly
Set this if the RenderTarget only contains a depth texture to prevent the creation of color buffers. Careful: it is better to use a IWritableTexture when rendering to a single texture!
Declaration
bool IsDepthOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RenderTextures
The array that holds all textures of the G-buffer.
Declaration
IWritableTexture[] RenderTextures { get; }
Property Value
Type | Description |
---|---|
IWritableTexture[] |
TextureResolution
The resolution of the render textures in px.
Declaration
TexRes TextureResolution { get; }
Property Value
Type | Description |
---|---|
TexRes |
Methods
SetAlbedoTex()
Generates a albedo and specular (alpha channel) texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetAlbedoTex()
SetDepthTex(TextureCompareMode, Compare)
Generates a depth texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetDepthTex(TextureCompareMode texCompareMode, Compare depthCompare)
Parameters
Type | Name | Description |
---|---|---|
TextureCompareMode | texCompareMode | |
Compare | depthCompare |
SetEmissiveTex()
Generates a emissive texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetEmissiveTex()
SetNormalTex()
Generates a normal texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetNormalTex()
SetPositionTex()
Generates a position texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetPositionTex()
SetSpecularTex()
Generates a specular texture and sets it at the correct position in the RenderTextures Array.
Declaration
void SetSpecularTex()
SetSubsurfaceTex()
Generates a texture containing subsurface color and strength and sets it at the correct position in the RenderTextures Array.
Declaration
void SetSubsurfaceTex()
SetTexture(IWritableTexture, RenderTargetTextureTypes)
Sets a RenderTexture into the correct position in the RenderTexture array.
Declaration
void SetTexture(IWritableTexture src, RenderTargetTextureTypes tex)
Parameters
Type | Name | Description |
---|---|---|
IWritableTexture | src | The source RenderTexture. |
RenderTargetTextureTypes | tex | The type of the texture. |
Events
DeleteBuffers
Event that deletes unmanaged buffer objects.
Declaration
event EventHandler<EventArgs> DeleteBuffers
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |