mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-05 18:16:23 +03:00
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.
MFC samples
- Contents
The directory samples/mfc/standard contains the following packages and files:
- Numbered packages: 01_Geometry, 02_Modeling, etc. provide projects and sources of samples;
- Files All-vc(number).sln are auxiliary utility projects depending on all other sample projects. When such project is rebuilt, all samples and mfcsample library are also rebuilt.
- Common directory provides common source and header files for samples and dynamic-link library mfcsample.dll.
- Data directory stores data files.
- mfcsample directory contains project for mfcsample.dll library providing basic functionality used by all OCC samples.
- File env.bat is called from msvc.bat.
- Launching Open CASCADE Technology samples:
To run the Open CASCADE Technology samples, use command:
execute run.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug] [SampleName]
To run the Animation sample, use command:
execute run.bat vc8 win32 Debug Animation
- Modifying and rebuilding samples:
You can modify, compile and launch all sample projects in MS Visual C++ at once with command:
execute msvc.bat [vc8|vc9|vc10|vc11|vc12] [win32|win64] [Release|Debug]
To run all sample projects in MS Visual C++ at once, use command:
execute msvc.bat vc8 win32 Debug
Note: make sure that your PATH environment variable contains a directory, where msdev.exe is located.