1 #ifndef COIN_SOGLIMAGE_H 2 #define COIN_SOGLIMAGE_H 43 #include <Inventor/SbBasic.h> 44 #include <Inventor/SbVec2s.h> 45 #include <Inventor/SbVec3s.h> 57 virtual void unref(
SoState * state = NULL);
59 static SoType getClassTypeId(
void);
60 virtual SoType getTypeId(
void)
const ;
61 virtual SbBool isOfType(
SoType type)
const;
78 unsigned char * destbuffer,
85 const Wrap wraps = REPEAT,
86 const Wrap wrapt = REPEAT,
87 const float quality = 0.5f);
89 void setPBuffer(
SoState * state,
91 const Wrap wraps = REPEAT,
92 const Wrap wrapt = REPEAT,
93 const float quality = 0.5f);
95 void setData(
const unsigned char * bytes,
97 const int numcomponents,
98 const Wrap wraps = REPEAT,
99 const Wrap wrapt = REPEAT,
100 const float quality = 0.5f,
101 const int border = 0,
102 SoState * createinstate = NULL);
104 void setData(
const unsigned char * bytes,
106 const int numcomponents,
107 const Wrap wraps = REPEAT,
108 const Wrap wrapt = REPEAT,
109 const Wrap wrapr = REPEAT,
110 const float quality = 0.5f,
111 const int border = 0,
112 SoState * createinstate = NULL);
114 virtual void setData(
const SbImage * image,
115 const Wrap wraps = REPEAT,
116 const Wrap wrapt = REPEAT,
117 const float quality = 0.5f,
118 const int border = 0,
119 SoState * createinstate = NULL);
121 virtual void setData(
const SbImage * image,
125 const float quality = 0.5f,
126 const int border = 0,
127 SoState * createinstate = NULL);
134 LINEAR_MAG_FILTER = 0x0004,
135 LINEAR_MIN_FILTER = 0x0008,
136 LINEAR_MIPMAP_FILTER = 0x0010,
139 FORCE_TRANSPARENCY_TRUE = 0x0020,
140 FORCE_TRANSPARENCY_FALSE = 0x0040,
141 FORCE_ALPHA_TEST_TRUE = 0x0080,
142 FORCE_ALPHA_TEST_FALSE = 0x0100,
154 USE_QUALITY_VALUE = 0X8000
157 void setFlags(
const uint32_t flags);
158 uint32_t getFlags(
void)
const;
160 const SbImage * getImage(
void)
const;
163 SbBool hasTransparency(
void)
const;
164 SbBool useAlphaTest(
void)
const;
165 Wrap getWrapS(
void)
const;
166 Wrap getWrapT(
void)
const;
167 Wrap getWrapR(
void)
const;
169 float getQuality(
void)
const;
170 uint32_t getGLImageId(
void)
const;
174 void incAge(
void)
const;
175 void resetAge(
void)
const;
176 virtual void unrefOldDL(
SoState * state,
const uint32_t maxage);
181 class SoGLImageP * pimpl;
182 friend class SoGLImageP;
183 static void cleanupClass(
void);
187 static void beginFrame(
SoState * state);
189 static void endFrame(
SoState * state);
190 static void setDisplayListMaxAge(
const uint32_t maxage);
191 static void freeAllImages(
SoState * state = NULL);
193 void setEndFrameCallback(
void (*cb)(
void *),
void * closure);
194 int getNumFramesSinceUsed(
void)
const;
197 static void initClass(
void);
198 static void setResizeCallback(SoGLImageResizeCB * f,
void * closure);
201 static void registerImage(
SoGLImage * image);
202 static void unregisterImage(
SoGLImage * image);
205 #endif // !COIN_SOGLIMAGE_H ResizeReason
Definition: SoGLImage.h:70
Flags
Definition: SoGLImage.h:130
Wrap
Definition: SoGLImage.h:63
The SoState class manages the Coin scenegraph traversal state data.
Definition: SoState.h:44
The SbVec3s class is a 3 dimensional vector with short integer coordinates.
Definition: SbVec3s.h:51
The SoGLDisplayList class stores and manages OpenGL display lists.
Definition: SoGLDisplayList.h:43
The SoGLImage class is used to handle OpenGL 2D/3D textures.
Definition: SoGLImage.h:53
SbBool SoGLImageResizeCB(SoState *state, const SbVec3s &newsize, unsigned char *destbuffer, ResizeReason reason, void *closure, class SoGLImage *image)
Definition: SoGLImage.h:76
The SbImage class is an abstract datatype for 2D and 3D images.
Definition: SbImage.h:46
The SbVec2s class is a 2 dimensional vector with short integer coordinates.
Definition: SbVec2s.h:51
The SoType class is the basis for the run-time type system in Coin.
Definition: SoType.h:59