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 _OSGCGFXTECHNIQUE_H_
40 #define _OSGCGFXTECHNIQUE_H_
45 #include "OSGCgFXTechniqueBase.h"
54 /*! \brief CgFXTechnique class. See \ref
55 PageKernelCGFXTechnique for a description.
58 class OSG_CONTRIBCGFX_DLLMAPPING CgFXTechnique
: public CgFXTechniqueBase
62 typedef CgFXTechniqueBase Inherited
;
64 /*========================== PUBLIC =================================*/
66 static const UInt8 TechniqueValid
= 0x01;
67 static const UInt8 ValidationTried
= 0x02;
71 /*---------------------------------------------------------------------*/
75 virtual void changed(ConstFieldMaskArg whichField
,
80 /*---------------------------------------------------------------------*/
84 virtual void dump( UInt32 uiIndent
= 0,
85 const BitVector bvFlags
= 0) const;
88 /*---------------------------------------------------------------------*/
92 virtual void rebuildState (void );
93 virtual bool isTransparent(void ) const;
94 virtual UInt32
getNPasses (void );
95 virtual State
*getState (UInt32 index
= 0);
98 /*---------------------------------------------------------------------*/
102 bool validate(CgFXMaterial
*pMat
,
106 /*---------------------------------------------------------------------*/
107 /*! \name Parameter Access */
111 /*---------------------------------------------------------------------*/
112 /*! \name Texture specific */
116 /*========================= PROTECTED ===============================*/
120 // Variables should all be in CGFXTechniqueBase.
122 CGtechnique _pCGTechnique
;
123 UInt8 _uiValidationState
;
125 /*---------------------------------------------------------------------*/
126 /*! \name Constructors */
130 CgFXTechnique(const CgFXTechnique
&source
);
133 /*---------------------------------------------------------------------*/
134 /*! \name Destructors */
137 virtual ~CgFXTechnique(void);
140 /*---------------------------------------------------------------------*/
144 void setTechnique(CGtechnique pTechnique
);
145 CGtechnique
getTechnique(void );
148 /*---------------------------------------------------------------------*/
152 virtual void resolveLinks(void);
155 /*---------------------------------------------------------------------*/
159 static void initMethod(InitPhase ePhase
);
162 /*========================== 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
;
178 #include "OSGCgFXTechniqueBase.inl"
179 #include "OSGCgFXTechnique.inl"
182 #endif /* _OSGCGFXTECHNIQUE_H_ */