fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / CgFXMaterial / OSGCgFXTechnique.h
blobacdede6c7930ed22e2ac8454bf0f75bc399fc84e
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 _OSGCGFXTECHNIQUE_H_
40 #define _OSGCGFXTECHNIQUE_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGCgFXTechniqueBase.h"
47 #include "OSGCG.h"
49 OSG_BEGIN_NAMESPACE
51 class DrawEnv;
52 class CgFXMaterial;
54 /*! \brief CgFXTechnique class. See \ref
55 PageKernelCGFXTechnique for a description.
58 class OSG_CONTRIBCGFX_DLLMAPPING CgFXTechnique : public CgFXTechniqueBase
60 private:
62 typedef CgFXTechniqueBase Inherited;
64 /*========================== PUBLIC =================================*/
66 static const UInt8 TechniqueValid = 0x01;
67 static const UInt8 ValidationTried = 0x02;
69 public:
71 /*---------------------------------------------------------------------*/
72 /*! \name Sync */
73 /*! \{ */
75 virtual void changed(ConstFieldMaskArg whichField,
76 UInt32 origin,
77 BitVector detail );
79 /*! \} */
80 /*---------------------------------------------------------------------*/
81 /*! \name Output */
82 /*! \{ */
84 virtual void dump( UInt32 uiIndent = 0,
85 const BitVector bvFlags = 0) const;
87 /*! \} */
88 /*---------------------------------------------------------------------*/
89 /*! \name Output */
90 /*! \{ */
92 virtual void rebuildState (void );
93 virtual bool isTransparent(void ) const;
94 virtual UInt32 getNPasses (void );
95 virtual State *getState (UInt32 index = 0);
97 /*! \} */
98 /*---------------------------------------------------------------------*/
99 /*! \name Timer */
100 /*! \{ */
102 bool validate(CgFXMaterial *pMat,
103 DrawEnv *pEnv);
105 /*! \} */
106 /*---------------------------------------------------------------------*/
107 /*! \name Parameter Access */
108 /*! \{ */
110 /*! \} */
111 /*---------------------------------------------------------------------*/
112 /*! \name Texture specific */
113 /*! \{ */
115 /*! \} */
116 /*========================= PROTECTED ===============================*/
118 protected:
120 // Variables should all be in CGFXTechniqueBase.
122 CGtechnique _pCGTechnique;
123 UInt8 _uiValidationState;
125 /*---------------------------------------------------------------------*/
126 /*! \name Constructors */
127 /*! \{ */
129 CgFXTechnique(void);
130 CgFXTechnique(const CgFXTechnique &source);
132 /*! \} */
133 /*---------------------------------------------------------------------*/
134 /*! \name Destructors */
135 /*! \{ */
137 virtual ~CgFXTechnique(void);
139 /*! \} */
140 /*---------------------------------------------------------------------*/
141 /*! \name Init */
142 /*! \{ */
144 void setTechnique(CGtechnique pTechnique);
145 CGtechnique getTechnique(void );
147 /*! \} */
148 /*---------------------------------------------------------------------*/
149 /*! \name Init */
150 /*! \{ */
152 virtual void resolveLinks(void);
154 /*! \} */
155 /*---------------------------------------------------------------------*/
156 /*! \name Init */
157 /*! \{ */
159 static void initMethod(InitPhase ePhase);
161 /*! \} */
162 /*========================== PRIVATE ================================*/
164 private:
166 friend class FieldContainer;
167 friend class CgFXTechniqueBase;
168 friend class CgFXMaterial;
170 // prohibit default functions (move to 'public' if you need one)
171 void operator =(const CgFXTechnique &source);
174 typedef CgFXTechnique *CgFXTechniqueP;
176 OSG_END_NAMESPACE
178 #include "OSGCgFXTechniqueBase.inl"
179 #include "OSGCgFXTechnique.inl"
182 #endif /* _OSGCGFXTECHNIQUE_H_ */