]> OCCT Git - occt.git/commitdiff
0026275: Visualization, TKOpenGl - add public constructor for OpenGl_ShaderProgram
authoromy <omy@opencascade.com>
Thu, 28 May 2015 08:18:40 +0000 (11:18 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 4 Jun 2015 09:16:57 +0000 (12:16 +0300)
src/OpenGl/OpenGl_ShaderProgram.hxx

index bb6d0ba1df81a7a2fa16cf13e64303c89687e5c5..b9e58de2795b97272c0cfc0f7f31b1aa6e7cd3d5 100755 (executable)
@@ -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: