changed: gcc8 base update
[opensg.git] / Source / System / State / Base / OSGTextureObjChunkBase.cpp
blobf33ad0a2eca8e81d82a849c204134af257b5cc0a
1 /*---------------------------------------------------------------------------*\
2 * OpenSG *
3 * *
4 * *
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
6 * *
7 * www.opensg.org *
8 * *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
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 /*****************************************************************************\
40 *****************************************************************************
41 ** **
42 ** This file is automatically generated. **
43 ** **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
46 ** **
47 ** Do not change this file, changes should be done in the derived **
48 ** class TextureObjChunk!
49 ** **
50 *****************************************************************************
51 \*****************************************************************************/
53 #include <cstdlib>
54 #include <cstdio>
56 #ifdef WIN32
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
59 #endif
61 #include "OSGConfig.h"
64 #include "OSGGL.h" // InternalFormat default header
65 #include "OSGGL.h" // ExternalFormat default header
66 #include "OSGGL.h" // MinFilter default header
67 #include "OSGGL.h" // MagFilter default header
68 #include "OSGGL.h" // WrapS default header
69 #include "OSGGL.h" // WrapT default header
70 #include "OSGGL.h" // WrapR default header
71 #include "OSGGL.h" // CompareMode default header
72 #include "OSGGL.h" // CompareFunc default header
73 #include "OSGGL.h" // DepthMode default header
75 #include "OSGImage.h" // Image Class
77 #include "OSGTextureObjChunkBase.h"
78 #include "OSGTextureObjChunk.h"
80 #include <boost/bind.hpp>
82 OSG_BEGIN_NAMESPACE
84 /***************************************************************************\
85 * Description *
86 \***************************************************************************/
88 /*! \class OSG::TextureObjChunk
89 See \ref PageSystemTextureObjChunk for a description.
91 This chunk wraps glTexImage[123]D (OSG::TextureObjChunk::_sfImage,
92 OSG::TextureObjChunk::_sfInternalFormat, OSG::TextureObjChunk::_sfExternalFormat),
93 glTexParameter (OSG::TextureObjChunk::_sfMinFilter,
94 OSG::TextureObjChunk::_sfMagFilter, OSG::TextureObjChunk::_sfWrapS,
95 OSG::TextureObjChunk::_sfWrapT, OSG::TextureObjChunk::_sfWrapR), glTexEnv
96 (OSG::TextureObjChunk::_sfEnvMode, OSG::TextureObjChunk::_sfEnvColor,
97 OSG::TextureObjChunk::_sfPriority).
99 The ARB combine extension is also supported,
100 where available (OSG::TextureObjChunk::_sfEnvCombineRGB,
101 OSG::TextureObjChunk::_sfEnvScaleRGB, OSG::TextureObjChunk::_sfEnvSource0RGB,
102 OSG::TextureObjChunk::_sfEnvSource1RGB, OSG::TextureObjChunk::_sfEnvSource2RGB,
103 OSG::TextureObjChunk::_sfEnvOperand0RGB, OSG::TextureObjChunk::_sfEnvOperand1RGB,
104 OSG::TextureObjChunk::_sfEnvOperand2RGB,
105 OSG::TextureObjChunk::_sfEnvCombineAlpha, OSG::TextureObjChunk::_sfEnvScaleAlpha,
106 OSG::TextureObjChunk::_sfEnvSource0Alpha, OSG::TextureObjChunk::_sfEnvSource1Alpha,
107 OSG::TextureObjChunk::_sfEnvSource2Alpha, OSG::TextureObjChunk::_sfEnvOperand0Alpha,
108 OSG::TextureObjChunk::_sfEnvOperand1Alpha,
109 OSG::TextureObjChunk::_sfEnvOperand2Alpha).
111 It is possible to enable the point
112 sprite coordinate replacement (OSG::TextureObjChunk::_sfPointSprite), see \ref
113 PageSystemPointChunk for details. The two parameters
114 OSG::TextureObjChunk::_sfScale and OSG::TextureObjChunk::_sfFrame specify details
115 about the texture.
117 On hardware that supports it (i.e. NVidia boards) the texture shader
118 extension(s) are also available.
121 /***************************************************************************\
122 * Field Documentation *
123 \***************************************************************************/
125 /*! \var Image * TextureObjChunkBase::_sfImage
126 The texture image.
129 /*! \var GLenum TextureObjChunkBase::_sfInternalFormat
130 The internal texture format.
133 /*! \var GLenum TextureObjChunkBase::_sfExternalFormat
134 The external texture format - overwrites
135 external format of image when set to a value not equal to
136 GL_NONE (which is the default).
139 /*! \var bool TextureObjChunkBase::_sfScale
140 Specifies whether the image should be scaled to the next power of two,
141 thus filling the whole texture coordinate range, or if it should be put
142 in the lower left corner, leaving the rest of the texture undefined.
143 This is mainly used for rapidly changing non power of two textures, to
144 get around the scaling overhead.
147 /*! \var UInt32 TextureObjChunkBase::_sfFrame
148 Select the frame of the image to be used. See OSG::Image about details
149 concerning multi-frame images.
150 \hint For fast update use GL_LINEAR or GL_NEAREST filters, as mipmap
151 creation is slow right now \endhint.
154 /*! \var GLenum TextureObjChunkBase::_sfMinFilter
155 The minimisation filter, default GL_LINEAR_MIPMAP_LINEAR.
158 /*! \var GLenum TextureObjChunkBase::_sfMagFilter
159 The magnification filter, default GL_LINEAR.
162 /*! \var GLenum TextureObjChunkBase::_sfWrapS
163 Texture coordinate S wrapping, default GL_REPEAT.
166 /*! \var GLenum TextureObjChunkBase::_sfWrapT
167 Texture coordinate T wrapping, default GL_REPEAT.
170 /*! \var GLenum TextureObjChunkBase::_sfWrapR
171 Texture coordinate R wrapping, default GL_REPEAT.
174 /*! \var GLenum TextureObjChunkBase::_sfGLId
175 The OpenGL texture id for this texture.
178 /*! \var Real32 TextureObjChunkBase::_sfPriority
179 Priority of this texture, between 0 and 1, the default is 0. (GL_TEXTURE_PRIORITY)
182 /*! \var Int32 TextureObjChunkBase::_sfDirtyLeft
183 Left coordinate of the dirty rectangle to use for
184 imageContentChanged(). This doesn't make sense to be stored in files,
185 it does make sense on a cluster, though, that's why it's external.
188 /*! \var Int32 TextureObjChunkBase::_sfDirtyMinX
189 Minimum X coordinate of the dirty rectangle to use for
190 imageContentChanged(). This doesn't make sense to be stored in files,
191 it does make sense on a cluster, though, that's why it's external.
194 /*! \var Int32 TextureObjChunkBase::_sfDirtyMaxX
195 Maximum X coordinate of the dirty rectangle to use for
196 imageContentChanged(). This doesn't make sense to be stored in files,
197 it does make sense on a cluster, though, that's why it's external.
200 /*! \var Int32 TextureObjChunkBase::_sfDirtyMinY
201 Minimum Y coordinate of the dirty rectangle to use for
202 imageContentChanged(). This doesn't make sense to be stored in files,
203 it does make sense on a cluster, though, that's why it's external.
206 /*! \var Int32 TextureObjChunkBase::_sfDirtyMaxY
207 Maximum Y coordinate of the dirty rectangle to use for
208 imageContentChanged(). This doesn't make sense to be stored in files,
209 it does make sense on a cluster, though, that's why it's external.
212 /*! \var Int32 TextureObjChunkBase::_sfDirtyMinZ
213 Minimum Z coordinate of the dirty rectangle to use for
214 imageContentChanged(). This doesn't make sense to be stored in files,
215 it does make sense on a cluster, though, that's why it's external.
218 /*! \var Int32 TextureObjChunkBase::_sfDirtyMaxZ
219 Maximum Z coordinate of the dirty rectangle to use for
220 imageContentChanged(). This doesn't make sense to be stored in files,
221 it does make sense on a cluster, though, that's why it's external.
224 /*! \var Real32 TextureObjChunkBase::_sfAnisotropy
225 Anisotropic filtering the default 1.0f means isotropic filtering.
228 /*! \var Color4f TextureObjChunkBase::_sfBorderColor
229 Texture border color
232 /*! \var GLenum TextureObjChunkBase::_sfCompareMode
236 /*! \var GLenum TextureObjChunkBase::_sfCompareFunc
240 /*! \var GLenum TextureObjChunkBase::_sfDepthMode
244 /*! \var UInt32 TextureObjChunkBase::_sfBorderWidth
245 Texture border width in pixels.
248 /*! \var Real32 TextureObjChunkBase::_sfSkipMipMapLevels
249 Percentage of mipmap levels to be skipped. Especially useful in combination with image formats that already hold all levels and GPUs with only low mem.
253 /***************************************************************************\
254 * FieldType/FieldTrait Instantiation *
255 \***************************************************************************/
257 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
258 PointerType FieldTraits<TextureObjChunk *, nsOSG>::_type(
259 "TextureObjChunkPtr",
260 "TextureBaseChunkPtr",
261 TextureObjChunk::getClassType(),
262 nsOSG);
263 #endif
265 OSG_FIELDTRAITS_GETTYPE_NS(TextureObjChunk *, nsOSG)
267 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
268 TextureObjChunk *,
269 nsOSG)
271 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
272 TextureObjChunk *,
273 nsOSG)
275 /***************************************************************************\
276 * Field Description *
277 \***************************************************************************/
279 void TextureObjChunkBase::classDescInserter(TypeObject &oType)
281 FieldDescriptionBase *pDesc = NULL;
284 pDesc = new SFUnrecChildImagePtr::Description(
285 SFUnrecChildImagePtr::getClassType(),
286 "image",
287 "The texture image.\n",
288 ImageFieldId, ImageFieldMask,
289 false,
290 (Field::SFDefaultFlags | Field::FStdAccess),
291 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleImage),
292 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleImage));
294 oType.addInitialDesc(pDesc);
296 pDesc = new SFGLenum::Description(
297 SFGLenum::getClassType(),
298 "internalFormat",
299 "The internal texture format.\n",
300 InternalFormatFieldId, InternalFormatFieldMask,
301 false,
302 (Field::SFDefaultFlags | Field::FStdAccess),
303 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleInternalFormat),
304 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleInternalFormat));
306 oType.addInitialDesc(pDesc);
308 pDesc = new SFGLenum::Description(
309 SFGLenum::getClassType(),
310 "externalFormat",
311 "The external texture format - overwrites \n"
312 "external format of image when set to a value not equal to \n"
313 "GL_NONE (which is the default).\n",
314 ExternalFormatFieldId, ExternalFormatFieldMask,
315 false,
316 (Field::SFDefaultFlags | Field::FStdAccess),
317 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleExternalFormat),
318 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleExternalFormat));
320 oType.addInitialDesc(pDesc);
322 pDesc = new SFBool::Description(
323 SFBool::getClassType(),
324 "scale",
325 "Specifies whether the image should be scaled to the next power of two,\n"
326 "thus filling the whole texture coordinate range, or if it should be put\n"
327 "in the lower left corner, leaving the rest of the texture undefined.\n"
328 "This is mainly used for rapidly changing non power of two textures, to\n"
329 "get around the scaling overhead.\n",
330 ScaleFieldId, ScaleFieldMask,
331 false,
332 (Field::SFDefaultFlags | Field::FStdAccess),
333 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleScale),
334 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleScale));
336 oType.addInitialDesc(pDesc);
338 pDesc = new SFUInt32::Description(
339 SFUInt32::getClassType(),
340 "frame",
341 "Select the frame of the image to be used. See OSG::Image about details\n"
342 "concerning multi-frame images.\n"
343 "\\hint For fast update use GL_LINEAR or GL_NEAREST filters, as mipmap\n"
344 "creation is slow right now \\endhint.\n",
345 FrameFieldId, FrameFieldMask,
346 false,
347 (Field::SFDefaultFlags | Field::FStdAccess),
348 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleFrame),
349 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleFrame));
351 oType.addInitialDesc(pDesc);
353 pDesc = new SFGLenum::Description(
354 SFGLenum::getClassType(),
355 "minFilter",
356 "The minimisation filter, default GL_LINEAR_MIPMAP_LINEAR.\n",
357 MinFilterFieldId, MinFilterFieldMask,
358 false,
359 (Field::SFDefaultFlags | Field::FStdAccess),
360 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleMinFilter),
361 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleMinFilter));
363 oType.addInitialDesc(pDesc);
365 pDesc = new SFGLenum::Description(
366 SFGLenum::getClassType(),
367 "magFilter",
368 "The magnification filter, default GL_LINEAR.\n",
369 MagFilterFieldId, MagFilterFieldMask,
370 false,
371 (Field::SFDefaultFlags | Field::FStdAccess),
372 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleMagFilter),
373 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleMagFilter));
375 oType.addInitialDesc(pDesc);
377 pDesc = new SFGLenum::Description(
378 SFGLenum::getClassType(),
379 "wrapS",
380 "Texture coordinate S wrapping, default GL_REPEAT.\n",
381 WrapSFieldId, WrapSFieldMask,
382 false,
383 (Field::SFDefaultFlags | Field::FStdAccess),
384 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleWrapS),
385 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleWrapS));
387 oType.addInitialDesc(pDesc);
389 pDesc = new SFGLenum::Description(
390 SFGLenum::getClassType(),
391 "wrapT",
392 "Texture coordinate T wrapping, default GL_REPEAT.\n",
393 WrapTFieldId, WrapTFieldMask,
394 false,
395 (Field::SFDefaultFlags | Field::FStdAccess),
396 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleWrapT),
397 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleWrapT));
399 oType.addInitialDesc(pDesc);
401 pDesc = new SFGLenum::Description(
402 SFGLenum::getClassType(),
403 "wrapR",
404 "Texture coordinate R wrapping, default GL_REPEAT.\n",
405 WrapRFieldId, WrapRFieldMask,
406 false,
407 (Field::SFDefaultFlags | Field::FStdAccess),
408 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleWrapR),
409 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleWrapR));
411 oType.addInitialDesc(pDesc);
413 pDesc = new SFGLenum::Description(
414 SFGLenum::getClassType(),
415 "GLId",
416 "The OpenGL texture id for this texture.\n",
417 GLIdFieldId, GLIdFieldMask,
418 true,
419 (Field::FClusterLocal),
420 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleGLId),
421 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleGLId));
423 oType.addInitialDesc(pDesc);
425 pDesc = new SFReal32::Description(
426 SFReal32::getClassType(),
427 "priority",
428 "Priority of this texture, between 0 and 1, the default is 0. (GL_TEXTURE_PRIORITY)\n",
429 PriorityFieldId, PriorityFieldMask,
430 false,
431 (Field::SFDefaultFlags | Field::FStdAccess),
432 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandlePriority),
433 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandlePriority));
435 oType.addInitialDesc(pDesc);
437 pDesc = new SFInt32::Description(
438 SFInt32::getClassType(),
439 "dirtyLeft",
440 "Left coordinate of the dirty rectangle to use for \n"
441 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
442 "it does make sense on a cluster, though, that's why it's external.\n",
443 DirtyLeftFieldId, DirtyLeftFieldMask,
444 false,
445 (Field::SFDefaultFlags | Field::FStdAccess),
446 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyLeft),
447 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyLeft));
449 oType.addInitialDesc(pDesc);
451 pDesc = new SFInt32::Description(
452 SFInt32::getClassType(),
453 "dirtyMinX",
454 "Minimum X coordinate of the dirty rectangle to use for \n"
455 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
456 "it does make sense on a cluster, though, that's why it's external.\n",
457 DirtyMinXFieldId, DirtyMinXFieldMask,
458 false,
459 (Field::SFDefaultFlags | Field::FStdAccess),
460 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMinX),
461 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMinX));
463 oType.addInitialDesc(pDesc);
465 pDesc = new SFInt32::Description(
466 SFInt32::getClassType(),
467 "dirtyMaxX",
468 "Maximum X coordinate of the dirty rectangle to use for \n"
469 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
470 "it does make sense on a cluster, though, that's why it's external.\n",
471 DirtyMaxXFieldId, DirtyMaxXFieldMask,
472 false,
473 (Field::SFDefaultFlags | Field::FStdAccess),
474 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMaxX),
475 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMaxX));
477 oType.addInitialDesc(pDesc);
479 pDesc = new SFInt32::Description(
480 SFInt32::getClassType(),
481 "dirtyMinY",
482 "Minimum Y coordinate of the dirty rectangle to use for \n"
483 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
484 "it does make sense on a cluster, though, that's why it's external.\n",
485 DirtyMinYFieldId, DirtyMinYFieldMask,
486 false,
487 (Field::SFDefaultFlags | Field::FStdAccess),
488 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMinY),
489 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMinY));
491 oType.addInitialDesc(pDesc);
493 pDesc = new SFInt32::Description(
494 SFInt32::getClassType(),
495 "dirtyMaxY",
496 "Maximum Y coordinate of the dirty rectangle to use for \n"
497 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
498 "it does make sense on a cluster, though, that's why it's external.\n",
499 DirtyMaxYFieldId, DirtyMaxYFieldMask,
500 false,
501 (Field::SFDefaultFlags | Field::FStdAccess),
502 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMaxY),
503 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMaxY));
505 oType.addInitialDesc(pDesc);
507 pDesc = new SFInt32::Description(
508 SFInt32::getClassType(),
509 "dirtyMinZ",
510 "Minimum Z coordinate of the dirty rectangle to use for \n"
511 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
512 "it does make sense on a cluster, though, that's why it's external.\n",
513 DirtyMinZFieldId, DirtyMinZFieldMask,
514 false,
515 (Field::SFDefaultFlags | Field::FStdAccess),
516 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMinZ),
517 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMinZ));
519 oType.addInitialDesc(pDesc);
521 pDesc = new SFInt32::Description(
522 SFInt32::getClassType(),
523 "dirtyMaxZ",
524 "Maximum Z coordinate of the dirty rectangle to use for \n"
525 "imageContentChanged(). This doesn't make sense to be stored in files, \n"
526 "it does make sense on a cluster, though, that's why it's external.\n",
527 DirtyMaxZFieldId, DirtyMaxZFieldMask,
528 false,
529 (Field::SFDefaultFlags | Field::FStdAccess),
530 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDirtyMaxZ),
531 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDirtyMaxZ));
533 oType.addInitialDesc(pDesc);
535 pDesc = new SFReal32::Description(
536 SFReal32::getClassType(),
537 "anisotropy",
538 "Anisotropic filtering the default 1.0f means isotropic filtering.\n",
539 AnisotropyFieldId, AnisotropyFieldMask,
540 false,
541 (Field::SFDefaultFlags | Field::FStdAccess),
542 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleAnisotropy),
543 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleAnisotropy));
545 oType.addInitialDesc(pDesc);
547 pDesc = new SFColor4f::Description(
548 SFColor4f::getClassType(),
549 "borderColor",
550 "Texture border color\n",
551 BorderColorFieldId, BorderColorFieldMask,
552 false,
553 (Field::SFDefaultFlags | Field::FStdAccess),
554 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleBorderColor),
555 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleBorderColor));
557 oType.addInitialDesc(pDesc);
559 pDesc = new SFGLenum::Description(
560 SFGLenum::getClassType(),
561 "compareMode",
563 CompareModeFieldId, CompareModeFieldMask,
564 false,
565 (Field::SFDefaultFlags | Field::FStdAccess),
566 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleCompareMode),
567 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleCompareMode));
569 oType.addInitialDesc(pDesc);
571 pDesc = new SFGLenum::Description(
572 SFGLenum::getClassType(),
573 "compareFunc",
575 CompareFuncFieldId, CompareFuncFieldMask,
576 false,
577 (Field::SFDefaultFlags | Field::FStdAccess),
578 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleCompareFunc),
579 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleCompareFunc));
581 oType.addInitialDesc(pDesc);
583 pDesc = new SFGLenum::Description(
584 SFGLenum::getClassType(),
585 "depthMode",
587 DepthModeFieldId, DepthModeFieldMask,
588 false,
589 (Field::SFDefaultFlags | Field::FStdAccess),
590 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleDepthMode),
591 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleDepthMode));
593 oType.addInitialDesc(pDesc);
595 pDesc = new SFUInt32::Description(
596 SFUInt32::getClassType(),
597 "borderWidth",
598 "Texture border width in pixels.\n",
599 BorderWidthFieldId, BorderWidthFieldMask,
600 false,
601 (Field::SFDefaultFlags | Field::FStdAccess),
602 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleBorderWidth),
603 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleBorderWidth));
605 oType.addInitialDesc(pDesc);
607 pDesc = new SFReal32::Description(
608 SFReal32::getClassType(),
609 "skipMipMapLevels",
610 "Percentage of mipmap levels to be skipped. Especially useful in combination with image formats that already hold all levels and GPUs with only low mem.\n",
611 SkipMipMapLevelsFieldId, SkipMipMapLevelsFieldMask,
612 false,
613 (Field::SFDefaultFlags | Field::FStdAccess),
614 static_cast<FieldEditMethodSig>(&TextureObjChunk::editHandleSkipMipMapLevels),
615 static_cast<FieldGetMethodSig >(&TextureObjChunk::getHandleSkipMipMapLevels));
617 oType.addInitialDesc(pDesc);
621 TextureObjChunkBase::TypeObject TextureObjChunkBase::_type(
622 TextureObjChunkBase::getClassname(),
623 Inherited::getClassname(),
624 "NULL",
625 nsOSG, //Namespace
626 reinterpret_cast<PrototypeCreateF>(&TextureObjChunkBase::createEmptyLocal),
627 reinterpret_cast<InitContainerF>(&TextureObjChunk::initMethod),
628 reinterpret_cast<ExitContainerF>(&TextureObjChunk::exitMethod),
629 reinterpret_cast<InitalInsertDescFunc>(
630 reinterpret_cast<void *>(&TextureObjChunk::classDescInserter)),
631 false,
633 "<?xml version=\"1.0\"?>\n"
634 "\n"
635 "<FieldContainer\n"
636 " name=\"TextureObjChunk\"\n"
637 " parent=\"TextureBaseChunk\"\n"
638 " library=\"System\"\n"
639 " pointerfieldtypes=\"both\"\n"
640 " structure=\"concrete\"\n"
641 " systemcomponent=\"true\"\n"
642 " parentsystemcomponent=\"true\"\n"
643 " decoratable=\"false\"\n"
644 " useLocalIncludes=\"false\"\n"
645 " docGroupBase=\"GrpSystemState\"\n"
646 " >\n"
647 " See \\ref PageSystemTextureObjChunk for a description.\n"
648 "\n"
649 " This chunk wraps glTexImage[123]D (OSG::TextureObjChunk::_sfImage,\n"
650 " OSG::TextureObjChunk::_sfInternalFormat, OSG::TextureObjChunk::_sfExternalFormat),\n"
651 " glTexParameter (OSG::TextureObjChunk::_sfMinFilter,\n"
652 " OSG::TextureObjChunk::_sfMagFilter, OSG::TextureObjChunk::_sfWrapS,\n"
653 " OSG::TextureObjChunk::_sfWrapT, OSG::TextureObjChunk::_sfWrapR), glTexEnv\n"
654 " (OSG::TextureObjChunk::_sfEnvMode, OSG::TextureObjChunk::_sfEnvColor,\n"
655 " OSG::TextureObjChunk::_sfPriority).\n"
656 "\n"
657 " The ARB combine extension is also supported,\n"
658 " where available (OSG::TextureObjChunk::_sfEnvCombineRGB,\n"
659 " OSG::TextureObjChunk::_sfEnvScaleRGB, OSG::TextureObjChunk::_sfEnvSource0RGB,\n"
660 " OSG::TextureObjChunk::_sfEnvSource1RGB, OSG::TextureObjChunk::_sfEnvSource2RGB,\n"
661 " OSG::TextureObjChunk::_sfEnvOperand0RGB, OSG::TextureObjChunk::_sfEnvOperand1RGB,\n"
662 " OSG::TextureObjChunk::_sfEnvOperand2RGB,\n"
663 " OSG::TextureObjChunk::_sfEnvCombineAlpha, OSG::TextureObjChunk::_sfEnvScaleAlpha,\n"
664 " OSG::TextureObjChunk::_sfEnvSource0Alpha, OSG::TextureObjChunk::_sfEnvSource1Alpha,\n"
665 " OSG::TextureObjChunk::_sfEnvSource2Alpha, OSG::TextureObjChunk::_sfEnvOperand0Alpha,\n"
666 " OSG::TextureObjChunk::_sfEnvOperand1Alpha,\n"
667 " OSG::TextureObjChunk::_sfEnvOperand2Alpha).\n"
668 "\n"
669 " It is possible to enable the point\n"
670 " sprite coordinate replacement (OSG::TextureObjChunk::_sfPointSprite), see \\ref\n"
671 " PageSystemPointChunk for details. The two parameters\n"
672 " OSG::TextureObjChunk::_sfScale and OSG::TextureObjChunk::_sfFrame specify details\n"
673 " about the texture.\n"
674 "\n"
675 " On hardware that supports it (i.e. NVidia boards) the texture shader\n"
676 " extension(s) are also available.\n"
677 " <Field\n"
678 " name=\"image\"\n"
679 " type=\"Image\"\n"
680 " cardinality=\"single\"\n"
681 " visibility=\"external\"\n"
682 " access=\"public\"\n"
683 " category=\"childpointer\"\n"
684 " childParentType=\"FieldContainer\"\n"
685 " linkParentField=\"Parents\"\n"
686 "\t>\n"
687 "\tThe texture image.\n"
688 " </Field>\n"
689 " <Field\n"
690 " name=\"internalFormat\"\n"
691 " type=\"GLenum\"\n"
692 " cardinality=\"single\"\n"
693 " visibility=\"external\"\n"
694 " defaultValue=\"GL_NONE\"\n"
695 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
696 " access=\"public\"\n"
697 " potential_values=\"GL_NONE,GL_ALPHA, GL_DEPTH_COMPONENT, GL_LUMINANCE, GL_LUMINANCE_ALPH, GL_INTENSITY, GL_RGB, GL_RGBA, COMPRESSED_ALPHA, COMPRESSED_LUMINANCE, COMPRESSED_LUMINANCE_ALPHA, COMPRESSED_RGB, COMPRESSED_RGBA\"\n"
698 "\t>\n"
699 "\tThe internal texture format.\n"
700 " </Field>\n"
701 " <Field\n"
702 " name=\"externalFormat\"\n"
703 " type=\"GLenum\"\n"
704 " cardinality=\"single\"\n"
705 " visibility=\"external\"\n"
706 " defaultValue=\"GL_NONE\"\n"
707 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
708 " access=\"public\"\n"
709 " potential_values=\"GL_NONE,GL_DEPTH_COMPONENT, GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_RGB, GL_RGBA, GL_BGR, GL_BGRA, GL_LUMINANCE, GL_LUMINANCE_ALPHA\"\n"
710 "\t>\n"
711 " The external texture format - overwrites \n"
712 " external format of image when set to a value not equal to \n"
713 " GL_NONE (which is the default).\n"
714 " </Field>\n"
715 " <Field\n"
716 " name=\"scale\"\n"
717 " type=\"bool\"\n"
718 " cardinality=\"single\"\n"
719 " visibility=\"external\"\n"
720 " defaultValue=\"true\"\n"
721 " access=\"public\"\n"
722 "\t>\n"
723 " Specifies whether the image should be scaled to the next power of two,\n"
724 " thus filling the whole texture coordinate range, or if it should be put\n"
725 " in the lower left corner, leaving the rest of the texture undefined.\n"
726 " This is mainly used for rapidly changing non power of two textures, to\n"
727 " get around the scaling overhead.\n"
728 " </Field>\n"
729 " <Field\n"
730 " name=\"frame\"\n"
731 " type=\"UInt32\"\n"
732 " cardinality=\"single\"\n"
733 " visibility=\"external\"\n"
734 " defaultValue=\"0\"\n"
735 " access=\"public\"\n"
736 "\t>\n"
737 " Select the frame of the image to be used. See OSG::Image about details\n"
738 " concerning multi-frame images.\n"
739 " \\hint For fast update use GL_LINEAR or GL_NEAREST filters, as mipmap\n"
740 " creation is slow right now \\endhint.\n"
741 " </Field>\n"
742 " <Field\n"
743 " name=\"minFilter\"\n"
744 " type=\"GLenum\"\n"
745 " cardinality=\"single\"\n"
746 " visibility=\"external\"\n"
747 " defaultValue=\"GL_LINEAR_MIPMAP_LINEAR\"\n"
748 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
749 " access=\"public\"\n"
750 " potential_values=\"GL_NEAREST, GL_LINEAR, GL_NEAREST_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_LINEAR\"\n"
751 "\t>\n"
752 " The minimisation filter, default GL_LINEAR_MIPMAP_LINEAR.\n"
753 " </Field>\n"
754 " <Field\n"
755 " name=\"magFilter\"\n"
756 " type=\"GLenum\"\n"
757 " cardinality=\"single\"\n"
758 " visibility=\"external\"\n"
759 " defaultValue=\"GL_LINEAR\"\n"
760 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
761 " access=\"public\"\n"
762 " potential_values=\"GL_NEAREST, GL_LINEAR\"\n"
763 "\t>\n"
764 " The magnification filter, default GL_LINEAR.\n"
765 " </Field>\n"
766 " <Field\n"
767 " name=\"wrapS\"\n"
768 " type=\"GLenum\"\n"
769 " cardinality=\"single\"\n"
770 " visibility=\"external\"\n"
771 " defaultValue=\"GL_REPEAT\"\n"
772 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
773 " access=\"public\"\n"
774 " potential_values=\"GL_CLAMP, GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT\"\n"
775 "\t>\n"
776 " Texture coordinate S wrapping, default GL_REPEAT.\n"
777 " </Field>\n"
778 " <Field\n"
779 " name=\"wrapT\"\n"
780 " type=\"GLenum\"\n"
781 " cardinality=\"single\"\n"
782 " visibility=\"external\"\n"
783 " defaultValue=\"GL_REPEAT\"\n"
784 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
785 " access=\"public\"\n"
786 " potential_values=\"GL_CLAMP, GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT\" \n"
787 "\t>\n"
788 " Texture coordinate T wrapping, default GL_REPEAT.\n"
789 " </Field>\n"
790 " <Field\n"
791 " name=\"wrapR\"\n"
792 " type=\"GLenum\"\n"
793 " cardinality=\"single\"\n"
794 " visibility=\"external\"\n"
795 " defaultValue=\"GL_REPEAT\"\n"
796 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
797 " access=\"public\"\n"
798 " potential_values=\"GL_CLAMP, GL_CLAMP_TO_EDGE, GL_REPEAT, GL_CLAMP_TO_BORDER, GL_MIRRORED_REPEAT\" \n"
799 "\t>\n"
800 " Texture coordinate R wrapping, default GL_REPEAT.\n"
801 " </Field>\n"
802 " <Field\n"
803 " name=\"GLId\"\n"
804 " type=\"GLenum\"\n"
805 " cardinality=\"single\"\n"
806 " visibility=\"internal\"\n"
807 " access=\"public\"\n"
808 " defaultValue=\"0\"\n"
809 " fieldFlags=\"FClusterLocal\"\n"
810 "\t>\n"
811 " The OpenGL texture id for this texture.\n"
812 " </Field>\n"
813 " <Field\n"
814 " name=\"priority\"\n"
815 " type=\"Real32\"\n"
816 " cardinality=\"single\"\n"
817 " visibility=\"external\"\n"
818 " access=\"public\"\n"
819 " defaultValue=\"1.f\"\n"
820 "\t>\n"
821 " Priority of this texture, between 0 and 1, the default is 0. (GL_TEXTURE_PRIORITY)\n"
822 " </Field>\n"
823 " <Field\n"
824 " name=\"dirtyLeft\"\n"
825 " type=\"Int32\"\n"
826 " cardinality=\"single\"\n"
827 " visibility=\"external\"\n"
828 " defaultValue=\"-1\"\n"
829 " access=\"public\"\n"
830 " >\n"
831 " Left coordinate of the dirty rectangle to use for \n"
832 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
833 " it does make sense on a cluster, though, that's why it's external.\n"
834 " </Field>\n"
835 " <Field\n"
836 " name=\"dirtyMinX\"\n"
837 " type=\"Int32\"\n"
838 " cardinality=\"single\"\n"
839 " visibility=\"external\"\n"
840 " defaultValue=\"-1\"\n"
841 " access=\"public\"\n"
842 " >\n"
843 " Minimum X coordinate of the dirty rectangle to use for \n"
844 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
845 " it does make sense on a cluster, though, that's why it's external.\n"
846 " </Field>\n"
847 " <Field\n"
848 " name=\"dirtyMaxX\"\n"
849 " type=\"Int32\"\n"
850 " cardinality=\"single\"\n"
851 " visibility=\"external\"\n"
852 " defaultValue=\"-1\"\n"
853 " access=\"public\"\n"
854 " >\n"
855 " Maximum X coordinate of the dirty rectangle to use for \n"
856 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
857 " it does make sense on a cluster, though, that's why it's external.\n"
858 " </Field>\n"
859 " <Field\n"
860 " name=\"dirtyMinY\"\n"
861 " type=\"Int32\"\n"
862 " cardinality=\"single\"\n"
863 " visibility=\"external\"\n"
864 " defaultValue=\"-1\"\n"
865 " access=\"public\"\n"
866 " >\n"
867 " Minimum Y coordinate of the dirty rectangle to use for \n"
868 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
869 " it does make sense on a cluster, though, that's why it's external.\n"
870 " </Field>\n"
871 " <Field\n"
872 " name=\"dirtyMaxY\"\n"
873 " type=\"Int32\"\n"
874 " cardinality=\"single\"\n"
875 " visibility=\"external\"\n"
876 " defaultValue=\"-1\"\n"
877 " access=\"public\"\n"
878 " >\n"
879 " Maximum Y coordinate of the dirty rectangle to use for \n"
880 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
881 " it does make sense on a cluster, though, that's why it's external.\n"
882 " </Field>\n"
883 " <Field\n"
884 " name=\"dirtyMinZ\"\n"
885 " type=\"Int32\"\n"
886 " cardinality=\"single\"\n"
887 " visibility=\"external\"\n"
888 " defaultValue=\"-1\"\n"
889 " access=\"public\"\n"
890 " >\n"
891 " Minimum Z coordinate of the dirty rectangle to use for \n"
892 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
893 " it does make sense on a cluster, though, that's why it's external.\n"
894 " </Field>\n"
895 " <Field\n"
896 " name=\"dirtyMaxZ\"\n"
897 " type=\"Int32\"\n"
898 " cardinality=\"single\"\n"
899 " visibility=\"external\"\n"
900 " defaultValue=\"-1\"\n"
901 " access=\"public\"\n"
902 " >\n"
903 " Maximum Z coordinate of the dirty rectangle to use for \n"
904 " imageContentChanged(). This doesn't make sense to be stored in files, \n"
905 " it does make sense on a cluster, though, that's why it's external.\n"
906 " </Field>\n"
907 " <Field\n"
908 " name=\"anisotropy\"\n"
909 " type=\"Real32\"\n"
910 " cardinality=\"single\"\n"
911 " visibility=\"external\"\n"
912 " defaultValue=\"1.0f\"\n"
913 " access=\"public\"\n"
914 " >\n"
915 " Anisotropic filtering the default 1.0f means isotropic filtering.\n"
916 " </Field>\n"
917 " <Field\n"
918 " name=\"borderColor\"\n"
919 " type=\"Color4f\"\n"
920 " cardinality=\"single\"\n"
921 " visibility=\"external\"\n"
922 " defaultValue=\"0,0,0,0\"\n"
923 " access=\"public\"\n"
924 "\t>\n"
925 "\tTexture border color\n"
926 " </Field>\n"
927 " <Field\n"
928 " name=\"compareMode\"\n"
929 " type=\"GLenum\"\n"
930 " cardinality=\"single\"\n"
931 " visibility=\"external\"\n"
932 " defaultValue=\"GL_NONE\"\n"
933 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
934 " access=\"public\"\n"
935 " potential_values=\"GL_NONE, GL_COMPARE_R_TO_TEXTURE\"\n"
936 "\t>\n"
937 " </Field>\n"
938 " <Field\n"
939 " name=\"compareFunc\"\n"
940 " type=\"GLenum\"\n"
941 " cardinality=\"single\"\n"
942 " visibility=\"external\"\n"
943 " defaultValue=\"GL_LEQUAL\"\n"
944 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
945 " access=\"public\"\n"
946 " potential_values=\"GL_LEQUAL, GL_GEQUAL, GL_LESS, GL_GREATER, GL_EQUAL, GL_NOTEQUAL, GL_ALWAYS, GL_NEVER\"\n"
947 "\t>\n"
948 " </Field>\n"
949 " <Field\n"
950 " name=\"depthMode\"\n"
951 " type=\"GLenum\"\n"
952 " cardinality=\"single\"\n"
953 " visibility=\"external\"\n"
954 " defaultValue=\"GL_LUMINANCE\"\n"
955 " defaultHeader=\"&quot;OSGGL.h&quot;\"\n"
956 " access=\"public\"\n"
957 " potential_values=\"GL_LUMINANCE, GL_INTENSITY, GL_ALPHA\"\n"
958 "\t>\n"
959 " </Field>\n"
960 " <Field\n"
961 " name=\"borderWidth\"\n"
962 " type=\"UInt32\"\n"
963 " cardinality=\"single\"\n"
964 " visibility=\"external\"\n"
965 " defaultValue=\"0\"\n"
966 " access=\"public\"\n"
967 "\t>\n"
968 "\tTexture border width in pixels.\n"
969 " </Field>\n"
970 " <!-- DISABLED - was in 1.x, but does not interact well with TextureTransformChunk\n"
971 " <Field\n"
972 " name=\"NPOTMatrixScale\"\n"
973 " type=\"UInt32\"\n"
974 " cardinality=\"single\"\n"
975 " visibility=\"external\"\n"
976 " defaultValue=\"0\"\n"
977 " access=\"public\"\n"
978 " >\n"
979 " Use the texture matrix to scale the texture coordinates for NPOT images. Only used if neither rectangular nor NPOT textures are supported. If set to false, the image is scaled to the next power of two before being used as a texture. For convenience xFlip/ yFlip can also be set. Note that this will interfere with other TextureTransform and TexGen chunks. Do not use it if you need to use those chunks!\n"
980 " </Field>\n"
981 " -->\n"
982 " <Field\n"
983 " name=\"skipMipMapLevels\"\n"
984 " type=\"Real32\"\n"
985 " cardinality=\"single\"\n"
986 " visibility=\"external\"\n"
987 " defaultValue=\"0\"\n"
988 " access=\"public\"\n"
989 "\t>\n"
990 "\tPercentage of mipmap levels to be skipped. Especially useful in combination with image formats that already hold all levels and GPUs with only low mem.\n"
991 " </Field>\n"
992 "</FieldContainer>\n",
993 "See \\ref PageSystemTextureObjChunk for a description.\n"
994 "\n"
995 "This chunk wraps glTexImage[123]D (OSG::TextureObjChunk::_sfImage,\n"
996 "OSG::TextureObjChunk::_sfInternalFormat, OSG::TextureObjChunk::_sfExternalFormat),\n"
997 "glTexParameter (OSG::TextureObjChunk::_sfMinFilter,\n"
998 "OSG::TextureObjChunk::_sfMagFilter, OSG::TextureObjChunk::_sfWrapS,\n"
999 "OSG::TextureObjChunk::_sfWrapT, OSG::TextureObjChunk::_sfWrapR), glTexEnv\n"
1000 "(OSG::TextureObjChunk::_sfEnvMode, OSG::TextureObjChunk::_sfEnvColor,\n"
1001 "OSG::TextureObjChunk::_sfPriority).\n"
1002 "\n"
1003 "The ARB combine extension is also supported,\n"
1004 "where available (OSG::TextureObjChunk::_sfEnvCombineRGB,\n"
1005 "OSG::TextureObjChunk::_sfEnvScaleRGB, OSG::TextureObjChunk::_sfEnvSource0RGB,\n"
1006 "OSG::TextureObjChunk::_sfEnvSource1RGB, OSG::TextureObjChunk::_sfEnvSource2RGB,\n"
1007 "OSG::TextureObjChunk::_sfEnvOperand0RGB, OSG::TextureObjChunk::_sfEnvOperand1RGB,\n"
1008 "OSG::TextureObjChunk::_sfEnvOperand2RGB,\n"
1009 "OSG::TextureObjChunk::_sfEnvCombineAlpha, OSG::TextureObjChunk::_sfEnvScaleAlpha,\n"
1010 "OSG::TextureObjChunk::_sfEnvSource0Alpha, OSG::TextureObjChunk::_sfEnvSource1Alpha,\n"
1011 "OSG::TextureObjChunk::_sfEnvSource2Alpha, OSG::TextureObjChunk::_sfEnvOperand0Alpha,\n"
1012 "OSG::TextureObjChunk::_sfEnvOperand1Alpha,\n"
1013 "OSG::TextureObjChunk::_sfEnvOperand2Alpha).\n"
1014 "\n"
1015 "It is possible to enable the point\n"
1016 "sprite coordinate replacement (OSG::TextureObjChunk::_sfPointSprite), see \\ref\n"
1017 "PageSystemPointChunk for details. The two parameters\n"
1018 "OSG::TextureObjChunk::_sfScale and OSG::TextureObjChunk::_sfFrame specify details\n"
1019 "about the texture.\n"
1020 "\n"
1021 "On hardware that supports it (i.e. NVidia boards) the texture shader\n"
1022 "extension(s) are also available.\n"
1025 /*------------------------------ get -----------------------------------*/
1027 FieldContainerType &TextureObjChunkBase::getType(void)
1029 return _type;
1032 const FieldContainerType &TextureObjChunkBase::getType(void) const
1034 return _type;
1037 UInt32 TextureObjChunkBase::getContainerSize(void) const
1039 return sizeof(TextureObjChunk);
1042 /*------------------------- decorator get ------------------------------*/
1045 //! Get the TextureObjChunk::_sfImage field.
1046 const SFUnrecChildImagePtr *TextureObjChunkBase::getSFImage(void) const
1048 return &_sfImage;
1051 SFUnrecChildImagePtr *TextureObjChunkBase::editSFImage (void)
1053 editSField(ImageFieldMask);
1055 return &_sfImage;
1058 //! Get the value of the TextureObjChunk::_sfImage field.
1059 Image * TextureObjChunkBase::getImage(void) const
1061 return _sfImage.getValue();
1064 //! Set the value of the TextureObjChunk::_sfImage field.
1065 void TextureObjChunkBase::setImage(Image * const value)
1067 editSField(ImageFieldMask);
1069 _sfImage.setValue(value);
1073 SFGLenum *TextureObjChunkBase::editSFInternalFormat(void)
1075 editSField(InternalFormatFieldMask);
1077 return &_sfInternalFormat;
1080 const SFGLenum *TextureObjChunkBase::getSFInternalFormat(void) const
1082 return &_sfInternalFormat;
1086 SFGLenum *TextureObjChunkBase::editSFExternalFormat(void)
1088 editSField(ExternalFormatFieldMask);
1090 return &_sfExternalFormat;
1093 const SFGLenum *TextureObjChunkBase::getSFExternalFormat(void) const
1095 return &_sfExternalFormat;
1099 SFBool *TextureObjChunkBase::editSFScale(void)
1101 editSField(ScaleFieldMask);
1103 return &_sfScale;
1106 const SFBool *TextureObjChunkBase::getSFScale(void) const
1108 return &_sfScale;
1112 SFUInt32 *TextureObjChunkBase::editSFFrame(void)
1114 editSField(FrameFieldMask);
1116 return &_sfFrame;
1119 const SFUInt32 *TextureObjChunkBase::getSFFrame(void) const
1121 return &_sfFrame;
1125 SFGLenum *TextureObjChunkBase::editSFMinFilter(void)
1127 editSField(MinFilterFieldMask);
1129 return &_sfMinFilter;
1132 const SFGLenum *TextureObjChunkBase::getSFMinFilter(void) const
1134 return &_sfMinFilter;
1138 SFGLenum *TextureObjChunkBase::editSFMagFilter(void)
1140 editSField(MagFilterFieldMask);
1142 return &_sfMagFilter;
1145 const SFGLenum *TextureObjChunkBase::getSFMagFilter(void) const
1147 return &_sfMagFilter;
1151 SFGLenum *TextureObjChunkBase::editSFWrapS(void)
1153 editSField(WrapSFieldMask);
1155 return &_sfWrapS;
1158 const SFGLenum *TextureObjChunkBase::getSFWrapS(void) const
1160 return &_sfWrapS;
1164 SFGLenum *TextureObjChunkBase::editSFWrapT(void)
1166 editSField(WrapTFieldMask);
1168 return &_sfWrapT;
1171 const SFGLenum *TextureObjChunkBase::getSFWrapT(void) const
1173 return &_sfWrapT;
1177 SFGLenum *TextureObjChunkBase::editSFWrapR(void)
1179 editSField(WrapRFieldMask);
1181 return &_sfWrapR;
1184 const SFGLenum *TextureObjChunkBase::getSFWrapR(void) const
1186 return &_sfWrapR;
1190 SFGLenum *TextureObjChunkBase::editSFGLId(void)
1192 editSField(GLIdFieldMask);
1194 return &_sfGLId;
1197 const SFGLenum *TextureObjChunkBase::getSFGLId(void) const
1199 return &_sfGLId;
1203 SFReal32 *TextureObjChunkBase::editSFPriority(void)
1205 editSField(PriorityFieldMask);
1207 return &_sfPriority;
1210 const SFReal32 *TextureObjChunkBase::getSFPriority(void) const
1212 return &_sfPriority;
1216 SFInt32 *TextureObjChunkBase::editSFDirtyLeft(void)
1218 editSField(DirtyLeftFieldMask);
1220 return &_sfDirtyLeft;
1223 const SFInt32 *TextureObjChunkBase::getSFDirtyLeft(void) const
1225 return &_sfDirtyLeft;
1229 SFInt32 *TextureObjChunkBase::editSFDirtyMinX(void)
1231 editSField(DirtyMinXFieldMask);
1233 return &_sfDirtyMinX;
1236 const SFInt32 *TextureObjChunkBase::getSFDirtyMinX(void) const
1238 return &_sfDirtyMinX;
1242 SFInt32 *TextureObjChunkBase::editSFDirtyMaxX(void)
1244 editSField(DirtyMaxXFieldMask);
1246 return &_sfDirtyMaxX;
1249 const SFInt32 *TextureObjChunkBase::getSFDirtyMaxX(void) const
1251 return &_sfDirtyMaxX;
1255 SFInt32 *TextureObjChunkBase::editSFDirtyMinY(void)
1257 editSField(DirtyMinYFieldMask);
1259 return &_sfDirtyMinY;
1262 const SFInt32 *TextureObjChunkBase::getSFDirtyMinY(void) const
1264 return &_sfDirtyMinY;
1268 SFInt32 *TextureObjChunkBase::editSFDirtyMaxY(void)
1270 editSField(DirtyMaxYFieldMask);
1272 return &_sfDirtyMaxY;
1275 const SFInt32 *TextureObjChunkBase::getSFDirtyMaxY(void) const
1277 return &_sfDirtyMaxY;
1281 SFInt32 *TextureObjChunkBase::editSFDirtyMinZ(void)
1283 editSField(DirtyMinZFieldMask);
1285 return &_sfDirtyMinZ;
1288 const SFInt32 *TextureObjChunkBase::getSFDirtyMinZ(void) const
1290 return &_sfDirtyMinZ;
1294 SFInt32 *TextureObjChunkBase::editSFDirtyMaxZ(void)
1296 editSField(DirtyMaxZFieldMask);
1298 return &_sfDirtyMaxZ;
1301 const SFInt32 *TextureObjChunkBase::getSFDirtyMaxZ(void) const
1303 return &_sfDirtyMaxZ;
1307 SFReal32 *TextureObjChunkBase::editSFAnisotropy(void)
1309 editSField(AnisotropyFieldMask);
1311 return &_sfAnisotropy;
1314 const SFReal32 *TextureObjChunkBase::getSFAnisotropy(void) const
1316 return &_sfAnisotropy;
1320 SFColor4f *TextureObjChunkBase::editSFBorderColor(void)
1322 editSField(BorderColorFieldMask);
1324 return &_sfBorderColor;
1327 const SFColor4f *TextureObjChunkBase::getSFBorderColor(void) const
1329 return &_sfBorderColor;
1333 SFGLenum *TextureObjChunkBase::editSFCompareMode(void)
1335 editSField(CompareModeFieldMask);
1337 return &_sfCompareMode;
1340 const SFGLenum *TextureObjChunkBase::getSFCompareMode(void) const
1342 return &_sfCompareMode;
1346 SFGLenum *TextureObjChunkBase::editSFCompareFunc(void)
1348 editSField(CompareFuncFieldMask);
1350 return &_sfCompareFunc;
1353 const SFGLenum *TextureObjChunkBase::getSFCompareFunc(void) const
1355 return &_sfCompareFunc;
1359 SFGLenum *TextureObjChunkBase::editSFDepthMode(void)
1361 editSField(DepthModeFieldMask);
1363 return &_sfDepthMode;
1366 const SFGLenum *TextureObjChunkBase::getSFDepthMode(void) const
1368 return &_sfDepthMode;
1372 SFUInt32 *TextureObjChunkBase::editSFBorderWidth(void)
1374 editSField(BorderWidthFieldMask);
1376 return &_sfBorderWidth;
1379 const SFUInt32 *TextureObjChunkBase::getSFBorderWidth(void) const
1381 return &_sfBorderWidth;
1385 SFReal32 *TextureObjChunkBase::editSFSkipMipMapLevels(void)
1387 editSField(SkipMipMapLevelsFieldMask);
1389 return &_sfSkipMipMapLevels;
1392 const SFReal32 *TextureObjChunkBase::getSFSkipMipMapLevels(void) const
1394 return &_sfSkipMipMapLevels;
1402 /*------------------------------ access -----------------------------------*/
1404 SizeT TextureObjChunkBase::getBinSize(ConstFieldMaskArg whichField)
1406 SizeT returnValue = Inherited::getBinSize(whichField);
1408 if(FieldBits::NoField != (ImageFieldMask & whichField))
1410 returnValue += _sfImage.getBinSize();
1412 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
1414 returnValue += _sfInternalFormat.getBinSize();
1416 if(FieldBits::NoField != (ExternalFormatFieldMask & whichField))
1418 returnValue += _sfExternalFormat.getBinSize();
1420 if(FieldBits::NoField != (ScaleFieldMask & whichField))
1422 returnValue += _sfScale.getBinSize();
1424 if(FieldBits::NoField != (FrameFieldMask & whichField))
1426 returnValue += _sfFrame.getBinSize();
1428 if(FieldBits::NoField != (MinFilterFieldMask & whichField))
1430 returnValue += _sfMinFilter.getBinSize();
1432 if(FieldBits::NoField != (MagFilterFieldMask & whichField))
1434 returnValue += _sfMagFilter.getBinSize();
1436 if(FieldBits::NoField != (WrapSFieldMask & whichField))
1438 returnValue += _sfWrapS.getBinSize();
1440 if(FieldBits::NoField != (WrapTFieldMask & whichField))
1442 returnValue += _sfWrapT.getBinSize();
1444 if(FieldBits::NoField != (WrapRFieldMask & whichField))
1446 returnValue += _sfWrapR.getBinSize();
1448 if(FieldBits::NoField != (GLIdFieldMask & whichField))
1450 returnValue += _sfGLId.getBinSize();
1452 if(FieldBits::NoField != (PriorityFieldMask & whichField))
1454 returnValue += _sfPriority.getBinSize();
1456 if(FieldBits::NoField != (DirtyLeftFieldMask & whichField))
1458 returnValue += _sfDirtyLeft.getBinSize();
1460 if(FieldBits::NoField != (DirtyMinXFieldMask & whichField))
1462 returnValue += _sfDirtyMinX.getBinSize();
1464 if(FieldBits::NoField != (DirtyMaxXFieldMask & whichField))
1466 returnValue += _sfDirtyMaxX.getBinSize();
1468 if(FieldBits::NoField != (DirtyMinYFieldMask & whichField))
1470 returnValue += _sfDirtyMinY.getBinSize();
1472 if(FieldBits::NoField != (DirtyMaxYFieldMask & whichField))
1474 returnValue += _sfDirtyMaxY.getBinSize();
1476 if(FieldBits::NoField != (DirtyMinZFieldMask & whichField))
1478 returnValue += _sfDirtyMinZ.getBinSize();
1480 if(FieldBits::NoField != (DirtyMaxZFieldMask & whichField))
1482 returnValue += _sfDirtyMaxZ.getBinSize();
1484 if(FieldBits::NoField != (AnisotropyFieldMask & whichField))
1486 returnValue += _sfAnisotropy.getBinSize();
1488 if(FieldBits::NoField != (BorderColorFieldMask & whichField))
1490 returnValue += _sfBorderColor.getBinSize();
1492 if(FieldBits::NoField != (CompareModeFieldMask & whichField))
1494 returnValue += _sfCompareMode.getBinSize();
1496 if(FieldBits::NoField != (CompareFuncFieldMask & whichField))
1498 returnValue += _sfCompareFunc.getBinSize();
1500 if(FieldBits::NoField != (DepthModeFieldMask & whichField))
1502 returnValue += _sfDepthMode.getBinSize();
1504 if(FieldBits::NoField != (BorderWidthFieldMask & whichField))
1506 returnValue += _sfBorderWidth.getBinSize();
1508 if(FieldBits::NoField != (SkipMipMapLevelsFieldMask & whichField))
1510 returnValue += _sfSkipMipMapLevels.getBinSize();
1513 return returnValue;
1516 void TextureObjChunkBase::copyToBin(BinaryDataHandler &pMem,
1517 ConstFieldMaskArg whichField)
1519 Inherited::copyToBin(pMem, whichField);
1521 if(FieldBits::NoField != (ImageFieldMask & whichField))
1523 _sfImage.copyToBin(pMem);
1525 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
1527 _sfInternalFormat.copyToBin(pMem);
1529 if(FieldBits::NoField != (ExternalFormatFieldMask & whichField))
1531 _sfExternalFormat.copyToBin(pMem);
1533 if(FieldBits::NoField != (ScaleFieldMask & whichField))
1535 _sfScale.copyToBin(pMem);
1537 if(FieldBits::NoField != (FrameFieldMask & whichField))
1539 _sfFrame.copyToBin(pMem);
1541 if(FieldBits::NoField != (MinFilterFieldMask & whichField))
1543 _sfMinFilter.copyToBin(pMem);
1545 if(FieldBits::NoField != (MagFilterFieldMask & whichField))
1547 _sfMagFilter.copyToBin(pMem);
1549 if(FieldBits::NoField != (WrapSFieldMask & whichField))
1551 _sfWrapS.copyToBin(pMem);
1553 if(FieldBits::NoField != (WrapTFieldMask & whichField))
1555 _sfWrapT.copyToBin(pMem);
1557 if(FieldBits::NoField != (WrapRFieldMask & whichField))
1559 _sfWrapR.copyToBin(pMem);
1561 if(FieldBits::NoField != (GLIdFieldMask & whichField))
1563 _sfGLId.copyToBin(pMem);
1565 if(FieldBits::NoField != (PriorityFieldMask & whichField))
1567 _sfPriority.copyToBin(pMem);
1569 if(FieldBits::NoField != (DirtyLeftFieldMask & whichField))
1571 _sfDirtyLeft.copyToBin(pMem);
1573 if(FieldBits::NoField != (DirtyMinXFieldMask & whichField))
1575 _sfDirtyMinX.copyToBin(pMem);
1577 if(FieldBits::NoField != (DirtyMaxXFieldMask & whichField))
1579 _sfDirtyMaxX.copyToBin(pMem);
1581 if(FieldBits::NoField != (DirtyMinYFieldMask & whichField))
1583 _sfDirtyMinY.copyToBin(pMem);
1585 if(FieldBits::NoField != (DirtyMaxYFieldMask & whichField))
1587 _sfDirtyMaxY.copyToBin(pMem);
1589 if(FieldBits::NoField != (DirtyMinZFieldMask & whichField))
1591 _sfDirtyMinZ.copyToBin(pMem);
1593 if(FieldBits::NoField != (DirtyMaxZFieldMask & whichField))
1595 _sfDirtyMaxZ.copyToBin(pMem);
1597 if(FieldBits::NoField != (AnisotropyFieldMask & whichField))
1599 _sfAnisotropy.copyToBin(pMem);
1601 if(FieldBits::NoField != (BorderColorFieldMask & whichField))
1603 _sfBorderColor.copyToBin(pMem);
1605 if(FieldBits::NoField != (CompareModeFieldMask & whichField))
1607 _sfCompareMode.copyToBin(pMem);
1609 if(FieldBits::NoField != (CompareFuncFieldMask & whichField))
1611 _sfCompareFunc.copyToBin(pMem);
1613 if(FieldBits::NoField != (DepthModeFieldMask & whichField))
1615 _sfDepthMode.copyToBin(pMem);
1617 if(FieldBits::NoField != (BorderWidthFieldMask & whichField))
1619 _sfBorderWidth.copyToBin(pMem);
1621 if(FieldBits::NoField != (SkipMipMapLevelsFieldMask & whichField))
1623 _sfSkipMipMapLevels.copyToBin(pMem);
1627 void TextureObjChunkBase::copyFromBin(BinaryDataHandler &pMem,
1628 ConstFieldMaskArg whichField)
1630 Inherited::copyFromBin(pMem, whichField);
1632 if(FieldBits::NoField != (ImageFieldMask & whichField))
1634 editSField(ImageFieldMask);
1635 _sfImage.copyFromBin(pMem);
1637 if(FieldBits::NoField != (InternalFormatFieldMask & whichField))
1639 editSField(InternalFormatFieldMask);
1640 _sfInternalFormat.copyFromBin(pMem);
1642 if(FieldBits::NoField != (ExternalFormatFieldMask & whichField))
1644 editSField(ExternalFormatFieldMask);
1645 _sfExternalFormat.copyFromBin(pMem);
1647 if(FieldBits::NoField != (ScaleFieldMask & whichField))
1649 editSField(ScaleFieldMask);
1650 _sfScale.copyFromBin(pMem);
1652 if(FieldBits::NoField != (FrameFieldMask & whichField))
1654 editSField(FrameFieldMask);
1655 _sfFrame.copyFromBin(pMem);
1657 if(FieldBits::NoField != (MinFilterFieldMask & whichField))
1659 editSField(MinFilterFieldMask);
1660 _sfMinFilter.copyFromBin(pMem);
1662 if(FieldBits::NoField != (MagFilterFieldMask & whichField))
1664 editSField(MagFilterFieldMask);
1665 _sfMagFilter.copyFromBin(pMem);
1667 if(FieldBits::NoField != (WrapSFieldMask & whichField))
1669 editSField(WrapSFieldMask);
1670 _sfWrapS.copyFromBin(pMem);
1672 if(FieldBits::NoField != (WrapTFieldMask & whichField))
1674 editSField(WrapTFieldMask);
1675 _sfWrapT.copyFromBin(pMem);
1677 if(FieldBits::NoField != (WrapRFieldMask & whichField))
1679 editSField(WrapRFieldMask);
1680 _sfWrapR.copyFromBin(pMem);
1682 if(FieldBits::NoField != (GLIdFieldMask & whichField))
1684 editSField(GLIdFieldMask);
1685 _sfGLId.copyFromBin(pMem);
1687 if(FieldBits::NoField != (PriorityFieldMask & whichField))
1689 editSField(PriorityFieldMask);
1690 _sfPriority.copyFromBin(pMem);
1692 if(FieldBits::NoField != (DirtyLeftFieldMask & whichField))
1694 editSField(DirtyLeftFieldMask);
1695 _sfDirtyLeft.copyFromBin(pMem);
1697 if(FieldBits::NoField != (DirtyMinXFieldMask & whichField))
1699 editSField(DirtyMinXFieldMask);
1700 _sfDirtyMinX.copyFromBin(pMem);
1702 if(FieldBits::NoField != (DirtyMaxXFieldMask & whichField))
1704 editSField(DirtyMaxXFieldMask);
1705 _sfDirtyMaxX.copyFromBin(pMem);
1707 if(FieldBits::NoField != (DirtyMinYFieldMask & whichField))
1709 editSField(DirtyMinYFieldMask);
1710 _sfDirtyMinY.copyFromBin(pMem);
1712 if(FieldBits::NoField != (DirtyMaxYFieldMask & whichField))
1714 editSField(DirtyMaxYFieldMask);
1715 _sfDirtyMaxY.copyFromBin(pMem);
1717 if(FieldBits::NoField != (DirtyMinZFieldMask & whichField))
1719 editSField(DirtyMinZFieldMask);
1720 _sfDirtyMinZ.copyFromBin(pMem);
1722 if(FieldBits::NoField != (DirtyMaxZFieldMask & whichField))
1724 editSField(DirtyMaxZFieldMask);
1725 _sfDirtyMaxZ.copyFromBin(pMem);
1727 if(FieldBits::NoField != (AnisotropyFieldMask & whichField))
1729 editSField(AnisotropyFieldMask);
1730 _sfAnisotropy.copyFromBin(pMem);
1732 if(FieldBits::NoField != (BorderColorFieldMask & whichField))
1734 editSField(BorderColorFieldMask);
1735 _sfBorderColor.copyFromBin(pMem);
1737 if(FieldBits::NoField != (CompareModeFieldMask & whichField))
1739 editSField(CompareModeFieldMask);
1740 _sfCompareMode.copyFromBin(pMem);
1742 if(FieldBits::NoField != (CompareFuncFieldMask & whichField))
1744 editSField(CompareFuncFieldMask);
1745 _sfCompareFunc.copyFromBin(pMem);
1747 if(FieldBits::NoField != (DepthModeFieldMask & whichField))
1749 editSField(DepthModeFieldMask);
1750 _sfDepthMode.copyFromBin(pMem);
1752 if(FieldBits::NoField != (BorderWidthFieldMask & whichField))
1754 editSField(BorderWidthFieldMask);
1755 _sfBorderWidth.copyFromBin(pMem);
1757 if(FieldBits::NoField != (SkipMipMapLevelsFieldMask & whichField))
1759 editSField(SkipMipMapLevelsFieldMask);
1760 _sfSkipMipMapLevels.copyFromBin(pMem);
1764 //! create a new instance of the class
1765 TextureObjChunkTransitPtr TextureObjChunkBase::createLocal(BitVector bFlags)
1767 TextureObjChunkTransitPtr fc;
1769 if(getClassType().getPrototype() != NULL)
1771 FieldContainerTransitPtr tmpPtr =
1772 getClassType().getPrototype()-> shallowCopyLocal(bFlags);
1774 fc = dynamic_pointer_cast<TextureObjChunk>(tmpPtr);
1777 return fc;
1780 //! create a new instance of the class, copy the container flags
1781 TextureObjChunkTransitPtr TextureObjChunkBase::createDependent(BitVector bFlags)
1783 TextureObjChunkTransitPtr fc;
1785 if(getClassType().getPrototype() != NULL)
1787 FieldContainerTransitPtr tmpPtr =
1788 getClassType().getPrototype()-> shallowCopyDependent(bFlags);
1790 fc = dynamic_pointer_cast<TextureObjChunk>(tmpPtr);
1793 return fc;
1796 //! create a new instance of the class
1797 TextureObjChunkTransitPtr TextureObjChunkBase::create(void)
1799 TextureObjChunkTransitPtr fc;
1801 if(getClassType().getPrototype() != NULL)
1803 FieldContainerTransitPtr tmpPtr =
1804 getClassType().getPrototype()-> shallowCopy();
1806 fc = dynamic_pointer_cast<TextureObjChunk>(tmpPtr);
1809 return fc;
1812 TextureObjChunk *TextureObjChunkBase::createEmptyLocal(BitVector bFlags)
1814 TextureObjChunk *returnValue;
1816 newPtr<TextureObjChunk>(returnValue, bFlags);
1818 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1820 return returnValue;
1823 //! create an empty new instance of the class, do not copy the prototype
1824 TextureObjChunk *TextureObjChunkBase::createEmpty(void)
1826 TextureObjChunk *returnValue;
1828 newPtr<TextureObjChunk>(returnValue, Thread::getCurrentLocalFlags());
1830 returnValue->_pFieldFlags->_bNamespaceMask &=
1831 ~Thread::getCurrentLocalFlags();
1833 return returnValue;
1837 FieldContainerTransitPtr TextureObjChunkBase::shallowCopyLocal(
1838 BitVector bFlags) const
1840 TextureObjChunk *tmpPtr;
1842 newPtr(tmpPtr, dynamic_cast<const TextureObjChunk *>(this), bFlags);
1844 FieldContainerTransitPtr returnValue(tmpPtr);
1846 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1848 return returnValue;
1851 FieldContainerTransitPtr TextureObjChunkBase::shallowCopyDependent(
1852 BitVector bFlags) const
1854 TextureObjChunk *tmpPtr;
1856 newPtr(tmpPtr, dynamic_cast<const TextureObjChunk *>(this), ~bFlags);
1858 FieldContainerTransitPtr returnValue(tmpPtr);
1860 tmpPtr->_pFieldFlags->_bNamespaceMask = bFlags;
1862 return returnValue;
1865 FieldContainerTransitPtr TextureObjChunkBase::shallowCopy(void) const
1867 TextureObjChunk *tmpPtr;
1869 newPtr(tmpPtr,
1870 dynamic_cast<const TextureObjChunk *>(this),
1871 Thread::getCurrentLocalFlags());
1873 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1875 FieldContainerTransitPtr returnValue(tmpPtr);
1877 return returnValue;
1883 /*------------------------- constructors ----------------------------------*/
1885 TextureObjChunkBase::TextureObjChunkBase(void) :
1886 Inherited(),
1887 _sfImage (this,
1888 ImageFieldId,
1889 Image::ParentsFieldId),
1890 _sfInternalFormat (GLenum(GL_NONE)),
1891 _sfExternalFormat (GLenum(GL_NONE)),
1892 _sfScale (bool(true)),
1893 _sfFrame (UInt32(0)),
1894 _sfMinFilter (GLenum(GL_LINEAR_MIPMAP_LINEAR)),
1895 _sfMagFilter (GLenum(GL_LINEAR)),
1896 _sfWrapS (GLenum(GL_REPEAT)),
1897 _sfWrapT (GLenum(GL_REPEAT)),
1898 _sfWrapR (GLenum(GL_REPEAT)),
1899 _sfGLId (GLenum(0)),
1900 _sfPriority (Real32(1.f)),
1901 _sfDirtyLeft (Int32(-1)),
1902 _sfDirtyMinX (Int32(-1)),
1903 _sfDirtyMaxX (Int32(-1)),
1904 _sfDirtyMinY (Int32(-1)),
1905 _sfDirtyMaxY (Int32(-1)),
1906 _sfDirtyMinZ (Int32(-1)),
1907 _sfDirtyMaxZ (Int32(-1)),
1908 _sfAnisotropy (Real32(1.0f)),
1909 _sfBorderColor (Color4f(0,0,0,0)),
1910 _sfCompareMode (GLenum(GL_NONE)),
1911 _sfCompareFunc (GLenum(GL_LEQUAL)),
1912 _sfDepthMode (GLenum(GL_LUMINANCE)),
1913 _sfBorderWidth (UInt32(0)),
1914 _sfSkipMipMapLevels (Real32(0))
1918 TextureObjChunkBase::TextureObjChunkBase(const TextureObjChunkBase &source) :
1919 Inherited(source),
1920 _sfImage (this,
1921 ImageFieldId,
1922 Image::ParentsFieldId),
1923 _sfInternalFormat (source._sfInternalFormat ),
1924 _sfExternalFormat (source._sfExternalFormat ),
1925 _sfScale (source._sfScale ),
1926 _sfFrame (source._sfFrame ),
1927 _sfMinFilter (source._sfMinFilter ),
1928 _sfMagFilter (source._sfMagFilter ),
1929 _sfWrapS (source._sfWrapS ),
1930 _sfWrapT (source._sfWrapT ),
1931 _sfWrapR (source._sfWrapR ),
1932 _sfGLId (source._sfGLId ),
1933 _sfPriority (source._sfPriority ),
1934 _sfDirtyLeft (source._sfDirtyLeft ),
1935 _sfDirtyMinX (source._sfDirtyMinX ),
1936 _sfDirtyMaxX (source._sfDirtyMaxX ),
1937 _sfDirtyMinY (source._sfDirtyMinY ),
1938 _sfDirtyMaxY (source._sfDirtyMaxY ),
1939 _sfDirtyMinZ (source._sfDirtyMinZ ),
1940 _sfDirtyMaxZ (source._sfDirtyMaxZ ),
1941 _sfAnisotropy (source._sfAnisotropy ),
1942 _sfBorderColor (source._sfBorderColor ),
1943 _sfCompareMode (source._sfCompareMode ),
1944 _sfCompareFunc (source._sfCompareFunc ),
1945 _sfDepthMode (source._sfDepthMode ),
1946 _sfBorderWidth (source._sfBorderWidth ),
1947 _sfSkipMipMapLevels (source._sfSkipMipMapLevels )
1952 /*-------------------------- destructors ----------------------------------*/
1954 TextureObjChunkBase::~TextureObjChunkBase(void)
1958 /*-------------------------------------------------------------------------*/
1959 /* Child linking */
1961 bool TextureObjChunkBase::unlinkChild(
1962 FieldContainer * const pChild,
1963 UInt16 const childFieldId)
1965 if(childFieldId == ImageFieldId)
1967 Image * pTypedChild =
1968 dynamic_cast<Image *>(pChild);
1970 if(pTypedChild != NULL)
1972 if(_sfImage.getValue() == pTypedChild)
1974 editSField(ImageFieldMask);
1976 _sfImage.setValue(NULL);
1978 return true;
1981 SWARNING << "Parent ([" << this
1982 << "] id [" << this->getId()
1983 << "] type [" << this->getType().getCName()
1984 << "] childFieldId [" << childFieldId
1985 << "]) - Child ([" << pChild
1986 << "] id [" << pChild->getId()
1987 << "] type [" << pChild->getType().getCName()
1988 << "]): link inconsistent!"
1989 << std::endl;
1991 return false;
1994 return false;
1998 return Inherited::unlinkChild(pChild, childFieldId);
2001 void TextureObjChunkBase::onCreate(const TextureObjChunk *source)
2003 Inherited::onCreate(source);
2005 if(source != NULL)
2007 TextureObjChunk *pThis = static_cast<TextureObjChunk *>(this);
2009 pThis->setImage(source->getImage());
2013 GetFieldHandlePtr TextureObjChunkBase::getHandleImage (void) const
2015 SFUnrecChildImagePtr::GetHandlePtr returnValue(
2016 new SFUnrecChildImagePtr::GetHandle(
2017 &_sfImage,
2018 this->getType().getFieldDesc(ImageFieldId),
2019 const_cast<TextureObjChunkBase *>(this)));
2021 return returnValue;
2024 EditFieldHandlePtr TextureObjChunkBase::editHandleImage (void)
2026 SFUnrecChildImagePtr::EditHandlePtr returnValue(
2027 new SFUnrecChildImagePtr::EditHandle(
2028 &_sfImage,
2029 this->getType().getFieldDesc(ImageFieldId),
2030 this));
2032 returnValue->setSetMethod(
2033 boost::bind(&TextureObjChunk::setImage,
2034 static_cast<TextureObjChunk *>(this), _1));
2036 editSField(ImageFieldMask);
2038 return returnValue;
2041 GetFieldHandlePtr TextureObjChunkBase::getHandleInternalFormat (void) const
2043 SFGLenum::GetHandlePtr returnValue(
2044 new SFGLenum::GetHandle(
2045 &_sfInternalFormat,
2046 this->getType().getFieldDesc(InternalFormatFieldId),
2047 const_cast<TextureObjChunkBase *>(this)));
2049 return returnValue;
2052 EditFieldHandlePtr TextureObjChunkBase::editHandleInternalFormat (void)
2054 SFGLenum::EditHandlePtr returnValue(
2055 new SFGLenum::EditHandle(
2056 &_sfInternalFormat,
2057 this->getType().getFieldDesc(InternalFormatFieldId),
2058 this));
2061 editSField(InternalFormatFieldMask);
2063 return returnValue;
2066 GetFieldHandlePtr TextureObjChunkBase::getHandleExternalFormat (void) const
2068 SFGLenum::GetHandlePtr returnValue(
2069 new SFGLenum::GetHandle(
2070 &_sfExternalFormat,
2071 this->getType().getFieldDesc(ExternalFormatFieldId),
2072 const_cast<TextureObjChunkBase *>(this)));
2074 return returnValue;
2077 EditFieldHandlePtr TextureObjChunkBase::editHandleExternalFormat (void)
2079 SFGLenum::EditHandlePtr returnValue(
2080 new SFGLenum::EditHandle(
2081 &_sfExternalFormat,
2082 this->getType().getFieldDesc(ExternalFormatFieldId),
2083 this));
2086 editSField(ExternalFormatFieldMask);
2088 return returnValue;
2091 GetFieldHandlePtr TextureObjChunkBase::getHandleScale (void) const
2093 SFBool::GetHandlePtr returnValue(
2094 new SFBool::GetHandle(
2095 &_sfScale,
2096 this->getType().getFieldDesc(ScaleFieldId),
2097 const_cast<TextureObjChunkBase *>(this)));
2099 return returnValue;
2102 EditFieldHandlePtr TextureObjChunkBase::editHandleScale (void)
2104 SFBool::EditHandlePtr returnValue(
2105 new SFBool::EditHandle(
2106 &_sfScale,
2107 this->getType().getFieldDesc(ScaleFieldId),
2108 this));
2111 editSField(ScaleFieldMask);
2113 return returnValue;
2116 GetFieldHandlePtr TextureObjChunkBase::getHandleFrame (void) const
2118 SFUInt32::GetHandlePtr returnValue(
2119 new SFUInt32::GetHandle(
2120 &_sfFrame,
2121 this->getType().getFieldDesc(FrameFieldId),
2122 const_cast<TextureObjChunkBase *>(this)));
2124 return returnValue;
2127 EditFieldHandlePtr TextureObjChunkBase::editHandleFrame (void)
2129 SFUInt32::EditHandlePtr returnValue(
2130 new SFUInt32::EditHandle(
2131 &_sfFrame,
2132 this->getType().getFieldDesc(FrameFieldId),
2133 this));
2136 editSField(FrameFieldMask);
2138 return returnValue;
2141 GetFieldHandlePtr TextureObjChunkBase::getHandleMinFilter (void) const
2143 SFGLenum::GetHandlePtr returnValue(
2144 new SFGLenum::GetHandle(
2145 &_sfMinFilter,
2146 this->getType().getFieldDesc(MinFilterFieldId),
2147 const_cast<TextureObjChunkBase *>(this)));
2149 return returnValue;
2152 EditFieldHandlePtr TextureObjChunkBase::editHandleMinFilter (void)
2154 SFGLenum::EditHandlePtr returnValue(
2155 new SFGLenum::EditHandle(
2156 &_sfMinFilter,
2157 this->getType().getFieldDesc(MinFilterFieldId),
2158 this));
2161 editSField(MinFilterFieldMask);
2163 return returnValue;
2166 GetFieldHandlePtr TextureObjChunkBase::getHandleMagFilter (void) const
2168 SFGLenum::GetHandlePtr returnValue(
2169 new SFGLenum::GetHandle(
2170 &_sfMagFilter,
2171 this->getType().getFieldDesc(MagFilterFieldId),
2172 const_cast<TextureObjChunkBase *>(this)));
2174 return returnValue;
2177 EditFieldHandlePtr TextureObjChunkBase::editHandleMagFilter (void)
2179 SFGLenum::EditHandlePtr returnValue(
2180 new SFGLenum::EditHandle(
2181 &_sfMagFilter,
2182 this->getType().getFieldDesc(MagFilterFieldId),
2183 this));
2186 editSField(MagFilterFieldMask);
2188 return returnValue;
2191 GetFieldHandlePtr TextureObjChunkBase::getHandleWrapS (void) const
2193 SFGLenum::GetHandlePtr returnValue(
2194 new SFGLenum::GetHandle(
2195 &_sfWrapS,
2196 this->getType().getFieldDesc(WrapSFieldId),
2197 const_cast<TextureObjChunkBase *>(this)));
2199 return returnValue;
2202 EditFieldHandlePtr TextureObjChunkBase::editHandleWrapS (void)
2204 SFGLenum::EditHandlePtr returnValue(
2205 new SFGLenum::EditHandle(
2206 &_sfWrapS,
2207 this->getType().getFieldDesc(WrapSFieldId),
2208 this));
2211 editSField(WrapSFieldMask);
2213 return returnValue;
2216 GetFieldHandlePtr TextureObjChunkBase::getHandleWrapT (void) const
2218 SFGLenum::GetHandlePtr returnValue(
2219 new SFGLenum::GetHandle(
2220 &_sfWrapT,
2221 this->getType().getFieldDesc(WrapTFieldId),
2222 const_cast<TextureObjChunkBase *>(this)));
2224 return returnValue;
2227 EditFieldHandlePtr TextureObjChunkBase::editHandleWrapT (void)
2229 SFGLenum::EditHandlePtr returnValue(
2230 new SFGLenum::EditHandle(
2231 &_sfWrapT,
2232 this->getType().getFieldDesc(WrapTFieldId),
2233 this));
2236 editSField(WrapTFieldMask);
2238 return returnValue;
2241 GetFieldHandlePtr TextureObjChunkBase::getHandleWrapR (void) const
2243 SFGLenum::GetHandlePtr returnValue(
2244 new SFGLenum::GetHandle(
2245 &_sfWrapR,
2246 this->getType().getFieldDesc(WrapRFieldId),
2247 const_cast<TextureObjChunkBase *>(this)));
2249 return returnValue;
2252 EditFieldHandlePtr TextureObjChunkBase::editHandleWrapR (void)
2254 SFGLenum::EditHandlePtr returnValue(
2255 new SFGLenum::EditHandle(
2256 &_sfWrapR,
2257 this->getType().getFieldDesc(WrapRFieldId),
2258 this));
2261 editSField(WrapRFieldMask);
2263 return returnValue;
2266 GetFieldHandlePtr TextureObjChunkBase::getHandleGLId (void) const
2268 SFGLenum::GetHandlePtr returnValue(
2269 new SFGLenum::GetHandle(
2270 &_sfGLId,
2271 this->getType().getFieldDesc(GLIdFieldId),
2272 const_cast<TextureObjChunkBase *>(this)));
2274 return returnValue;
2277 EditFieldHandlePtr TextureObjChunkBase::editHandleGLId (void)
2279 SFGLenum::EditHandlePtr returnValue(
2280 new SFGLenum::EditHandle(
2281 &_sfGLId,
2282 this->getType().getFieldDesc(GLIdFieldId),
2283 this));
2286 editSField(GLIdFieldMask);
2288 return returnValue;
2291 GetFieldHandlePtr TextureObjChunkBase::getHandlePriority (void) const
2293 SFReal32::GetHandlePtr returnValue(
2294 new SFReal32::GetHandle(
2295 &_sfPriority,
2296 this->getType().getFieldDesc(PriorityFieldId),
2297 const_cast<TextureObjChunkBase *>(this)));
2299 return returnValue;
2302 EditFieldHandlePtr TextureObjChunkBase::editHandlePriority (void)
2304 SFReal32::EditHandlePtr returnValue(
2305 new SFReal32::EditHandle(
2306 &_sfPriority,
2307 this->getType().getFieldDesc(PriorityFieldId),
2308 this));
2311 editSField(PriorityFieldMask);
2313 return returnValue;
2316 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyLeft (void) const
2318 SFInt32::GetHandlePtr returnValue(
2319 new SFInt32::GetHandle(
2320 &_sfDirtyLeft,
2321 this->getType().getFieldDesc(DirtyLeftFieldId),
2322 const_cast<TextureObjChunkBase *>(this)));
2324 return returnValue;
2327 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyLeft (void)
2329 SFInt32::EditHandlePtr returnValue(
2330 new SFInt32::EditHandle(
2331 &_sfDirtyLeft,
2332 this->getType().getFieldDesc(DirtyLeftFieldId),
2333 this));
2336 editSField(DirtyLeftFieldMask);
2338 return returnValue;
2341 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMinX (void) const
2343 SFInt32::GetHandlePtr returnValue(
2344 new SFInt32::GetHandle(
2345 &_sfDirtyMinX,
2346 this->getType().getFieldDesc(DirtyMinXFieldId),
2347 const_cast<TextureObjChunkBase *>(this)));
2349 return returnValue;
2352 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMinX (void)
2354 SFInt32::EditHandlePtr returnValue(
2355 new SFInt32::EditHandle(
2356 &_sfDirtyMinX,
2357 this->getType().getFieldDesc(DirtyMinXFieldId),
2358 this));
2361 editSField(DirtyMinXFieldMask);
2363 return returnValue;
2366 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMaxX (void) const
2368 SFInt32::GetHandlePtr returnValue(
2369 new SFInt32::GetHandle(
2370 &_sfDirtyMaxX,
2371 this->getType().getFieldDesc(DirtyMaxXFieldId),
2372 const_cast<TextureObjChunkBase *>(this)));
2374 return returnValue;
2377 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMaxX (void)
2379 SFInt32::EditHandlePtr returnValue(
2380 new SFInt32::EditHandle(
2381 &_sfDirtyMaxX,
2382 this->getType().getFieldDesc(DirtyMaxXFieldId),
2383 this));
2386 editSField(DirtyMaxXFieldMask);
2388 return returnValue;
2391 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMinY (void) const
2393 SFInt32::GetHandlePtr returnValue(
2394 new SFInt32::GetHandle(
2395 &_sfDirtyMinY,
2396 this->getType().getFieldDesc(DirtyMinYFieldId),
2397 const_cast<TextureObjChunkBase *>(this)));
2399 return returnValue;
2402 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMinY (void)
2404 SFInt32::EditHandlePtr returnValue(
2405 new SFInt32::EditHandle(
2406 &_sfDirtyMinY,
2407 this->getType().getFieldDesc(DirtyMinYFieldId),
2408 this));
2411 editSField(DirtyMinYFieldMask);
2413 return returnValue;
2416 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMaxY (void) const
2418 SFInt32::GetHandlePtr returnValue(
2419 new SFInt32::GetHandle(
2420 &_sfDirtyMaxY,
2421 this->getType().getFieldDesc(DirtyMaxYFieldId),
2422 const_cast<TextureObjChunkBase *>(this)));
2424 return returnValue;
2427 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMaxY (void)
2429 SFInt32::EditHandlePtr returnValue(
2430 new SFInt32::EditHandle(
2431 &_sfDirtyMaxY,
2432 this->getType().getFieldDesc(DirtyMaxYFieldId),
2433 this));
2436 editSField(DirtyMaxYFieldMask);
2438 return returnValue;
2441 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMinZ (void) const
2443 SFInt32::GetHandlePtr returnValue(
2444 new SFInt32::GetHandle(
2445 &_sfDirtyMinZ,
2446 this->getType().getFieldDesc(DirtyMinZFieldId),
2447 const_cast<TextureObjChunkBase *>(this)));
2449 return returnValue;
2452 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMinZ (void)
2454 SFInt32::EditHandlePtr returnValue(
2455 new SFInt32::EditHandle(
2456 &_sfDirtyMinZ,
2457 this->getType().getFieldDesc(DirtyMinZFieldId),
2458 this));
2461 editSField(DirtyMinZFieldMask);
2463 return returnValue;
2466 GetFieldHandlePtr TextureObjChunkBase::getHandleDirtyMaxZ (void) const
2468 SFInt32::GetHandlePtr returnValue(
2469 new SFInt32::GetHandle(
2470 &_sfDirtyMaxZ,
2471 this->getType().getFieldDesc(DirtyMaxZFieldId),
2472 const_cast<TextureObjChunkBase *>(this)));
2474 return returnValue;
2477 EditFieldHandlePtr TextureObjChunkBase::editHandleDirtyMaxZ (void)
2479 SFInt32::EditHandlePtr returnValue(
2480 new SFInt32::EditHandle(
2481 &_sfDirtyMaxZ,
2482 this->getType().getFieldDesc(DirtyMaxZFieldId),
2483 this));
2486 editSField(DirtyMaxZFieldMask);
2488 return returnValue;
2491 GetFieldHandlePtr TextureObjChunkBase::getHandleAnisotropy (void) const
2493 SFReal32::GetHandlePtr returnValue(
2494 new SFReal32::GetHandle(
2495 &_sfAnisotropy,
2496 this->getType().getFieldDesc(AnisotropyFieldId),
2497 const_cast<TextureObjChunkBase *>(this)));
2499 return returnValue;
2502 EditFieldHandlePtr TextureObjChunkBase::editHandleAnisotropy (void)
2504 SFReal32::EditHandlePtr returnValue(
2505 new SFReal32::EditHandle(
2506 &_sfAnisotropy,
2507 this->getType().getFieldDesc(AnisotropyFieldId),
2508 this));
2511 editSField(AnisotropyFieldMask);
2513 return returnValue;
2516 GetFieldHandlePtr TextureObjChunkBase::getHandleBorderColor (void) const
2518 SFColor4f::GetHandlePtr returnValue(
2519 new SFColor4f::GetHandle(
2520 &_sfBorderColor,
2521 this->getType().getFieldDesc(BorderColorFieldId),
2522 const_cast<TextureObjChunkBase *>(this)));
2524 return returnValue;
2527 EditFieldHandlePtr TextureObjChunkBase::editHandleBorderColor (void)
2529 SFColor4f::EditHandlePtr returnValue(
2530 new SFColor4f::EditHandle(
2531 &_sfBorderColor,
2532 this->getType().getFieldDesc(BorderColorFieldId),
2533 this));
2536 editSField(BorderColorFieldMask);
2538 return returnValue;
2541 GetFieldHandlePtr TextureObjChunkBase::getHandleCompareMode (void) const
2543 SFGLenum::GetHandlePtr returnValue(
2544 new SFGLenum::GetHandle(
2545 &_sfCompareMode,
2546 this->getType().getFieldDesc(CompareModeFieldId),
2547 const_cast<TextureObjChunkBase *>(this)));
2549 return returnValue;
2552 EditFieldHandlePtr TextureObjChunkBase::editHandleCompareMode (void)
2554 SFGLenum::EditHandlePtr returnValue(
2555 new SFGLenum::EditHandle(
2556 &_sfCompareMode,
2557 this->getType().getFieldDesc(CompareModeFieldId),
2558 this));
2561 editSField(CompareModeFieldMask);
2563 return returnValue;
2566 GetFieldHandlePtr TextureObjChunkBase::getHandleCompareFunc (void) const
2568 SFGLenum::GetHandlePtr returnValue(
2569 new SFGLenum::GetHandle(
2570 &_sfCompareFunc,
2571 this->getType().getFieldDesc(CompareFuncFieldId),
2572 const_cast<TextureObjChunkBase *>(this)));
2574 return returnValue;
2577 EditFieldHandlePtr TextureObjChunkBase::editHandleCompareFunc (void)
2579 SFGLenum::EditHandlePtr returnValue(
2580 new SFGLenum::EditHandle(
2581 &_sfCompareFunc,
2582 this->getType().getFieldDesc(CompareFuncFieldId),
2583 this));
2586 editSField(CompareFuncFieldMask);
2588 return returnValue;
2591 GetFieldHandlePtr TextureObjChunkBase::getHandleDepthMode (void) const
2593 SFGLenum::GetHandlePtr returnValue(
2594 new SFGLenum::GetHandle(
2595 &_sfDepthMode,
2596 this->getType().getFieldDesc(DepthModeFieldId),
2597 const_cast<TextureObjChunkBase *>(this)));
2599 return returnValue;
2602 EditFieldHandlePtr TextureObjChunkBase::editHandleDepthMode (void)
2604 SFGLenum::EditHandlePtr returnValue(
2605 new SFGLenum::EditHandle(
2606 &_sfDepthMode,
2607 this->getType().getFieldDesc(DepthModeFieldId),
2608 this));
2611 editSField(DepthModeFieldMask);
2613 return returnValue;
2616 GetFieldHandlePtr TextureObjChunkBase::getHandleBorderWidth (void) const
2618 SFUInt32::GetHandlePtr returnValue(
2619 new SFUInt32::GetHandle(
2620 &_sfBorderWidth,
2621 this->getType().getFieldDesc(BorderWidthFieldId),
2622 const_cast<TextureObjChunkBase *>(this)));
2624 return returnValue;
2627 EditFieldHandlePtr TextureObjChunkBase::editHandleBorderWidth (void)
2629 SFUInt32::EditHandlePtr returnValue(
2630 new SFUInt32::EditHandle(
2631 &_sfBorderWidth,
2632 this->getType().getFieldDesc(BorderWidthFieldId),
2633 this));
2636 editSField(BorderWidthFieldMask);
2638 return returnValue;
2641 GetFieldHandlePtr TextureObjChunkBase::getHandleSkipMipMapLevels (void) const
2643 SFReal32::GetHandlePtr returnValue(
2644 new SFReal32::GetHandle(
2645 &_sfSkipMipMapLevels,
2646 this->getType().getFieldDesc(SkipMipMapLevelsFieldId),
2647 const_cast<TextureObjChunkBase *>(this)));
2649 return returnValue;
2652 EditFieldHandlePtr TextureObjChunkBase::editHandleSkipMipMapLevels(void)
2654 SFReal32::EditHandlePtr returnValue(
2655 new SFReal32::EditHandle(
2656 &_sfSkipMipMapLevels,
2657 this->getType().getFieldDesc(SkipMipMapLevelsFieldId),
2658 this));
2661 editSField(SkipMipMapLevelsFieldMask);
2663 return returnValue;
2667 #ifdef OSG_MT_CPTR_ASPECT
2668 void TextureObjChunkBase::execSyncV( FieldContainer &oFrom,
2669 ConstFieldMaskArg whichField,
2670 AspectOffsetStore &oOffsets,
2671 ConstFieldMaskArg syncMode,
2672 const UInt32 uiSyncInfo)
2674 TextureObjChunk *pThis = static_cast<TextureObjChunk *>(this);
2676 pThis->execSync(static_cast<TextureObjChunk *>(&oFrom),
2677 whichField,
2678 oOffsets,
2679 syncMode,
2680 uiSyncInfo);
2682 #endif
2685 #ifdef OSG_MT_CPTR_ASPECT
2686 FieldContainer *TextureObjChunkBase::createAspectCopy(
2687 const FieldContainer *pRefAspect) const
2689 TextureObjChunk *returnValue;
2691 newAspectCopy(returnValue,
2692 dynamic_cast<const TextureObjChunk *>(pRefAspect),
2693 dynamic_cast<const TextureObjChunk *>(this));
2695 return returnValue;
2697 #endif
2699 void TextureObjChunkBase::resolveLinks(void)
2701 Inherited::resolveLinks();
2703 static_cast<TextureObjChunk *>(this)->setImage(NULL);
2709 OSG_END_NAMESPACE