changed: gcc8 base update
[opensg.git] / Source / System / State / Auxiliary / OSGTextureSelectChunk.h
blob66c4abec9a420fb4d1371fb2bd992417cd7e9dd8
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 _OSGTEXTURESELECTCHUNK_H_
40 #define _OSGTEXTURESELECTCHUNK_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGTextureSelectChunkBase.h"
47 OSG_BEGIN_NAMESPACE
49 /*! \brief State chunk for textures. See \ref PageSystemTextureSelectChunk
50 for a description.
51 \ingroup GrpStateAuxiliaryObj
52 \ingroup GrpLibOSGState
53 \includebasedoc
56 class OSG_STATE_DLLMAPPING TextureSelectChunk : public TextureSelectChunkBase
58 /*========================== PUBLIC =================================*/
60 public:
62 /*---------------------------------------------------------------------*/
63 /*! \name Chunk Class Access */
64 /*! \{ */
66 /*! \} */
67 /*---------------------------------------------------------------------*/
68 /*! \name Static Chunk Class Access */
69 /*! \{ */
71 /*! \} */
72 /*---------------------------------------------------------------------*/
73 /*! \name Chunk Id */
74 /*! \{ */
76 /*! \} */
77 /*---------------------------------------------------------------------*/
78 /*! \name Sync */
79 /*! \{ */
81 virtual void changed(ConstFieldMaskArg whichField,
82 UInt32 origin,
83 BitVector details);
85 /*! \} */
86 /*---------------------------------------------------------------------*/
87 /*! \name Output */
88 /*! \{ */
90 virtual void dump( UInt32 uiIndent = 0,
91 const BitVector bvFlags = 0) const;
93 /*! \} */
94 /*---------------------------------------------------------------------*/
95 /*! \name State */
96 /*! \{ */
98 virtual void activate (DrawEnv *pEnv,
99 UInt32 index = 0);
101 virtual void changeFrom (DrawEnv *pEnv,
102 StateChunk *pOld,
103 UInt32 index = 0);
105 virtual void deactivate (DrawEnv *pEnv,
106 UInt32 index = 0);
108 virtual bool isTransparent (void) const;
110 /*! \} */
111 /*---------------------------------------------------------------------*/
112 /*! \name query */
113 /*! \{ */
115 //GLenum determineTextureTarget(Window *pWindow) const;
117 /*! \} */
118 /*---------------------------------------------------------------------*/
119 /*! \name Comparison */
120 /*! \{ */
122 virtual Real32 switchCost(StateChunk * chunk);
124 virtual bool operator < (const StateChunk &other) const;
126 virtual bool operator == (const StateChunk &other) const;
127 virtual bool operator != (const StateChunk &other) const;
129 /*! \} */
130 /*---------------------------------------------------------------------*/
131 /*! \name Texture specific */
132 /*! \{ */
134 virtual void validate (DrawEnv *pEnv);
135 virtual Int32 getOpenGLId (DrawEnv *pEnv);
136 virtual GLenum determineInternalFormat(void );
138 /*! \} */
139 /*---------------------------------------------------------------------*/
140 /*! \name Multitexture handling */
141 /*! \{ */
143 /*! \} */
144 /*========================= PROTECTED ===============================*/
146 protected:
148 /*---------------------------------------------------------------------*/
149 /*! \name Init */
150 /*! \{ */
152 void onCreate (const TextureSelectChunk *source = NULL);
153 void onCreateAspect(const TextureSelectChunk *createAspect,
154 const TextureSelectChunk *source = NULL);
156 /*! \} */
157 /*---------------------------------------------------------------------*/
158 /*! \name Constructors */
159 /*! \{ */
161 TextureSelectChunk(void);
162 TextureSelectChunk(const TextureSelectChunk &source);
164 /*! \} */
165 /*---------------------------------------------------------------------*/
166 /*! \name Destructors */
167 /*! \{ */
169 virtual ~TextureSelectChunk(void);
171 /*! \} */
172 /*---------------------------------------------------------------------*/
173 /*! \name Init */
174 /*! \{ */
176 static void initMethod(InitPhase ePhase);
178 /*! \} */
179 /*---------------------------------------------------------------------*/
180 /*! \name GL */
181 /*! \{ */
183 /*! \} */
184 /*---------------------------------------------------------------------*/
186 /*========================== PRIVATE ================================*/
188 private:
190 typedef TextureSelectChunkBase Inherited;
192 friend class FieldContainer;
193 friend class TextureSelectChunkBase;
195 // prohibit default functions (move to 'public' if you need one)
196 void operator =(const TextureSelectChunk &source);
199 typedef TextureSelectChunk *TextureSelectChunkP;
201 OSG_END_NAMESPACE
203 #include "OSGTextureSelectChunkBase.inl"
204 #include "OSGTextureSelectChunk.inl"
206 #endif /* _OSGTEXTURESELECTCHUNK_H_ */