1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

26 Commits

Author SHA1 Message Date
kgv
b40cdc2b55 0029384: Visualization, TKOpenGl - basic integration with OpenVR
V3d_View::AutoZFit() is now called only before redraw
within methods V3d_View::Redraw() and V3d_View::Update().

Graphic3d_CView now holds Aspect_ExtendedRealitySession object.
Aspect_OpenVRSession implements new interface via optional OpenVR library.
Graphic3d_CView::ProcessInput() - added new interface method
which should be called for processing positional input (head tracking).

Graphic3d_Camera now allows setting custom stereoscopic Projection matrices.

OpenGl_Context::Camera() - context now holds Camera object
in addition to active camera matrices.

genproj.tcl has been extended to handle optional CSF_OpenVR dependency.
2020-05-06 20:45:53 +03:00
mzernova
c68c346d2b 0030600: Visualization, TKOpenGl - include GLES3/gl3.h instead of GLES2/gl2.h
Changed GLES2/gl2.h to GLES3/gl3.h.

OpenGl_Window_1.mm has been updated, now it is trying to create kEAGLRenderingAPIOpenGLES3 before trying to create kEAGLRenderingAPIOpenGLES2.
2019-12-19 16:50:16 +03:00
kgv
42451ec057 0030681: Configuration - suppress OpenGL deprecation warning on macOS 10.14
Define GL_SILENCE_DEPRECATION to suppress warnings.
2019-04-30 14:26:51 +03:00
kgv
e2b4dea253 0029156: Coding Rules - eliminate deprecation compiler warnings when targeting macOS 10.12 2017-09-29 09:42:14 +03:00
abv
896faa7296 0028417: Using PRECOMPILED HEADER to speed up compilation time
Use of Cotire tool is introduced for acceleration of CMake builds, by usage of precompiled headers.
CMake option BUILD_USE_PCH is added to enable / disable use of precompiled headers

When precompiled headers are used, additional compiler macros are defined globally in the build system to avoid problems due to different order of included files:
- NOMINMAX is defined on Windows to prevent defining "min" and "max" as macros by windows.h
- STRSAFE_NO_DEPRECATE and _SCL_SECURE_NO_WARNINGS are defined on Windows to prevent declaring functions of standard C library as deprecated by #pragma, and other warnings in system headers
- GL_GLEXT_LEGACY and GLX_GLEXT_LEGACY are defined to ensure that only OCCT's own glext.h is used
- __STDC_FORMAT_MACROS is defined to have standard C print format macros always defined

Code is corrected to avoid conflicts with system headers and in case of compiling together as unity builds (partially):
- Some locally defined variables in TKV3d, TKHLR are renamed to be unique
- Duplicated definitions of macros and global functions are eliminated in TKSTEP
- Useless header WNT_UInt.hxx is removed
- Usage of local variables conflicting with X11 macro is avoided in Draw_Viewer.cxx
- Local variables in AIS_ConcentricRelation.cxx are renamed to avoid conflict with macros defined in windows.h
- HXX files containing code are renamed to PXX or merged with corresponding CXX files.

IVtkTools classes are corrected to avoid compiler warnings disabled in non-PCH builds by inclusion of VTK headers.

Useless pragmas disabling warnings on MSVC are removed
2017-07-06 12:41:41 +03:00
ski
9775fa6110 0026937: Eliminate NO_CXX_EXCEPTION macro support
Macro NO_CXX_EXCEPTION was removed from code.
Method Raise() was replaced by explicit throw statement.
Method Standard_Failure::Caught() was replaced by normal C++mechanism of exception transfer.
Method Standard_Failure::Caught() is deprecated now.
Eliminated empty constructors.
Updated samples.
Eliminate empty method ChangeValue from NCollection_Map class.
Removed not operable methods from NCollection classes.
2017-02-02 16:35:54 +03:00
kgv
59ec40f804 0027684: Coding rules - drop unused declarations from Graphic3d
The following headers have been removed:
- Graphic3d_TypeOfPolygon
- Graphic3d_TypeOfPrimitive
- Graphic3d_Array1OfVector.hxx
- Graphic3d_Array1OfVertex.hxx
- Graphic3d_Array2OfVertex.hxx
- Graphic3d_CBitFields4.hxx
- Graphic3d_CBitFields8.hxx
- Graphic3d_CBitFields16.hxx
- Graphic3d_CBitFields20.hxx
- Graphic3d_CStructurePtr.hxx
- Graphic3d_CycleError.hxx
- Graphic3d_DataStructure.pxx
- Graphic3d_HSequenceOfStructure.hxx
- Graphic3d_InitialisationError.hxx
- Graphic3d_ListIteratorOfListOfShortReal.hxx
- Graphic3d_ListOfShortReal.hxx
- Graphic3d_NListOfHAsciiString.hxx
- Graphic3d_StructureManagerPtr.hxx
- Graphic3d_StructurePtr.hxx

Graphic3d_StructureManager - remove default aspects, which have been never used.

do not include non-existing header Graphic3d_Array1OfVertex.hxx from MFC sample

Graphic3d_Group::MinMaxValues() - add missing Standard_EXPORT
2016-07-21 12:47:49 +03:00
kgv
5501f9a946 0027510: Visualization, OpenGl_Window - do not ignore backing store resize on OS X 2016-05-19 14:01:30 +03:00
kgv
5ef127d0f1 0027080: Coding - eliminate CLang compiler warning on OS X: unused parameter (in .mm files) 2016-01-21 15:50:24 +03:00
kgv
3b523c4cb2 0026822: Visualization, OpenGl_Texture - fix compilation issue on Android due to usage of undefined macros GL_DEBUG_TYPE_ERROR
Drop _ARB prefix from GL_DEBUG_ enumeration.
2015-10-30 10:26:57 +03:00
kgv
3c4b62a436 0026711: Visualization, TKOpenGl - support creation of multisampling off-screen FBOs
OpenGl_Texture::Init2DMultisample() - new method to initialize multisampled texture.
Graphic3d_RenderingParams::NbMsaaSamples - add option defining MSAA samples number.

RayTracing will keep using FBO without MSAA, however it is possible to combine
MSAA for rasterization and FSAA for RayTracing.

OpenGl_FrameBuffer constructor has been changed to do not take arguments.
OpenGl_FrameBuffer::Init() method has been extended with mandatory parameters
defining Color and Depth attachment formats
and optional parameter defining number of MSAA parameters.

Draw Harness, add option -msaa to vrenderparams.
2015-10-29 13:28:11 +03:00
apl
c357e42610 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.
2015-09-22 11:49:33 +03:00
isk
f8ae360566 0023028: Visualization, TKOpenGl - eliminate global static variables
OpenGl_CappingAlgo - move global variables to OpenGl_Workspace class fields.
OpenGl_View::ShaderSource::Source() - drop static for local variable.
OpenGl_Window - drop redundant global constant THE_DEFAULT_BG_COLOR.
2015-06-25 15:06:24 +03:00
kgv
f978241fb6 0025556: Visualization - support stereo pair formats recognized by consumer display devices
Graphic3d_StereoMode - add new enumeration for stereoscopic outputs:
- Graphic3d_StereoMode_QuadBuffer
- Graphic3d_StereoMode_Anaglyph
- Graphic3d_StereoMode_RowInterlaced
- Graphic3d_StereoMode_ColumnInterlaced
- Graphic3d_StereoMode_ChessBoard
- Graphic3d_StereoMode_SideBySide
- Graphic3d_StereoMode_OverUnder

Graphic3d_RenderingParams - add new options controlling stereo output:
- StereoMode
- ToReverseStereo
- AnaglyphFilter

OpenGl_ShaderManager - add predefined GLSL programs for new stereo outputs.
OpenGl_Workspace::Redraw() - do not implicitly disable stereo to allow stereo dump as is.
OpenGl_Caps - add flag swapInterval to control VSync.
OpenGl_Workspace::BufferDump() - handle cases with non-applicable GL_PACK_ROW_LENGTH.

CALL_DEF_WINDOW - drop unused fields; add fields "left" and "top"
to reverse stereo pair for interlaced output depending on window position.

Draw Harness, ViewerTest:
- Extend syntax of command vstereo to setup stereo.
- Extend vdump command to allow dump of stereoscopic pair in different formats.
- Extend command vcaps with option vsync.
- Use mouse scroll to zoom and adjust ZFocus in WinAPI.
- Use "/" and "*" to adjust IOD.

v3d/glsl/stereo - add test case for stereo modes.

Cocoa_LocalPool, OSD_EnvironmentIterator - fix compilation issues on OS X Snow Leopard.
2015-06-20 16:08:12 +03:00
kgv
a2e4f780c2 0025973: Visualization, TKOpenGl - support EAGLContext as alternative to NSOpenGLContext
OpenGl_FrameBuffer::InitWithRB() - add method to initialize FBO with Render Buffer Objects.
OpenGl_FrameBuffer::InitWrapper() - add new method to initialize FBO from currently bound in context.

Aspect_RenderingContext - define type explicitly to EAGLContext* / NSOpenGLContext* for ARC.
OpenGl_Window - allow initialization from alien context for OS X / iOS.
2015-04-06 17:26:01 +03:00
kgv
4e1523ef0b 0025854: Visualization, TKOpenGl - add option to request Core profile 3.2+
OpenGl_Caps::contextCompatible - new option to request compatibility/core OpenGL profile.
OpenGl_Window - request core profile when requested (WGL and Cocoa).
OpenGl_Context::CheckExtension() - retrieve extensions using glGetStringi().
OpenGl_Context::init() - set backward-compatible functions to NULL within core profile:
core11, core15, core20, core32back, core33back, core41back, core42back, core43back, core44back.
OpenGl_Context::BindDefaultVao() - create default VAO required for core profile.
OpenGl_Context::ReadGlVersion() - make method public.
OpenGl_ShaderManager - create programs using GLSL version 150 when available.
OpenGl_VertexBuffer, OpenGl_ShaderProgram, OpenGl_ShaderObject - use
functions set from core profile instead of compatibility.

TKOpenGl - escape deprecated functionality with runtime checks.

Command vcaps - add option -compatibleProfile to request core/compatibility profile.
NIS_View - prevenr rendering within Core profile (unsupported).

Test case for issue CR25854

Aspect_GraphicCallbackStruct::IsCoreProfile - add new field to the struct for NIS
2015-03-05 16:02:32 +03:00
kgv
c7ccbb77a0 update OpenGl_Window constructor arguments in OpenGl_Window_1.mm 2014-10-03 10:19:14 +04:00
dbv
0e9d3b83b8 0025051: Compilation issues on OS X 10.6.8
Added define to prevent inclusion of system glext.h on Mac OS X 10.6.8
2014-07-10 14:39:06 +04:00
kgv
73192b3746 0024847: CLang warnings -Wdeprecated-writable-strings in OpenGl_Display
Remove obsolete properties, remove OpenGl_Display class.
Fix compilation on Linux
2014-04-30 13:39:53 +04:00
abv
d5f74e42d6 0024624: Lost word in license statement in source files
License statement text corrected; compiler warnings caused by Bison 2.41 disabled for MSVC; a few other compiler warnings on 54-bit Windows eliminated by appropriate type cast
Wrong license statements corrected in several files.
Copyright and license statements added in XSD and GLSL files.
Copyright year updated in some files.
Obsolete documentation files removed from DrawResources.
2014-02-20 16:15:17 +04:00
bugmaster
6aca4d3977 0024516: Copyright information has been corrupted within some headers
Update incorrectly modified header files
2014-01-09 12:05:23 +04:00
bugmster
973c2be1e1 0024428: Implementation of LGPL license
The copying permission statements at the beginning of source files updated to refer to LGPL.
Copyright dates extended till 2014 in advance.
2013-12-17 12:42:41 +04:00
kgv
d9ec7d1d09 0024148: Test case bugs/vis/bug24131_markers works wrong with software MS OpenGL
Fix misprint in OpenGl_Window aGLForma -> aGLFormat
2013-09-30 11:39:12 +04:00
kgv
abe4607711 0024148: Test case bugs/vis/bug24131_markers works wrong on software MS OpenGL
Add pre-rendered images for custom markers.
OpenGl_Window - drop overcomplicated find_pixel_format() function
OpenGl_Caps - add option to force software OpenGL imlementation (MS or Apple)
Remove TODO from test case
Add grayscale custom marker to the test
Correct color bitness in attributes list
2013-09-26 20:22:05 +04:00
kgv
58655684c0 0024123: Create debug OpenGL context when requested (GL_ARB_debug_output)
Introduce new OpenGl_Caps class for unified graphic driver options access.
New command vgldebug to request debug OpenGL context.
OpenGl_Window  - create debug OpenGL context when requested (WGL-only).
OpenGl_Context - destroy arbTBO, arbIns members.
Workaround namespace collisions with Xlib macros
Eliminate new warning (unused argument in OpenGl_Context::debugCallbackWrap)
2013-08-29 15:46:40 +04:00
bugmaster
4fe5661921 0023243: Adapt OpenGL viewer for using in Cocoa applications on Mac OS X
Cocoa_Window draft
OpenGl_Context and OpenGl_Window - added support for Cocoa OpenGL context
TKV3d - accept Cocoa_Window
Draft version of ViewerInit method for Mac OS X
Added ViewerTest_CocoaEventManagerView
ViewerTest - attach events to Cocoa window
Cocoa_Window - disable autorelease on close
Fix for OpenGl_Context::Init method
Cocoa_Window - convert top-left coordinates to bottom-left
Added selection with rubber band (rubber band drawing still should be implemented)
Fixed OpenGl_Display initialization on Mac OS X
Fixed OpenGl includes
2012-12-24 17:46:07 +04:00