fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / System / State / Shader / Variables / OSGShaderVariableOSG.h
blob9314965c2d5dac9ba462b3bcad7c7aef2966fc02
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2002 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *
10 * *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
13 * License *
14 * *
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. *
18 * *
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. *
23 * *
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. *
27 * *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
30 * Changes *
31 * *
32 * *
33 * *
34 * *
35 * *
36 * *
37 \*---------------------------------------------------------------------------*/
39 #ifndef _OSGSHADERVARIABLEOSG_H_
40 #define _OSGSHADERVARIABLEOSG_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGShaderVariableOSGBase.h"
47 OSG_BEGIN_NAMESPACE
49 class ShaderProgramVariables;
51 /*! \brief ShaderVariableOSG class. See \ref
52 PageSystemShaderVariableOSG for a description.
53 \ingroup GrpSystemShaderVariables
54 \ingroup GrpLibOSGSystem
55 \includebasedoc
58 class OSG_SYSTEM_DLLMAPPING ShaderVariableOSG : public ShaderVariableOSGBase
60 private:
62 /*========================== PUBLIC =================================*/
64 public:
66 typedef ShaderVariableOSGBase Inherited;
68 enum SHVOSGType
70 OSGUnknown = 0,
71 OSGWorldMatrix,
72 OSGInvWorldMatrix,
73 OSGTransInvWorldMatrix,
74 OSGCameraOrientation,
75 OSGCameraPosition,
76 OSGViewMatrix,
77 OSGInvViewMatrix,
78 OSGProjectionMatrix,
79 OSGModelViewMatrix,
80 OSGViewportSize,
81 #ifdef OSG_OGL_COREONLY
82 OSGNormalMatrix,
83 OSGModelViewProjectionMatrix,
84 #endif
85 OSGStereoLeftEye,
86 OSGDrawerId,
87 OSGDrawableId,
88 OSGNodeId,
89 OSGNodeBoxMin,
90 OSGNodeBoxMax,
91 OSGNodeBoxCenter,
92 OSGNodeWorldBoxMin,
93 OSGNodeWorldBoxMax,
94 OSGNodeWorldBoxCenter,
95 OSGActiveLightsMask,
96 OSGLight0Active,
97 OSGLight1Active,
98 OSGLight2Active,
99 OSGLight3Active,
100 OSGLight4Active,
101 OSGLight5Active,
102 OSGLight6Active,
103 OSGLight7Active
107 /*---------------------------------------------------------------------*/
108 /*! \name Sync */
109 /*! \{ */
111 virtual void changed(ConstFieldMaskArg whichField,
112 UInt32 origin,
113 BitVector details);
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name Output */
118 /*! \{ */
120 virtual void dump( UInt32 uiIndent = 0,
121 const BitVector bvFlags = 0) const;
123 /*! \} */
124 /*---------------------------------------------------------------------*/
125 /*! \name Output */
126 /*! \{ */
128 virtual bool isProcedural(void) const;
130 /*! \} */
131 /*---------------------------------------------------------------------*/
132 /*! \name Output */
133 /*! \{ */
135 void evaluate(DrawEnv *pEnv,
136 Int32 &iLocation);
138 /*! \} */
139 /*========================= PROTECTED ===============================*/
141 protected:
143 /*---------------------------------------------------------------------*/
144 /*! \name Constructors */
145 /*! \{ */
147 ShaderVariableOSG(void);
148 ShaderVariableOSG(const ShaderVariableOSG &source);
150 /*! \} */
151 /*---------------------------------------------------------------------*/
152 /*! \name Destructors */
153 /*! \{ */
155 virtual ~ShaderVariableOSG(void);
157 /*! \} */
158 /*---------------------------------------------------------------------*/
159 /*! \name Init */
160 /*! \{ */
162 static void initMethod(InitPhase ePhase);
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Destructors */
167 /*! \{ */
169 void setName(const std::string &value);
171 /*! \} */
172 /*========================== PRIVATE ================================*/
174 private:
176 friend class FieldContainer;
177 friend class ShaderVariableOSGBase;
178 friend class ShaderProgramVariables;
180 // prohibit default functions (move to 'public' if you need one)
181 void operator =(const ShaderVariableOSG &source);
184 typedef ShaderVariableOSG *ShaderVariableOSGP;
186 OSG_END_NAMESPACE
188 #include "OSGShaderVariableOSGBase.inl"
189 #include "OSGShaderVariableOSG.inl"
191 #endif /* _OSGSHADERVARIABLEOSG_H_ */