changed: gcc8 base update
[opensg.git] / Source / System / State / Auxiliary / OSGTextureObjRefChunk.h
blob172a3df0ba2bb42cf317a1502cd632b95dc5184d
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@zghdv.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 _OSGTEXTUREOBJREFCHUNK_H_
40 #define _OSGTEXTUREOBJREFCHUNK_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGConfig.h"
46 #include "OSGGLEXT.h"
47 #include "OSGWindow.h"
48 #include "OSGImage.h"
49 #include "OSGTextureObjRefChunkBase.h"
51 OSG_BEGIN_NAMESPACE
53 /*! \brief State chunk for textures. See \ref PageSystemTextureObjRefChunk
54 for a description.
55 \ingroup GrpStateAuxiliaryObj
56 \ingroup GrpLibOSGState
57 \includebasedoc
60 class OSG_STATE_DLLMAPPING TextureObjRefChunk : public TextureObjRefChunkBase
62 /*========================== PUBLIC =================================*/
64 public:
66 /*---------------------------------------------------------------------*/
67 /*! \name Chunk Class Access */
68 /*! \{ */
70 /*! \} */
71 /*---------------------------------------------------------------------*/
72 /*! \name Static Chunk Class Access */
73 /*! \{ */
75 /*! \} */
76 /*---------------------------------------------------------------------*/
77 /*! \name Chunk Id */
78 /*! \{ */
80 /*! \} */
81 /*---------------------------------------------------------------------*/
82 /*! \name Sync */
83 /*! \{ */
85 virtual void changed(ConstFieldMaskArg whichField,
86 UInt32 origin,
87 BitVector details);
89 /*! \} */
90 /*---------------------------------------------------------------------*/
91 /*! \name Output */
92 /*! \{ */
94 virtual void dump( UInt32 uiIndent = 0,
95 const BitVector bvFlags = 0) const;
97 /*! \} */
98 /*---------------------------------------------------------------------*/
99 /*! \name State */
100 /*! \{ */
102 virtual void activate (DrawEnv *pEnv,
103 UInt32 index = 0);
105 virtual void changeFrom (DrawEnv *pEnv,
106 StateChunk *pOld,
107 UInt32 index = 0);
109 virtual void deactivate (DrawEnv *pEnv,
110 UInt32 index = 0);
112 virtual bool isTransparent (void) const;
114 /*! \} */
115 /*---------------------------------------------------------------------*/
116 /*! \name query */
117 /*! \{ */
119 //GLenum determineTextureTarget(Window *pWindow) const;
121 /*! \} */
122 /*---------------------------------------------------------------------*/
123 /*! \name Comparison */
124 /*! \{ */
126 virtual Real32 switchCost(StateChunk * chunk);
128 virtual bool operator < (const StateChunk &other) const;
130 virtual bool operator == (const StateChunk &other) const;
131 virtual bool operator != (const StateChunk &other) const;
133 /*! \} */
134 /*---------------------------------------------------------------------*/
135 /*! \name Texture specific */
136 /*! \{ */
138 /*! \} */
139 /*---------------------------------------------------------------------*/
140 /*! \name Multitexture handling */
141 /*! \{ */
143 virtual void validate (DrawEnv *pEnv);
144 virtual Int32 getOpenGLId (DrawEnv *pEnv);
145 virtual GLenum determineInternalFormat(void );
147 /*! \} */
148 /*========================= PROTECTED ===============================*/
150 protected:
152 /*---------------------------------------------------------------------*/
153 /*! \name Init */
154 /*! \{ */
156 void onCreate (const TextureObjRefChunk *source = NULL);
157 void onCreateAspect(const TextureObjRefChunk *createAspect,
158 const TextureObjRefChunk *source = NULL);
160 /*! \} */
161 /*---------------------------------------------------------------------*/
162 /*! \name Constructors */
163 /*! \{ */
165 TextureObjRefChunk(void);
166 TextureObjRefChunk(const TextureObjRefChunk &source);
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Destructors */
171 /*! \{ */
173 virtual ~TextureObjRefChunk(void);
175 /*! \} */
176 /*---------------------------------------------------------------------*/
177 /*! \name Init */
178 /*! \{ */
180 static void initMethod(InitPhase ePhase);
182 /*! \} */
183 /*---------------------------------------------------------------------*/
184 /*! \name GL */
185 /*! \{ */
187 /*! \} */
188 /*---------------------------------------------------------------------*/
190 /*========================== PRIVATE ================================*/
192 private:
194 typedef TextureObjRefChunkBase Inherited;
196 friend class FieldContainer;
197 friend class TextureObjRefChunkBase;
199 // prohibit default functions (move to 'public' if you need one)
200 void operator =(const TextureObjRefChunk &source);
203 typedef TextureObjRefChunk *TextureObjRefChunkP;
205 OSG_END_NAMESPACE
207 #include "OSGTextureObjRefChunkBase.inl"
208 #include "OSGTextureObjRefChunk.inl"
210 #endif /* _OSGTEXTUREOBJREFCHUNK_H_ */