Mantis Bug Tracker Workflow

View Revisions: Issue #22819 All Revisions ] Back to Issue ]
Summary 0022819: Redesign of OpenGl driver
Revision 2012-02-20 20:31 by san
Additional information
and documentation updates
Since we re-write OpenGl package almost anew, it is mandatory to eliminate all compiler warnings in it.

Documentation remark (written by KGV and SZV)
The code in OpenGl package was revised deeply, without touching the present high-level visualization API. The main purpose of this action was to facilitate maintenance of OCCT visualization engine and improve its robustness.

Although the code changes were internal by their nature, below the most important ones are mentioned. This information might be helpful for those advanced OCCT users who are not afraid of getting inside TKOpenGl.

- Most of functionality of OpenGl package has been re-implemented with the following new classes:
  OpenGl_Context. Represents low-level GL context. On initialization retrieves available GL extensions (currently OpenGl_ArbVBO and OpenGl_ExtFBO). Replaces old mechanisms like QueryExtension() in "OpenGl_Extension.hxx" header and global initialization in-place of usage.
  OpenGl_Display. Represents an objects that controls some common properties of all contexts / windows. On UNIX it is bound to used X Server connection. Stores global (shared between GL contexts) primitives like markers. Provides text-rendering methods. Subject to further redesign or describing documentation.
  OpenGl_Window. Represents window with GL context. Stores native, system-dependent handles and provide low-level functions to activate/swap front/back buffers.
  OpenGl_Workspace -> OpenGl_Window. Encapsulates functionality previously existed with WS suffix, maintains a set of "global" attributes (old TsmSetAttri, TsmGetAttri stuff) etc. Controls current GL context state using OpenGl_Aspect* elements. Used as the container (or medium) of various statuses and attributes in the method Render() of all primitive elements.
  OpenGl_View. Represents part of the window to draw scene. Now just ONE view is allowed per window.
  OpenGl_Element. Represents new drawable interface with one virtual method ::Render (const Handle(OpenGl_Workspace)& ). All drawable primitives OpenGl_Marker, OpenGl_MarkerSet, OpenGl_Mesh, OpenGl_Polygon ( TEL_POLYGON_DATA), OpenGl_Polyline, OpenGl_PrimitiveArray (CALL_DEF_PARRAY), OpenGl_QuadrangleStrip (OPENGL_QSTRIP_DATA), OpenGl_TriangleStrip (TEL_TMESH_DATA), OpenGl_Text and aspects OpenGl_AspectFace, OpenGl_AspectLine, OpenGl_AspectMarker, OpenGl_AspectText implements this interface.
  OpenGl_PrimitiveArray. Represents array of drawable primitives - the most efficient (can use VBO) and universal method. OpenGl_Polygon, OpenGl_Polyline, OpenGl_TriangleStrip, OpenGl_QuadrangleStrip, OpenGl_Mesh are subject to removal (0022971).
  OpenGl_Group -> OpenGl_Element. Represents group of drawable primitives (stored as sequence). Corresponds Graphic3d_Group. Notice that now group aspects are placed as class members rather than just aspects in front of all primitives. Additional aspects that can be placed as elements within the group sequence are still supported but suggested for removal.
  OpenGl_Structure -> OpenGl_Element. Represents a set of groups, or structure, with a set of own attributes. maps to Graphic3d_Structure.

- OpenGl is cdl-less package now (however it state was not changed to 'nocdlpack' in UDLIST). All classes are declared using not generated C++ headers.

- Most of memory allocation/deallocation mismatches reported by many contributors were fixed.

- Most compiler warnings removed.

- OpenGl_Resource and OpenGl_FrameBuffer are almost left untouched.

- Removed work-around for Windows 95 system.

- Removed compatibility with OpenGL 1.0 standard. Now OpenGL 1.1+ is required for compilation.

- Removed double buffer emulation using GLX Pixmap's (UNIX). However some related pieces of code were not completely removed and left in commented state, search for e.g. JWR_PIXMAP_DB.

- All low-level static functions (Tsm*, Txgl*, Tel*, call_*) are deprecated and most of them removed.

- QuadrangleSet, Bezier primitive types were removed from OpenGl_GraphicDriver, Graphic3d_GraphicDriver and Graphic3d_Group.
Revision 2012-01-13 11:18 by san
Additional information
and documentation updates
Since we re-write OpenGl package almost anew, it is mandatory to eliminate all compiler warnings in it.
Revision 2012-01-10 19:21 by san
Additional information
and documentation updates

Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker