RealtimeDisplayMode
Base class for implementing real-time display modes in .NET. Pay special attention that in StartRenderer the RenderWindow.SetSize() function is called if the implementation relies on the RenderWindow to do the drawing to the viewport. If i.e. OpenGL is used to draw render results to the viewport then SetSize() doesn’t have to be called, nor should the implementation then access channels on the RenderWindow, as those then don’t exist. For OpenGL-based drawing the RenderWindow is used as a container for ViewInfo management, nothing else.
Inheritance Hierarchy
System.Object
Rhino.Render.RealtimeDisplayMode
Namespace: Rhino.Render
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
public abstract class RealtimeDisplayMode
The RealtimeDisplayMode type exposes the following members.
Constructors
Name
Description
Protected Method
RealtimeDisplayMode
Initializes a new instance of the RealtimeDisplayMode class
Properties
Name
Description
Public Property
LinearWorkflow
Returns the LinearWorkflow data for this realtime display mode.
Public Property
Locked
Public Property
MaxPasses
Public Property
Paused
Public Property
PostEffectsOn
Methods
Name
Description
Public Method
CaptureProgress
Override to communicate the progress of a capture.
Public Method
ComputeViewportCrc
Compute viewport CRC for the given ViewInfo
Public Method
CreateWorld
Implement if you need to handle the initial CreateWorld call initiated by the display pipeline system. Note that this is not the same as the CreateWorld call in Rhino.Render.ChangeQueue.ChangeQueue, although related.
Public Method
DrawOpenGl
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected Method
Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public Method
Static Member
GetRealtimeViewport(IntPtr)
Retrieve RealtimeDisplayMode instance that the IntPtr refers to.
Public Method
Static Member
GetRealtimeViewport(IntPtr, Boolean)
Retrieve RealtimeDisplayMode instance. If create is set to true then a new instance is created if not found, null is returned for false.
Public Method
GetRenderSize
Get the current render resolution for the running render session.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
GetView
Get ViewInfo that has been registered with this RealtimeDisplayMode instance.
Public Method
HudAllowEditMaxPasses
Override to allow maximum pass editing. By default disabled.
Public Method
HudCustomStatusText
Override to display status of the render engine.
Public Method
HudLastRenderedPass
Override to communicate the last completed pass. Can be shown in the HUD
Public Method
HudMaximumPasses
Override to communicate the maximum passes count currently in use for the render session. Can be shown in the HUD
Public Method
HudProductName
Override to return the name of your product. This will be printed in the HUD.
Public Method
HudRendererLocked
Implement to support locking in the viewport
Public Method
HudRendererPaused
Implement to support pausing and resuming in the viewport
Public Method
HudShow
Override if you want to hide the HUD. Shown by default
Public Method
HudShowControls
Show control buttons on the realtime display HUD. By default these are shown, override this function and return false if HUD controls aren’t needed.
Public Method
HudShowCustomStatusText
Override to show status text in HUD. By default disabled.
Public Method
HudShowMaxPasses
Override to show maximum passes in HUD. By default disabled.
Public Method
HudShowPasses
Override to show current pass in HUD. By default disabled.
Public Method
HudStartTime
Public Method
IsCompleted
Implement to tell if your render engine has completed a frame for drawing into the viewport
Public Method
IsFrameBufferAvailable
Implement to tell the render pipeline that a framebuffer is ready
Public Method
IsRendererStarted
Override to tell the started state of your render engine.
Public Method
LastRenderedPass
Implement to communicate last completed pass to the underlying system.
Protected Method
MemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public Method
OnRenderSizeChanged
Override to restart your render engine
Public Method
OpenGlVersion
Public Method
PostConstruct
Override PostConstruct if you need to initialize where the underlying RealtimeDisplayMode is available. The connection is made right after RealtimeDisplayMode has been instantiated, but just before PostConstruct is called. For instance finding out OpenGL information can be done in PostConstruct.
Public Method
Static Member
RegisterDisplayModes(PlugIn)
Find and register classes that derive from RealtimeDisplayMode from the given plug-in.
Public Method
Static Member
RegisterDisplayModes(Assembly, Guid)
Find and register classes that derive from RealtimeDisplayMode from the given plug-in. The plug-in is found in the given assembly
Public Method
Static Member
RemoveRealtimeViewport
Remove RealtimeDisplayMode instance from internal dictionary.
Public Method
SetUseDrawOpenGl
During run-time change whether to use OpenGL drawing of results or not. For instance offline rendering (viewcapture* with different resolution than viewport) could use RenderWindow instead of direct OpenGL drawing.
Public Method
SetView
Set ViewInfo for this RealtimeDisplayMode instance.
Public Method
ShowCaptureProgress
Override if you want to i.e. hide the progress dialog for capture progress.
Public Method
ShutdownRenderer
Override to shutdown your render engine
Public Method
SignalRedraw
Use to signal the underlying pipeline a redraw is wanted. This can be used for instance when a renderer has completed a pass which should be updated in the associated viewport.
Public Method
StartRenderer
Override to start your render engine. Note that before using the RenderWindow you *must* call SetSize to properly initialize the underlying DIB.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object.)
Public Method
Static Member
UnregisterDisplayModes(PlugIn)
Public Method
Static Member
UnregisterDisplayModes(Assembly, Guid)
Public Method
UseFastDraw
Implement and return true if you want the display pipeline to not wait for IsFramebufferAvailable during the MiddleGround draw phase. This will also tell the pipeline to draw a complete middleground pass in OpenGL.
Events
Name
Description
Public Event
HudLockButtonDoubleClicked
Public Event
HudLockButtonLeftClicked
Public Event
HudLockButtonPressed
Obsolete.
Listen tot his event if you want to handle the lock button control
Public Event
HudLockButtonRightClicked
Public Event
HudPauseButtonDoubleClicked
Public Event
HudPauseButtonLeftClicked
Public Event
HudPauseButtonPressed
Obsolete.
Listen tot his event if you want to handle the pause button control
Public Event
HudPauseButtonRightClicked
Public Event
HudPlayButtonDoubleClicked
Public Event
HudPlayButtonLeftClicked
Public Event
HudPlayButtonPressed
Obsolete.
Listen to this event if you want to handle the play button control.
Public Event
HudPlayButtonRightClicked
Public Event
HudPostEffectsOffButtonDoubleClicked
Public Event
HudPostEffectsOffButtonLeftClicked
Public Event
HudPostEffectsOffButtonRightClicked
Public Event
HudPostEffectsOnButtonDoubleClicked
Public Event
HudPostEffectsOnButtonLeftClicked
Public Event
HudPostEffectsOnButtonRightClicked
Public Event
HudProductNameDoubleClicked
Public Event
HudProductNameLeftClicked
Public Event
HudProductNamePressed
Obsolete.
Listen tot his event if you want to handle a press on the product name component
Public Event
HudProductNameRightClicked
Public Event
HudStatusTextDoubleClicked
Public Event
HudStatusTextLeftClicked
Public Event
HudStatusTextPressed
Obsolete.
Listen tot his event if you want to handle a press on the status text component
Public Event
HudStatusTextRightClicked
Public Event
HudTimeDoubleClicked
Public Event
HudTimeLeftClicked
Public Event
HudTimePressed
Obsolete.
Listen tot his event if you want to handle a press press on the time component
Public Event
HudTimeRightClicked
Public Event
HudUnlockButtonDoubleClicked
Public Event
HudUnlockButtonLeftClicked
Public Event
HudUnlockButtonPressed
Obsolete.
Listen tot his event if you want to handle the unlock button control
Public Event
HudUnlockButtonRightClicked
Public Event
MaxPassesChanged
Listen to this if you want to handle changes in maximum pass count through the HUD.
Public Event
OnDisplayPipelineSettingsChanged
Public Event
OnDrawMiddleground
Public Event
OnInitFramebuffer