mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0024381: Visualization, TKOpenGl - revise matrices stack and usage of temporary matrices
0025301: Visualization, TKOpenGl - transpose matrix manually before glUniformMatrix4fv() OpenGl_View::ReleaseGlResources() - release GL resources of trihedron, do not destroy it
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include <Handle_OpenGl_Context.hxx>
|
||||
#include <OpenGl_Clipping.hxx>
|
||||
#include <OpenGl_GlCore11.hxx>
|
||||
#include <OpenGl_Utils.hxx>
|
||||
|
||||
//! Forward declarations
|
||||
struct OpenGl_GlFunctions;
|
||||
@@ -384,6 +385,18 @@ public:
|
||||
//! @return old value of the flag
|
||||
Standard_EXPORT Standard_Boolean SetGlNormalizeEnabled (Standard_Boolean isEnabled);
|
||||
|
||||
//! Applies matrix stored in ModelWorldState to OpenGl.
|
||||
void ApplyModelWorldMatrix();
|
||||
|
||||
//! Applies matrix stored in WorldViewState to OpenGl.
|
||||
void ApplyWorldViewMatrix();
|
||||
|
||||
//! Applies combination of matrices stored in ModelWorldState and WorldViewState to OpenGl.
|
||||
void ApplyModelViewMatrix();
|
||||
|
||||
//! Applies matrix stored in ProjectionState to OpenGl.
|
||||
void ApplyProjectionMatrix();
|
||||
|
||||
public:
|
||||
|
||||
//! @return messenger instance
|
||||
@@ -572,6 +585,12 @@ private: //! @name fields tracking current state
|
||||
Standard_Integer myRenderMode; //!< value for active rendering mode
|
||||
Standard_Integer myDrawBuffer; //!< current draw buffer
|
||||
|
||||
public:
|
||||
|
||||
OpenGl_Utils::MatrixState<Standard_ShortReal> ModelWorldState; //!< state of orientation matrix
|
||||
OpenGl_Utils::MatrixState<Standard_ShortReal> WorldViewState; //!< state of orientation matrix
|
||||
OpenGl_Utils::MatrixState<Standard_ShortReal> ProjectionState; //!< state of projection matrix
|
||||
|
||||
private:
|
||||
|
||||
//! Copying allowed only within Handles
|
||||
|
Reference in New Issue
Block a user