Rhino C++ API  8.14
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
CRhinoDisplayEngine_OGL Class Reference

#include <RhinoSdkDisplayEngine_OGL.h>

Inheritance diagram for CRhinoDisplayEngine_OGL:
CRhinoDisplayEngine ON_Object

Public Member Functions

 CRhinoDisplayEngine_OGL ()
 
virtual ~CRhinoDisplayEngine_OGL ()
 
int ActiveStereoProjection () const override
 0 = left, 1 = right... More...
 
void AddLight (const ON_Light &) override
 
bool CanSaveDepthBuffer () override
 
bool CaptureFrame (const ON_Viewport &viewport) override
 
bool CaptureFrameTo (class CRhOpenGLTexture2D &)
 
void ClearDepthBuffer () override
 
void ClearFrameBuffer (const CRhinoDib *) override
 
void ClearFrameBuffer (const ON_Color &, const ON_Color &, const ON_Color &, const ON_Color &) override
 
void ClearTextureCache () override
 
bool CopyBackBufferFrom (const CRhinoDib &) override
 
bool CopyBackBufferTo (CRhinoDib &) override
 
bool CopyDepthBufferTo (CRhinoDib &, bool=false, bool=false, CRhinoDib *=nullptr) override
 
int DepthBufferBitDepth () override
 
int DepthMode ()
 
void Draw2dLines (const ON_2fPoint *points, int count, bool asPolyline, ON_Color strokeColor, float strokeWidth, RhinoDashStyle style, bool xormode) override
 
void DrawBitmap (const CRhinoDib &dib, int left, int top) override
 
void DrawBitmap (const CRhinoDib &dib, int left, int top, int width, int height)
 
void DrawBrepWires (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, CRhinoCacheHandle *cacheHandle) override
 
bool DrawCapturedFrame (const ON_Viewport &destination) override
 
bool DrawCombinedTextures (UINT nT1, UINT nT2, int nCOP, float Scale, ON_Color Color=ON_UNSET_COLOR)
 
void DrawCurve (const ON_Curve &curve, const class CRhinoDisplayPen &pen, CRhinoCacheHandle *cacheHandle) override
 
void DrawDot (const ON_TextDot &dot, bool locationInWorld, ON_Color fillColor, ON_Color textColor, ON_Color borderColor, CRhinoCacheHandle *cache) override
 
void DrawEnvironment () override
 
void DrawExtrusionWires (const ON_Extrusion &extrusion, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, CRhinoCacheHandle *cacheHandle) override
 
void DrawGroundPlane (const class CDisplayPipelineAttributes &dpa, const class CRhDisplayGroundPlane &groundplane) override
 
void DrawHatch (const ON_Hatch &hatch, const class CRhinoDisplayBrush *fillBrush, const class CRhinoDisplayPen *boundaryPen, CRhinoCacheHandle *cacheHandle) override
 
void DrawHatch (const ON_Hatch &hatch, const ON_HatchPattern *pattern, float strokeWidth, ON_Color hatchColor, ON_Color boundaryColor, CRhinoCacheHandle *cacheHandle) override
 
void DrawLines (const class CLinesDescriptor &) override
 
void DrawMeshes (const ON_Mesh **meshes, int count, bool wires, bool shaded, const CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle) override
 
void DrawMeshFaces (const ON_Mesh &mesh, const int *faces, int faceCount, const CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle) override
 
void DrawPointCloud (const ON_PointCloud &cloud, ERhinoPointStyle style, float pixelSize, bool scaleSizeForDpi, ON_Color colorOverride, int indexCount, const unsigned int *indices, CRhinoCacheHandle *cache, int degradeCount) override
 
void DrawPoints (int count, const class CRhPointData *points, CRhinoCacheHandle *) override
 
void DrawPolygon (const ON_3dPoint *points, int count, ON_Color color, bool bFilled) override
 
void DrawPolylines (const CRhinoClippingVertexCollection *lists, int count) override
 
void DrawRoundedRectangle (ON_2fPoint screenCenter, float pixelWidth, float pixelHeight, float cornerRadius, ON_Color strokeColor, float strokeWidth, ON_Color fillColor) override
 
void DrawString (const wchar_t *text, const ON_Color &textColor, const ON_2dPoint &point, bool middle, float fontHeightPixels, const ON_Font *font) override
 
void DrawString (const wchar_t *text, const ON_Xform &xf, const ON_Font *font, const ON_Color &color, ON::TextHorizontalAlignment horizontalAlignment, ON::TextVerticalAlignment verticalAlignment, CRhinoCacheHandle *cache) override
 
void DrawSubD (const class CRhinoSubDDisplay &subd_display, const class CRhinoSubDDisplayAttributes &subd_display_attributes) override
 
void DrawTraceImage (const class CRhTraceImage &traceimage) override
 
void DrawViewportAlignedImage (const class CRhOpenGLTexture &image, bool bProgramInUse)
 
void DrawViewportAlignedQuad (bool bProgramInUse)
 
void DrawWallpaper (const class CRhWallpaper &wallpaper) override
 
void EnableColorWriting (bool=true) override
 
void EnableDepthTesting (bool=true) override
 Depth-Buffered operations & attributes... More...
 
void EnableDepthWriting (bool=true) override
 
void EnableMeshBuffering (bool on) override
 "State" operations & attributes... More...
 
void EnableMultiSample (bool bEnable=true) override
 Enables / disables multisampling. More...
 
void EnableShadowMap (bool bEnable=true)
 
unsigned int ExecutionLevel () const
 
void FlushAll () override
 
int FrameBufferBitDepth () override
 
void FrameBufferChannelDepth (int &, int &, int &, int &) override
 
bool GetBackBuffer (CRhinoDib &) override
 
const class CRhFrameCapture * GetCapturedFrame () const override
 
bool GetDepthBuffer (float *buffer, int left, int top, int width, int height) override
 
class CRhDisplayEnginePrivate_OGLGetEngineGlPrivate ()
 
class CRhOpenGLRenderer * GetFrameBufferObject ()
 
void GetGlCameraToClip (float m[16], const ON_Xform *extra) const
 
void GetGlCameraToClipInverse (float m[16], const ON_Xform *extra) const
 
void GetGlClipToScreen (float m[16]) const
 
void GetGlScreenToClip (float m[16]) const
 
void GetGlWorldToCamera (float m[16], bool includeModelTransform, const ON_Xform *extra) const
 
void GetGlWorldToCameraInverse (float m[16], bool includeModelTransform, const ON_Xform *extra) const
 
void GetGlWorldToClip (float m[16], bool includeModelTransform, const ON_Xform *extra) const
 
void GetGlWorldToClipInverse (float m[16], bool includeModelTransform, const ON_Xform *extra) const
 
int GetMultiSampleMode () const override
 
void GetMultiSampleModes (ON_SimpleArray< int > &) const override
 
bool GetOffscreenBufferInfo (HDC dc, int &, int &) override
 
HGLRC GetRenderingContext () const
 
bool HasDepthBuffer () override
 Engine buffers support... More...
 
void InvalidateCapturedFrame () override
 Caching operations... More...
 
bool IsAccelerated () const override
 
bool IsPreview (void) const
 
bool IsShadowMapEnabled ()
 
const CDisplayPipelineAttributes::LinearWorkflowLinearWorkflow () const
 
int MaxClipPlanesSupported () const override
 
int MaxDecalsSupported () const override
 
int MaxLightsSupported () const override
 
int MaxObjectMappingsSupported () const override
 
int MaxTextureCoords () const
 
int MaxTextureSize () const
 
int MaxTextureUnits () const
 
bool MeshBufferingEnabled () const override
 
bool PostProcessFrameBuffer ()
 
ON_UUID PreviewEnvironmentId (void) const
 
void ProcessLinearWorkflow (const class CRhOpenGLTexture &image, const float gammaExponent)
 
int RenderPass () const
 
bool ResetEngine () override
 
bool RestoreBackBuffer () override
 
bool RestoreDepthBuffer () override
 
bool SaveBackBuffer () override
 
bool SaveDepthBuffer () override
 
ECullFaceMode SetCullFaceMode (ECullFaceMode mode) override
 
int SetDepthMode (int) override
 
void SetIsPreview (bool)
 
void SetLinearWorkflow (const CDisplayPipelineAttributes::LinearWorkflow &lw)
 Linear workflow support. More...
 
bool SetMultiSampleMode (int) override
 
void SetPreviewEnvironmentId (ON_UUID)
 
bool SetStereoMode (bool) override
 
void SetTextureCoords (int nTex, int stride, const void *) const
 
bool ShowBackBuffer (HDC dc) override
 
void ShutdownEngine () override
 
bool StartEngine () override
 Engine initialization and cleanup operations... More...
 
bool StopEngine () override
 
bool SupportsMultiSampling () const override
 
bool SupportsShading () const override
 
bool SupportsStencilBuffer () const
 
void TransformShadowMatrix (bool bTransform)
 
void UseHardwareModes (bool=true)
 Specific OpenGL hardware information. More...
 
- Public Member Functions inherited from CRhinoDisplayEngine
 CRhinoDisplayEngine ()
 
virtual ~CRhinoDisplayEngine ()
 
const ON_XformCameraToClip () const
 
const ON_XformCameraToClipInverse () const
 
virtual void ClearClipPlanes ()
 
void ClearFrameBuffer (const ON_Color &color)
 
void ClearFrameBuffer (const ON_Color &colorTop, const ON_Color &colorBottom)
 
virtual void ClearLights ()
 
const ON_SimpleArray< ON_ClippingPlaneInfo > & ClippingPlanes () const
 
ON_2dPoint ClippingToScreenPoint (const ON_4dPoint &point) const
 
int ClipPlaneCount () const
 
virtual bool CopyBackBufferFrom (HDC pDC)
 
virtual bool CopyBackBufferTo (HDC hDC)
 
virtual bool CopyDepthToBackBuffer ()
 
virtual int CreateClipRegion (const ON_Curve &boundary)
 
ECullFaceMode CullFaceMode () const
 
virtual void DestroyClipRegion (int region_id)
 
void DisableCoplanarClippingPlanes (const CRhinoObject *pRhinoObject, ON_SimpleArray< int > &planes_disabled)
 
void DisableCoplanarClippingPlanes (const ON_Plane &plane, ON_SimpleArray< int > &planes_disabled)
 
const CDisplayPipelineAttributesDisplayAttrs () const
 
float DpiScale () const
 
virtual void DrawBezier (int dim, BOOL32 bIsRational, int order, int cv_stride, const double *cv4d, const CRhCurveAttributes &attrs)
 
void DrawBrepWires (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, const class CRhDisplayPenPrivate *pen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawConstructionPlane (const ON_3dmConstructionPlane &plane, bool bShowGrid, bool bShowGridAxes, bool bShowZAxis, const ON_Color &grid_thin_color, const ON_Color &grid_thick_color, const ON_Color &grid_xaxis_color, const ON_Color &grid_yaxis_color, const ON_Color &grid_zaxis_color, int grid_thick_line_size, int grid_axis_line_size, int axes_percentage=100, bool bForceBackground=false)
 
void DrawExtrusionWires (const ON_Extrusion &extrusion, const class CDisplayPipelineAttributes *da, int wireDensity, bool edgeAnalysis, const class CRhDisplayPenPrivate *pen, CRhinoCacheHandle *cacheHandle)
 
void DrawHatch (const ON_Hatch &hatch, const class CRhinoDisplayBrush *fillBrush, const class CRhinoDisplayBrush *hatchBrush, const class CRhinoDisplayPen *boundaryPen, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawLine (const ON_3dPoint &from, const ON_3dPoint &to, const ON_Color &color, int thickness, UINT pattern=0xFFFFFFFF)
 
void DrawLineNoClip (const ON_3dPoint &from, const ON_3dPoint &to, const ON_Color &color, float thickness)
 
void DrawMesh (const ON_Mesh &mesh, bool wires, bool shaded, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawMeshes (const ON_Mesh **meshes, int count, bool wires, bool shaded, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
void DrawMeshFace (const ON_Mesh &mesh, int faceIndex, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawMeshFaces (const ON_Mesh &mesh, const int *faces, int faceCount, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
void DrawMeshFaces (const ON_Mesh &mesh, const ON_SimpleArray< int > &faces, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
void DrawPoints (int count, const class CRhPointData *points, const class CRhPointData *forcedOverride, CRhinoCacheHandle *cache, const ON_Xform *ffoTransform, bool precomputedTransform)
 
void DrawPoints (int count, const class CRhPointData *points, CRhinoCacheHandle *cache, const ON_Xform *ffoTransform, bool precomputedTransform)
 
virtual void DrawPoints (int count, const ON_2dPoint *screenPoints, ERhinoPointStyle style, const ON_Color &strokeColor, const ON_Color &fillColor, float diameterPixels, float strokeWidthPixels, float innerDiameterPixels, float rotationRadians, bool autoScaleDpi, CRhinoCacheHandle *cache)
 
virtual void DrawPoints (int count, const ON_3dPoint *points, ERhinoPointStyle style, const ON_Color &strokeColor, const ON_Color &fillColor, float diameter, float strokeWidth, float innerDiameter, float rotationRadians, bool diameterInPixels, bool autoScaleDpi, CRhinoCacheHandle *cache)
 
virtual void DrawPolylines (const class CLinesDescriptor &ld)
 
virtual void DrawPolylines (const class CRhinoClippingVertexCollection *lists, int count)=0
 
virtual void DrawShadedBrep (const ON_Brep *brep, const class CDisplayPipelineAttributes *da, CRhinoCacheHandle *cacheHandle)
 
virtual void DrawString (const ON_TextContent &text, const ON_Xform &textXform, ON_Color color, CRhinoCacheHandle *cache)
 
virtual void DrawSubD (const class ON_SubD &subd, const class CRhSubDDisplayAttributes *attrs, CRhinoCacheHandle *cacheHandle)
 Do not call - placeholder virtual function in order to improve SubD display without breaking SDK. More...
 
virtual void DrawSubDComponents (const class ON_SubD &subd, const class ON_SubDComponentPtr *components, size_t componentCount, const class CRhSubDDisplayAttributes *attrs, CRhinoCacheHandle *cacheHandle)
 Do not call - placeholder virtual function in order to improve SubD display without breaking SDK. More...
 
void DrawSubDWires (const CRhinoSubDDisplay &subd_display, const class CRhinoDisplayPen *boundaryPen, const class CRhinoDisplayPen *smoothInteriorPen, const class CRhinoDisplayPen *creaseInteriorPen, const class CRhinoDisplayPen *nonmanifoldPen)
 
void DrawTechnicalWires (const CRhinoObject &rhinoObject, const ON_Color &color, float borderThickness, float silhouetteThickness, float creaseThickness)
 
virtual void DrawTextRun (const ON_TextRun &run, const ON_Font *font, const ON_Xform &xform, ON_Color color, CRhinoCacheHandle *cache)
 
virtual void DrawWorldAxes (const ON_Color &xaxis_color, const ON_Color &yaxis_color, const ON_Color &zaxis_color, int axes_length, int label_offset, int letter_size)
 
virtual bool EnableClipPlanes (bool bEnable, int plane=-1)
 
void EnableMaterials (bool on)
 
void EnableShadows (bool)
 New for V8 [end]. More...
 
ON_3dPoint FrustumCenter () const
 
const CRhinoDocGeometrySource () const
 Return the document that the pipeline uses to get geometry information from when drawing. More...
 
void GetCurveAttributes (CRhCurveAttributes &attributes) const
 
ON_SimpleArray< ON_PlaneEquationGetEnabledClipPlanes (const ON_Xform *xf) const
 
void GetFarPlane (ON_Plane &) const
 
virtual const ON_LightGetLight (int index) const
 
ON_Xform GetModelViewMatrix () const
 
void GetNearFarPlane (ON_Plane &N, ON_Plane &F) const
 
void GetNearPlane (ON_Plane &) const
 
class CRhGLSceneManager * GetSceneManager (const CRhinoDoc *doc)
 
virtual double GetStereoParallax () const
 
virtual double GetStereoSeparation () const
 
const ON_XformInstanceDefinitionTransform () const
 
virtual bool InStereoMode () const
 
bool IsEntireBoxVisible (const ON_BoundingBox &bbox) const
 
bool IsPreview (void) const
 
virtual int LightCount () const
 
const CDisplayPipelineAttributes::LinearWorkflowLinearWorkflow () const
 
int MaxProceduralCommandsSupported () const
 
int MaxProceduralsSupported () const
 
int MaxProceduralTransformsSupported () const
 
const ON_XformModelTransform () const
 Model transform operations... More...
 
bool ModelTransformIsIdentity () const
 
virtual bool PopColorWriting ()
 
virtual void PopDepthTesting ()
 
virtual void PopDepthWriting ()
 
void PopModelTransform ()
 
void PopModelViewMatrix ()
 
void PopProjection ()
 
ON_UUID PreviewEnvironmentId (void) const
 
virtual void PushColorWriting (bool bEnable)
 
virtual void PushDepthTesting (bool bEnable)
 
virtual void PushDepthWriting (bool bEnable)
 
void PushModelTransform (const ON_Xform &mt)
 
void PushModelViewMatrix ()
 
void PushModelViewMatrix (const ON_Xform &xf)
 
void PushProjection (const ON_Viewport &viewport)
 
double ScreenLength (double world_length) const
 
const ON_XformScreenToClip () const
 
const ON_XformScreenToClipInverse () const
 
void SetCamera (const ON_Viewport &)
 
virtual int SetClippingPlanes (const ON_SimpleArray< ON_ClippingPlaneInfo > &clipplanes)
 
virtual int SetClipRegion (int region_id)
 
void SetCurveAttributes (const CRhCurveAttributes &attributes)
 
void SetDpiScale (float scale)
 
void SetInstanceDefinitionTransform (const ON_Xform &idt)
 
void SetIsPreview (bool)
 
void SetLinearWorkflow (const CDisplayPipelineAttributes::LinearWorkflow &lw)
 
void SetModelTransform (const ON_Xform &mt)
 
void SetModelViewMatrix (const ON_Xform &xf)
 
void SetPreviewEnvironmentId (ON_UUID id)
 
virtual void SetStereoParallax (float)
 
virtual void SetStereoSeparation (float fSep)
 
virtual int SetZBiasLevel (int zbias)
 
bool ShadowsEnabled (void) const
 
bool UseClipPlanes () const
 
bool UseMaterials ()
 
const ON_ViewportVP () const
 Generic engine attributes... More...
 
float WireDpiScale () const
 
const ON_XformWorldToCamera (bool includeModelXform=true) const
 
const ON_XformWorldToCameraInverse (bool includeModelXform=true) const
 
const ON_XformWorldToClip (bool includeModelXform=true) const
 world to screen transform = Viewport(world to clip)*m_ModelTransform More...
 
const ON_XformWorldToClipInverse (bool includeModelXform=true) const
 
ON_4dPoint WorldToClippingPoint (const ON_3dPoint &point) const
 
const ON_XformWorldToScreen (bool includeModelXform=true) const
 world to screen transform = Viewport(world to screen)*m_ModelTransform More...
 
const ON_XformWorldToScreenInverse (bool includeModelXform=true) const
 
ON_2dPoint WorldToScreenPoint (const ON_3dPoint &point) const
 
virtual int ZBiasLevel () const
 
- Public Member Functions inherited from ON_Object
 ON_Object () ON_NOEXCEPT
 
 ON_Object (const ON_Object &)
 
virtual ~ON_Object ()
 
virtual ON_AggregateComponentStatus AggregateComponentStatus () const
 
bool AttachUserData (class ON_UserData *pUserData)
 
unsigned int ClearAllComponentStates () const
 
virtual unsigned int ClearComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_clear) const
 
virtual unsigned int ClearComponentStates (ON_ComponentStatus states_to_clear) const
 
void CopyUserData (const ON_Object &source_object)
 
unsigned int CopyUserData (const ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution)
 
virtual ON__UINT32 DataCRC (ON__UINT32 current_remainder) const
 
virtual bool DeleteComponents (const ON_COMPONENT_INDEX *ci_list, size_t ci_count)
 
virtual void DestroyRuntimeCache (bool bDelete=true)
 
bool DetachUserData (class ON_UserData *pUserData)
 
virtual void Dump (ON_TextLog &) const
 
void EmergencyDestroy ()
 
class ON_UserDataFirstUserData () const
 
virtual unsigned int GetComponentsWithSetStates (ON_ComponentStatus states_filter, bool bAllEqualStates, ON_SimpleArray< ON_COMPONENT_INDEX > &components) const
 
class ON_UserDataGetUserData (const ON_UUID &userdata_uuid) const
 
bool GetUserString (const wchar_t *key, ON_wString &string_value) const
 
int GetUserStringKeys (ON_ClassArray< ON_wString > &user_string_keys) const
 
int GetUserStrings (ON_ClassArray< ON_UserString > &user_strings) const
 
bool IsCorrupt (bool bRepair, bool bSilentError, class ON_TextLog *text_log) const
 
bool IsKindOf (const ON_ClassId *pClassId) const
 
virtual bool IsValid (class ON_TextLog *text_log=nullptr) const
 
virtual void MarkAggregateComponentStatusAsNotCurrent () const
 
virtual void MemoryRelocate ()
 
virtual ON_UUID ModelObjectId () const
 
void MoveUserData (ON_Object &source_object)
 
unsigned int MoveUserData (ON_Object &source_object, ON_UUID source_userdata_item_id, ON_Object::UserDataConflictResolution userdata_conflict_resolution, bool bDeleteAllSourceItems)
 
virtual ON::object_type ObjectType () const
 
ON_Objectoperator= (const ON_Object &)
 
void PurgeUserData ()
 
virtual bool Read (ON_BinaryArchive &binary_archive)
 
virtual unsigned int SetComponentStates (ON_COMPONENT_INDEX component_index, ON_ComponentStatus states_to_set) const
 
virtual unsigned int SetComponentStatus (ON_COMPONENT_INDEX component_index, ON_ComponentStatus status_to_copy) const
 
bool SetUserString (const wchar_t *key, const wchar_t *string_value)
 
int SetUserStrings (int count, const ON_UserString *user_strings, bool bReplace)
 
virtual unsigned int SizeOf () const
 
bool ThisIsNullptr (bool bSilentError) const
 
void TransformUserData (const class ON_Xform &xform)
 
virtual bool UpdateReferencedComponents (const class ON_ComponentManifest &source_manifest, const class ON_ComponentManifest &destination_manifest, const class ON_ManifestMap &manifest_map)
 
int UserStringCount () const
 
virtual bool Write (ON_BinaryArchive &binary_archive) const
 

Static Public Member Functions

static unsigned int AvailableGLLevel (bool *coreProfile)
 
static bool MakeDefaultContextCurrent ()
 Activate the 'default' context. More...
 

Protected Member Functions

void BlendMap (int nTex, float fBlend)
 
void Defaults ()
 
void Destroy ()
 
bool DisableGLContext ()
 
void DisableTextures ()
 
bool EnableGLContext ()
 
void EnumMultiSampleModes (int)
 
void FlushCurveBuffer () override
 
void FlushMeshBuffer () override
 
void FlushPointBuffer () override
 
int GetClipPlanes (bool clippingCoordinates, ON_SimpleArray< ON_PlaneEquation > &planes) const
 
bool InitOpenGL ()
 
void NotifyClippingPlanesChanged () override
 
bool NotifyFrameSizeChanged (int nWidth, int nHeight) override
 
bool NotifyProjectionChanged () override
 Notifier routines called by the pipeline framework... More...
 
void SetupGLMatrices (bool model, bool projection)
 
void SetupMaterial (const CDisplayAttributeMaterial &material)
 
void SetupMaterial (int cullFaceMode, const CDisplayPipelineAttributes *da)
 
bool SetupPixelFormat ()
 
void SetupTexture (UINT nId, UINT nTarget, ON_Texture &)
 
void Shutdown ()
 
void ValidateFBO ()
 
- Protected Member Functions inherited from CRhinoDisplayEngine
void BufferMeshWires (CRhinoCacheHandle &cache, const CDisplayPipelineAttributes &da, const ON_Xform *xform, bool isSubD, const CRhinoSubDDisplayAttributes *subdAttrs)
 
void BufferShadedMesh (CRhinoCacheHandle &cache, const ON_Xform *xform)
 
void BufferShadedMesh (CRhinoCacheHandle &cache, ECullFaceMode cfm, const ON_Color &frontAmbient, const ON_Color &frontDiffuse, const std::shared_ptr< CDisplayPipelineMaterial > &material, const ON_SHA1_Hash &materialHash, const ON_Xform *xform)
 
void BufferShadedMeshes (class CRhVboMeshCache *buffer)
 
void ComputeZBiasValues (int bias, double &a, double &b, double &c, double &d, bool &use_d) const
 
void DrawBezier (int, const ON_4fPoint *, const CRhCurveAttributes &, int=1, int=0)
 
void DrawConstructionPlaneFarLines (ON_SimpleArray< ON_Line > &far_lines)
 
void DrawConstructionPlaneLine (const ON_Plane &near_plane, const ON_3dPoint &p, const ON_3dPoint &q, ON_SimpleArray< ON_Line > &far_lines)
 
HDC GetRenderTargetDC () const
 
void iShutdownEngine ()
 
void Line (const ON_4fPoint &start, const ON_4fPoint &end)
 
void LineTo (const ON_4fPoint &)
 clipping coordinate point More...
 
void MoveTo (const ON_4fPoint &)
 clipping coordinate point More...
 
void MoveToLineTo (const ON_4fPoint &start, const ON_4fPoint &end)
 
virtual void SetRenderTarget (HDC pDC, bool bShutDown)
 
virtual void SetRenderTarget (HWND hWnd)
 
void SetScreenDrawTolerance (double, double, double)
 
bool SupportsVboBuffers () const
 New for V8 [begin]. More...
 
double ZBiasDistance (double z, double w) const
 

Protected Attributes

bool m_bTransformShadowMatrix
 
UINT m_nTextureUnit
 
- Protected Attributes inherited from CRhinoDisplayEngine
double m__zbias_a = 0
 (near+far) More...
 
double m__zbias_b = 0
 (far-near) More...
 
double m__zbias_c = 0
 m__zbias_d*‍/(4*near*far) More...
 
double m__zbias_d = 0
 parallel proj bias or 0 for no zbias More...
 
bool m__zbias_use_d = true
 true to return constance bias More...
 
bool m_bInfiniteDepth = false
 
bool m_bInStereoMode = false
 Stereo viewing operations... More...
 
bool m_bUseMaterials = true
 
ON_Viewport m_Camera
 
ON_ClassArray< ON_Viewportm_CameraStack
 
float m_cliptol_x = 0.01f
 
float m_cliptol_y = 0.01f
 
float m_cliptol_z = 0.01f
 tolerance in clipping coordinates More...
 
CRhCurveAttributes m_curve_attrs
 
ON_SimpleArray< bool > m_depth_testing_stack
 
ON_SimpleArray< bool > m_depth_writing_stack
 
CRhinoDisplayPipelinem_dp = nullptr
 
float m_dpi_scale = 1.0f
 scaling for high resolution displays More...
 
int m_draw_speed = 0
 0 = accurate, 1 = fast, 2 = really More...
 
float m_fStereoParallax = 1.0f
 
float m_fStereoSeparation = 1.0f
 
HDC m_hDC = nullptr
 Device Context handle render target. More...
 
HWND m_hWnd = nullptr
 Engine display and drawing attributes... More...
 
ON_SimpleArray< ON_Xformm_modelview_matrix_stack
 
ON_SimpleArray< ON_Xformm_ModelXformStack
 
int m_nDisplayHeight = 0
 
int m_nDisplayWidth = 0
 Viewport size attributes... More...
 
class CRhDisplayEnginePrivatem_private = nullptr
 
float m_stol_x = 0.75f
 
float m_stol_y = 0.75f
 
float m_stol_z = 1.00f
 screen buffer drawing tolerances More...
 
int m_wire_depth = 0
 

Friends

class CRhDisplayEnginePrivate_OGL
 
class CRhEngine_GL11
 
class CRhEngine_GL21
 
class CRhEngine_GL33
 
class CRhEngine_GL40
 
class CRhinoDisplayPipeline
 
class CRhOglEngineExtension
 
class CRhResourceManager_OGL
 

Additional Inherited Members

- Public Types inherited from ON_Object
enum  UserDataConflictResolution : unsigned char {
  UserDataConflictResolution::destination_object = 0, UserDataConflictResolution::source_object = 1, UserDataConflictResolution::source_copycount_gt = 2, UserDataConflictResolution::source_copycount_ge = 3,
  UserDataConflictResolution::destination_copycount_gt = 4, UserDataConflictResolution::destination_copycount_ge = 5, UserDataConflictResolution::delete_item = 6
}
 

Detailed Description

Copyright (c) 1993-2021 Robert McNeel & Associates. All rights reserved. Rhinoceros is a registered trademark of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete Rhino SDK copyright information see http://www.rhino3d.com/developer. OpenGL engine class...

Constructor & Destructor Documentation

◆ CRhinoDisplayEngine_OGL()

CRhinoDisplayEngine_OGL::CRhinoDisplayEngine_OGL ( )

◆ ~CRhinoDisplayEngine_OGL()

virtual CRhinoDisplayEngine_OGL::~CRhinoDisplayEngine_OGL ( )
virtual

Member Function Documentation

◆ ActiveStereoProjection()

int CRhinoDisplayEngine_OGL::ActiveStereoProjection ( ) const
overridevirtual

0 = left, 1 = right...

Reimplemented from CRhinoDisplayEngine.

◆ AddLight()

void CRhinoDisplayEngine_OGL::AddLight ( const ON_Light light)
overridevirtual

Description: Add a light to the list of lights that the engine should use when displaying shaded geometry. Parameters: light: [in] the light information the engine should use to set up an graphics technology specific light

Reimplemented from CRhinoDisplayEngine.

◆ AvailableGLLevel()

static unsigned int CRhinoDisplayEngine_OGL::AvailableGLLevel ( bool *  coreProfile)
static

Return the available OpenGL level for the current instance of Rhino The level is returned as major*10+minor, so OpenGL 4.5 would return 45 Parameters: coreProfile: is set to true if operating in core profile mode

◆ BlendMap()

void CRhinoDisplayEngine_OGL::BlendMap ( int  nTex,
float  fBlend 
)
protected

◆ CanSaveDepthBuffer()

bool CRhinoDisplayEngine_OGL::CanSaveDepthBuffer ( )
overridevirtual

Returns: true if this engine can save depth buffer information

Reimplemented from CRhinoDisplayEngine.

◆ CaptureFrame()

bool CRhinoDisplayEngine_OGL::CaptureFrame ( const ON_Viewport viewport)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ CaptureFrameTo()

bool CRhinoDisplayEngine_OGL::CaptureFrameTo ( class CRhOpenGLTexture2D &  )

◆ ClearDepthBuffer()

void CRhinoDisplayEngine_OGL::ClearDepthBuffer ( )
overridevirtual

Description: Clear the depth buffer for this engine. If the engine does not support depth buffered drawing, then nothing is done.

Reimplemented from CRhinoDisplayEngine.

◆ ClearFrameBuffer() [1/2]

void CRhinoDisplayEngine_OGL::ClearFrameBuffer ( const CRhinoDib dib)
overridevirtual

Description: File the frame buffer with a bitmap image This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: dib: [in] the image to draw into the frame buffer

Reimplemented from CRhinoDisplayEngine.

◆ ClearFrameBuffer() [2/2]

void CRhinoDisplayEngine_OGL::ClearFrameBuffer ( const ON_Color colorTopLeft,
const ON_Color colorBottomLeft,
const ON_Color colorTopRight,
const ON_Color colorBottomRight 
)
overridevirtual

Description: Fill the frame buffer with a gradient between four corner colors This function also clears the depth buffer for engines that support depth buffered drawing. Parameters: colorTopLeft: [in] the color in the top-left corner of the frame buffer colorBottomLeft: [in] the color in the bottom-left corner of the frame buffer colorTopRight: [in] the color in the top-right corner of the frame buffer colorBottomRight: [in] the color in the bottom-right corner of the frame buffer

Implements CRhinoDisplayEngine.

◆ ClearTextureCache()

void CRhinoDisplayEngine_OGL::ClearTextureCache ( )
overridevirtual

Description: Remove all cached texture information that may be stored locally or on the graphics card

Reimplemented from CRhinoDisplayEngine.

◆ CopyBackBufferFrom()

bool CRhinoDisplayEngine_OGL::CopyBackBufferFrom ( const CRhinoDib dib)
overridevirtual

Description: Copy color information from a bitmap into the back buffer Parameters: dib: [in] bitmap that contains the color information Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ CopyBackBufferTo()

bool CRhinoDisplayEngine_OGL::CopyBackBufferTo ( CRhinoDib dib)
overridevirtual

Description: Copy color information in back buffer to a bitmap Parameters: dib: [out] bitmap that is created with color information from back buffer Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ CopyDepthBufferTo()

bool CRhinoDisplayEngine_OGL::CopyDepthBufferTo ( CRhinoDib dib,
bool  bConvertToImage = false,
bool  bInvertDepthValues = false,
CRhinoDib pBackground = nullptr 
)
overridevirtual

Description: Copy the depth buffer information to a bitmap Parameters: dib: [out] the bitmap that is created with depth buffer information bConvertToImage: [in] if true, the depth information is converted into a grey scale image if false, each byte in the dib contains a depth value bInvertDepthValues: [in] if true, the values in the dib are flipped where a byte used to be 0 will now be 255 and a byte that used to be 255 will now be 0 pBackground: [in] If not NULL, this image will be place in the background of dib where no depth information was written to Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ Defaults()

void CRhinoDisplayEngine_OGL::Defaults ( )
protected

◆ DepthBufferBitDepth()

int CRhinoDisplayEngine_OGL::DepthBufferBitDepth ( )
overridevirtual

Returns: Number of bits per pixel used to describe the depth value

Reimplemented from CRhinoDisplayEngine.

◆ DepthMode()

int CRhinoDisplayEngine_OGL::DepthMode ( )

◆ Destroy()

void CRhinoDisplayEngine_OGL::Destroy ( )
protected

◆ DisableGLContext()

bool CRhinoDisplayEngine_OGL::DisableGLContext ( )
protected

◆ DisableTextures()

void CRhinoDisplayEngine_OGL::DisableTextures ( )
protected

◆ Draw2dLines()

void CRhinoDisplayEngine_OGL::Draw2dLines ( const ON_2fPoint points,
int  count,
bool  asPolyline,
ON_Color  strokeColor,
float  strokeWidth,
RhinoDashStyle  style,
bool  xormode 
)
overridevirtual

Description: Draw polyline defined in screen coordinates This is the low level 2d drawing routine used for drawing lines, rectangles,...

Parameters
asPolylineif false, each point pair is treated as independent lines

Implements CRhinoDisplayEngine.

◆ DrawBitmap() [1/2]

void CRhinoDisplayEngine_OGL::DrawBitmap ( const CRhinoDib dib,
int  nX,
int  nY 
)
overridevirtual

Description: Draw a bitmap Parameters: dib: [in] the bitmap to draw nX: [in] screen coordinate left location to draw top-left corner of dib nY: [in] screen coordinate top location to draw top-left corner of dib mask: [in] if set to a color, the dib is drawn using a color mask for transparency

Reimplemented from CRhinoDisplayEngine.

◆ DrawBitmap() [2/2]

void CRhinoDisplayEngine_OGL::DrawBitmap ( const CRhinoDib dib,
int  left,
int  top,
int  width,
int  height 
)

◆ DrawBrepWires()

void CRhinoDisplayEngine_OGL::DrawBrepWires ( const ON_Brep brep,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
CRhinoCacheHandle cacheHandle 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawCapturedFrame()

bool CRhinoDisplayEngine_OGL::DrawCapturedFrame ( const ON_Viewport destination)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawCombinedTextures()

bool CRhinoDisplayEngine_OGL::DrawCombinedTextures ( UINT  nT1,
UINT  nT2,
int  nCOP,
float  Scale,
ON_Color  Color = ON_UNSET_COLOR 
)

◆ DrawCurve()

void CRhinoDisplayEngine_OGL::DrawCurve ( const ON_Curve curve,
const class CRhinoDisplayPen &  pen,
CRhinoCacheHandle cacheHandle 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawDot()

void CRhinoDisplayEngine_OGL::DrawDot ( const ON_TextDot dot,
bool  locationInWorld,
ON_Color  fillColor,
ON_Color  textColor,
ON_Color  borderColor,
CRhinoCacheHandle cache 
)
overridevirtual

Implements CRhinoDisplayEngine.

◆ DrawEnvironment()

void CRhinoDisplayEngine_OGL::DrawEnvironment ( )
overridevirtual

Description: Draws background environment into the frame buffer.

Reimplemented from CRhinoDisplayEngine.

◆ DrawExtrusionWires()

void CRhinoDisplayEngine_OGL::DrawExtrusionWires ( const ON_Extrusion extrusion,
const class CDisplayPipelineAttributes da,
int  wireDensity,
bool  edgeAnalysis,
CRhinoCacheHandle cacheHandle 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawGroundPlane()

void CRhinoDisplayEngine_OGL::DrawGroundPlane ( const class CDisplayPipelineAttributes dpa,
const class CRhDisplayGroundPlane &  groundplane 
)
overridevirtual

Description: Draws a ground plane into the frame buffer.

Reimplemented from CRhinoDisplayEngine.

◆ DrawHatch() [1/2]

void CRhinoDisplayEngine_OGL::DrawHatch ( const ON_Hatch hatch,
const class CRhinoDisplayBrush *  fillBrush,
const class CRhinoDisplayPen *  boundaryPen,
CRhinoCacheHandle cacheHandle 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawHatch() [2/2]

void CRhinoDisplayEngine_OGL::DrawHatch ( const ON_Hatch hatch,
const ON_HatchPattern pattern,
float  strokeWidth,
ON_Color  hatchColor,
ON_Color  boundaryColor,
CRhinoCacheHandle cacheHandle 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawLines()

void CRhinoDisplayEngine_OGL::DrawLines ( const class CLinesDescriptor ld)
overridevirtual

Description: Draw a set of lines Parameters: ld: [in] the line locations and attributes to draw

Reimplemented from CRhinoDisplayEngine.

◆ DrawMeshes()

void CRhinoDisplayEngine_OGL::DrawMeshes ( const ON_Mesh **  meshes,
int  count,
bool  wires,
bool  shaded,
const CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)
override

◆ DrawMeshFaces()

void CRhinoDisplayEngine_OGL::DrawMeshFaces ( const ON_Mesh mesh,
const int *  faces,
int  faceCount,
const CDisplayPipelineAttributes da,
CRhinoCacheHandle cacheHandle 
)
override

◆ DrawPointCloud()

void CRhinoDisplayEngine_OGL::DrawPointCloud ( const ON_PointCloud cloud,
ERhinoPointStyle  style,
float  pixelSize,
bool  scaleSizeForDpi,
ON_Color  colorOverride,
int  indexCount,
const unsigned int *  indices,
CRhinoCacheHandle cache,
int  degradeCount 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawPoints()

void CRhinoDisplayEngine_OGL::DrawPoints ( int  count,
const class CRhPointData *  points,
CRhinoCacheHandle  
)
overridevirtual

Implements CRhinoDisplayEngine.

◆ DrawPolygon()

void CRhinoDisplayEngine_OGL::DrawPolygon ( const ON_3dPoint points,
int  count,
ON_Color  color,
bool  bFilled 
)
overridevirtual

Description: Draw a polygon using a set of points for the polygon border Parameters: points: [in] array of points in world coordinates to use for polygon border count: [in] number of elements in points array color: [in] draw color bFilled: [in] true = draw the polygon as a filled shape false = just draw the polygon border

Reimplemented from CRhinoDisplayEngine.

◆ DrawPolylines()

void CRhinoDisplayEngine_OGL::DrawPolylines ( const CRhinoClippingVertexCollection *  lists,
int  count 
)
override

◆ DrawRoundedRectangle()

void CRhinoDisplayEngine_OGL::DrawRoundedRectangle ( ON_2fPoint  screenCenter,
float  pixelWidth,
float  pixelHeight,
float  cornerRadius,
ON_Color  strokeColor,
float  strokeWidth,
ON_Color  fillColor 
)
overridevirtual

Implements CRhinoDisplayEngine.

◆ DrawString() [1/2]

void CRhinoDisplayEngine_OGL::DrawString ( const wchar_t *  text,
const ON_Color textColor,
const ON_2dPoint point,
bool  middle,
float  fontHeightPixels,
const ON_Font font 
)
overridevirtual

Description: Draws text with specified color, font and height

Implements CRhinoDisplayEngine.

◆ DrawString() [2/2]

void CRhinoDisplayEngine_OGL::DrawString ( const wchar_t *  text,
const ON_Xform xf,
const ON_Font font,
const ON_Color color,
ON::TextHorizontalAlignment  horizontalAlignment,
ON::TextVerticalAlignment  verticalAlignment,
CRhinoCacheHandle cache 
)
overridevirtual

Implements CRhinoDisplayEngine.

◆ DrawSubD()

void CRhinoDisplayEngine_OGL::DrawSubD ( const class CRhinoSubDDisplay subd_display,
const class CRhinoSubDDisplayAttributes subd_display_attributes 
)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ DrawTraceImage()

void CRhinoDisplayEngine_OGL::DrawTraceImage ( const class CRhTraceImage &  traceimage)
overridevirtual

Description: Draws background bitmap image onto the construction plane.

Reimplemented from CRhinoDisplayEngine.

◆ DrawViewportAlignedImage()

void CRhinoDisplayEngine_OGL::DrawViewportAlignedImage ( const class CRhOpenGLTexture &  image,
bool  bProgramInUse 
)

◆ DrawViewportAlignedQuad()

void CRhinoDisplayEngine_OGL::DrawViewportAlignedQuad ( bool  bProgramInUse)

◆ DrawWallpaper()

void CRhinoDisplayEngine_OGL::DrawWallpaper ( const class CRhWallpaper &  wallpaper)
overridevirtual

Description: Draws wallpaper image into the back buffer.

Reimplemented from CRhinoDisplayEngine.

◆ EnableColorWriting()

void CRhinoDisplayEngine_OGL::EnableColorWriting ( bool  bEnable = true)
overridevirtual

Description: Turn on/off writing of information to the color buffer

Reimplemented from CRhinoDisplayEngine.

◆ EnableDepthTesting()

void CRhinoDisplayEngine_OGL::EnableDepthTesting ( bool  = true)
overridevirtual

Depth-Buffered operations & attributes...

Reimplemented from CRhinoDisplayEngine.

◆ EnableDepthWriting()

void CRhinoDisplayEngine_OGL::EnableDepthWriting ( bool  bEnable = true)
overridevirtual

Description Turn on/off writing of information to the depth buffer for engines that support depth buffers

Reimplemented from CRhinoDisplayEngine.

◆ EnableGLContext()

bool CRhinoDisplayEngine_OGL::EnableGLContext ( )
protected

◆ EnableMeshBuffering()

void CRhinoDisplayEngine_OGL::EnableMeshBuffering ( bool  on)
overridevirtual

"State" operations & attributes...

Reimplemented from CRhinoDisplayEngine.

◆ EnableMultiSample()

void CRhinoDisplayEngine_OGL::EnableMultiSample ( bool  bEnable = true)
overridevirtual

Enables / disables multisampling.

Reimplemented from CRhinoDisplayEngine.

◆ EnableShadowMap()

void CRhinoDisplayEngine_OGL::EnableShadowMap ( bool  bEnable = true)

◆ EnumMultiSampleModes()

void CRhinoDisplayEngine_OGL::EnumMultiSampleModes ( int  )
protected

◆ ExecutionLevel()

unsigned int CRhinoDisplayEngine_OGL::ExecutionLevel ( ) const

◆ FlushAll()

void CRhinoDisplayEngine_OGL::FlushAll ( )
overridevirtual

Description: Flushes any and all buffers used by the engine.

Reimplemented from CRhinoDisplayEngine.

◆ FlushCurveBuffer()

void CRhinoDisplayEngine_OGL::FlushCurveBuffer ( )
overrideprotectedvirtual

Reimplemented from CRhinoDisplayEngine.

◆ FlushMeshBuffer()

void CRhinoDisplayEngine_OGL::FlushMeshBuffer ( )
overrideprotectedvirtual

Reimplemented from CRhinoDisplayEngine.

◆ FlushPointBuffer()

void CRhinoDisplayEngine_OGL::FlushPointBuffer ( )
overrideprotectedvirtual

Reimplemented from CRhinoDisplayEngine.

◆ FrameBufferBitDepth()

int CRhinoDisplayEngine_OGL::FrameBufferBitDepth ( )
overridevirtual

Returns: Number of bits per pixel for the frame buffer color values

Reimplemented from CRhinoDisplayEngine.

◆ FrameBufferChannelDepth()

void CRhinoDisplayEngine_OGL::FrameBufferChannelDepth ( int &  red_bits,
int &  green_bits,
int &  blue_bits,
int &  alpha_bits 
)
overridevirtual

Description: Gets the number of bits used to define each color channel for an individual pixel Parameters: red_bits: [out] number of bits dedicated to describing red level in pixel green_bits: [out] number of bits dedicated to describing green level in pixel blue_bits: [out] number of bits dedicated to describing blue level in pixel alpha_bits: [out] number of bits dedicated to describing alpha level in pixel

Reimplemented from CRhinoDisplayEngine.

◆ GetBackBuffer()

bool CRhinoDisplayEngine_OGL::GetBackBuffer ( CRhinoDib dib)
overridevirtual

Description: copy the color information in the back buffer to a bitmap Parameters: dib: [out] the bitmap that is created and holds the back buffer's values Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ GetCapturedFrame()

const class CRhFrameCapture* CRhinoDisplayEngine_OGL::GetCapturedFrame ( ) const
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ GetClipPlanes()

int CRhinoDisplayEngine_OGL::GetClipPlanes ( bool  clippingCoordinates,
ON_SimpleArray< ON_PlaneEquation > &  planes 
) const
protected

◆ GetDepthBuffer()

bool CRhinoDisplayEngine_OGL::GetDepthBuffer ( float *  buffer,
int  left,
int  top,
int  width,
int  height 
)
overridevirtual

Description: Read depth values into an array Parameters: buffer: [out] array large enough to hold width * height elements This array will hold the depth values left: [in] defines rectangle on viewport to get information from top: [in] defines rectangle on viewport to get information from width: [in] defines rectangle on viewport to get information from height: [in] defines rectangle on viewport to get information from Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ GetEngineGlPrivate()

class CRhDisplayEnginePrivate_OGL* CRhinoDisplayEngine_OGL::GetEngineGlPrivate ( )

◆ GetFrameBufferObject()

class CRhOpenGLRenderer* CRhinoDisplayEngine_OGL::GetFrameBufferObject ( )
Deprecated:
Do not use

◆ GetGlCameraToClip()

void CRhinoDisplayEngine_OGL::GetGlCameraToClip ( float  m[16],
const ON_Xform extra 
) const

◆ GetGlCameraToClipInverse()

void CRhinoDisplayEngine_OGL::GetGlCameraToClipInverse ( float  m[16],
const ON_Xform extra 
) const

◆ GetGlClipToScreen()

void CRhinoDisplayEngine_OGL::GetGlClipToScreen ( float  m[16]) const

◆ GetGlScreenToClip()

void CRhinoDisplayEngine_OGL::GetGlScreenToClip ( float  m[16]) const

◆ GetGlWorldToCamera()

void CRhinoDisplayEngine_OGL::GetGlWorldToCamera ( float  m[16],
bool  includeModelTransform,
const ON_Xform extra 
) const

◆ GetGlWorldToCameraInverse()

void CRhinoDisplayEngine_OGL::GetGlWorldToCameraInverse ( float  m[16],
bool  includeModelTransform,
const ON_Xform extra 
) const

◆ GetGlWorldToClip()

void CRhinoDisplayEngine_OGL::GetGlWorldToClip ( float  m[16],
bool  includeModelTransform,
const ON_Xform extra 
) const

◆ GetGlWorldToClipInverse()

void CRhinoDisplayEngine_OGL::GetGlWorldToClipInverse ( float  m[16],
bool  includeModelTransform,
const ON_Xform extra 
) const

◆ GetMultiSampleMode()

int CRhinoDisplayEngine_OGL::GetMultiSampleMode ( ) const
overridevirtual

Returns: The current multi-sample mode for this engine or -1 if multisampling is not supported

Reimplemented from CRhinoDisplayEngine.

◆ GetMultiSampleModes()

void CRhinoDisplayEngine_OGL::GetMultiSampleModes ( ON_SimpleArray< int > &  modes) const
overridevirtual

Description: If this engine supports multisampling, this function retrieves a list of the multisampling modes available Parameters: modes: [out] list of multi-sample modes available Note: the values returned are engine specific, and only the underlying engine knows how to really interpret their meaning. The routine SetMultiSampleMode( N ) is used in conjunction with these return values, and again, only the engine knows what they mean and how they're interpreted when actually setting up multi-sampling.

Reimplemented from CRhinoDisplayEngine.

◆ GetOffscreenBufferInfo()

bool CRhinoDisplayEngine_OGL::GetOffscreenBufferInfo ( HDC  hDC,
int &  nColorDepth,
int &  nZDepth 
)
overridevirtual

Description:

Reimplemented from CRhinoDisplayEngine.

◆ GetRenderingContext()

HGLRC CRhinoDisplayEngine_OGL::GetRenderingContext ( ) const

Description: returns the OpenGL rendering context that this engine is working with. May be NULL if the engine has not created the rendering context.

◆ HasDepthBuffer()

bool CRhinoDisplayEngine_OGL::HasDepthBuffer ( )
overridevirtual

Engine buffers support...

Reimplemented from CRhinoDisplayEngine.

◆ InitOpenGL()

bool CRhinoDisplayEngine_OGL::InitOpenGL ( )
protected

◆ InvalidateCapturedFrame()

void CRhinoDisplayEngine_OGL::InvalidateCapturedFrame ( )
overridevirtual

Caching operations...

Reimplemented from CRhinoDisplayEngine.

◆ IsAccelerated()

bool CRhinoDisplayEngine_OGL::IsAccelerated ( ) const
overridevirtual

Description: Is this engine drawing using hardware acceleration? Returns: true if the engine is using hardware accelerated OpenGL or Direct3D

Reimplemented from CRhinoDisplayEngine.

◆ IsPreview()

bool CRhinoDisplayEngine_OGL::IsPreview ( void  ) const

◆ IsShadowMapEnabled()

bool CRhinoDisplayEngine_OGL::IsShadowMapEnabled ( )

◆ LinearWorkflow()

const CDisplayPipelineAttributes::LinearWorkflow& CRhinoDisplayEngine_OGL::LinearWorkflow ( ) const

◆ MakeDefaultContextCurrent()

static bool CRhinoDisplayEngine_OGL::MakeDefaultContextCurrent ( )
static

Activate the 'default' context.

◆ MaxClipPlanesSupported()

int CRhinoDisplayEngine_OGL::MaxClipPlanesSupported ( ) const
overridevirtual

Returns: The maximum number of user defined clipping planes supported. This does not include the standard view frustum clipping planes. OpenGL and Direct3D will support different numbers of clipping planes based on the installed graphics card.

Reimplemented from CRhinoDisplayEngine.

◆ MaxDecalsSupported()

int CRhinoDisplayEngine_OGL::MaxDecalsSupported ( ) const
overridevirtual

Returns: The maximum number of decals supported for shading. OpenGL and Direct3D will support different numbers of decals based on the installed graphics card.

Reimplemented from CRhinoDisplayEngine.

◆ MaxLightsSupported()

int CRhinoDisplayEngine_OGL::MaxLightsSupported ( ) const
overridevirtual

Returns: The maximum number of lights supported for shading. OpenGL and Direct3D will support different numbers of lights based on the installed graphics card.

Reimplemented from CRhinoDisplayEngine.

◆ MaxObjectMappingsSupported()

int CRhinoDisplayEngine_OGL::MaxObjectMappingsSupported ( ) const
overridevirtual

Returns: The maximum number of object mappings supported for shading. OpenGL and Direct3D will support different numbers of object mappings based on the installed graphics card.

Reimplemented from CRhinoDisplayEngine.

◆ MaxTextureCoords()

int CRhinoDisplayEngine_OGL::MaxTextureCoords ( ) const

◆ MaxTextureSize()

int CRhinoDisplayEngine_OGL::MaxTextureSize ( ) const

◆ MaxTextureUnits()

int CRhinoDisplayEngine_OGL::MaxTextureUnits ( ) const

◆ MeshBufferingEnabled()

bool CRhinoDisplayEngine_OGL::MeshBufferingEnabled ( ) const
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ NotifyClippingPlanesChanged()

void CRhinoDisplayEngine_OGL::NotifyClippingPlanesChanged ( )
overrideprotectedvirtual

Reimplemented from CRhinoDisplayEngine.

◆ NotifyFrameSizeChanged()

bool CRhinoDisplayEngine_OGL::NotifyFrameSizeChanged ( int  nWidth,
int  nHeight 
)
overrideprotectedvirtual

Description: Tell the engine that the size of the rectangle that it draws to has changed.

Reimplemented from CRhinoDisplayEngine.

◆ NotifyProjectionChanged()

bool CRhinoDisplayEngine_OGL::NotifyProjectionChanged ( )
overrideprotectedvirtual

Notifier routines called by the pipeline framework...

Description: This routine is normally called by the pipeline framework because the current "display's" viewport projection has changed...This means that all of the commonly used engine attributes need to be updated.

Note: this routine should never be called haphazardly since it can be somewhat expensive performance-wise. However, if you or your display pipeline ever change the projection other than by through the standard pipeline mechanisms, then you must ensure that this routine gets called AFTER the changes, or update these attributes manually on an as-needed basis. Also, if your engine overrides this routine, then it is best that your implementation also call the derived class's implementation. Returns: true on success

Reimplemented from CRhinoDisplayEngine.

◆ PostProcessFrameBuffer()

bool CRhinoDisplayEngine_OGL::PostProcessFrameBuffer ( )

◆ PreviewEnvironmentId()

ON_UUID CRhinoDisplayEngine_OGL::PreviewEnvironmentId ( void  ) const

◆ ProcessLinearWorkflow()

void CRhinoDisplayEngine_OGL::ProcessLinearWorkflow ( const class CRhOpenGLTexture &  image,
const float  gammaExponent 
)

◆ RenderPass()

int CRhinoDisplayEngine_OGL::RenderPass ( ) const

◆ ResetEngine()

bool CRhinoDisplayEngine_OGL::ResetEngine ( )
overridevirtual

Description: Should reset the engine back to some initial state...but at the same time try to maintain current state (ie. opened or closed). Typically this means saving the current state, shutting down the engine and then restarting the engine with the saved state

This is typically only used for things like changing the multisampling modes for an engine Returns: true if the reset operation was successful

Reimplemented from CRhinoDisplayEngine.

◆ RestoreBackBuffer()

bool CRhinoDisplayEngine_OGL::RestoreBackBuffer ( )
overridevirtual

Returns: true if a saved back buffer was successfully restored to the back buffer

Reimplemented from CRhinoDisplayEngine.

◆ RestoreDepthBuffer()

bool CRhinoDisplayEngine_OGL::RestoreDepthBuffer ( )
overridevirtual

Returns: true if a saved depth buffer was successfully restored to the engine depth buffer

Reimplemented from CRhinoDisplayEngine.

◆ SaveBackBuffer()

bool CRhinoDisplayEngine_OGL::SaveBackBuffer ( )
overridevirtual

Returns: true if this engine successfully saved back buffer color information to a location that can be retrieved at a later time

Reimplemented from CRhinoDisplayEngine.

◆ SaveDepthBuffer()

bool CRhinoDisplayEngine_OGL::SaveDepthBuffer ( )
overridevirtual

Returns: true is this engine successfully saved the depth buffer information to a location that can be retrieved at a later time

Reimplemented from CRhinoDisplayEngine.

◆ SetCullFaceMode()

ECullFaceMode CRhinoDisplayEngine_OGL::SetCullFaceMode ( ECullFaceMode  mode)
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ SetDepthMode()

int CRhinoDisplayEngine_OGL::SetDepthMode ( int  nDepth)
overridevirtual

Description: Sets the current depth-testing mode used when drawing curves and lines. This basically determines whether lines are either always drawn in front, in back, or pays attention to the current depth value in the depth buffer. Parameters: nDepth: [in] 0 = Perform a depth-buffer test draw - this the normal mode of operation -1 = Always draw in back of everything else (i.e. on the far clipping plane) 1 = Always draw in front of everything else (i.e. on the near clipping plane) Note: All parameter values are currently clamped to [-1 .. 1] Returns: int : the previously used depth mode setting.

Reimplemented from CRhinoDisplayEngine.

◆ SetIsPreview()

void CRhinoDisplayEngine_OGL::SetIsPreview ( bool  )

◆ SetLinearWorkflow()

void CRhinoDisplayEngine_OGL::SetLinearWorkflow ( const CDisplayPipelineAttributes::LinearWorkflow lw)

Linear workflow support.

◆ SetMultiSampleMode()

bool CRhinoDisplayEngine_OGL::SetMultiSampleMode ( int  mode)
overridevirtual

Description: Set the current multisampling mode for this engine Parameters: mode: [in] one of the modes retrieved from GetMultiSampleModes function Returns: true on success. If the engine does not support multisampling the return value will always be false

Reimplemented from CRhinoDisplayEngine.

◆ SetPreviewEnvironmentId()

void CRhinoDisplayEngine_OGL::SetPreviewEnvironmentId ( ON_UUID  )

◆ SetStereoMode()

bool CRhinoDisplayEngine_OGL::SetStereoMode ( bool  )
overridevirtual

Reimplemented from CRhinoDisplayEngine.

◆ SetTextureCoords()

void CRhinoDisplayEngine_OGL::SetTextureCoords ( int  nTex,
int  stride,
const void *   
) const

◆ SetupGLMatrices()

void CRhinoDisplayEngine_OGL::SetupGLMatrices ( bool  model,
bool  projection 
)
protected

Set up the 'legacy' OpenGL model and projection matrices with values matching the current camera

◆ SetupMaterial() [1/2]

void CRhinoDisplayEngine_OGL::SetupMaterial ( const CDisplayAttributeMaterial material)
protected

◆ SetupMaterial() [2/2]

void CRhinoDisplayEngine_OGL::SetupMaterial ( int  cullFaceMode,
const CDisplayPipelineAttributes da 
)
protected

◆ SetupPixelFormat()

bool CRhinoDisplayEngine_OGL::SetupPixelFormat ( )
protected

◆ SetupTexture()

void CRhinoDisplayEngine_OGL::SetupTexture ( UINT  nId,
UINT  nTarget,
ON_Texture  
)
protected

◆ ShowBackBuffer()

bool CRhinoDisplayEngine_OGL::ShowBackBuffer ( HDC  hDC)
overridevirtual

Description: Display the contents of the back buffer on to the front buffer Parameters: pDC: [in] device context to draw the back buffer colors to Returns: true if successful

Reimplemented from CRhinoDisplayEngine.

◆ Shutdown()

void CRhinoDisplayEngine_OGL::Shutdown ( )
protected

◆ ShutdownEngine()

void CRhinoDisplayEngine_OGL::ShutdownEngine ( )
overridevirtual

Description: Should completely shutdown and destroy everything associated with this engine... This includes any runtime buffers, dibs, or rendering contexts

Reimplemented from CRhinoDisplayEngine.

◆ StartEngine()

bool CRhinoDisplayEngine_OGL::StartEngine ( )
overridevirtual

Engine initialization and cleanup operations...

Description: At the very beginning of drawing each frame the pipeline will call StartEngine to allow the engine to perform any required initializaion or context enabling

All subclasses that override this function should call this base class version of the function. Returns: True if the engine was successfully "started". False if something went wrong. If the function returns false, the pipeline will not be able to draw a frame.

Reimplemented from CRhinoDisplayEngine.

◆ StopEngine()

bool CRhinoDisplayEngine_OGL::StopEngine ( )
overridevirtual

Description: Near the end of drawing a frame the display pipeline will call StopEngine to tell the engine that it should flush any remaining buffers and perform and other task that must occur just prior to displaying the frame. Returns: true if the engine was successfully stopped. This is pretty much always true

Reimplemented from CRhinoDisplayEngine.

◆ SupportsMultiSampling()

bool CRhinoDisplayEngine_OGL::SupportsMultiSampling ( ) const
overridevirtual

Returns: True if the underlying engine technology support multisampling modes. This is used for anti-aliasing purposes and depends on the installed graphics card.

Reimplemented from CRhinoDisplayEngine.

◆ SupportsShading()

bool CRhinoDisplayEngine_OGL::SupportsShading ( ) const
overridevirtual

Returns: True if the display engine support drawing triangles with lighting effects. Basically this is false for GDI and true for OpenGL and DirectX

Reimplemented from CRhinoDisplayEngine.

◆ SupportsStencilBuffer()

bool CRhinoDisplayEngine_OGL::SupportsStencilBuffer ( ) const

◆ TransformShadowMatrix()

void CRhinoDisplayEngine_OGL::TransformShadowMatrix ( bool  bTransform)

◆ UseHardwareModes()

void CRhinoDisplayEngine_OGL::UseHardwareModes ( bool  = true)

Specific OpenGL hardware information.

◆ ValidateFBO()

void CRhinoDisplayEngine_OGL::ValidateFBO ( )
protected

Friends And Related Function Documentation

◆ CRhDisplayEnginePrivate_OGL

friend class CRhDisplayEnginePrivate_OGL
friend

◆ CRhEngine_GL11

friend class CRhEngine_GL11
friend

◆ CRhEngine_GL21

friend class CRhEngine_GL21
friend

◆ CRhEngine_GL33

friend class CRhEngine_GL33
friend

◆ CRhEngine_GL40

friend class CRhEngine_GL40
friend

◆ CRhinoDisplayPipeline

friend class CRhinoDisplayPipeline
friend

◆ CRhOglEngineExtension

friend class CRhOglEngineExtension
friend

◆ CRhResourceManager_OGL

friend class CRhResourceManager_OGL
friend

Member Data Documentation

◆ m_bTransformShadowMatrix

bool CRhinoDisplayEngine_OGL::m_bTransformShadowMatrix
protected

◆ m_nTextureUnit

UINT CRhinoDisplayEngine_OGL::m_nTextureUnit
protected