changed: gcc8 base update
[opensg.git] / Source / System / State / OpenGL / OSGTextureEnvChunkBase.cpp
blob1fa8ac4b274826f1c037ab8a1bbc1714c1e37a8c
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 TextureEnvChunk!
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" // 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>
90 OSG_BEGIN_NAMESPACE
92 /***************************************************************************\
93 * Description *
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
210 (mask 8) for Q.
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",
230 "StateChunkPtr",
231 TextureEnvChunk::getClassType(),
232 nsOSG);
233 #endif
235 OSG_FIELDTRAITS_GETTYPE_NS(TextureEnvChunk *, nsOSG)
237 OSG_EXPORT_PTR_SFIELD_FULL(PointerSField,
238 TextureEnvChunk *,
239 nsOSG)
241 OSG_EXPORT_PTR_MFIELD_FULL(PointerMField,
242 TextureEnvChunk *,
243 nsOSG)
245 /***************************************************************************\
246 * Field Description *
247 \***************************************************************************/
249 void TextureEnvChunkBase::classDescInserter(TypeObject &oType)
251 FieldDescriptionBase *pDesc = NULL;
254 pDesc = new SFGLenum::Description(
255 SFGLenum::getClassType(),
256 "envMode",
257 "Texture environment mode, default GL_REPLACE.\n",
258 EnvModeFieldId, EnvModeFieldMask,
259 false,
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(),
268 "envColor",
269 "Texture environment color default transparent black.\n",
270 EnvColorFieldId, EnvColorFieldMask,
271 false,
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(),
280 "envCombineRGB",
281 "Texture environment rgb combine mode, default GL_MODULATE.\n",
282 EnvCombineRGBFieldId, EnvCombineRGBFieldMask,
283 false,
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(),
292 "envCombineAlpha",
293 "Texture environment alpha combine mode, default GL_MODULATE.\n",
294 EnvCombineAlphaFieldId, EnvCombineAlphaFieldMask,
295 false,
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(),
304 "envScaleRGB",
305 "Texture environment combine rgb scale factor, default 1.f.\n",
306 EnvScaleRGBFieldId, EnvScaleRGBFieldMask,
307 false,
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(),
316 "envScaleAlpha",
317 "Texture environment combine alpha scale factor, default 1.f.\n",
318 EnvScaleAlphaFieldId, EnvScaleAlphaFieldMask,
319 false,
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(),
328 "envSource0RGB",
329 "Texture environment combine source 0 rgb, default GL_TEXTURE.\n",
330 EnvSource0RGBFieldId, EnvSource0RGBFieldMask,
331 false,
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(),
340 "envSource1RGB",
341 "Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT.\n",
342 EnvSource1RGBFieldId, EnvSource1RGBFieldMask,
343 false,
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(),
352 "envSource2RGB",
353 "Texture environment combine source 2 rgb, default GL_CONSTANT_EXT.\n",
354 EnvSource2RGBFieldId, EnvSource2RGBFieldMask,
355 false,
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(),
364 "envSource0Alpha",
365 "Texture environment combine source 0 alpha, default GL_TEXTURE.\n",
366 EnvSource0AlphaFieldId, EnvSource0AlphaFieldMask,
367 false,
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(),
376 "envSource1Alpha",
377 "Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT.\n",
378 EnvSource1AlphaFieldId, EnvSource1AlphaFieldMask,
379 false,
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(),
388 "envSource2Alpha",
389 "Texture environment combine source 2 alpha, default GL_CONSTANT_EXT.\n",
390 EnvSource2AlphaFieldId, EnvSource2AlphaFieldMask,
391 false,
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(),
400 "envOperand0RGB",
401 "Texture environment combine operand 0 rgb, default GL_SRC_COLOR.\n",
402 EnvOperand0RGBFieldId, EnvOperand0RGBFieldMask,
403 false,
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(),
412 "envOperand1RGB",
413 "Texture environment combine operand 1 rgb, default GL_SRC_COLOR.\n",
414 EnvOperand1RGBFieldId, EnvOperand1RGBFieldMask,
415 false,
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(),
424 "envOperand2RGB",
425 "Texture environment combine operand 2 rgb, default GL_SRC_ALPHA.\n",
426 EnvOperand2RGBFieldId, EnvOperand2RGBFieldMask,
427 false,
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(),
436 "envOperand0Alpha",
437 "Texture environment combine operand 0 alpha, default GL_SRC_ALPHA.\n",
438 EnvOperand0AlphaFieldId, EnvOperand0AlphaFieldMask,
439 false,
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(),
448 "envOperand1Alpha",
449 "Texture environment combine operand 1 alpha, default GL_SRC_ALPHA.\n",
450 EnvOperand1AlphaFieldId, EnvOperand1AlphaFieldMask,
451 false,
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(),
460 "envOperand2Alpha",
461 "Texture environment combine operand 2 alpha, default GL_SRC_ALPHA.\n",
462 EnvOperand2AlphaFieldId, EnvOperand2AlphaFieldMask,
463 false,
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(),
472 "pointSprite",
473 "Flag to use this texture for Point Sprites.\n",
474 PointSpriteFieldId, PointSpriteFieldMask,
475 false,
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(),
484 "shaderOperation",
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,
488 false,
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(),
497 "shaderInput",
498 "Input texture unit for this shader's operation. (GL_TEXTURE_SHADER_NV)\n",
499 ShaderInputFieldId, ShaderInputFieldMask,
500 false,
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,
512 false,
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(),
521 "shaderOffsetScale",
522 "The scaling factor for scaled offset textures. (GL_OFFSET_TEXTURE_SCALE_NV)\n",
523 ShaderOffsetScaleFieldId, ShaderOffsetScaleFieldMask,
524 false,
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(),
533 "shaderOffsetBias",
534 "The bias factor for scaled offset textures. (GL_OFFSET_TEXTURE_BIAS_NV)\n",
535 ShaderOffsetBiasFieldId, ShaderOffsetBiasFieldMask,
536 false,
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,
548 false,
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(),
557 "shaderCullModes",
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"
562 "(mask 8) for Q.\n",
563 ShaderCullModesFieldId, ShaderCullModesFieldMask,
564 false,
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(),
573 "shaderConstEye",
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,
577 false,
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(),
586 "lodBias",
587 "Bias of LOD calculation for texture access.\n",
588 LodBiasFieldId, LodBiasFieldMask,
589 false,
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(),
601 "NULL",
602 nsOSG, //Namespace
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)),
608 false,
610 "<?xml version=\"1.0\"?>\n"
611 "\n"
612 "<FieldContainer\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"
623 " >\n"
624 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
631 "\t access=\"public\"\n"
632 " potential_values=\"GL_MODULATE, GL_DECAL, GL_BLEND, GL_REPLACE, GL_ADD, GL_COMBINE\"\n"
633 "\t >\n"
634 " Texture environment mode, default GL_REPLACE.\n"
635 " </Field>\n"
636 " <Field\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"
643 "\t >\n"
644 " Texture environment color default transparent black.\n"
645 " </Field>\n"
646 " <Field\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=\"&quot;OSGGL.h&quot;\"\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"
655 "\t >\n"
656 " Texture environment rgb combine mode, default GL_MODULATE.\n"
657 " </Field>\n"
658 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
665 "\t access=\"public\"\n"
666 " potential_values=\"GL_REPLACE, GL_MODULATE, GL_ADD, GL_ADD_SIGNED, GL_INTERPOLATE, GL_SUBTRACT\"\n"
667 "\t >\n"
668 " Texture environment alpha combine mode, default GL_MODULATE.\n"
669 " </Field>\n"
670 " <Field\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"
677 "\t >\n"
678 " Texture environment combine rgb scale factor, default 1.f.\n"
679 " </Field>\n"
680 " <Field\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"
687 "\t >\n"
688 " Texture environment combine alpha scale factor, default 1.f.\n"
689 " </Field>\n"
690 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
697 "\t access=\"public\"\n"
698 "\t >\n"
699 " Texture environment combine source 0 rgb, default GL_TEXTURE.\n"
700 " </Field>\n"
701 " <Field\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=\"&quot;OSGGLEXT.h&quot;\"\n"
708 "\t access=\"public\"\n"
709 "\t >\n"
710 " Texture environment combine source 1 rgb, default GL_PREVIOUS_EXT.\n"
711 " </Field>\n"
712 " <Field\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=\"&quot;OSGGLEXT.h&quot;\"\n"
719 "\t access=\"public\"\n"
720 "\t >\n"
721 " Texture environment combine source 2 rgb, default GL_CONSTANT_EXT.\n"
722 " </Field>\n"
723 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
730 "\t access=\"public\"\n"
731 "\t >\n"
732 " Texture environment combine source 0 alpha, default GL_TEXTURE.\n"
733 " </Field>\n"
734 " <Field\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=\"&quot;OSGGLEXT.h&quot;\"\n"
741 "\t access=\"public\"\n"
742 "\t >\n"
743 " Texture environment combine source 1 alpha, default GL_PREVIOUS_EXT.\n"
744 " </Field>\n"
745 " <Field\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=\"&quot;OSGGLEXT.h&quot;\"\n"
752 "\t access=\"public\"\n"
753 "\t >\n"
754 " Texture environment combine source 2 alpha, default GL_CONSTANT_EXT.\n"
755 " </Field>\n"
756 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
763 "\t access=\"public\"\n"
764 "\t >\n"
765 " Texture environment combine operand 0 rgb, default GL_SRC_COLOR.\n"
766 " </Field>\n"
767 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
774 "\t access=\"public\"\n"
775 "\t >\n"
776 " Texture environment combine operand 1 rgb, default GL_SRC_COLOR.\n"
777 " </Field>\n"
778 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
785 "\t access=\"public\"\n"
786 "\t >\n"
787 " Texture environment combine operand 2 rgb, default GL_SRC_ALPHA.\n"
788 " </Field>\n"
789 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
796 "\t access=\"public\"\n"
797 "\t >\n"
798 " Texture environment combine operand 0 alpha, default GL_SRC_ALPHA.\n"
799 " </Field>\n"
800 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
807 "\t access=\"public\"\n"
808 "\t >\n"
809 " Texture environment combine operand 1 alpha, default GL_SRC_ALPHA.\n"
810 " </Field>\n"
811 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
818 "\t access=\"public\"\n"
819 "\t >\n"
820 " Texture environment combine operand 2 alpha, default GL_SRC_ALPHA.\n"
821 " </Field>\n"
822 " <Field\n"
823 "\t name=\"pointSprite\"\n"
824 "\t type=\"bool\"\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=\"&quot;OSGGL.h&quot;\"\n"
830 "\t >\n"
831 " Flag to use this texture for Point Sprites.\n"
832 " </Field>\n"
833 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
841 "\t >\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"
844 " </Field>\n"
845 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
853 "\t >\n"
854 " Input texture unit for this shader's operation. (GL_TEXTURE_SHADER_NV)\n"
855 " </Field>\n"
856 " <Field\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"
862 "\t >\n"
863 " The 2x2 transformation matrix for offset textures. (GL_OFFSET_TEXTURE_MATRIX_NV)\n"
864 " </Field>\n"
865 " <Field\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"
872 "\t >\n"
873 " The scaling factor for scaled offset textures. (GL_OFFSET_TEXTURE_SCALE_NV)\n"
874 " </Field>\n"
875 " <Field\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"
882 "\t >\n"
883 " The bias factor for scaled offset textures. (GL_OFFSET_TEXTURE_BIAS_NV)\n"
884 " </Field>\n"
885 " <Field\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=\"&quot;OSGGL.h&quot;\"\n"
893 "\t >\n"
894 " The RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV value.\n"
895 " </Field>\n"
896 " <Field\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"
903 "\t >\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"
908 " (mask 8) for Q.\n"
909 " </Field>\n"
910 " <Field\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"
916 "\t >\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"
919 " </Field>\n"
920 " <Field\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"
928 "\t >\n"
929 " Bias of LOD calculation for texture access.\n"
930 " </Field>\n"
931 "</FieldContainer>\n",
935 /*------------------------------ get -----------------------------------*/
937 FieldContainerType &TextureEnvChunkBase::getType(void)
939 return _type;
942 const FieldContainerType &TextureEnvChunkBase::getType(void) const
944 return _type;
947 UInt32 TextureEnvChunkBase::getContainerSize(void) const
949 return sizeof(TextureEnvChunk);
952 /*------------------------- decorator get ------------------------------*/
955 SFGLenum *TextureEnvChunkBase::editSFEnvMode(void)
957 editSField(EnvModeFieldMask);
959 return &_sfEnvMode;
962 const SFGLenum *TextureEnvChunkBase::getSFEnvMode(void) const
964 return &_sfEnvMode;
968 SFColor4f *TextureEnvChunkBase::editSFEnvColor(void)
970 editSField(EnvColorFieldMask);
972 return &_sfEnvColor;
975 const SFColor4f *TextureEnvChunkBase::getSFEnvColor(void) const
977 return &_sfEnvColor;
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);
1310 return &_sfLodBias;
1313 const SFReal32 *TextureEnvChunkBase::getSFLodBias(void) const
1315 return &_sfLodBias;
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();
1442 return returnValue;
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);
1724 return fc;
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);
1740 return fc;
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);
1756 return fc;
1759 TextureEnvChunk *TextureEnvChunkBase::createEmptyLocal(BitVector bFlags)
1761 TextureEnvChunk *returnValue;
1763 newPtr<TextureEnvChunk>(returnValue, bFlags);
1765 returnValue->_pFieldFlags->_bNamespaceMask &= ~bFlags;
1767 return returnValue;
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();
1780 return returnValue;
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;
1795 return returnValue;
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;
1809 return returnValue;
1812 FieldContainerTransitPtr TextureEnvChunkBase::shallowCopy(void) const
1814 TextureEnvChunk *tmpPtr;
1816 newPtr(tmpPtr,
1817 dynamic_cast<const TextureEnvChunk *>(this),
1818 Thread::getCurrentLocalFlags());
1820 tmpPtr->_pFieldFlags->_bNamespaceMask &= ~Thread::getCurrentLocalFlags();
1822 FieldContainerTransitPtr returnValue(tmpPtr);
1824 return returnValue;
1830 /*------------------------- constructors ----------------------------------*/
1832 TextureEnvChunkBase::TextureEnvChunkBase(void) :
1833 Inherited(),
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) :
1866 Inherited(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(
1910 &_sfEnvMode,
1911 this->getType().getFieldDesc(EnvModeFieldId),
1912 const_cast<TextureEnvChunkBase *>(this)));
1914 return returnValue;
1917 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvMode (void)
1919 SFGLenum::EditHandlePtr returnValue(
1920 new SFGLenum::EditHandle(
1921 &_sfEnvMode,
1922 this->getType().getFieldDesc(EnvModeFieldId),
1923 this));
1926 editSField(EnvModeFieldMask);
1928 return returnValue;
1931 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvColor (void) const
1933 SFColor4f::GetHandlePtr returnValue(
1934 new SFColor4f::GetHandle(
1935 &_sfEnvColor,
1936 this->getType().getFieldDesc(EnvColorFieldId),
1937 const_cast<TextureEnvChunkBase *>(this)));
1939 return returnValue;
1942 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvColor (void)
1944 SFColor4f::EditHandlePtr returnValue(
1945 new SFColor4f::EditHandle(
1946 &_sfEnvColor,
1947 this->getType().getFieldDesc(EnvColorFieldId),
1948 this));
1951 editSField(EnvColorFieldMask);
1953 return returnValue;
1956 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvCombineRGB (void) const
1958 SFGLenum::GetHandlePtr returnValue(
1959 new SFGLenum::GetHandle(
1960 &_sfEnvCombineRGB,
1961 this->getType().getFieldDesc(EnvCombineRGBFieldId),
1962 const_cast<TextureEnvChunkBase *>(this)));
1964 return returnValue;
1967 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvCombineRGB (void)
1969 SFGLenum::EditHandlePtr returnValue(
1970 new SFGLenum::EditHandle(
1971 &_sfEnvCombineRGB,
1972 this->getType().getFieldDesc(EnvCombineRGBFieldId),
1973 this));
1976 editSField(EnvCombineRGBFieldMask);
1978 return returnValue;
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)));
1989 return returnValue;
1992 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvCombineAlpha(void)
1994 SFGLenum::EditHandlePtr returnValue(
1995 new SFGLenum::EditHandle(
1996 &_sfEnvCombineAlpha,
1997 this->getType().getFieldDesc(EnvCombineAlphaFieldId),
1998 this));
2001 editSField(EnvCombineAlphaFieldMask);
2003 return returnValue;
2006 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvScaleRGB (void) const
2008 SFReal32::GetHandlePtr returnValue(
2009 new SFReal32::GetHandle(
2010 &_sfEnvScaleRGB,
2011 this->getType().getFieldDesc(EnvScaleRGBFieldId),
2012 const_cast<TextureEnvChunkBase *>(this)));
2014 return returnValue;
2017 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvScaleRGB (void)
2019 SFReal32::EditHandlePtr returnValue(
2020 new SFReal32::EditHandle(
2021 &_sfEnvScaleRGB,
2022 this->getType().getFieldDesc(EnvScaleRGBFieldId),
2023 this));
2026 editSField(EnvScaleRGBFieldMask);
2028 return returnValue;
2031 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvScaleAlpha (void) const
2033 SFReal32::GetHandlePtr returnValue(
2034 new SFReal32::GetHandle(
2035 &_sfEnvScaleAlpha,
2036 this->getType().getFieldDesc(EnvScaleAlphaFieldId),
2037 const_cast<TextureEnvChunkBase *>(this)));
2039 return returnValue;
2042 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvScaleAlpha (void)
2044 SFReal32::EditHandlePtr returnValue(
2045 new SFReal32::EditHandle(
2046 &_sfEnvScaleAlpha,
2047 this->getType().getFieldDesc(EnvScaleAlphaFieldId),
2048 this));
2051 editSField(EnvScaleAlphaFieldMask);
2053 return returnValue;
2056 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvSource0RGB (void) const
2058 SFGLenum::GetHandlePtr returnValue(
2059 new SFGLenum::GetHandle(
2060 &_sfEnvSource0RGB,
2061 this->getType().getFieldDesc(EnvSource0RGBFieldId),
2062 const_cast<TextureEnvChunkBase *>(this)));
2064 return returnValue;
2067 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource0RGB (void)
2069 SFGLenum::EditHandlePtr returnValue(
2070 new SFGLenum::EditHandle(
2071 &_sfEnvSource0RGB,
2072 this->getType().getFieldDesc(EnvSource0RGBFieldId),
2073 this));
2076 editSField(EnvSource0RGBFieldMask);
2078 return returnValue;
2081 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvSource1RGB (void) const
2083 SFGLenum::GetHandlePtr returnValue(
2084 new SFGLenum::GetHandle(
2085 &_sfEnvSource1RGB,
2086 this->getType().getFieldDesc(EnvSource1RGBFieldId),
2087 const_cast<TextureEnvChunkBase *>(this)));
2089 return returnValue;
2092 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource1RGB (void)
2094 SFGLenum::EditHandlePtr returnValue(
2095 new SFGLenum::EditHandle(
2096 &_sfEnvSource1RGB,
2097 this->getType().getFieldDesc(EnvSource1RGBFieldId),
2098 this));
2101 editSField(EnvSource1RGBFieldMask);
2103 return returnValue;
2106 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvSource2RGB (void) const
2108 SFGLenum::GetHandlePtr returnValue(
2109 new SFGLenum::GetHandle(
2110 &_sfEnvSource2RGB,
2111 this->getType().getFieldDesc(EnvSource2RGBFieldId),
2112 const_cast<TextureEnvChunkBase *>(this)));
2114 return returnValue;
2117 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource2RGB (void)
2119 SFGLenum::EditHandlePtr returnValue(
2120 new SFGLenum::EditHandle(
2121 &_sfEnvSource2RGB,
2122 this->getType().getFieldDesc(EnvSource2RGBFieldId),
2123 this));
2126 editSField(EnvSource2RGBFieldMask);
2128 return returnValue;
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)));
2139 return returnValue;
2142 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource0Alpha(void)
2144 SFGLenum::EditHandlePtr returnValue(
2145 new SFGLenum::EditHandle(
2146 &_sfEnvSource0Alpha,
2147 this->getType().getFieldDesc(EnvSource0AlphaFieldId),
2148 this));
2151 editSField(EnvSource0AlphaFieldMask);
2153 return returnValue;
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)));
2164 return returnValue;
2167 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource1Alpha(void)
2169 SFGLenum::EditHandlePtr returnValue(
2170 new SFGLenum::EditHandle(
2171 &_sfEnvSource1Alpha,
2172 this->getType().getFieldDesc(EnvSource1AlphaFieldId),
2173 this));
2176 editSField(EnvSource1AlphaFieldMask);
2178 return returnValue;
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)));
2189 return returnValue;
2192 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvSource2Alpha(void)
2194 SFGLenum::EditHandlePtr returnValue(
2195 new SFGLenum::EditHandle(
2196 &_sfEnvSource2Alpha,
2197 this->getType().getFieldDesc(EnvSource2AlphaFieldId),
2198 this));
2201 editSField(EnvSource2AlphaFieldMask);
2203 return returnValue;
2206 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvOperand0RGB (void) const
2208 SFGLenum::GetHandlePtr returnValue(
2209 new SFGLenum::GetHandle(
2210 &_sfEnvOperand0RGB,
2211 this->getType().getFieldDesc(EnvOperand0RGBFieldId),
2212 const_cast<TextureEnvChunkBase *>(this)));
2214 return returnValue;
2217 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand0RGB (void)
2219 SFGLenum::EditHandlePtr returnValue(
2220 new SFGLenum::EditHandle(
2221 &_sfEnvOperand0RGB,
2222 this->getType().getFieldDesc(EnvOperand0RGBFieldId),
2223 this));
2226 editSField(EnvOperand0RGBFieldMask);
2228 return returnValue;
2231 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvOperand1RGB (void) const
2233 SFGLenum::GetHandlePtr returnValue(
2234 new SFGLenum::GetHandle(
2235 &_sfEnvOperand1RGB,
2236 this->getType().getFieldDesc(EnvOperand1RGBFieldId),
2237 const_cast<TextureEnvChunkBase *>(this)));
2239 return returnValue;
2242 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand1RGB (void)
2244 SFGLenum::EditHandlePtr returnValue(
2245 new SFGLenum::EditHandle(
2246 &_sfEnvOperand1RGB,
2247 this->getType().getFieldDesc(EnvOperand1RGBFieldId),
2248 this));
2251 editSField(EnvOperand1RGBFieldMask);
2253 return returnValue;
2256 GetFieldHandlePtr TextureEnvChunkBase::getHandleEnvOperand2RGB (void) const
2258 SFGLenum::GetHandlePtr returnValue(
2259 new SFGLenum::GetHandle(
2260 &_sfEnvOperand2RGB,
2261 this->getType().getFieldDesc(EnvOperand2RGBFieldId),
2262 const_cast<TextureEnvChunkBase *>(this)));
2264 return returnValue;
2267 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand2RGB (void)
2269 SFGLenum::EditHandlePtr returnValue(
2270 new SFGLenum::EditHandle(
2271 &_sfEnvOperand2RGB,
2272 this->getType().getFieldDesc(EnvOperand2RGBFieldId),
2273 this));
2276 editSField(EnvOperand2RGBFieldMask);
2278 return returnValue;
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)));
2289 return returnValue;
2292 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand0Alpha(void)
2294 SFGLenum::EditHandlePtr returnValue(
2295 new SFGLenum::EditHandle(
2296 &_sfEnvOperand0Alpha,
2297 this->getType().getFieldDesc(EnvOperand0AlphaFieldId),
2298 this));
2301 editSField(EnvOperand0AlphaFieldMask);
2303 return returnValue;
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)));
2314 return returnValue;
2317 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand1Alpha(void)
2319 SFGLenum::EditHandlePtr returnValue(
2320 new SFGLenum::EditHandle(
2321 &_sfEnvOperand1Alpha,
2322 this->getType().getFieldDesc(EnvOperand1AlphaFieldId),
2323 this));
2326 editSField(EnvOperand1AlphaFieldMask);
2328 return returnValue;
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)));
2339 return returnValue;
2342 EditFieldHandlePtr TextureEnvChunkBase::editHandleEnvOperand2Alpha(void)
2344 SFGLenum::EditHandlePtr returnValue(
2345 new SFGLenum::EditHandle(
2346 &_sfEnvOperand2Alpha,
2347 this->getType().getFieldDesc(EnvOperand2AlphaFieldId),
2348 this));
2351 editSField(EnvOperand2AlphaFieldMask);
2353 return returnValue;
2356 GetFieldHandlePtr TextureEnvChunkBase::getHandlePointSprite (void) const
2358 SFBool::GetHandlePtr returnValue(
2359 new SFBool::GetHandle(
2360 &_sfPointSprite,
2361 this->getType().getFieldDesc(PointSpriteFieldId),
2362 const_cast<TextureEnvChunkBase *>(this)));
2364 return returnValue;
2367 EditFieldHandlePtr TextureEnvChunkBase::editHandlePointSprite (void)
2369 SFBool::EditHandlePtr returnValue(
2370 new SFBool::EditHandle(
2371 &_sfPointSprite,
2372 this->getType().getFieldDesc(PointSpriteFieldId),
2373 this));
2376 editSField(PointSpriteFieldMask);
2378 return returnValue;
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)));
2389 return returnValue;
2392 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderOperation(void)
2394 SFGLenum::EditHandlePtr returnValue(
2395 new SFGLenum::EditHandle(
2396 &_sfShaderOperation,
2397 this->getType().getFieldDesc(ShaderOperationFieldId),
2398 this));
2401 editSField(ShaderOperationFieldMask);
2403 return returnValue;
2406 GetFieldHandlePtr TextureEnvChunkBase::getHandleShaderInput (void) const
2408 SFGLenum::GetHandlePtr returnValue(
2409 new SFGLenum::GetHandle(
2410 &_sfShaderInput,
2411 this->getType().getFieldDesc(ShaderInputFieldId),
2412 const_cast<TextureEnvChunkBase *>(this)));
2414 return returnValue;
2417 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderInput (void)
2419 SFGLenum::EditHandlePtr returnValue(
2420 new SFGLenum::EditHandle(
2421 &_sfShaderInput,
2422 this->getType().getFieldDesc(ShaderInputFieldId),
2423 this));
2426 editSField(ShaderInputFieldMask);
2428 return returnValue;
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)));
2439 return returnValue;
2442 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderOffsetMatrix(void)
2444 MFReal32::EditHandlePtr returnValue(
2445 new MFReal32::EditHandle(
2446 &_mfShaderOffsetMatrix,
2447 this->getType().getFieldDesc(ShaderOffsetMatrixFieldId),
2448 this));
2451 editMField(ShaderOffsetMatrixFieldMask, _mfShaderOffsetMatrix);
2453 return returnValue;
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)));
2464 return returnValue;
2467 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderOffsetScale(void)
2469 SFReal32::EditHandlePtr returnValue(
2470 new SFReal32::EditHandle(
2471 &_sfShaderOffsetScale,
2472 this->getType().getFieldDesc(ShaderOffsetScaleFieldId),
2473 this));
2476 editSField(ShaderOffsetScaleFieldMask);
2478 return returnValue;
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)));
2489 return returnValue;
2492 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderOffsetBias(void)
2494 SFReal32::EditHandlePtr returnValue(
2495 new SFReal32::EditHandle(
2496 &_sfShaderOffsetBias,
2497 this->getType().getFieldDesc(ShaderOffsetBiasFieldId),
2498 this));
2501 editSField(ShaderOffsetBiasFieldMask);
2503 return returnValue;
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)));
2514 return returnValue;
2517 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderRGBADotProduct(void)
2519 SFGLenum::EditHandlePtr returnValue(
2520 new SFGLenum::EditHandle(
2521 &_sfShaderRGBADotProduct,
2522 this->getType().getFieldDesc(ShaderRGBADotProductFieldId),
2523 this));
2526 editSField(ShaderRGBADotProductFieldMask);
2528 return returnValue;
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)));
2539 return returnValue;
2542 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderCullModes(void)
2544 SFUInt8::EditHandlePtr returnValue(
2545 new SFUInt8::EditHandle(
2546 &_sfShaderCullModes,
2547 this->getType().getFieldDesc(ShaderCullModesFieldId),
2548 this));
2551 editSField(ShaderCullModesFieldMask);
2553 return returnValue;
2556 GetFieldHandlePtr TextureEnvChunkBase::getHandleShaderConstEye (void) const
2558 SFVec3f::GetHandlePtr returnValue(
2559 new SFVec3f::GetHandle(
2560 &_sfShaderConstEye,
2561 this->getType().getFieldDesc(ShaderConstEyeFieldId),
2562 const_cast<TextureEnvChunkBase *>(this)));
2564 return returnValue;
2567 EditFieldHandlePtr TextureEnvChunkBase::editHandleShaderConstEye (void)
2569 SFVec3f::EditHandlePtr returnValue(
2570 new SFVec3f::EditHandle(
2571 &_sfShaderConstEye,
2572 this->getType().getFieldDesc(ShaderConstEyeFieldId),
2573 this));
2576 editSField(ShaderConstEyeFieldMask);
2578 return returnValue;
2581 GetFieldHandlePtr TextureEnvChunkBase::getHandleLodBias (void) const
2583 SFReal32::GetHandlePtr returnValue(
2584 new SFReal32::GetHandle(
2585 &_sfLodBias,
2586 this->getType().getFieldDesc(LodBiasFieldId),
2587 const_cast<TextureEnvChunkBase *>(this)));
2589 return returnValue;
2592 EditFieldHandlePtr TextureEnvChunkBase::editHandleLodBias (void)
2594 SFReal32::EditHandlePtr returnValue(
2595 new SFReal32::EditHandle(
2596 &_sfLodBias,
2597 this->getType().getFieldDesc(LodBiasFieldId),
2598 this));
2601 editSField(LodBiasFieldMask);
2603 return returnValue;
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),
2617 whichField,
2618 oOffsets,
2619 syncMode,
2620 uiSyncInfo);
2622 #endif
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));
2635 return returnValue;
2637 #endif
2639 void TextureEnvChunkBase::resolveLinks(void)
2641 Inherited::resolveLinks();
2643 #ifdef OSG_MT_CPTR_ASPECT
2644 AspectOffsetStore oOffsets;
2646 _pAspectStore->fillOffsetArray(oOffsets, this);
2647 #endif
2649 #ifdef OSG_MT_CPTR_ASPECT
2650 _mfShaderOffsetMatrix.terminateShare(Thread::getCurrentAspect(),
2651 oOffsets);
2652 #endif
2656 OSG_END_NAMESPACE