1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
15 * This library is free software; you can redistribute it and/or modify it *
16 * under the terms of the GNU Library General Public License as published *
17 * by the Free Software Foundation, version 2. *
19 * This library is distributed in the hope that it will be useful, but *
20 * WITHOUT ANY WARRANTY; without even the implied warranty of *
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
22 * Library General Public License for more details. *
24 * You should have received a copy of the GNU Library General Public *
25 * License along with this library; if not, write to the Free Software *
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSHADERVARIABLE_H_
40 #define _OSGSHADERVARIABLE_H_
45 #include "OSGShaderVariableBase.h"
49 class ShaderProgramVariables
;
51 /*! \brief ShaderParameter class. See \ref
52 PageSystemShaderParameter for a description.
53 \ingroup GrpSystemShaderBase
54 \ingroup GrpLibOSGSystem
58 class OSG_SYSTEM_DLLMAPPING ShaderVariable
: public ShaderVariableBase
62 /*========================== PUBLIC =================================*/
66 typedef ShaderVariableBase Inherited
;
68 static bool WarnUnknown
;
70 /*---------------------------------------------------------------------*/
74 virtual void changed(ConstFieldMaskArg whichField
,
79 /*---------------------------------------------------------------------*/
83 const std::string
&getName(void) const;
86 /*---------------------------------------------------------------------*/
90 virtual bool isProcedural(void) const;
93 /*---------------------------------------------------------------------*/
97 virtual void dump( UInt32 uiIndent
= 0,
98 const BitVector bvFlags
= 0) const;
101 /*---------------------------------------------------------------------*/
102 /*! \name TypeId's */
112 SHVTypeVec2s
, // missing
113 SHVTypeVec3s
, // missing
114 SHVTypeVec4s
, // missing
121 SHVTypeString
, // missing
122 SHVTypeMBool
, // missing
126 SHVTypeMVec2s
, // missing
127 SHVTypeMVec3s
, // missing
128 SHVTypeMVec4s
, // missing
133 SHVTypeMString
, // missing
137 SHVTypeShaderStorageBlock
146 SHVType
getTypeId(void);
149 /*========================= PROTECTED ===============================*/
155 /*---------------------------------------------------------------------*/
156 /*! \name Constructors */
159 ShaderVariable(void);
160 ShaderVariable(const ShaderVariable
&source
);
163 /*---------------------------------------------------------------------*/
164 /*! \name Destructors */
167 virtual ~ShaderVariable(void);
169 void setTypeId (SHVType type
);
172 /*---------------------------------------------------------------------*/
176 static void initMethod(InitPhase ePhase
);
179 /*========================== PRIVATE ================================*/
183 friend class FieldContainer
;
184 friend class ShaderVariableBase
;
185 friend class ShaderProgramVariables
;
187 // prohibit default functions (move to 'public' if you need one)
188 void operator =(const ShaderVariable
&source
);
191 typedef ShaderVariable
*ShaderVariableP
;
195 #include "OSGShaderVariableBase.inl"
196 #include "OSGShaderVariable.inl"
198 #endif /* _OSGSHADERVARIABLE_H_ */