1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +03:00

0024776: Visualization - inherit OpenGl_View from Graphic3d_CView

Expose interface of OpenGl_View (OpenGL graphics rendering methods) to client code
and collecting all high-level API methods of application views in V3d_View class.

1) Exposing interface of OpenGl_View:

The OpenGl_View inherits from new class Graphic3d_CView.
Graphic3d_CView is an interface class that declares abstract methods for managing displayed structures,
display properties and a base layer code that implements computation
and management of HLR (or more broadly speaking view-depended) structures.

In new implementation it takes place of eliminated Visual3d_View.
As before the instance of Graphic3d_CView is still completely managed by V3d_View classes.
It can be accessed through V3d_View interface but normally this should not be required as all its methods are completely wrapped.

In more details, a concrete specialization of Graphic3d_CView is created and returned by graphical driver on request.
Right after creation the views is directly used for setting rendering properties and adding graphical structures to be displayed.

The rendering of graphics is possible after mapping a window and activating the view.
The direct setting of properties makes obsolete usage of intermediate structures with display parameter
like Visual3d_ContextView and etc (the whole package of Visual3d become redundant).

2) Collecting all high-level API methods of application views in V3d package:

The patch includes elimination of Visual3d layer.
All of its methods that could be previously used by application are now exposed and should be accessed on the level of V3d entities.
- Introduced new class Graphic3d_CView.
  This is a base class for render views.
  Made possible to specialize concrete instances of the class by graphical driver.
- Moved all methods managing rendering views into interface of Graphic3d_CView.
  The corresponding methods were removed from interface of graphical driver.

3) Eliminated Visual3d package:

- Logic of managing display of structures was put from Visual3d_ViewManager into Graphic3d_StructureManager.
- Removed Visual3d_View class. Logic of managing computed structures was put into base layer of Graphi3d_CView.
- Removed all intermediate structures for storing view parameters e.g. Visual3d_ContextView.
  All settings are kept by instances of Graphic3d_CView
- Removed Visual3d_Light intermediate class.
  All light properties are still stored in Graphic3d_CLight structure.
  The structure is directly access by instance of V3d_Light classes.
- Moved all needed enumerations into Graphic3d package.

4) Update package D3DHost to new changes.

5) Update code of OCCT samples to new changes.
This commit is contained in:
apl
2015-09-22 11:49:33 +03:00
committed by kgv
parent 97d87ffa94
commit c357e42610
159 changed files with 9998 additions and 14088 deletions

View File

@@ -28,20 +28,20 @@ OpenGl_PrimitiveArray.hxx
OpenGl_PrimitiveArray.cxx
OpenGl_Workspace.hxx
OpenGl_Workspace.cxx
OpenGl_Workspace_2.cxx
OpenGl_Workspace_5.cxx
OpenGl_View.hxx
OpenGl_View.cxx
OpenGl_View_2.cxx
OpenGl_View_Print.cxx
OpenGl_View_Raytrace.cxx
OpenGl_View_Redraw.cxx
OpenGl_Light.hxx
OpenGl_Trihedron.hxx
OpenGl_Trihedron.cxx
OpenGl_GraduatedTrihedron.hxx
OpenGl_GraduatedTrihedron.cxx
OpenGl_MapOfZLayerSettings.hxx
OpenGl_Matrix.hxx
OpenGl_Matrix.cxx
OpenGl_MatrixState.hxx
OpenGl_CView.hxx
OpenGl_NamedStatus.hxx
OpenGl_TextParam.hxx
OpenGl_PrinterContext.hxx
@@ -113,10 +113,6 @@ OpenGl_LayerList.hxx
OpenGl_LayerFilter.hxx
OpenGl_GraphicDriver.cxx
OpenGl_GraphicDriver.hxx
OpenGl_GraphicDriver_4.cxx
OpenGl_GraphicDriver_7.cxx
OpenGl_GraphicDriver_713.cxx
OpenGl_GraphicDriver_Export.cxx
OpenGl_IndexBuffer.cxx
OpenGl_IndexBuffer.hxx
OpenGl_Layer.cxx
@@ -151,6 +147,5 @@ OpenGl_VertexBuffer.lxx
OpenGl_VertexBufferCompat.cxx
OpenGl_VertexBufferCompat.hxx
OpenGl_VertexBufferEditor.hxx
OpenGl_View_Raytrace.cxx
OpenGl_TextBuilder.hxx
OpenGl_TextBuilder.cxx