1 /*---------------------------------------------------------------------------*\
5 * Copyright (C) 2000-2013 by the OpenSG Forum *
9 * contact: dirk@opensg.org, gerrit.voss@vossg.org, carsten_neumann@gmx.net *
11 \*---------------------------------------------------------------------------*/
12 /*---------------------------------------------------------------------------*\
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. *
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. *
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. *
28 \*---------------------------------------------------------------------------*/
29 /*---------------------------------------------------------------------------*\
37 \*---------------------------------------------------------------------------*/
39 /*****************************************************************************\
40 *****************************************************************************
42 ** This file is automatically generated. **
44 ** Any changes made to this file WILL be lost when it is **
45 ** regenerated, which can become necessary at any time. **
47 ** Do not change this file, changes should be done in the derived **
48 ** class TextureEnvChunk!
50 *****************************************************************************
51 \*****************************************************************************/
57 #pragma warning(disable: 4355) // turn off 'this' : used in base member initializer list warning
58 #pragma warning(disable: 4290) // disable exception specification warning
61 #include "OSGConfig.h"
64 #include "OSGGL.h" // EnvMode default header
65 #include "OSGGL.h" // EnvCombineRGB default header
66 #include "OSGGL.h" // EnvCombineAlpha default header
67 #include "OSGGL.h" // EnvSource0RGB default header
68 #include "OSGGLEXT.h" // EnvSource1RGB default header
69 #include "OSGGLEXT.h" // EnvSource2RGB default header
70 #include "OSGGL.h" // EnvSource0Alpha default header
71 #include "OSGGLEXT.h" // EnvSource1Alpha default header
72 #include "OSGGLEXT.h" // EnvSource2Alpha default header
73 #include "OSGGL.h" // EnvOperand0RGB default header
74 #include "OSGGL.h" // EnvOperand1RGB default header
75 #include "OSGGL.h" // EnvOperand2RGB default header
76 #include "OSGGL.h" // EnvOperand0Alpha default header
77 #include "OSGGL.h" // EnvOperand1Alpha default header
78 #include "OSGGL.h" // EnvOperand2Alpha default header
79 #include "OSGGL.h" // PointSprite default header
80 #include "OSGGL.h" // ShaderOperation default header
81 #include "OSGGL.h" // ShaderInput default header
82 #include "OSGGL.h" // ShaderRGBADotProduct default header
85 #include "OSGTextureEnvChunkBase.h"
86 #include "OSGTextureEnvChunk.h"
88 #include <boost/bind.hpp>
92 /***************************************************************************\
94 \***************************************************************************/
96 /*! \class OSG::TextureEnvChunk
100 /***************************************************************************\
101 * Field Documentation *
102 \***************************************************************************/
104 /*! \var GLenum TextureEnvChunkBase::_sfEnvMode
105 Texture environment mode, default GL_REPLACE.
108 /*! \var Color4f TextureEnvChunkBase::_sfEnvColor
109 Texture environment color default transparent black.
112 /*! \var GLenum TextureEnvChunkBase::_sfEnvCombineRGB
113 Texture environment rgb combine mode, default GL_MODULATE.
116 /*! \var GLenum TextureEnvChunkBase::_sfEnvCombineAlpha
117 Texture environment alpha combine mode, default GL_MODULATE.
120 /*! \var Real32 TextureEnvChunkBase::_sfEnvScaleRGB
121 Texture environment combine rgb scale factor, default 1.f.
124 /*! \var Real32 TextureEnvChunkBase::_sfEnvScaleAlpha
125 Texture environment combine alpha scale factor, default 1.f.
128 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource0RGB
129 Texture environment combine source 0 rgb, default GL_TEXTURE.
132 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource1RGB
133 Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT.
136 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource2RGB
137 Texture environment combine source 2 rgb, default GL_CONSTANT_EXT.
140 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource0Alpha
141 Texture environment combine source 0 alpha, default GL_TEXTURE.
144 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource1Alpha
145 Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT.
148 /*! \var GLenum TextureEnvChunkBase::_sfEnvSource2Alpha
149 Texture environment combine source 2 alpha, default GL_CONSTANT_EXT.
152 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand0RGB
153 Texture environment combine operand 0 rgb, default GL_SRC_COLOR.
156 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand1RGB
157 Texture environment combine operand 1 rgb, default GL_SRC_COLOR.
160 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand2RGB
161 Texture environment combine operand 2 rgb, default GL_SRC_ALPHA.
164 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand0Alpha
165 Texture environment combine operand 0 alpha, default GL_SRC_ALPHA.
168 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand1Alpha
169 Texture environment combine operand 1 alpha, default GL_SRC_ALPHA.
172 /*! \var GLenum TextureEnvChunkBase::_sfEnvOperand2Alpha
173 Texture environment combine operand 2 alpha, default GL_SRC_ALPHA.
176 /*! \var bool TextureEnvChunkBase::_sfPointSprite
177 Flag to use this texture for Point Sprites.
180 /*! \var GLenum TextureEnvChunkBase::_sfShaderOperation
181 Shader operation of this texture unit, default GL_NONE. If unit 0 uses
182 GL_NONE, shading is switched off. (GL_SHADER_OPERATION_NV).
185 /*! \var GLenum TextureEnvChunkBase::_sfShaderInput
186 Input texture unit for this shader's operation. (GL_TEXTURE_SHADER_NV)
189 /*! \var Real32 TextureEnvChunkBase::_mfShaderOffsetMatrix
190 The 2x2 transformation matrix for offset textures. (GL_OFFSET_TEXTURE_MATRIX_NV)
193 /*! \var Real32 TextureEnvChunkBase::_sfShaderOffsetScale
194 The scaling factor for scaled offset textures. (GL_OFFSET_TEXTURE_SCALE_NV)
197 /*! \var Real32 TextureEnvChunkBase::_sfShaderOffsetBias
198 The bias factor for scaled offset textures. (GL_OFFSET_TEXTURE_BIAS_NV)
201 /*! \var GLenum TextureEnvChunkBase::_sfShaderRGBADotProduct
202 The RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV value.
205 /*! \var UInt8 TextureEnvChunkBase::_sfShaderCullModes
206 The CULL_MODES_NV value, coded into a single byte. The first 4 bits of
207 the byte are used to indicate the wnated cull modes, a value of 0
208 signifies GL_LESS, a value of 1 GL_GEQUAL. Bit 0 (mask 1) is used for
209 the S coordinate, bit 1 (mask 2) for T, bit 2 (mask 4) for R and bit 4
213 /*! \var Vec3f TextureEnvChunkBase::_sfShaderConstEye
214 The CONST_EYE_NV value, i.e. the constant eye position used by the
215 DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV shader.
218 /*! \var Real32 TextureEnvChunkBase::_sfLodBias
219 Bias of LOD calculation for texture access.
223 /***************************************************************************\
224 * FieldType/FieldTrait Instantiation *
225 \***************************************************************************/
227 #if !defined(OSG_DO_DOC) || defined(OSG_DOC_DEV)
228 PointerType FieldTraits
<TextureEnvChunk
*, nsOSG
>::_type(
229 "TextureEnvChunkPtr",
231 TextureEnvChunk::getClassType(),
235 OSG_FIELDTRAITS_GETTYPE_NS(TextureEnvChunk
*, nsOSG
)
237 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField
,
241 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField
,
245 /***************************************************************************\
246 * Field Description *
247 \***************************************************************************/
249 void TextureEnvChunkBase::classDescInserter(TypeObject
&oType
)
251 FieldDescriptionBase
*pDesc
= NULL
;
254 pDesc
= new SFGLenum::Description(
255 SFGLenum::getClassType(),
257 "Texture environment mode, default GL_REPLACE.\n",
258 EnvModeFieldId
, EnvModeFieldMask
,
260 (Field::SFDefaultFlags
| Field::FStdAccess
),
261 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvMode
),
262 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvMode
));
264 oType
.addInitialDesc(pDesc
);
266 pDesc
= new SFColor4f::Description(
267 SFColor4f::getClassType(),
269 "Texture environment color default transparent black.\n",
270 EnvColorFieldId
, EnvColorFieldMask
,
272 (Field::SFDefaultFlags
| Field::FStdAccess
),
273 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvColor
),
274 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvColor
));
276 oType
.addInitialDesc(pDesc
);
278 pDesc
= new SFGLenum::Description(
279 SFGLenum::getClassType(),
281 "Texture environment rgb combine mode, default GL_MODULATE.\n",
282 EnvCombineRGBFieldId
, EnvCombineRGBFieldMask
,
284 (Field::SFDefaultFlags
| Field::FStdAccess
),
285 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvCombineRGB
),
286 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvCombineRGB
));
288 oType
.addInitialDesc(pDesc
);
290 pDesc
= new SFGLenum::Description(
291 SFGLenum::getClassType(),
293 "Texture environment alpha combine mode, default GL_MODULATE.\n",
294 EnvCombineAlphaFieldId
, EnvCombineAlphaFieldMask
,
296 (Field::SFDefaultFlags
| Field::FStdAccess
),
297 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvCombineAlpha
),
298 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvCombineAlpha
));
300 oType
.addInitialDesc(pDesc
);
302 pDesc
= new SFReal32::Description(
303 SFReal32::getClassType(),
305 "Texture environment combine rgb scale factor, default 1.f.\n",
306 EnvScaleRGBFieldId
, EnvScaleRGBFieldMask
,
308 (Field::SFDefaultFlags
| Field::FStdAccess
),
309 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvScaleRGB
),
310 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvScaleRGB
));
312 oType
.addInitialDesc(pDesc
);
314 pDesc
= new SFReal32::Description(
315 SFReal32::getClassType(),
317 "Texture environment combine alpha scale factor, default 1.f.\n",
318 EnvScaleAlphaFieldId
, EnvScaleAlphaFieldMask
,
320 (Field::SFDefaultFlags
| Field::FStdAccess
),
321 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvScaleAlpha
),
322 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvScaleAlpha
));
324 oType
.addInitialDesc(pDesc
);
326 pDesc
= new SFGLenum::Description(
327 SFGLenum::getClassType(),
329 "Texture environment combine source 0 rgb, default GL_TEXTURE.\n",
330 EnvSource0RGBFieldId
, EnvSource0RGBFieldMask
,
332 (Field::SFDefaultFlags
| Field::FStdAccess
),
333 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource0RGB
),
334 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource0RGB
));
336 oType
.addInitialDesc(pDesc
);
338 pDesc
= new SFGLenum::Description(
339 SFGLenum::getClassType(),
341 "Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT.\n",
342 EnvSource1RGBFieldId
, EnvSource1RGBFieldMask
,
344 (Field::SFDefaultFlags
| Field::FStdAccess
),
345 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource1RGB
),
346 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource1RGB
));
348 oType
.addInitialDesc(pDesc
);
350 pDesc
= new SFGLenum::Description(
351 SFGLenum::getClassType(),
353 "Texture environment combine source 2 rgb, default GL_CONSTANT_EXT.\n",
354 EnvSource2RGBFieldId
, EnvSource2RGBFieldMask
,
356 (Field::SFDefaultFlags
| Field::FStdAccess
),
357 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource2RGB
),
358 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource2RGB
));
360 oType
.addInitialDesc(pDesc
);
362 pDesc
= new SFGLenum::Description(
363 SFGLenum::getClassType(),
365 "Texture environment combine source 0 alpha, default GL_TEXTURE.\n",
366 EnvSource0AlphaFieldId
, EnvSource0AlphaFieldMask
,
368 (Field::SFDefaultFlags
| Field::FStdAccess
),
369 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource0Alpha
),
370 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource0Alpha
));
372 oType
.addInitialDesc(pDesc
);
374 pDesc
= new SFGLenum::Description(
375 SFGLenum::getClassType(),
377 "Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT.\n",
378 EnvSource1AlphaFieldId
, EnvSource1AlphaFieldMask
,
380 (Field::SFDefaultFlags
| Field::FStdAccess
),
381 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource1Alpha
),
382 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource1Alpha
));
384 oType
.addInitialDesc(pDesc
);
386 pDesc
= new SFGLenum::Description(
387 SFGLenum::getClassType(),
389 "Texture environment combine source 2 alpha, default GL_CONSTANT_EXT.\n",
390 EnvSource2AlphaFieldId
, EnvSource2AlphaFieldMask
,
392 (Field::SFDefaultFlags
| Field::FStdAccess
),
393 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvSource2Alpha
),
394 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvSource2Alpha
));
396 oType
.addInitialDesc(pDesc
);
398 pDesc
= new SFGLenum::Description(
399 SFGLenum::getClassType(),
401 "Texture environment combine operand 0 rgb, default GL_SRC_COLOR.\n",
402 EnvOperand0RGBFieldId
, EnvOperand0RGBFieldMask
,
404 (Field::SFDefaultFlags
| Field::FStdAccess
),
405 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand0RGB
),
406 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand0RGB
));
408 oType
.addInitialDesc(pDesc
);
410 pDesc
= new SFGLenum::Description(
411 SFGLenum::getClassType(),
413 "Texture environment combine operand 1 rgb, default GL_SRC_COLOR.\n",
414 EnvOperand1RGBFieldId
, EnvOperand1RGBFieldMask
,
416 (Field::SFDefaultFlags
| Field::FStdAccess
),
417 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand1RGB
),
418 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand1RGB
));
420 oType
.addInitialDesc(pDesc
);
422 pDesc
= new SFGLenum::Description(
423 SFGLenum::getClassType(),
425 "Texture environment combine operand 2 rgb, default GL_SRC_ALPHA.\n",
426 EnvOperand2RGBFieldId
, EnvOperand2RGBFieldMask
,
428 (Field::SFDefaultFlags
| Field::FStdAccess
),
429 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand2RGB
),
430 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand2RGB
));
432 oType
.addInitialDesc(pDesc
);
434 pDesc
= new SFGLenum::Description(
435 SFGLenum::getClassType(),
437 "Texture environment combine operand 0 alpha, default GL_SRC_ALPHA.\n",
438 EnvOperand0AlphaFieldId
, EnvOperand0AlphaFieldMask
,
440 (Field::SFDefaultFlags
| Field::FStdAccess
),
441 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand0Alpha
),
442 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand0Alpha
));
444 oType
.addInitialDesc(pDesc
);
446 pDesc
= new SFGLenum::Description(
447 SFGLenum::getClassType(),
449 "Texture environment combine operand 1 alpha, default GL_SRC_ALPHA.\n",
450 EnvOperand1AlphaFieldId
, EnvOperand1AlphaFieldMask
,
452 (Field::SFDefaultFlags
| Field::FStdAccess
),
453 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand1Alpha
),
454 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand1Alpha
));
456 oType
.addInitialDesc(pDesc
);
458 pDesc
= new SFGLenum::Description(
459 SFGLenum::getClassType(),
461 "Texture environment combine operand 2 alpha, default GL_SRC_ALPHA.\n",
462 EnvOperand2AlphaFieldId
, EnvOperand2AlphaFieldMask
,
464 (Field::SFDefaultFlags
| Field::FStdAccess
),
465 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleEnvOperand2Alpha
),
466 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleEnvOperand2Alpha
));
468 oType
.addInitialDesc(pDesc
);
470 pDesc
= new SFBool::Description(
471 SFBool::getClassType(),
473 "Flag to use this texture for Point Sprites.\n",
474 PointSpriteFieldId
, PointSpriteFieldMask
,
476 (Field::SFDefaultFlags
| Field::FStdAccess
),
477 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandlePointSprite
),
478 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandlePointSprite
));
480 oType
.addInitialDesc(pDesc
);
482 pDesc
= new SFGLenum::Description(
483 SFGLenum::getClassType(),
485 "Shader operation of this texture unit, default GL_NONE. If unit 0 uses\n"
486 "GL_NONE, shading is switched off. (GL_SHADER_OPERATION_NV).\n",
487 ShaderOperationFieldId
, ShaderOperationFieldMask
,
489 (Field::SFDefaultFlags
| Field::FStdAccess
),
490 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderOperation
),
491 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderOperation
));
493 oType
.addInitialDesc(pDesc
);
495 pDesc
= new SFGLenum::Description(
496 SFGLenum::getClassType(),
498 "Input texture unit for this shader's operation. (GL_TEXTURE_SHADER_NV)\n",
499 ShaderInputFieldId
, ShaderInputFieldMask
,
501 (Field::SFDefaultFlags
| Field::FStdAccess
),
502 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderInput
),
503 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderInput
));
505 oType
.addInitialDesc(pDesc
);
507 pDesc
= new MFReal32::Description(
508 MFReal32::getClassType(),
509 "shaderOffsetMatrix",
510 "The 2x2 transformation matrix for offset textures. (GL_OFFSET_TEXTURE_MATRIX_NV)\n",
511 ShaderOffsetMatrixFieldId
, ShaderOffsetMatrixFieldMask
,
513 (Field::MFDefaultFlags
| Field::FStdAccess
),
514 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderOffsetMatrix
),
515 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderOffsetMatrix
));
517 oType
.addInitialDesc(pDesc
);
519 pDesc
= new SFReal32::Description(
520 SFReal32::getClassType(),
522 "The scaling factor for scaled offset textures. (GL_OFFSET_TEXTURE_SCALE_NV)\n",
523 ShaderOffsetScaleFieldId
, ShaderOffsetScaleFieldMask
,
525 (Field::SFDefaultFlags
| Field::FStdAccess
),
526 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderOffsetScale
),
527 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderOffsetScale
));
529 oType
.addInitialDesc(pDesc
);
531 pDesc
= new SFReal32::Description(
532 SFReal32::getClassType(),
534 "The bias factor for scaled offset textures. (GL_OFFSET_TEXTURE_BIAS_NV)\n",
535 ShaderOffsetBiasFieldId
, ShaderOffsetBiasFieldMask
,
537 (Field::SFDefaultFlags
| Field::FStdAccess
),
538 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderOffsetBias
),
539 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderOffsetBias
));
541 oType
.addInitialDesc(pDesc
);
543 pDesc
= new SFGLenum::Description(
544 SFGLenum::getClassType(),
545 "shaderRGBADotProduct",
546 "The RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV value.\n",
547 ShaderRGBADotProductFieldId
, ShaderRGBADotProductFieldMask
,
549 (Field::SFDefaultFlags
| Field::FStdAccess
),
550 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderRGBADotProduct
),
551 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderRGBADotProduct
));
553 oType
.addInitialDesc(pDesc
);
555 pDesc
= new SFUInt8::Description(
556 SFUInt8::getClassType(),
558 "The CULL_MODES_NV value, coded into a single byte. The first 4 bits of\n"
559 "the byte are used to indicate the wnated cull modes, a value of 0 \n"
560 "signifies GL_LESS, a value of 1 GL_GEQUAL. Bit 0 (mask 1) is used for \n"
561 "the S coordinate, bit 1 (mask 2) for T, bit 2 (mask 4) for R and bit 4 \n"
563 ShaderCullModesFieldId
, ShaderCullModesFieldMask
,
565 (Field::SFDefaultFlags
| Field::FStdAccess
),
566 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderCullModes
),
567 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderCullModes
));
569 oType
.addInitialDesc(pDesc
);
571 pDesc
= new SFVec3f::Description(
572 SFVec3f::getClassType(),
574 "The CONST_EYE_NV value, i.e. the constant eye position used by the \n"
575 "DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV shader.\n",
576 ShaderConstEyeFieldId
, ShaderConstEyeFieldMask
,
578 (Field::SFDefaultFlags
| Field::FStdAccess
),
579 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleShaderConstEye
),
580 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleShaderConstEye
));
582 oType
.addInitialDesc(pDesc
);
584 pDesc
= new SFReal32::Description(
585 SFReal32::getClassType(),
587 "Bias of LOD calculation for texture access.\n",
588 LodBiasFieldId
, LodBiasFieldMask
,
590 (Field::SFDefaultFlags
| Field::FStdAccess
),
591 static_cast<FieldEditMethodSig
>(&TextureEnvChunk::editHandleLodBias
),
592 static_cast<FieldGetMethodSig
>(&TextureEnvChunk::getHandleLodBias
));
594 oType
.addInitialDesc(pDesc
);
598 TextureEnvChunkBase::TypeObject
TextureEnvChunkBase::_type(
599 TextureEnvChunkBase::getClassname(),
600 Inherited::getClassname(),
603 reinterpret_cast<PrototypeCreateF
>(&TextureEnvChunkBase::createEmptyLocal
),
604 reinterpret_cast<InitContainerF
>(&TextureEnvChunk::initMethod
),
605 reinterpret_cast<ExitContainerF
>(&TextureEnvChunk::exitMethod
),
606 reinterpret_cast<InitalInsertDescFunc
>(
607 reinterpret_cast<void *>(&TextureEnvChunk::classDescInserter
)),
610 "<?xml version=\"1.0\"?>\n"
613 " name=\"TextureEnvChunk\"\n"
614 " parent=\"StateChunk\"\n"
615 " library=\"State\"\n"
616 " pointerfieldtypes=\"both\"\n"
617 " structure=\"concrete\"\n"
618 " systemcomponent=\"true\"\n"
619 " parentsystemcomponent=\"true\"\n"
620 " decoratable=\"false\"\n"
621 " useLocalIncludes=\"false\"\n"
622 " docGroupBase=\"GrpStateOpenGL\"\n"
625 "\t name=\"envMode\"\n"
626 "\t type=\"GLenum\"\n"
627 "\t cardinality=\"single\"\n"
628 "\t visibility=\"external\"\n"
629 "\t defaultValue=\"GL_REPLACE\"\n"
630 "\t defaultHeader=\""OSGGL.h"\"\n"
631 "\t access=\"public\"\n"
632 " potential_values=\"GL_MODULATE, GL_DECAL, GL_BLEND, GL_REPLACE, GL_ADD, GL_COMBINE\"\n"
634 " Texture environment mode, default GL_REPLACE.\n"
637 "\t name=\"envColor\"\n"
638 "\t type=\"Color4f\"\n"
639 "\t cardinality=\"single\"\n"
640 "\t visibility=\"external\"\n"
641 "\t defaultValue=\"0.f,0.f,0.f,0.f\"\n"
642 "\t access=\"public\"\n"
644 " Texture environment color default transparent black.\n"
647 "\t name=\"envCombineRGB\"\n"
648 "\t type=\"GLenum\"\n"
649 "\t cardinality=\"single\"\n"
650 "\t visibility=\"external\"\n"
651 "\t defaultValue=\"GL_MODULATE\"\n"
652 "\t defaultHeader=\""OSGGL.h"\"\n"
653 "\t access=\"public\"\n"
654 " potential_values=\"GL_REPLACE, GL_MODULATE, GL_ADD, GL_ADD_SIGNED, GL_INTERPOLATE, GL_SUBTRACT, GL_DOT3_RGB, GL_DOT3_RGBA\"\n"
656 " Texture environment rgb combine mode, default GL_MODULATE.\n"
659 "\t name=\"envCombineAlpha\"\n"
660 "\t type=\"GLenum\"\n"
661 "\t cardinality=\"single\"\n"
662 "\t visibility=\"external\"\n"
663 "\t defaultValue=\"GL_MODULATE\"\n"
664 "\t defaultHeader=\""OSGGL.h"\"\n"
665 "\t access=\"public\"\n"
666 " potential_values=\"GL_REPLACE, GL_MODULATE, GL_ADD, GL_ADD_SIGNED, GL_INTERPOLATE, GL_SUBTRACT\"\n"
668 " Texture environment alpha combine mode, default GL_MODULATE.\n"
671 "\t name=\"envScaleRGB\"\n"
672 "\t type=\"Real32\"\n"
673 "\t cardinality=\"single\"\n"
674 "\t visibility=\"external\"\n"
675 "\t defaultValue=\"1.0f\"\n"
676 "\t access=\"public\"\n"
678 " Texture environment combine rgb scale factor, default 1.f.\n"
681 "\t name=\"envScaleAlpha\"\n"
682 "\t type=\"Real32\"\n"
683 "\t cardinality=\"single\"\n"
684 "\t visibility=\"external\"\n"
685 "\t defaultValue=\"1.0f\"\n"
686 "\t access=\"public\"\n"
688 " Texture environment combine alpha scale factor, default 1.f.\n"
691 "\t name=\"envSource0RGB\"\n"
692 "\t type=\"GLenum\"\n"
693 "\t cardinality=\"single\"\n"
694 "\t visibility=\"external\"\n"
695 "\t defaultValue=\"GL_TEXTURE\"\n"
696 "\t defaultHeader=\""OSGGL.h"\"\n"
697 "\t access=\"public\"\n"
699 " Texture environment combine source 0 rgb, default GL_TEXTURE.\n"
702 "\t name=\"envSource1RGB\"\n"
703 "\t type=\"GLenum\"\n"
704 "\t cardinality=\"single\"\n"
705 "\t visibility=\"external\"\n"
706 "\t defaultValue=\"GL_PREVIOUS_EXT\"\n"
707 "\t defaultHeader=\""OSGGLEXT.h"\"\n"
708 "\t access=\"public\"\n"
710 " Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT.\n"
713 "\t name=\"envSource2RGB\"\n"
714 "\t type=\"GLenum\"\n"
715 "\t cardinality=\"single\"\n"
716 "\t visibility=\"external\"\n"
717 "\t defaultValue=\"GL_CONSTANT_EXT\"\n"
718 "\t defaultHeader=\""OSGGLEXT.h"\"\n"
719 "\t access=\"public\"\n"
721 " Texture environment combine source 2 rgb, default GL_CONSTANT_EXT.\n"
724 "\t name=\"envSource0Alpha\"\n"
725 "\t type=\"GLenum\"\n"
726 "\t cardinality=\"single\"\n"
727 "\t visibility=\"external\"\n"
728 "\t defaultValue=\"GL_TEXTURE\"\n"
729 "\t defaultHeader=\""OSGGL.h"\"\n"
730 "\t access=\"public\"\n"
732 " Texture environment combine source 0 alpha, default GL_TEXTURE.\n"
735 "\t name=\"envSource1Alpha\"\n"
736 "\t type=\"GLenum\"\n"
737 "\t cardinality=\"single\"\n"
738 "\t visibility=\"external\"\n"
739 "\t defaultValue=\"GL_PREVIOUS_EXT\"\n"
740 "\t defaultHeader=\""OSGGLEXT.h"\"\n"
741 "\t access=\"public\"\n"
743 " Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT.\n"
746 "\t name=\"envSource2Alpha\"\n"
747 "\t type=\"GLenum\"\n"
748 "\t cardinality=\"single\"\n"
749 "\t visibility=\"external\"\n"
750 "\t defaultValue=\"GL_CONSTANT_EXT\"\n"
751 "\t defaultHeader=\""OSGGLEXT.h"\"\n"
752 "\t access=\"public\"\n"
754 " Texture environment combine source 2 alpha, default GL_CONSTANT_EXT.\n"
757 "\t name=\"envOperand0RGB\"\n"
758 "\t type=\"GLenum\"\n"
759 "\t cardinality=\"single\"\n"
760 "\t visibility=\"external\"\n"
761 "\t defaultValue=\"GL_SRC_COLOR\"\n"
762 "\t defaultHeader=\""OSGGL.h"\"\n"
763 "\t access=\"public\"\n"
765 " Texture environment combine operand 0 rgb, default GL_SRC_COLOR.\n"
768 "\t name=\"envOperand1RGB\"\n"
769 "\t type=\"GLenum\"\n"
770 "\t cardinality=\"single\"\n"
771 "\t visibility=\"external\"\n"
772 "\t defaultValue=\"GL_SRC_COLOR\"\n"
773 "\t defaultHeader=\""OSGGL.h"\"\n"
774 "\t access=\"public\"\n"
776 " Texture environment combine operand 1 rgb, default GL_SRC_COLOR.\n"
779 "\t name=\"envOperand2RGB\"\n"
780 "\t type=\"GLenum\"\n"
781 "\t cardinality=\"single\"\n"
782 "\t visibility=\"external\"\n"
783 "\t defaultValue=\"GL_SRC_ALPHA\"\n"
784 "\t defaultHeader=\""OSGGL.h"\"\n"
785 "\t access=\"public\"\n"
787 " Texture environment combine operand 2 rgb, default GL_SRC_ALPHA.\n"
790 "\t name=\"envOperand0Alpha\"\n"
791 "\t type=\"GLenum\"\n"
792 "\t cardinality=\"single\"\n"
793 "\t visibility=\"external\"\n"
794 "\t defaultValue=\"GL_SRC_ALPHA\"\n"
795 "\t defaultHeader=\""OSGGL.h"\"\n"
796 "\t access=\"public\"\n"
798 " Texture environment combine operand 0 alpha, default GL_SRC_ALPHA.\n"
801 "\t name=\"envOperand1Alpha\"\n"
802 "\t type=\"GLenum\"\n"
803 "\t cardinality=\"single\"\n"
804 "\t visibility=\"external\"\n"
805 "\t defaultValue=\"GL_SRC_ALPHA\"\n"
806 "\t defaultHeader=\""OSGGL.h"\"\n"
807 "\t access=\"public\"\n"
809 " Texture environment combine operand 1 alpha, default GL_SRC_ALPHA.\n"
812 "\t name=\"envOperand2Alpha\"\n"
813 "\t type=\"GLenum\"\n"
814 "\t cardinality=\"single\"\n"
815 "\t visibility=\"external\"\n"
816 "\t defaultValue=\"GL_SRC_ALPHA\"\n"
817 "\t defaultHeader=\""OSGGL.h"\"\n"
818 "\t access=\"public\"\n"
820 " Texture environment combine operand 2 alpha, default GL_SRC_ALPHA.\n"
823 "\t name=\"pointSprite\"\n"
825 "\t cardinality=\"single\"\n"
826 "\t visibility=\"external\"\n"
827 "\t access=\"public\"\n"
828 "\t defaultValue=\"GL_FALSE\"\n"
829 "\t defaultHeader=\""OSGGL.h"\"\n"
831 " Flag to use this texture for Point Sprites.\n"
834 "\t name=\"shaderOperation\"\n"
835 "\t type=\"GLenum\"\n"
836 "\t cardinality=\"single\"\n"
837 "\t visibility=\"external\"\n"
838 "\t access=\"public\"\n"
839 "\t defaultValue=\"GL_NONE\"\n"
840 "\t defaultHeader=\""OSGGL.h"\"\n"
842 " Shader operation of this texture unit, default GL_NONE. If unit 0 uses\n"
843 " GL_NONE, shading is switched off. (GL_SHADER_OPERATION_NV).\n"
846 "\t name=\"shaderInput\"\n"
847 "\t type=\"GLenum\"\n"
848 "\t cardinality=\"single\"\n"
849 "\t visibility=\"external\"\n"
850 "\t access=\"public\"\n"
851 "\t defaultValue=\"GL_NONE\"\n"
852 "\t defaultHeader=\""OSGGL.h"\"\n"
854 " Input texture unit for this shader's operation. (GL_TEXTURE_SHADER_NV)\n"
857 "\t name=\"shaderOffsetMatrix\"\n"
858 "\t type=\"Real32\"\n"
859 "\t cardinality=\"multi\"\n"
860 "\t visibility=\"external\"\n"
861 "\t access=\"public\"\n"
863 " The 2x2 transformation matrix for offset textures. (GL_OFFSET_TEXTURE_MATRIX_NV)\n"
866 "\t name=\"shaderOffsetScale\"\n"
867 "\t type=\"Real32\"\n"
868 "\t cardinality=\"single\"\n"
869 "\t visibility=\"external\"\n"
870 "\t access=\"public\"\n"
871 "\t defaultValue=\"1.f\"\n"
873 " The scaling factor for scaled offset textures. (GL_OFFSET_TEXTURE_SCALE_NV)\n"
876 "\t name=\"shaderOffsetBias\"\n"
877 "\t type=\"Real32\"\n"
878 "\t cardinality=\"single\"\n"
879 "\t visibility=\"external\"\n"
880 "\t access=\"public\"\n"
881 "\t defaultValue=\"0.f\"\n"
883 " The bias factor for scaled offset textures. (GL_OFFSET_TEXTURE_BIAS_NV)\n"
886 "\t name=\"shaderRGBADotProduct\"\n"
887 "\t type=\"GLenum\"\n"
888 "\t cardinality=\"single\"\n"
889 "\t visibility=\"external\"\n"
890 "\t access=\"public\"\n"
891 "\t defaultValue=\"GL_NONE\"\n"
892 "\t defaultHeader=\""OSGGL.h"\"\n"
894 " The RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV value.\n"
897 "\t name=\"shaderCullModes\"\n"
898 "\t type=\"UInt8\"\n"
899 "\t cardinality=\"single\"\n"
900 "\t visibility=\"external\"\n"
901 "\t access=\"public\"\n"
902 "\t defaultValue=\"0\"\n"
904 " The CULL_MODES_NV value, coded into a single byte. The first 4 bits of\n"
905 " the byte are used to indicate the wnated cull modes, a value of 0 \n"
906 " signifies GL_LESS, a value of 1 GL_GEQUAL. Bit 0 (mask 1) is used for \n"
907 " the S coordinate, bit 1 (mask 2) for T, bit 2 (mask 4) for R and bit 4 \n"
911 "\t name=\"shaderConstEye\"\n"
912 "\t type=\"Vec3f\"\n"
913 "\t cardinality=\"single\"\n"
914 "\t visibility=\"external\"\n"
915 "\t access=\"public\"\n"
917 " The CONST_EYE_NV value, i.e. the constant eye position used by the \n"
918 " DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV shader.\n"
921 "\t name=\"lodBias\"\n"
922 "\t type=\"Real32\"\n"
923 "\t cardinality=\"single\"\n"
924 "\t visibility=\"external\"\n"
925 "\t access=\"public\"\n"
926 "\t defaultValue=\"0.f\"\n"
927 "\t defaultHeader=\"\"\n"
929 " Bias of LOD calculation for texture access.\n"
931 "</FieldContainer>\n",
935 /*------------------------------ get -----------------------------------*/
937 FieldContainerType
&TextureEnvChunkBase::getType(void)
942 const FieldContainerType
&TextureEnvChunkBase::getType(void) const
947 UInt32
TextureEnvChunkBase::getContainerSize(void) const
949 return sizeof(TextureEnvChunk
);
952 /*------------------------- decorator get ------------------------------*/
955 SFGLenum
*TextureEnvChunkBase::editSFEnvMode(void)
957 editSField(EnvModeFieldMask
);
962 const SFGLenum
*TextureEnvChunkBase::getSFEnvMode(void) const
968 SFColor4f
*TextureEnvChunkBase::editSFEnvColor(void)
970 editSField(EnvColorFieldMask
);
975 const SFColor4f
*TextureEnvChunkBase::getSFEnvColor(void) const
981 SFGLenum
*TextureEnvChunkBase::editSFEnvCombineRGB(void)
983 editSField(EnvCombineRGBFieldMask
);
985 return &_sfEnvCombineRGB
;
988 const SFGLenum
*TextureEnvChunkBase::getSFEnvCombineRGB(void) const
990 return &_sfEnvCombineRGB
;
994 SFGLenum
*TextureEnvChunkBase::editSFEnvCombineAlpha(void)
996 editSField(EnvCombineAlphaFieldMask
);
998 return &_sfEnvCombineAlpha
;
1001 const SFGLenum
*TextureEnvChunkBase::getSFEnvCombineAlpha(void) const
1003 return &_sfEnvCombineAlpha
;
1007 SFReal32
*TextureEnvChunkBase::editSFEnvScaleRGB(void)
1009 editSField(EnvScaleRGBFieldMask
);
1011 return &_sfEnvScaleRGB
;
1014 const SFReal32
*TextureEnvChunkBase::getSFEnvScaleRGB(void) const
1016 return &_sfEnvScaleRGB
;
1020 SFReal32
*TextureEnvChunkBase::editSFEnvScaleAlpha(void)
1022 editSField(EnvScaleAlphaFieldMask
);
1024 return &_sfEnvScaleAlpha
;
1027 const SFReal32
*TextureEnvChunkBase::getSFEnvScaleAlpha(void) const
1029 return &_sfEnvScaleAlpha
;
1033 SFGLenum
*TextureEnvChunkBase::editSFEnvSource0RGB(void)
1035 editSField(EnvSource0RGBFieldMask
);
1037 return &_sfEnvSource0RGB
;
1040 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource0RGB(void) const
1042 return &_sfEnvSource0RGB
;
1046 SFGLenum
*TextureEnvChunkBase::editSFEnvSource1RGB(void)
1048 editSField(EnvSource1RGBFieldMask
);
1050 return &_sfEnvSource1RGB
;
1053 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource1RGB(void) const
1055 return &_sfEnvSource1RGB
;
1059 SFGLenum
*TextureEnvChunkBase::editSFEnvSource2RGB(void)
1061 editSField(EnvSource2RGBFieldMask
);
1063 return &_sfEnvSource2RGB
;
1066 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource2RGB(void) const
1068 return &_sfEnvSource2RGB
;
1072 SFGLenum
*TextureEnvChunkBase::editSFEnvSource0Alpha(void)
1074 editSField(EnvSource0AlphaFieldMask
);
1076 return &_sfEnvSource0Alpha
;
1079 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource0Alpha(void) const
1081 return &_sfEnvSource0Alpha
;
1085 SFGLenum
*TextureEnvChunkBase::editSFEnvSource1Alpha(void)
1087 editSField(EnvSource1AlphaFieldMask
);
1089 return &_sfEnvSource1Alpha
;
1092 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource1Alpha(void) const
1094 return &_sfEnvSource1Alpha
;
1098 SFGLenum
*TextureEnvChunkBase::editSFEnvSource2Alpha(void)
1100 editSField(EnvSource2AlphaFieldMask
);
1102 return &_sfEnvSource2Alpha
;
1105 const SFGLenum
*TextureEnvChunkBase::getSFEnvSource2Alpha(void) const
1107 return &_sfEnvSource2Alpha
;
1111 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand0RGB(void)
1113 editSField(EnvOperand0RGBFieldMask
);
1115 return &_sfEnvOperand0RGB
;
1118 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand0RGB(void) const
1120 return &_sfEnvOperand0RGB
;
1124 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand1RGB(void)
1126 editSField(EnvOperand1RGBFieldMask
);
1128 return &_sfEnvOperand1RGB
;
1131 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand1RGB(void) const
1133 return &_sfEnvOperand1RGB
;
1137 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand2RGB(void)
1139 editSField(EnvOperand2RGBFieldMask
);
1141 return &_sfEnvOperand2RGB
;
1144 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand2RGB(void) const
1146 return &_sfEnvOperand2RGB
;
1150 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand0Alpha(void)
1152 editSField(EnvOperand0AlphaFieldMask
);
1154 return &_sfEnvOperand0Alpha
;
1157 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand0Alpha(void) const
1159 return &_sfEnvOperand0Alpha
;
1163 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand1Alpha(void)
1165 editSField(EnvOperand1AlphaFieldMask
);
1167 return &_sfEnvOperand1Alpha
;
1170 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand1Alpha(void) const
1172 return &_sfEnvOperand1Alpha
;
1176 SFGLenum
*TextureEnvChunkBase::editSFEnvOperand2Alpha(void)
1178 editSField(EnvOperand2AlphaFieldMask
);
1180 return &_sfEnvOperand2Alpha
;
1183 const SFGLenum
*TextureEnvChunkBase::getSFEnvOperand2Alpha(void) const
1185 return &_sfEnvOperand2Alpha
;
1189 SFBool
*TextureEnvChunkBase::editSFPointSprite(void)
1191 editSField(PointSpriteFieldMask
);
1193 return &_sfPointSprite
;
1196 const SFBool
*TextureEnvChunkBase::getSFPointSprite(void) const
1198 return &_sfPointSprite
;
1202 SFGLenum
*TextureEnvChunkBase::editSFShaderOperation(void)
1204 editSField(ShaderOperationFieldMask
);
1206 return &_sfShaderOperation
;
1209 const SFGLenum
*TextureEnvChunkBase::getSFShaderOperation(void) const
1211 return &_sfShaderOperation
;
1215 SFGLenum
*TextureEnvChunkBase::editSFShaderInput(void)
1217 editSField(ShaderInputFieldMask
);
1219 return &_sfShaderInput
;
1222 const SFGLenum
*TextureEnvChunkBase::getSFShaderInput(void) const
1224 return &_sfShaderInput
;
1228 MFReal32
*TextureEnvChunkBase::editMFShaderOffsetMatrix(void)
1230 editMField(ShaderOffsetMatrixFieldMask
, _mfShaderOffsetMatrix
);
1232 return &_mfShaderOffsetMatrix
;
1235 const MFReal32
*TextureEnvChunkBase::getMFShaderOffsetMatrix(void) const
1237 return &_mfShaderOffsetMatrix
;
1241 SFReal32
*TextureEnvChunkBase::editSFShaderOffsetScale(void)
1243 editSField(ShaderOffsetScaleFieldMask
);
1245 return &_sfShaderOffsetScale
;
1248 const SFReal32
*TextureEnvChunkBase::getSFShaderOffsetScale(void) const
1250 return &_sfShaderOffsetScale
;
1254 SFReal32
*TextureEnvChunkBase::editSFShaderOffsetBias(void)
1256 editSField(ShaderOffsetBiasFieldMask
);
1258 return &_sfShaderOffsetBias
;
1261 const SFReal32
*TextureEnvChunkBase::getSFShaderOffsetBias(void) const
1263 return &_sfShaderOffsetBias
;
1267 SFGLenum
*TextureEnvChunkBase::editSFShaderRGBADotProduct(void)
1269 editSField(ShaderRGBADotProductFieldMask
);
1271 return &_sfShaderRGBADotProduct
;
1274 const SFGLenum
*TextureEnvChunkBase::getSFShaderRGBADotProduct(void) const
1276 return &_sfShaderRGBADotProduct
;
1280 SFUInt8
*TextureEnvChunkBase::editSFShaderCullModes(void)
1282 editSField(ShaderCullModesFieldMask
);
1284 return &_sfShaderCullModes
;
1287 const SFUInt8
*TextureEnvChunkBase::getSFShaderCullModes(void) const
1289 return &_sfShaderCullModes
;
1293 SFVec3f
*TextureEnvChunkBase::editSFShaderConstEye(void)
1295 editSField(ShaderConstEyeFieldMask
);
1297 return &_sfShaderConstEye
;
1300 const SFVec3f
*TextureEnvChunkBase::getSFShaderConstEye(void) const
1302 return &_sfShaderConstEye
;
1306 SFReal32
*TextureEnvChunkBase::editSFLodBias(void)
1308 editSField(LodBiasFieldMask
);
1313 const SFReal32
*TextureEnvChunkBase::getSFLodBias(void) const
1323 /*------------------------------ access -----------------------------------*/
1325 SizeT
TextureEnvChunkBase::getBinSize(ConstFieldMaskArg whichField
)
1327 SizeT returnValue
= Inherited::getBinSize(whichField
);
1329 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
1331 returnValue
+= _sfEnvMode
.getBinSize();
1333 if(FieldBits::NoField
!= (EnvColorFieldMask
& whichField
))
1335 returnValue
+= _sfEnvColor
.getBinSize();
1337 if(FieldBits::NoField
!= (EnvCombineRGBFieldMask
& whichField
))
1339 returnValue
+= _sfEnvCombineRGB
.getBinSize();
1341 if(FieldBits::NoField
!= (EnvCombineAlphaFieldMask
& whichField
))
1343 returnValue
+= _sfEnvCombineAlpha
.getBinSize();
1345 if(FieldBits::NoField
!= (EnvScaleRGBFieldMask
& whichField
))
1347 returnValue
+= _sfEnvScaleRGB
.getBinSize();
1349 if(FieldBits::NoField
!= (EnvScaleAlphaFieldMask
& whichField
))
1351 returnValue
+= _sfEnvScaleAlpha
.getBinSize();
1353 if(FieldBits::NoField
!= (EnvSource0RGBFieldMask
& whichField
))
1355 returnValue
+= _sfEnvSource0RGB
.getBinSize();
1357 if(FieldBits::NoField
!= (EnvSource1RGBFieldMask
& whichField
))
1359 returnValue
+= _sfEnvSource1RGB
.getBinSize();
1361 if(FieldBits::NoField
!= (EnvSource2RGBFieldMask
& whichField
))
1363 returnValue
+= _sfEnvSource2RGB
.getBinSize();
1365 if(FieldBits::NoField
!= (EnvSource0AlphaFieldMask
& whichField
))
1367 returnValue
+= _sfEnvSource0Alpha
.getBinSize();
1369 if(FieldBits::NoField
!= (EnvSource1AlphaFieldMask
& whichField
))
1371 returnValue
+= _sfEnvSource1Alpha
.getBinSize();
1373 if(FieldBits::NoField
!= (EnvSource2AlphaFieldMask
& whichField
))
1375 returnValue
+= _sfEnvSource2Alpha
.getBinSize();
1377 if(FieldBits::NoField
!= (EnvOperand0RGBFieldMask
& whichField
))
1379 returnValue
+= _sfEnvOperand0RGB
.getBinSize();
1381 if(FieldBits::NoField
!= (EnvOperand1RGBFieldMask
& whichField
))
1383 returnValue
+= _sfEnvOperand1RGB
.getBinSize();
1385 if(FieldBits::NoField
!= (EnvOperand2RGBFieldMask
& whichField
))
1387 returnValue
+= _sfEnvOperand2RGB
.getBinSize();
1389 if(FieldBits::NoField
!= (EnvOperand0AlphaFieldMask
& whichField
))
1391 returnValue
+= _sfEnvOperand0Alpha
.getBinSize();
1393 if(FieldBits::NoField
!= (EnvOperand1AlphaFieldMask
& whichField
))
1395 returnValue
+= _sfEnvOperand1Alpha
.getBinSize();
1397 if(FieldBits::NoField
!= (EnvOperand2AlphaFieldMask
& whichField
))
1399 returnValue
+= _sfEnvOperand2Alpha
.getBinSize();
1401 if(FieldBits::NoField
!= (PointSpriteFieldMask
& whichField
))
1403 returnValue
+= _sfPointSprite
.getBinSize();
1405 if(FieldBits::NoField
!= (ShaderOperationFieldMask
& whichField
))
1407 returnValue
+= _sfShaderOperation
.getBinSize();
1409 if(FieldBits::NoField
!= (ShaderInputFieldMask
& whichField
))
1411 returnValue
+= _sfShaderInput
.getBinSize();
1413 if(FieldBits::NoField
!= (ShaderOffsetMatrixFieldMask
& whichField
))
1415 returnValue
+= _mfShaderOffsetMatrix
.getBinSize();
1417 if(FieldBits::NoField
!= (ShaderOffsetScaleFieldMask
& whichField
))
1419 returnValue
+= _sfShaderOffsetScale
.getBinSize();
1421 if(FieldBits::NoField
!= (ShaderOffsetBiasFieldMask
& whichField
))
1423 returnValue
+= _sfShaderOffsetBias
.getBinSize();
1425 if(FieldBits::NoField
!= (ShaderRGBADotProductFieldMask
& whichField
))
1427 returnValue
+= _sfShaderRGBADotProduct
.getBinSize();
1429 if(FieldBits::NoField
!= (ShaderCullModesFieldMask
& whichField
))
1431 returnValue
+= _sfShaderCullModes
.getBinSize();
1433 if(FieldBits::NoField
!= (ShaderConstEyeFieldMask
& whichField
))
1435 returnValue
+= _sfShaderConstEye
.getBinSize();
1437 if(FieldBits::NoField
!= (LodBiasFieldMask
& whichField
))
1439 returnValue
+= _sfLodBias
.getBinSize();
1445 void TextureEnvChunkBase::copyToBin(BinaryDataHandler
&pMem
,
1446 ConstFieldMaskArg whichField
)
1448 Inherited::copyToBin(pMem
, whichField
);
1450 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
1452 _sfEnvMode
.copyToBin(pMem
);
1454 if(FieldBits::NoField
!= (EnvColorFieldMask
& whichField
))
1456 _sfEnvColor
.copyToBin(pMem
);
1458 if(FieldBits::NoField
!= (EnvCombineRGBFieldMask
& whichField
))
1460 _sfEnvCombineRGB
.copyToBin(pMem
);
1462 if(FieldBits::NoField
!= (EnvCombineAlphaFieldMask
& whichField
))
1464 _sfEnvCombineAlpha
.copyToBin(pMem
);
1466 if(FieldBits::NoField
!= (EnvScaleRGBFieldMask
& whichField
))
1468 _sfEnvScaleRGB
.copyToBin(pMem
);
1470 if(FieldBits::NoField
!= (EnvScaleAlphaFieldMask
& whichField
))
1472 _sfEnvScaleAlpha
.copyToBin(pMem
);
1474 if(FieldBits::NoField
!= (EnvSource0RGBFieldMask
& whichField
))
1476 _sfEnvSource0RGB
.copyToBin(pMem
);
1478 if(FieldBits::NoField
!= (EnvSource1RGBFieldMask
& whichField
))
1480 _sfEnvSource1RGB
.copyToBin(pMem
);
1482 if(FieldBits::NoField
!= (EnvSource2RGBFieldMask
& whichField
))
1484 _sfEnvSource2RGB
.copyToBin(pMem
);
1486 if(FieldBits::NoField
!= (EnvSource0AlphaFieldMask
& whichField
))
1488 _sfEnvSource0Alpha
.copyToBin(pMem
);
1490 if(FieldBits::NoField
!= (EnvSource1AlphaFieldMask
& whichField
))
1492 _sfEnvSource1Alpha
.copyToBin(pMem
);
1494 if(FieldBits::NoField
!= (EnvSource2AlphaFieldMask
& whichField
))
1496 _sfEnvSource2Alpha
.copyToBin(pMem
);
1498 if(FieldBits::NoField
!= (EnvOperand0RGBFieldMask
& whichField
))
1500 _sfEnvOperand0RGB
.copyToBin(pMem
);
1502 if(FieldBits::NoField
!= (EnvOperand1RGBFieldMask
& whichField
))
1504 _sfEnvOperand1RGB
.copyToBin(pMem
);
1506 if(FieldBits::NoField
!= (EnvOperand2RGBFieldMask
& whichField
))
1508 _sfEnvOperand2RGB
.copyToBin(pMem
);
1510 if(FieldBits::NoField
!= (EnvOperand0AlphaFieldMask
& whichField
))
1512 _sfEnvOperand0Alpha
.copyToBin(pMem
);
1514 if(FieldBits::NoField
!= (EnvOperand1AlphaFieldMask
& whichField
))
1516 _sfEnvOperand1Alpha
.copyToBin(pMem
);
1518 if(FieldBits::NoField
!= (EnvOperand2AlphaFieldMask
& whichField
))
1520 _sfEnvOperand2Alpha
.copyToBin(pMem
);
1522 if(FieldBits::NoField
!= (PointSpriteFieldMask
& whichField
))
1524 _sfPointSprite
.copyToBin(pMem
);
1526 if(FieldBits::NoField
!= (ShaderOperationFieldMask
& whichField
))
1528 _sfShaderOperation
.copyToBin(pMem
);
1530 if(FieldBits::NoField
!= (ShaderInputFieldMask
& whichField
))
1532 _sfShaderInput
.copyToBin(pMem
);
1534 if(FieldBits::NoField
!= (ShaderOffsetMatrixFieldMask
& whichField
))
1536 _mfShaderOffsetMatrix
.copyToBin(pMem
);
1538 if(FieldBits::NoField
!= (ShaderOffsetScaleFieldMask
& whichField
))
1540 _sfShaderOffsetScale
.copyToBin(pMem
);
1542 if(FieldBits::NoField
!= (ShaderOffsetBiasFieldMask
& whichField
))
1544 _sfShaderOffsetBias
.copyToBin(pMem
);
1546 if(FieldBits::NoField
!= (ShaderRGBADotProductFieldMask
& whichField
))
1548 _sfShaderRGBADotProduct
.copyToBin(pMem
);
1550 if(FieldBits::NoField
!= (ShaderCullModesFieldMask
& whichField
))
1552 _sfShaderCullModes
.copyToBin(pMem
);
1554 if(FieldBits::NoField
!= (ShaderConstEyeFieldMask
& whichField
))
1556 _sfShaderConstEye
.copyToBin(pMem
);
1558 if(FieldBits::NoField
!= (LodBiasFieldMask
& whichField
))
1560 _sfLodBias
.copyToBin(pMem
);
1564 void TextureEnvChunkBase::copyFromBin(BinaryDataHandler
&pMem
,
1565 ConstFieldMaskArg whichField
)
1567 Inherited::copyFromBin(pMem
, whichField
);
1569 if(FieldBits::NoField
!= (EnvModeFieldMask
& whichField
))
1571 editSField(EnvModeFieldMask
);
1572 _sfEnvMode
.copyFromBin(pMem
);
1574 if(FieldBits::NoField
!= (EnvColorFieldMask
& whichField
))
1576 editSField(EnvColorFieldMask
);
1577 _sfEnvColor
.copyFromBin(pMem
);
1579 if(FieldBits::NoField
!= (EnvCombineRGBFieldMask
& whichField
))
1581 editSField(EnvCombineRGBFieldMask
);
1582 _sfEnvCombineRGB
.copyFromBin(pMem
);
1584 if(FieldBits::NoField
!= (EnvCombineAlphaFieldMask
& whichField
))
1586 editSField(EnvCombineAlphaFieldMask
);
1587 _sfEnvCombineAlpha
.copyFromBin(pMem
);
1589 if(FieldBits::NoField
!= (EnvScaleRGBFieldMask
& whichField
))
1591 editSField(EnvScaleRGBFieldMask
);
1592 _sfEnvScaleRGB
.copyFromBin(pMem
);
1594 if(FieldBits::NoField
!= (EnvScaleAlphaFieldMask
& whichField
))
1596 editSField(EnvScaleAlphaFieldMask
);
1597 _sfEnvScaleAlpha
.copyFromBin(pMem
);
1599 if(FieldBits::NoField
!= (EnvSource0RGBFieldMask
& whichField
))
1601 editSField(EnvSource0RGBFieldMask
);
1602 _sfEnvSource0RGB
.copyFromBin(pMem
);
1604 if(FieldBits::NoField
!= (EnvSource1RGBFieldMask
& whichField
))
1606 editSField(EnvSource1RGBFieldMask
);
1607 _sfEnvSource1RGB
.copyFromBin(pMem
);
1609 if(FieldBits::NoField
!= (EnvSource2RGBFieldMask
& whichField
))
1611 editSField(EnvSource2RGBFieldMask
);
1612 _sfEnvSource2RGB
.copyFromBin(pMem
);
1614 if(FieldBits::NoField
!= (EnvSource0AlphaFieldMask
& whichField
))
1616 editSField(EnvSource0AlphaFieldMask
);
1617 _sfEnvSource0Alpha
.copyFromBin(pMem
);
1619 if(FieldBits::NoField
!= (EnvSource1AlphaFieldMask
& whichField
))
1621 editSField(EnvSource1AlphaFieldMask
);
1622 _sfEnvSource1Alpha
.copyFromBin(pMem
);
1624 if(FieldBits::NoField
!= (EnvSource2AlphaFieldMask
& whichField
))
1626 editSField(EnvSource2AlphaFieldMask
);
1627 _sfEnvSource2Alpha
.copyFromBin(pMem
);
1629 if(FieldBits::NoField
!= (EnvOperand0RGBFieldMask
& whichField
))
1631 editSField(EnvOperand0RGBFieldMask
);
1632 _sfEnvOperand0RGB
.copyFromBin(pMem
);
1634 if(FieldBits::NoField
!= (EnvOperand1RGBFieldMask
& whichField
))
1636 editSField(EnvOperand1RGBFieldMask
);
1637 _sfEnvOperand1RGB
.copyFromBin(pMem
);
1639 if(FieldBits::NoField
!= (EnvOperand2RGBFieldMask
& whichField
))
1641 editSField(EnvOperand2RGBFieldMask
);
1642 _sfEnvOperand2RGB
.copyFromBin(pMem
);
1644 if(FieldBits::NoField
!= (EnvOperand0AlphaFieldMask
& whichField
))
1646 editSField(EnvOperand0AlphaFieldMask
);
1647 _sfEnvOperand0Alpha
.copyFromBin(pMem
);
1649 if(FieldBits::NoField
!= (EnvOperand1AlphaFieldMask
& whichField
))
1651 editSField(EnvOperand1AlphaFieldMask
);
1652 _sfEnvOperand1Alpha
.copyFromBin(pMem
);
1654 if(FieldBits::NoField
!= (EnvOperand2AlphaFieldMask
& whichField
))
1656 editSField(EnvOperand2AlphaFieldMask
);
1657 _sfEnvOperand2Alpha
.copyFromBin(pMem
);
1659 if(FieldBits::NoField
!= (PointSpriteFieldMask
& whichField
))
1661 editSField(PointSpriteFieldMask
);
1662 _sfPointSprite
.copyFromBin(pMem
);
1664 if(FieldBits::NoField
!= (ShaderOperationFieldMask
& whichField
))
1666 editSField(ShaderOperationFieldMask
);
1667 _sfShaderOperation
.copyFromBin(pMem
);
1669 if(FieldBits::NoField
!= (ShaderInputFieldMask
& whichField
))
1671 editSField(ShaderInputFieldMask
);
1672 _sfShaderInput
.copyFromBin(pMem
);
1674 if(FieldBits::NoField
!= (ShaderOffsetMatrixFieldMask
& whichField
))
1676 editMField(ShaderOffsetMatrixFieldMask
, _mfShaderOffsetMatrix
);
1677 _mfShaderOffsetMatrix
.copyFromBin(pMem
);
1679 if(FieldBits::NoField
!= (ShaderOffsetScaleFieldMask
& whichField
))
1681 editSField(ShaderOffsetScaleFieldMask
);
1682 _sfShaderOffsetScale
.copyFromBin(pMem
);
1684 if(FieldBits::NoField
!= (ShaderOffsetBiasFieldMask
& whichField
))
1686 editSField(ShaderOffsetBiasFieldMask
);
1687 _sfShaderOffsetBias
.copyFromBin(pMem
);
1689 if(FieldBits::NoField
!= (ShaderRGBADotProductFieldMask
& whichField
))
1691 editSField(ShaderRGBADotProductFieldMask
);
1692 _sfShaderRGBADotProduct
.copyFromBin(pMem
);
1694 if(FieldBits::NoField
!= (ShaderCullModesFieldMask
& whichField
))
1696 editSField(ShaderCullModesFieldMask
);
1697 _sfShaderCullModes
.copyFromBin(pMem
);
1699 if(FieldBits::NoField
!= (ShaderConstEyeFieldMask
& whichField
))
1701 editSField(ShaderConstEyeFieldMask
);
1702 _sfShaderConstEye
.copyFromBin(pMem
);
1704 if(FieldBits::NoField
!= (LodBiasFieldMask
& whichField
))
1706 editSField(LodBiasFieldMask
);
1707 _sfLodBias
.copyFromBin(pMem
);
1711 //! create a new instance of the class
1712 TextureEnvChunkTransitPtr
TextureEnvChunkBase::createLocal(BitVector bFlags
)
1714 TextureEnvChunkTransitPtr fc
;
1716 if(getClassType().getPrototype() != NULL
)
1718 FieldContainerTransitPtr tmpPtr
=
1719 getClassType().getPrototype()-> shallowCopyLocal(bFlags
);
1721 fc
= dynamic_pointer_cast
<TextureEnvChunk
>(tmpPtr
);
1727 //! create a new instance of the class, copy the container flags
1728 TextureEnvChunkTransitPtr
TextureEnvChunkBase::createDependent(BitVector bFlags
)
1730 TextureEnvChunkTransitPtr fc
;
1732 if(getClassType().getPrototype() != NULL
)
1734 FieldContainerTransitPtr tmpPtr
=
1735 getClassType().getPrototype()-> shallowCopyDependent(bFlags
);
1737 fc
= dynamic_pointer_cast
<TextureEnvChunk
>(tmpPtr
);
1743 //! create a new instance of the class
1744 TextureEnvChunkTransitPtr
TextureEnvChunkBase::create(void)
1746 TextureEnvChunkTransitPtr fc
;
1748 if(getClassType().getPrototype() != NULL
)
1750 FieldContainerTransitPtr tmpPtr
=
1751 getClassType().getPrototype()-> shallowCopy();
1753 fc
= dynamic_pointer_cast
<TextureEnvChunk
>(tmpPtr
);
1759 TextureEnvChunk
*TextureEnvChunkBase::createEmptyLocal(BitVector bFlags
)
1761 TextureEnvChunk
*returnValue
;
1763 newPtr
<TextureEnvChunk
>(returnValue
, bFlags
);
1765 returnValue
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1770 //! create an empty new instance of the class, do not copy the prototype
1771 TextureEnvChunk
*TextureEnvChunkBase::createEmpty(void)
1773 TextureEnvChunk
*returnValue
;
1775 newPtr
<TextureEnvChunk
>(returnValue
, Thread::getCurrentLocalFlags());
1777 returnValue
->_pFieldFlags
->_bNamespaceMask
&=
1778 ~Thread::getCurrentLocalFlags();
1784 FieldContainerTransitPtr
TextureEnvChunkBase::shallowCopyLocal(
1785 BitVector bFlags
) const
1787 TextureEnvChunk
*tmpPtr
;
1789 newPtr(tmpPtr
, dynamic_cast<const TextureEnvChunk
*>(this), bFlags
);
1791 FieldContainerTransitPtr
returnValue(tmpPtr
);
1793 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~bFlags
;
1798 FieldContainerTransitPtr
TextureEnvChunkBase::shallowCopyDependent(
1799 BitVector bFlags
) const
1801 TextureEnvChunk
*tmpPtr
;
1803 newPtr(tmpPtr
, dynamic_cast<const TextureEnvChunk
*>(this), ~bFlags
);
1805 FieldContainerTransitPtr
returnValue(tmpPtr
);
1807 tmpPtr
->_pFieldFlags
->_bNamespaceMask
= bFlags
;
1812 FieldContainerTransitPtr
TextureEnvChunkBase::shallowCopy(void) const
1814 TextureEnvChunk
*tmpPtr
;
1817 dynamic_cast<const TextureEnvChunk
*>(this),
1818 Thread::getCurrentLocalFlags());
1820 tmpPtr
->_pFieldFlags
->_bNamespaceMask
&= ~Thread::getCurrentLocalFlags();
1822 FieldContainerTransitPtr
returnValue(tmpPtr
);
1830 /*------------------------- constructors ----------------------------------*/
1832 TextureEnvChunkBase::TextureEnvChunkBase(void) :
1834 _sfEnvMode (GLenum(GL_REPLACE
)),
1835 _sfEnvColor (Color4f(0.f
,0.f
,0.f
,0.f
)),
1836 _sfEnvCombineRGB (GLenum(GL_MODULATE
)),
1837 _sfEnvCombineAlpha (GLenum(GL_MODULATE
)),
1838 _sfEnvScaleRGB (Real32(1.0f
)),
1839 _sfEnvScaleAlpha (Real32(1.0f
)),
1840 _sfEnvSource0RGB (GLenum(GL_TEXTURE
)),
1841 _sfEnvSource1RGB (GLenum(GL_PREVIOUS_EXT
)),
1842 _sfEnvSource2RGB (GLenum(GL_CONSTANT_EXT
)),
1843 _sfEnvSource0Alpha (GLenum(GL_TEXTURE
)),
1844 _sfEnvSource1Alpha (GLenum(GL_PREVIOUS_EXT
)),
1845 _sfEnvSource2Alpha (GLenum(GL_CONSTANT_EXT
)),
1846 _sfEnvOperand0RGB (GLenum(GL_SRC_COLOR
)),
1847 _sfEnvOperand1RGB (GLenum(GL_SRC_COLOR
)),
1848 _sfEnvOperand2RGB (GLenum(GL_SRC_ALPHA
)),
1849 _sfEnvOperand0Alpha (GLenum(GL_SRC_ALPHA
)),
1850 _sfEnvOperand1Alpha (GLenum(GL_SRC_ALPHA
)),
1851 _sfEnvOperand2Alpha (GLenum(GL_SRC_ALPHA
)),
1852 _sfPointSprite (bool(GL_FALSE
)),
1853 _sfShaderOperation (GLenum(GL_NONE
)),
1854 _sfShaderInput (GLenum(GL_NONE
)),
1855 _mfShaderOffsetMatrix (),
1856 _sfShaderOffsetScale (Real32(1.f
)),
1857 _sfShaderOffsetBias (Real32(0.f
)),
1858 _sfShaderRGBADotProduct (GLenum(GL_NONE
)),
1859 _sfShaderCullModes (UInt8(0)),
1860 _sfShaderConstEye (),
1861 _sfLodBias (Real32(0.f
))
1865 TextureEnvChunkBase::TextureEnvChunkBase(const TextureEnvChunkBase
&source
) :
1867 _sfEnvMode (source
._sfEnvMode
),
1868 _sfEnvColor (source
._sfEnvColor
),
1869 _sfEnvCombineRGB (source
._sfEnvCombineRGB
),
1870 _sfEnvCombineAlpha (source
._sfEnvCombineAlpha
),
1871 _sfEnvScaleRGB (source
._sfEnvScaleRGB
),
1872 _sfEnvScaleAlpha (source
._sfEnvScaleAlpha
),
1873 _sfEnvSource0RGB (source
._sfEnvSource0RGB
),
1874 _sfEnvSource1RGB (source
._sfEnvSource1RGB
),
1875 _sfEnvSource2RGB (source
._sfEnvSource2RGB
),
1876 _sfEnvSource0Alpha (source
._sfEnvSource0Alpha
),
1877 _sfEnvSource1Alpha (source
._sfEnvSource1Alpha
),
1878 _sfEnvSource2Alpha (source
._sfEnvSource2Alpha
),
1879 _sfEnvOperand0RGB (source
._sfEnvOperand0RGB
),
1880 _sfEnvOperand1RGB (source
._sfEnvOperand1RGB
),
1881 _sfEnvOperand2RGB (source
._sfEnvOperand2RGB
),
1882 _sfEnvOperand0Alpha (source
._sfEnvOperand0Alpha
),
1883 _sfEnvOperand1Alpha (source
._sfEnvOperand1Alpha
),
1884 _sfEnvOperand2Alpha (source
._sfEnvOperand2Alpha
),
1885 _sfPointSprite (source
._sfPointSprite
),
1886 _sfShaderOperation (source
._sfShaderOperation
),
1887 _sfShaderInput (source
._sfShaderInput
),
1888 _mfShaderOffsetMatrix (source
._mfShaderOffsetMatrix
),
1889 _sfShaderOffsetScale (source
._sfShaderOffsetScale
),
1890 _sfShaderOffsetBias (source
._sfShaderOffsetBias
),
1891 _sfShaderRGBADotProduct (source
._sfShaderRGBADotProduct
),
1892 _sfShaderCullModes (source
._sfShaderCullModes
),
1893 _sfShaderConstEye (source
._sfShaderConstEye
),
1894 _sfLodBias (source
._sfLodBias
)
1899 /*-------------------------- destructors ----------------------------------*/
1901 TextureEnvChunkBase::~TextureEnvChunkBase(void)
1906 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvMode (void) const
1908 SFGLenum::GetHandlePtr
returnValue(
1909 new SFGLenum::GetHandle(
1911 this->getType().getFieldDesc(EnvModeFieldId
),
1912 const_cast<TextureEnvChunkBase
*>(this)));
1917 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvMode (void)
1919 SFGLenum::EditHandlePtr
returnValue(
1920 new SFGLenum::EditHandle(
1922 this->getType().getFieldDesc(EnvModeFieldId
),
1926 editSField(EnvModeFieldMask
);
1931 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvColor (void) const
1933 SFColor4f::GetHandlePtr
returnValue(
1934 new SFColor4f::GetHandle(
1936 this->getType().getFieldDesc(EnvColorFieldId
),
1937 const_cast<TextureEnvChunkBase
*>(this)));
1942 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvColor (void)
1944 SFColor4f::EditHandlePtr
returnValue(
1945 new SFColor4f::EditHandle(
1947 this->getType().getFieldDesc(EnvColorFieldId
),
1951 editSField(EnvColorFieldMask
);
1956 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvCombineRGB (void) const
1958 SFGLenum::GetHandlePtr
returnValue(
1959 new SFGLenum::GetHandle(
1961 this->getType().getFieldDesc(EnvCombineRGBFieldId
),
1962 const_cast<TextureEnvChunkBase
*>(this)));
1967 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvCombineRGB (void)
1969 SFGLenum::EditHandlePtr
returnValue(
1970 new SFGLenum::EditHandle(
1972 this->getType().getFieldDesc(EnvCombineRGBFieldId
),
1976 editSField(EnvCombineRGBFieldMask
);
1981 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvCombineAlpha (void) const
1983 SFGLenum::GetHandlePtr
returnValue(
1984 new SFGLenum::GetHandle(
1985 &_sfEnvCombineAlpha
,
1986 this->getType().getFieldDesc(EnvCombineAlphaFieldId
),
1987 const_cast<TextureEnvChunkBase
*>(this)));
1992 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvCombineAlpha(void)
1994 SFGLenum::EditHandlePtr
returnValue(
1995 new SFGLenum::EditHandle(
1996 &_sfEnvCombineAlpha
,
1997 this->getType().getFieldDesc(EnvCombineAlphaFieldId
),
2001 editSField(EnvCombineAlphaFieldMask
);
2006 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvScaleRGB (void) const
2008 SFReal32::GetHandlePtr
returnValue(
2009 new SFReal32::GetHandle(
2011 this->getType().getFieldDesc(EnvScaleRGBFieldId
),
2012 const_cast<TextureEnvChunkBase
*>(this)));
2017 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvScaleRGB (void)
2019 SFReal32::EditHandlePtr
returnValue(
2020 new SFReal32::EditHandle(
2022 this->getType().getFieldDesc(EnvScaleRGBFieldId
),
2026 editSField(EnvScaleRGBFieldMask
);
2031 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvScaleAlpha (void) const
2033 SFReal32::GetHandlePtr
returnValue(
2034 new SFReal32::GetHandle(
2036 this->getType().getFieldDesc(EnvScaleAlphaFieldId
),
2037 const_cast<TextureEnvChunkBase
*>(this)));
2042 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvScaleAlpha (void)
2044 SFReal32::EditHandlePtr
returnValue(
2045 new SFReal32::EditHandle(
2047 this->getType().getFieldDesc(EnvScaleAlphaFieldId
),
2051 editSField(EnvScaleAlphaFieldMask
);
2056 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource0RGB (void) const
2058 SFGLenum::GetHandlePtr
returnValue(
2059 new SFGLenum::GetHandle(
2061 this->getType().getFieldDesc(EnvSource0RGBFieldId
),
2062 const_cast<TextureEnvChunkBase
*>(this)));
2067 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource0RGB (void)
2069 SFGLenum::EditHandlePtr
returnValue(
2070 new SFGLenum::EditHandle(
2072 this->getType().getFieldDesc(EnvSource0RGBFieldId
),
2076 editSField(EnvSource0RGBFieldMask
);
2081 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource1RGB (void) const
2083 SFGLenum::GetHandlePtr
returnValue(
2084 new SFGLenum::GetHandle(
2086 this->getType().getFieldDesc(EnvSource1RGBFieldId
),
2087 const_cast<TextureEnvChunkBase
*>(this)));
2092 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource1RGB (void)
2094 SFGLenum::EditHandlePtr
returnValue(
2095 new SFGLenum::EditHandle(
2097 this->getType().getFieldDesc(EnvSource1RGBFieldId
),
2101 editSField(EnvSource1RGBFieldMask
);
2106 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource2RGB (void) const
2108 SFGLenum::GetHandlePtr
returnValue(
2109 new SFGLenum::GetHandle(
2111 this->getType().getFieldDesc(EnvSource2RGBFieldId
),
2112 const_cast<TextureEnvChunkBase
*>(this)));
2117 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource2RGB (void)
2119 SFGLenum::EditHandlePtr
returnValue(
2120 new SFGLenum::EditHandle(
2122 this->getType().getFieldDesc(EnvSource2RGBFieldId
),
2126 editSField(EnvSource2RGBFieldMask
);
2131 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource0Alpha (void) const
2133 SFGLenum::GetHandlePtr
returnValue(
2134 new SFGLenum::GetHandle(
2135 &_sfEnvSource0Alpha
,
2136 this->getType().getFieldDesc(EnvSource0AlphaFieldId
),
2137 const_cast<TextureEnvChunkBase
*>(this)));
2142 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource0Alpha(void)
2144 SFGLenum::EditHandlePtr
returnValue(
2145 new SFGLenum::EditHandle(
2146 &_sfEnvSource0Alpha
,
2147 this->getType().getFieldDesc(EnvSource0AlphaFieldId
),
2151 editSField(EnvSource0AlphaFieldMask
);
2156 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource1Alpha (void) const
2158 SFGLenum::GetHandlePtr
returnValue(
2159 new SFGLenum::GetHandle(
2160 &_sfEnvSource1Alpha
,
2161 this->getType().getFieldDesc(EnvSource1AlphaFieldId
),
2162 const_cast<TextureEnvChunkBase
*>(this)));
2167 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource1Alpha(void)
2169 SFGLenum::EditHandlePtr
returnValue(
2170 new SFGLenum::EditHandle(
2171 &_sfEnvSource1Alpha
,
2172 this->getType().getFieldDesc(EnvSource1AlphaFieldId
),
2176 editSField(EnvSource1AlphaFieldMask
);
2181 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvSource2Alpha (void) const
2183 SFGLenum::GetHandlePtr
returnValue(
2184 new SFGLenum::GetHandle(
2185 &_sfEnvSource2Alpha
,
2186 this->getType().getFieldDesc(EnvSource2AlphaFieldId
),
2187 const_cast<TextureEnvChunkBase
*>(this)));
2192 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvSource2Alpha(void)
2194 SFGLenum::EditHandlePtr
returnValue(
2195 new SFGLenum::EditHandle(
2196 &_sfEnvSource2Alpha
,
2197 this->getType().getFieldDesc(EnvSource2AlphaFieldId
),
2201 editSField(EnvSource2AlphaFieldMask
);
2206 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand0RGB (void) const
2208 SFGLenum::GetHandlePtr
returnValue(
2209 new SFGLenum::GetHandle(
2211 this->getType().getFieldDesc(EnvOperand0RGBFieldId
),
2212 const_cast<TextureEnvChunkBase
*>(this)));
2217 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand0RGB (void)
2219 SFGLenum::EditHandlePtr
returnValue(
2220 new SFGLenum::EditHandle(
2222 this->getType().getFieldDesc(EnvOperand0RGBFieldId
),
2226 editSField(EnvOperand0RGBFieldMask
);
2231 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand1RGB (void) const
2233 SFGLenum::GetHandlePtr
returnValue(
2234 new SFGLenum::GetHandle(
2236 this->getType().getFieldDesc(EnvOperand1RGBFieldId
),
2237 const_cast<TextureEnvChunkBase
*>(this)));
2242 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand1RGB (void)
2244 SFGLenum::EditHandlePtr
returnValue(
2245 new SFGLenum::EditHandle(
2247 this->getType().getFieldDesc(EnvOperand1RGBFieldId
),
2251 editSField(EnvOperand1RGBFieldMask
);
2256 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand2RGB (void) const
2258 SFGLenum::GetHandlePtr
returnValue(
2259 new SFGLenum::GetHandle(
2261 this->getType().getFieldDesc(EnvOperand2RGBFieldId
),
2262 const_cast<TextureEnvChunkBase
*>(this)));
2267 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand2RGB (void)
2269 SFGLenum::EditHandlePtr
returnValue(
2270 new SFGLenum::EditHandle(
2272 this->getType().getFieldDesc(EnvOperand2RGBFieldId
),
2276 editSField(EnvOperand2RGBFieldMask
);
2281 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand0Alpha (void) const
2283 SFGLenum::GetHandlePtr
returnValue(
2284 new SFGLenum::GetHandle(
2285 &_sfEnvOperand0Alpha
,
2286 this->getType().getFieldDesc(EnvOperand0AlphaFieldId
),
2287 const_cast<TextureEnvChunkBase
*>(this)));
2292 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand0Alpha(void)
2294 SFGLenum::EditHandlePtr
returnValue(
2295 new SFGLenum::EditHandle(
2296 &_sfEnvOperand0Alpha
,
2297 this->getType().getFieldDesc(EnvOperand0AlphaFieldId
),
2301 editSField(EnvOperand0AlphaFieldMask
);
2306 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand1Alpha (void) const
2308 SFGLenum::GetHandlePtr
returnValue(
2309 new SFGLenum::GetHandle(
2310 &_sfEnvOperand1Alpha
,
2311 this->getType().getFieldDesc(EnvOperand1AlphaFieldId
),
2312 const_cast<TextureEnvChunkBase
*>(this)));
2317 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand1Alpha(void)
2319 SFGLenum::EditHandlePtr
returnValue(
2320 new SFGLenum::EditHandle(
2321 &_sfEnvOperand1Alpha
,
2322 this->getType().getFieldDesc(EnvOperand1AlphaFieldId
),
2326 editSField(EnvOperand1AlphaFieldMask
);
2331 GetFieldHandlePtr
TextureEnvChunkBase::getHandleEnvOperand2Alpha (void) const
2333 SFGLenum::GetHandlePtr
returnValue(
2334 new SFGLenum::GetHandle(
2335 &_sfEnvOperand2Alpha
,
2336 this->getType().getFieldDesc(EnvOperand2AlphaFieldId
),
2337 const_cast<TextureEnvChunkBase
*>(this)));
2342 EditFieldHandlePtr
TextureEnvChunkBase::editHandleEnvOperand2Alpha(void)
2344 SFGLenum::EditHandlePtr
returnValue(
2345 new SFGLenum::EditHandle(
2346 &_sfEnvOperand2Alpha
,
2347 this->getType().getFieldDesc(EnvOperand2AlphaFieldId
),
2351 editSField(EnvOperand2AlphaFieldMask
);
2356 GetFieldHandlePtr
TextureEnvChunkBase::getHandlePointSprite (void) const
2358 SFBool::GetHandlePtr
returnValue(
2359 new SFBool::GetHandle(
2361 this->getType().getFieldDesc(PointSpriteFieldId
),
2362 const_cast<TextureEnvChunkBase
*>(this)));
2367 EditFieldHandlePtr
TextureEnvChunkBase::editHandlePointSprite (void)
2369 SFBool::EditHandlePtr
returnValue(
2370 new SFBool::EditHandle(
2372 this->getType().getFieldDesc(PointSpriteFieldId
),
2376 editSField(PointSpriteFieldMask
);
2381 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderOperation (void) const
2383 SFGLenum::GetHandlePtr
returnValue(
2384 new SFGLenum::GetHandle(
2385 &_sfShaderOperation
,
2386 this->getType().getFieldDesc(ShaderOperationFieldId
),
2387 const_cast<TextureEnvChunkBase
*>(this)));
2392 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderOperation(void)
2394 SFGLenum::EditHandlePtr
returnValue(
2395 new SFGLenum::EditHandle(
2396 &_sfShaderOperation
,
2397 this->getType().getFieldDesc(ShaderOperationFieldId
),
2401 editSField(ShaderOperationFieldMask
);
2406 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderInput (void) const
2408 SFGLenum::GetHandlePtr
returnValue(
2409 new SFGLenum::GetHandle(
2411 this->getType().getFieldDesc(ShaderInputFieldId
),
2412 const_cast<TextureEnvChunkBase
*>(this)));
2417 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderInput (void)
2419 SFGLenum::EditHandlePtr
returnValue(
2420 new SFGLenum::EditHandle(
2422 this->getType().getFieldDesc(ShaderInputFieldId
),
2426 editSField(ShaderInputFieldMask
);
2431 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderOffsetMatrix (void) const
2433 MFReal32::GetHandlePtr
returnValue(
2434 new MFReal32::GetHandle(
2435 &_mfShaderOffsetMatrix
,
2436 this->getType().getFieldDesc(ShaderOffsetMatrixFieldId
),
2437 const_cast<TextureEnvChunkBase
*>(this)));
2442 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderOffsetMatrix(void)
2444 MFReal32::EditHandlePtr
returnValue(
2445 new MFReal32::EditHandle(
2446 &_mfShaderOffsetMatrix
,
2447 this->getType().getFieldDesc(ShaderOffsetMatrixFieldId
),
2451 editMField(ShaderOffsetMatrixFieldMask
, _mfShaderOffsetMatrix
);
2456 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderOffsetScale (void) const
2458 SFReal32::GetHandlePtr
returnValue(
2459 new SFReal32::GetHandle(
2460 &_sfShaderOffsetScale
,
2461 this->getType().getFieldDesc(ShaderOffsetScaleFieldId
),
2462 const_cast<TextureEnvChunkBase
*>(this)));
2467 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderOffsetScale(void)
2469 SFReal32::EditHandlePtr
returnValue(
2470 new SFReal32::EditHandle(
2471 &_sfShaderOffsetScale
,
2472 this->getType().getFieldDesc(ShaderOffsetScaleFieldId
),
2476 editSField(ShaderOffsetScaleFieldMask
);
2481 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderOffsetBias (void) const
2483 SFReal32::GetHandlePtr
returnValue(
2484 new SFReal32::GetHandle(
2485 &_sfShaderOffsetBias
,
2486 this->getType().getFieldDesc(ShaderOffsetBiasFieldId
),
2487 const_cast<TextureEnvChunkBase
*>(this)));
2492 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderOffsetBias(void)
2494 SFReal32::EditHandlePtr
returnValue(
2495 new SFReal32::EditHandle(
2496 &_sfShaderOffsetBias
,
2497 this->getType().getFieldDesc(ShaderOffsetBiasFieldId
),
2501 editSField(ShaderOffsetBiasFieldMask
);
2506 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderRGBADotProduct (void) const
2508 SFGLenum::GetHandlePtr
returnValue(
2509 new SFGLenum::GetHandle(
2510 &_sfShaderRGBADotProduct
,
2511 this->getType().getFieldDesc(ShaderRGBADotProductFieldId
),
2512 const_cast<TextureEnvChunkBase
*>(this)));
2517 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderRGBADotProduct(void)
2519 SFGLenum::EditHandlePtr
returnValue(
2520 new SFGLenum::EditHandle(
2521 &_sfShaderRGBADotProduct
,
2522 this->getType().getFieldDesc(ShaderRGBADotProductFieldId
),
2526 editSField(ShaderRGBADotProductFieldMask
);
2531 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderCullModes (void) const
2533 SFUInt8::GetHandlePtr
returnValue(
2534 new SFUInt8::GetHandle(
2535 &_sfShaderCullModes
,
2536 this->getType().getFieldDesc(ShaderCullModesFieldId
),
2537 const_cast<TextureEnvChunkBase
*>(this)));
2542 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderCullModes(void)
2544 SFUInt8::EditHandlePtr
returnValue(
2545 new SFUInt8::EditHandle(
2546 &_sfShaderCullModes
,
2547 this->getType().getFieldDesc(ShaderCullModesFieldId
),
2551 editSField(ShaderCullModesFieldMask
);
2556 GetFieldHandlePtr
TextureEnvChunkBase::getHandleShaderConstEye (void) const
2558 SFVec3f::GetHandlePtr
returnValue(
2559 new SFVec3f::GetHandle(
2561 this->getType().getFieldDesc(ShaderConstEyeFieldId
),
2562 const_cast<TextureEnvChunkBase
*>(this)));
2567 EditFieldHandlePtr
TextureEnvChunkBase::editHandleShaderConstEye (void)
2569 SFVec3f::EditHandlePtr
returnValue(
2570 new SFVec3f::EditHandle(
2572 this->getType().getFieldDesc(ShaderConstEyeFieldId
),
2576 editSField(ShaderConstEyeFieldMask
);
2581 GetFieldHandlePtr
TextureEnvChunkBase::getHandleLodBias (void) const
2583 SFReal32::GetHandlePtr
returnValue(
2584 new SFReal32::GetHandle(
2586 this->getType().getFieldDesc(LodBiasFieldId
),
2587 const_cast<TextureEnvChunkBase
*>(this)));
2592 EditFieldHandlePtr
TextureEnvChunkBase::editHandleLodBias (void)
2594 SFReal32::EditHandlePtr
returnValue(
2595 new SFReal32::EditHandle(
2597 this->getType().getFieldDesc(LodBiasFieldId
),
2601 editSField(LodBiasFieldMask
);
2607 #ifdef OSG_MT_CPTR_ASPECT
2608 void TextureEnvChunkBase::execSyncV( FieldContainer
&oFrom
,
2609 ConstFieldMaskArg whichField
,
2610 AspectOffsetStore
&oOffsets
,
2611 ConstFieldMaskArg syncMode
,
2612 const UInt32 uiSyncInfo
)
2614 TextureEnvChunk
*pThis
= static_cast<TextureEnvChunk
*>(this);
2616 pThis
->execSync(static_cast<TextureEnvChunk
*>(&oFrom
),
2625 #ifdef OSG_MT_CPTR_ASPECT
2626 FieldContainer
*TextureEnvChunkBase::createAspectCopy(
2627 const FieldContainer
*pRefAspect
) const
2629 TextureEnvChunk
*returnValue
;
2631 newAspectCopy(returnValue
,
2632 dynamic_cast<const TextureEnvChunk
*>(pRefAspect
),
2633 dynamic_cast<const TextureEnvChunk
*>(this));
2639 void TextureEnvChunkBase::resolveLinks(void)
2641 Inherited::resolveLinks();
2643 #ifdef OSG_MT_CPTR_ASPECT
2644 AspectOffsetStore oOffsets
;
2646 _pAspectStore
->fillOffsetArray(oOffsets
, this);
2649 #ifdef OSG_MT_CPTR_ASPECT
2650 _mfShaderOffsetMatrix
.terminateShare(Thread::getCurrentAspect(),