Show / Hide Table of Contents

Class FuseeSceneToTexture

Inheritance
System.Object
FuseeSceneToTexture
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.ImGuiImp.Desktop.Templates
Assembly: Fusee.ImGuiImp.Desktop.dll
Syntax
public abstract class FuseeSceneToTexture

Constructors

FuseeSceneToTexture(RenderContext)

Generate a Fusee view which is rendered to a MSAA texture and can then be used with Attention: Call UpdateOriginalGameWindowDimensions(Int32, Int32) after every window resize, as this class alters the window dimensions via and restores the original window size afterwards. When the original size information is missing or invalid, the result are terrible - as expected

Declaration
public FuseeSceneToTexture(RenderContext rc)
Parameters
Type Name Description
RenderContext rc
Exceptions
Type Condition
System.Exception

Fields

_rc

Declaration
protected RenderContext _rc
Field Value
Type Description
RenderContext

Methods

Init()

Call this method when Init() is called

Declaration
public virtual void Init()

RenderAFrame()

This method is called from within RenderToTexture(Int32, Int32). Insert your usual render loop.

Declaration
protected virtual ITextureHandle RenderAFrame()
Returns
Type Description
ITextureHandle

RenderToTexture(Int32, Int32)

Generate Fusee output and render into texture

Declaration
public IntPtr RenderToTexture(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height
Returns
Type Description
System.IntPtr

IntPtr to texture to use with

Resize(Int32, Int32)

This method is called from within RenderToTexture(Int32, Int32). Insert your usual changes during resize, if necessary

Declaration
protected virtual void Resize(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height

Update(Boolean)

Call this method when Update() is called Insert your usual update methods (e. g. input, etc.)

Declaration
public virtual void Update(bool allowInput)
Parameters
Type Name Description
System.Boolean allowInput

UpdateOriginalGameWindowDimensions(Int32, Int32)

Update original game window dims so we can restore the viewport after rendering Fusee content Needs to be called after each window resize!

Declaration
public void UpdateOriginalGameWindowDimensions(int width, int height)
Parameters
Type Name Description
System.Int32 width
System.Int32 height
Generated by DocFX
GitHub Repo
Back to top