changed: gcc8 base update
[opensg.git] / Source / System / State / Auxiliary / OSGTextureImageChunk.h
blobd1c93cacfa483c701178262f5f37b48ee1ae7e02
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 _OSGTEXTUREIMAGECHUNK_H_
40 #define _OSGTEXTUREIMAGECHUNK_H_
41 #ifdef __sgi
42 #pragma once
43 #endif
45 #include "OSGTextureImageChunkBase.h"
47 OSG_BEGIN_NAMESPACE
49 /*! \brief State chunk for textures. See \ref PageSystemTextureImageChunk
50 for a description.
51 \ingroup GrpStateAuxiliaryObj
52 \ingroup GrpLibOSGState
53 \includebasedoc
56 class OSG_STATE_DLLMAPPING TextureImageChunk : public TextureImageChunkBase
58 /*========================== PUBLIC =================================*/
60 public:
62 /*---------------------------------------------------------------------*/
63 /*! \name Chunk Class Access */
64 /*! \{ */
66 virtual const StateChunkClass *getClass(void) const;
68 /*! \} */
69 /*---------------------------------------------------------------------*/
70 /*! \name Static Chunk Class Access */
71 /*! \{ */
73 static UInt32 getStaticClassId(void);
74 static const StateChunkClass *getStaticClass (void);
76 /*! \} */
77 /*---------------------------------------------------------------------*/
78 /*! \name Chunk Id */
79 /*! \{ */
81 /*! \} */
82 /*---------------------------------------------------------------------*/
83 /*! \name Sync */
84 /*! \{ */
86 virtual void changed(ConstFieldMaskArg whichField,
87 UInt32 origin,
88 BitVector details);
90 /*! \} */
91 /*---------------------------------------------------------------------*/
92 /*! \name Output */
93 /*! \{ */
95 virtual void dump( UInt32 uiIndent = 0,
96 const BitVector bvFlags = 0) const;
98 /*! \} */
99 /*---------------------------------------------------------------------*/
100 /*! \name State */
101 /*! \{ */
103 virtual void activate (DrawEnv *pEnv,
104 UInt32 index = 0);
106 virtual void changeFrom (DrawEnv *pEnv,
107 StateChunk *pOld,
108 UInt32 index = 0);
110 virtual void deactivate (DrawEnv *pEnv,
111 UInt32 index = 0);
113 virtual bool isTransparent (void) const;
115 /*! \} */
116 /*---------------------------------------------------------------------*/
117 /*! \name query */
118 /*! \{ */
120 //GLenum determineTextureTarget(Window *pWindow) const;
122 /*! \} */
123 /*---------------------------------------------------------------------*/
124 /*! \name Comparison */
125 /*! \{ */
127 virtual Real32 switchCost(StateChunk * chunk);
129 virtual bool operator < (const StateChunk &other) const;
131 virtual bool operator == (const StateChunk &other) const;
132 virtual bool operator != (const StateChunk &other) const;
134 /*! \} */
135 /*---------------------------------------------------------------------*/
136 /*! \name Texture specific */
137 /*! \{ */
139 #if 0
140 virtual void validate(DrawEnv *pEnv);
141 #endif
143 /*! \} */
144 /*---------------------------------------------------------------------*/
145 /*! \name Multitexture handling */
146 /*! \{ */
148 /*! \} */
149 /*========================= PROTECTED ===============================*/
151 protected:
153 static UInt32 _arbShaderImageLS;
154 static UInt32 FuncIdBindImageTexture;
156 // class. Used for indexing in State
157 // protected to give CubeTextureChunk access
158 static StateChunkClass _class;
160 /*---------------------------------------------------------------------*/
161 /*! \name Init */
162 /*! \{ */
164 void onCreate (const TextureImageChunk *source = NULL);
165 void onCreateAspect(const TextureImageChunk *createAspect,
166 const TextureImageChunk *source = NULL);
168 /*! \} */
169 /*---------------------------------------------------------------------*/
170 /*! \name Constructors */
171 /*! \{ */
173 TextureImageChunk(void);
174 TextureImageChunk(const TextureImageChunk &source);
176 /*! \} */
177 /*---------------------------------------------------------------------*/
178 /*! \name Destructors */
179 /*! \{ */
181 virtual ~TextureImageChunk(void);
183 /*! \} */
184 /*---------------------------------------------------------------------*/
185 /*! \name Init */
186 /*! \{ */
188 static void initMethod(InitPhase ePhase);
190 /*! \} */
191 /*---------------------------------------------------------------------*/
192 /*! \name GL */
193 /*! \{ */
195 /*! \} */
196 /*---------------------------------------------------------------------*/
198 /*========================== PRIVATE ================================*/
200 private:
202 typedef TextureImageChunkBase Inherited;
204 friend class FieldContainer;
205 friend class TextureImageChunkBase;
207 // prohibit default functions (move to 'public' if you need one)
208 void operator =(const TextureImageChunk &source);
211 typedef TextureImageChunk *TextureImageChunkP;
213 OSG_END_NAMESPACE
215 #include "OSGTextureImageChunkBase.inl"
216 #include "OSGTextureImageChunk.inl"
218 #endif /* _OSGTEXTUREIMAGECHUNK_H_ */