00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : VSG (MMM YYYY) 00022 **=======================================================================*/ 00023 00024 #ifndef _SO_GL_SHADER_PROGRAM_ELEMENT_ 00025 #define _SO_GL_SHADER_PROGRAM_ELEMENT_ 00026 00027 #include <Inventor/elements/SoShaderProgramElement.h> 00028 #include <SoDeprecationRules.h> 00029 00030 class SoGLRenderAction; 00031 class SoGLShaderProgram ; 00032 class SoShaderProgram ; 00033 00047 SoEXTENDER_Documented class SoDEPRECATED SoGLShaderProgramElement : public SoShaderProgramElement 00048 { 00049 SO_ELEMENT_HEADER(SoGLShaderProgramElement); 00050 00051 public: 00055 static void set(SoState *state, SoNode *node); 00056 00060 virtual void pop(SoState *state, const SoElement *prevTopElement); 00061 00065 static int getMaxTextureImageUnit(SoState*state=NULL); 00066 00070 static int getMaxTextureCoords(SoState* state=NULL); 00071 00072 private: 00073 // Initializes the classes. 00074 static void initClass(); 00075 static void exitClass(); 00076 00077 static SoGLShaderProgramElement * getCurrentElement(SoState *); 00078 00086 static SbBool setShaderEnabled(SoState * state, SbBool value); 00087 00104 static SoGLShaderProgramElement* enableShader(SoGLRenderAction* action, SoShaderProgram* shaderInternal); 00105 00112 static void disableShader(SoState *state, const SoGLShaderProgramElement* shaderElement, 00113 SoShaderProgram* shaderInternal); 00114 00115 private: 00116 // Destructor 00117 virtual ~SoGLShaderProgramElement(); 00118 00119 }; 00120 #endif /* _SO_GL_SHADER_PROGRAM_ELEMENT_ */ 00121 00122 00123