Reprepsents window with GL context. Provides methods to render primitives and maintan GL state.
Public Member Functions |
| OpenGl_Workspace (const Handle< OpenGl_Display > &theDisplay, const CALL_DEF_WINDOW &theCWindow, Aspect_RenderingContext theGContext, const Handle< OpenGl_Context > &theShareCtx) |
| Main constructor - prepare GL context for specified window.
|
virtual | ~OpenGl_Workspace () |
| Destructor.
|
void | SetActiveView (const Handle< OpenGl_View > &theView) |
const Handle< OpenGl_View > & | ActiveView () const |
void | Redraw (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer) |
| Redraw the window.
|
void | Update (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer) |
| Deprecated. Simply calls Redraw().
|
Standard_Boolean | Print (const Handle< OpenGl_PrinterContext > &thePrintContext, const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const Aspect_Handle theHPrintDC, const Standard_Boolean theToShowBackground, const Standard_CString theFileName, const Aspect_PrintAlgo thePrintAlgorithm, const Standard_Real theScaleFactor) |
| Special method to perform printing. System-specific and currently only Win platform implemented.
|
const Handle
< OpenGl_PrinterContext > & | PrinterContext () const |
void | DisplayCallback (const Graphic3d_CView &theCView, int theReason) |
Standard_Boolean | SetImmediateModeDrawToFront (const Standard_Boolean theDrawToFrontBuffer) |
Standard_Boolean | BeginAddMode () |
void | EndAddMode () |
void | ClearImmediatMode (const Graphic3d_CView &theCView, const Standard_Boolean theToFlush) |
void | RedrawImmediatMode () |
Standard_Boolean | BeginImmediatMode (const Graphic3d_CView &theCView, const Standard_Boolean theUseDepthTest, const Standard_Boolean theRetainMode) |
void | EndImmediatMode () |
void | DrawStructure (const OpenGl_Structure *theStructure) |
Graphic3d_PtrFrameBuffer | FBOCreate (const Standard_Integer theWidth, const Standard_Integer theHeight) |
void | FBORelease (Graphic3d_PtrFrameBuffer theFBOPtr) |
Standard_Boolean | BufferDump (OpenGl_FrameBuffer *theFBOPtr, Image_PixMap &theImage, const Graphic3d_BufferType &theBufferType) |
void | UseTransparency (const Standard_Boolean theFlag) |
Standard_Boolean & | UseZBuffer () |
Standard_Boolean & | UseDepthTest () |
Standard_Boolean & | UseGLLight () |
const OpenGl_Matrix * | SetViewMatrix (const OpenGl_Matrix *) |
const OpenGl_Matrix * | SetStructureMatrix (const OpenGl_Matrix *) |
const OpenGl_AspectLine * | SetAspectLine (const OpenGl_AspectLine *theAspect) |
const OpenGl_AspectFace * | SetAspectFace (const OpenGl_AspectFace *theAspect) |
const OpenGl_AspectMarker * | SetAspectMarker (const OpenGl_AspectMarker *theAspect) |
const OpenGl_AspectText * | SetAspectText (const OpenGl_AspectText *theAspect) |
void | SetTextParam (const OpenGl_TextParam *theParam) |
const OpenGl_AspectLine * | AspectLine (const Standard_Boolean theWithApply) |
const OpenGl_AspectFace * | AspectFace (const Standard_Boolean theWithApply) |
const OpenGl_AspectMarker * | AspectMarker (const Standard_Boolean theWithApply) |
const OpenGl_AspectText * | AspectText (const Standard_Boolean theWithApply) |
const OpenGl_TextParam * | AspectTextParams () const |
void | ResetAppliedAspect () |
| Clear the applied aspect state.
|
Handle< OpenGl_Texture > | DisableTexture () |
Handle< OpenGl_Texture > | EnableTexture (const Handle< OpenGl_Texture > &theTexture, const Handle< Graphic3d_TextureParams > &theParams=NULL) |
Data Fields |
Standard_Integer | NamedStatus |
const TEL_COLOUR * | HighlightColor |
Protected Member Functions |
void | CopyBuffers (const Standard_Boolean theFrontToBack) |
virtual Standard_Boolean | Activate () |
| Makes GL context for this window active in current thread.
|
void | Redraw1 (const Graphic3d_CView &theCView, const Aspect_CLayer2d &theCUnderLayer, const Aspect_CLayer2d &theCOverLayer, const int theToSwap) |
void | UpdateMaterial (const int flag) |
void | setTextureParams (Handle< OpenGl_Texture > &theTexture, const Handle< Graphic3d_TextureParams > &theParams) |
Protected Attributes |
|
Handle< OpenGl_PrinterContext > | myPrintContext |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Handle< OpenGl_View > | myView |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myIsTransientOpen |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myRetainMode |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myTransientDrawToFront |
| optimization flag for immediate mode (to render directly to the front buffer)
|
NCollection_Sequence< const
OpenGl_Structure * > | myTransientList |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myUseTransparency |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myUseZBuffer |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myUseDepthTest |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myUseGLLight |
| optimization flag for immediate mode (to render directly to the front buffer)
|
Standard_Boolean | myBackBufferRestored |
| optimization flag for immediate mode (to render directly to the front buffer)
|
|
Handle< OpenGl_Texture > | myTextureBound |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectLine * | AspectLine_set |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectLine * | AspectLine_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectFace * | AspectFace_set |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectFace * | AspectFace_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectMarker * | AspectMarker_set |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectMarker * | AspectMarker_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectText * | AspectText_set |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_AspectText * | AspectText_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_TextParam * | TextParam_set |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_TextParam * | TextParam_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_Matrix * | ViewMatrix_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const OpenGl_Matrix * | StructureMatrix_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
const TEL_POFFSET_PARAM * | PolygonOffset_applied |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|
OpenGl_AspectFace | myAspectFaceHl |
| currently bound texture (managed by OpenGl_AspectFace and OpenGl_View environment texture)
|