Click or drag to resize

RealtimeDisplayMode Class

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
SystemObject
  Rhino.RenderRealtimeDisplayMode

Namespace:  Rhino.Render
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public abstract class RealtimeDisplayMode

The RealtimeDisplayMode type exposes the following members.

Constructors
  NameDescription
Protected methodRealtimeDisplayMode
Initializes a new instance of the RealtimeDisplayMode class
Top
Properties
  NameDescription
Public propertyLinearWorkflow
Returns the LinearWorkflow data for this realtime display mode.
Public propertyLocked
Public propertyMaxPasses
Public propertyPaused
Public propertyPostEffectsOn
Top
Methods
  NameDescription
Public methodCaptureProgress
Override to communicate the progress of a capture.
Public methodComputeViewportCrc
Compute viewport CRC for the given ViewInfo
Public methodCreateWorld
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 methodDrawOpenGl
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodStatic memberGetRealtimeViewport(IntPtr)
Retrieve RealtimeDisplayMode instance that the IntPtr refers to.
Public methodStatic memberGetRealtimeViewport(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 methodGetRenderSize
Get the current render resolution for the running render session.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetView
Get ViewInfo that has been registered with this RealtimeDisplayMode instance.
Public methodHudAllowEditMaxPasses
Override to allow maximum pass editing. By default disabled.
Public methodHudCustomStatusText
Override to display status of the render engine.
Public methodHudLastRenderedPass
Override to communicate the last completed pass. Can be shown in the HUD
Public methodHudMaximumPasses
Override to communicate the maximum passes count currently in use for the render session. Can be shown in the HUD
Public methodHudProductName
Override to return the name of your product. This will be printed in the HUD.
Public methodHudRendererLocked
Implement to support locking in the viewport
Public methodHudRendererPaused
Implement to support pausing and resuming in the viewport
Public methodHudShow
Override if you want to hide the HUD. Shown by default
Public methodHudShowControls
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 methodHudShowCustomStatusText
Override to show status text in HUD. By default disabled.
Public methodHudShowMaxPasses
Override to show maximum passes in HUD. By default disabled.
Public methodHudShowPasses
Override to show current pass in HUD. By default disabled.
Public methodHudStartTime
Public methodIsCompleted
Implement to tell if your render engine has completed a frame for drawing into the viewport
Public methodIsFrameBufferAvailable
Implement to tell the render pipeline that a framebuffer is ready
Public methodIsRendererStarted
Override to tell the started state of your render engine.
Public methodLastRenderedPass
Implement to communicate last completed pass to the underlying system.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOnRenderSizeChanged
Override to restart your render engine
Public methodOpenGlVersion
Public methodPostConstruct
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 methodStatic memberRegisterDisplayModes(PlugIn)
Find and register classes that derive from RealtimeDisplayMode from the given plug-in.
Public methodStatic memberRegisterDisplayModes(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 methodStatic memberRemoveRealtimeViewport
Remove RealtimeDisplayMode instance from internal dictionary.
Public methodSetUseDrawOpenGl
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 methodSetView
Set ViewInfo for this RealtimeDisplayMode instance.
Public methodShowCaptureProgress
Override if you want to i.e. hide the progress dialog for capture progress.
Public methodShutdownRenderer
Override to shutdown your render engine
Public methodSignalRedraw
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 methodStartRenderer
Override to start your render engine. Note that before using the RenderWindow you *must* call SetSize to properly initialize the underlying DIB.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodStatic memberUnregisterDisplayModes(PlugIn)
Public methodStatic memberUnregisterDisplayModes(Assembly, Guid)
Public methodUseFastDraw
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.
Top
Events
  NameDescription
Public eventHudLockButtonDoubleClicked
Public eventHudLockButtonLeftClicked
Public eventHudLockButtonPressed Obsolete.
Listen tot his event if you want to handle the lock button control
Public eventHudLockButtonRightClicked
Public eventHudPauseButtonDoubleClicked
Public eventHudPauseButtonLeftClicked
Public eventHudPauseButtonPressed Obsolete.
Listen tot his event if you want to handle the pause button control
Public eventHudPauseButtonRightClicked
Public eventHudPlayButtonDoubleClicked
Public eventHudPlayButtonLeftClicked
Public eventHudPlayButtonPressed Obsolete.
Listen to this event if you want to handle the play button control.
Public eventHudPlayButtonRightClicked
Public eventHudPostEffectsOffButtonDoubleClicked
Public eventHudPostEffectsOffButtonLeftClicked
Public eventHudPostEffectsOffButtonRightClicked
Public eventHudPostEffectsOnButtonDoubleClicked
Public eventHudPostEffectsOnButtonLeftClicked
Public eventHudPostEffectsOnButtonRightClicked
Public eventHudProductNameDoubleClicked
Public eventHudProductNameLeftClicked
Public eventHudProductNamePressed Obsolete.
Listen tot his event if you want to handle a press on the product name component
Public eventHudProductNameRightClicked
Public eventHudStatusTextDoubleClicked
Public eventHudStatusTextLeftClicked
Public eventHudStatusTextPressed Obsolete.
Listen tot his event if you want to handle a press on the status text component
Public eventHudStatusTextRightClicked
Public eventHudTimeDoubleClicked
Public eventHudTimeLeftClicked
Public eventHudTimePressed Obsolete.
Listen tot his event if you want to handle a press press on the time component
Public eventHudTimeRightClicked
Public eventHudUnlockButtonDoubleClicked
Public eventHudUnlockButtonLeftClicked
Public eventHudUnlockButtonPressed Obsolete.
Listen tot his event if you want to handle the unlock button control
Public eventHudUnlockButtonRightClicked
Public eventMaxPassesChanged
Listen to this if you want to handle changes in maximum pass count through the HUD.
Public eventOnDisplayPipelineSettingsChanged
Public eventOnDrawMiddleground
Public eventOnInitFramebuffer
Top
See Also