From 5440a790dea7e21e0d49d24a6999e5aa5c5fc789 Mon Sep 17 00:00:00 2001 From: omy Date: Thu, 28 May 2015 11:18:40 +0300 Subject: [PATCH] 0026275: Visualization, TKOpenGl - add public constructor for OpenGl_ShaderProgram --- src/OpenGl/OpenGl_ShaderProgram.hxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/OpenGl/OpenGl_ShaderProgram.hxx b/src/OpenGl/OpenGl_ShaderProgram.hxx index bb6d0ba1df..b9e58de279 100755 --- a/src/OpenGl/OpenGl_ShaderProgram.hxx +++ b/src/OpenGl/OpenGl_ShaderProgram.hxx @@ -145,11 +145,21 @@ public: //! List of pre-defined OCCT state uniform variables. static Standard_CString PredefinedKeywords[OpenGl_OCCT_NUMBER_OF_STATE_VARIABLES]; -protected: - //! Creates uninitialized shader program. + //! + //! WARNING! This constructor is not intended to be called anywhere but from OpenGl_ShaderManager::Create(). + //! Manager has been designed to synchronize camera position, lights definition and other aspects of the program implicitly, + //! as well as sharing same program across rendering groups. + //! + //! Program created outside the manager will be left detached from these routines, + //! and them should be performed manually by caller. + //! + //! This constructor has been made public to provide more flexibility to re-use OCCT OpenGL classes without OCCT Viewer itself. + //! If this is not the case - create the program using shared OpenGl_ShaderManager instance instead. Standard_EXPORT OpenGl_ShaderProgram (const Handle(Graphic3d_ShaderProgram)& theProxy = NULL); +protected: + static OpenGl_VariableSetterSelector mySetterSelector; public: