H3D API  2.4.1
FrameBufferTextureGenerator.h
Go to the documentation of this file.
1 // Copyright 2004-2019, SenseGraphics AB
3 //
4 // This file is part of H3D API.
5 //
6 // H3D API is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // H3D API is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with H3D API; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // A commercial license is also available. Please contact us at
21 // www.sensegraphics.com for more information.
22 //
23 //
28 //
30 #ifndef __FRAMEBUFFERTEXTUREGENERATOR_H__
31 #define __FRAMEBUFFERTEXTUREGENERATOR_H__
32 
33 #include <H3D/X3DGroupingNode.h>
34 #include <H3D/MFString.h>
35 #include <H3D/GeneratedTexture.h>
36 #include <H3D/X3DViewpointNode.h>
37 #include <H3D/NavigationInfo.h>
38 #include <H3D/X3DBackgroundNode.h>
39 #include <H3D/ShadowCaster.h>
40 #include <H3D/TypedField.h>
41 #include <H3D/FieldTemplates.h>
42 #include <H3D/SFColorRGBA.h>
43 #include <H3D/Field.h>
44 #include <H3D/MFColorRGBA.h>
45 #include <H3DUtil/AutoRef.h>
46 
47 namespace H3D {
48 
209  class H3DAPI_API FrameBufferTextureGenerator : public X3DGroupingNode {
210  public:
211 
219  typedef void (*RenderCallbackFunc)( FrameBufferTextureGenerator *, int i, void * );
222 
223  class H3DAPI_API UpdateMode : public AutoUpdate < OnNewValueSField < SFString > > {
224  virtual void onNewValue( const std::string& new_value );
225  };
226 
228  FrameBufferTextureGenerator( Inst< AddChildren > _addChildren = 0,
229  Inst< RemoveChildren > _removeChildren = 0,
230  Inst< MFChild > _children = 0,
231  Inst< SFNode > _metadata = 0,
232  Inst< SFBound > _bound = 0,
233  Inst< SFVec3f > _bboxCenter = 0,
234  Inst< SFVec3f > _bboxSize = 0,
235  Inst< MFString > _generateColorTextures = 0,
236  Inst< SFBool > _generateDepthTexture = 0,
237  Inst< MFTexturePropertiesNode > _colorTextureProperties = 0,
238  Inst< SFTexturePropertiesNode > _depthTextureProperties = 0,
239  Inst< MFGeneratedTextureNode > _colorTextures = 0,
240  Inst< SFGeneratedTextureNode > _colorTexture = 0,
241  Inst< SFGeneratedTextureNode > _depthTexture = 0,
242  Inst< SFString > _depthBufferType = 0,
243  Inst< SFString > _outputTextureType = 0,
244  Inst< SFInt32 > _samples = 0,
245  Inst< UpdateMode > _update = 0,
246  Inst< SFInt32 > _framesBeforeStop = 0,
247  Inst< SFViewpointNode > _viewpoint = 0,
248  Inst< SFNavigationInfo > _navigationInfo = 0,
249  Inst< SFBackgroundNode > _background = 0,
250  Inst< SFInt32 > _width = 0,
251  Inst< SFInt32 > _height = 0,
252  Inst< SFInt32 > _widthInUse = 0,
253  Inst< SFInt32 > _heightInUse = 0,
254  Inst< SFBool > _useStereo = 0,
255  Inst< SFString > _depthBufferStorage = 0,
256  Inst< SFFrameBufferTextureGeneratorNode > _externalFBODepthBuffer = 0,
257  Inst< MFString > _colorBufferStorages = 0,
258  Inst< MFFrameBufferTextureGeneratorNode > _externalFBOColorBuffers = 0,
259  Inst< SFBool > _useNavigation = 0,
260  Inst< SFInt32 > _projectionWidth = 0,
261  Inst< SFInt32 > _projectionHeight = 0,
262  Inst< SFBool > _useSpecifiedClearColor = 0,
263  Inst< SFColorRGBA > _clearColor = 0,
264  Inst< SFBool > _useDSA = 0,
265  Inst< SFBool > _splitScene = 0,
266  Inst< SFBool > _useScissor = 0,
267  Inst< SFInt32 > _scissorBoxX = 0,
268  Inst< SFInt32 > _scissorBoxY = 0,
269  Inst< SFInt32 > _scissorBoxWidth = 0,
270  Inst< SFInt32 > _scissorBoxHeight = 0,
271  Inst< MFColorRGBA > _clearColors = 0,
272  Inst< SFInt32 > _nrLayers = 0,
273  Inst< SFBool > _generateStencilMask = 0,
274  Inst< SFBool > _applyStencilMask = 0,
275  Inst< SFBool > _useInverseMasking = 0);
276 
278  virtual ~FrameBufferTextureGenerator();
279 
281  virtual void render();
282 
284  virtual void traverseSG( TraverseInfo &ti );
285 
287  virtual void initialize();
288 
290  bool haveStencilBuffer();
291 
304  void setRenderCallback( RenderCallbackFunc func, void *args = NULL );
305 
317  H3DUniquePtr< SFString > depthBufferStorage;
318 
323  H3DUniquePtr< SFFrameBufferTextureGeneratorNode > externalFBODepthBuffer;
324 
337  H3DUniquePtr< MFString > colorBufferStorages;
338 
343  H3DUniquePtr< MFFrameBufferTextureGeneratorNode > externalFBOColorBuffers;
344 
366  H3DUniquePtr< MFString > generateColorTextures;
367 
373  H3DUniquePtr< SFBool > generateDepthTexture;
374 
381  H3DUniquePtr< MFTexturePropertiesNode > colorTextureProperties;
382 
387  H3DUniquePtr< SFTexturePropertiesNode > depthTextureProperties;
388 
392  H3DUniquePtr< MFGeneratedTextureNode > colorTextures;
393 
397  H3DUniquePtr< SFGeneratedTextureNode > colorTexture;
398 
402  H3DUniquePtr< SFGeneratedTextureNode > depthTexture;
403 
418  H3DUniquePtr< SFString > depthBufferType;
419 
435  H3DUniquePtr< SFString > outputTextureType;
436 
444  H3DUniquePtr< SFInt32 > samples;
445 
468  H3DUniquePtr< UpdateMode > update;
469 
476  H3DUniquePtr< SFInt32 > framesBeforeStop;
477 
483  H3DUniquePtr< SFViewpointNode > viewpoint;
484 
493  H3DUniquePtr< SFNavigationInfo > navigationInfo;
494 
500  H3DUniquePtr< SFBackgroundNode > background;
501 
507  H3DUniquePtr< SFInt32 > width;
508 
514  H3DUniquePtr< SFInt32 > height;
515 
520  H3DUniquePtr< SFBool > useScissor;
521 
528  H3DUniquePtr< SFInt32 > scissorBoxX;
529 
536  H3DUniquePtr< SFInt32 > scissorBoxY;
537 
546  H3DUniquePtr< SFInt32 > scissorBoxWidth;
547 
556  H3DUniquePtr< SFInt32 > scissorBoxHeight;
557 
561  H3DUniquePtr< SFInt32 > widthInUse;
562 
566  H3DUniquePtr< SFInt32 > heightInUse;
567 
573  H3DUniquePtr< SFInt32 > projectionWidth;
574 
580  H3DUniquePtr< SFInt32 > projectionHeight;
581 
588  H3DUniquePtr< SFBool > useStereo;
589 
597  H3DUniquePtr< SFBool > useNavigation;
598 
599 
608  H3DUniquePtr< SFBool > useSpecifiedClearColor;
609 
614  H3DUniquePtr< SFColorRGBA > clearColor;
615 
622  H3DUniquePtr< MFColorRGBA > clearColors;
623 
629  H3DUniquePtr< SFBool > useDSA;
630 
642  H3DUniquePtr< SFBool > splitScene;
643 
651  H3DUniquePtr< SFBool > generateStencilMask;
652 
658  H3DUniquePtr< SFBool > applyStencilMask;
659 
665  H3DUniquePtr< SFBool > useInverseMasking;
666 
677  H3DUniquePtr < SFInt32 > nrLayers;
678 
681 
686  inline void ensureInitialized() {
687  if( !fbo_initialized ) initializeFBO();
688  }
689 
691  inline bool isFBOInitialized() {
692  return fbo_initialized;
693  }
694 
697  inline GLuint getFBOId() {
698  return fbo_id;
699  }
700 
703  inline GLuint getDepthId() {
704  return depth_id;
705  }
706 
709  return depthTexture->getValue();
710  }
711 
714  inline vector<GLuint> getColorIds() {
715  return color_ids;
716  }
717 
721  return colorTextures->getValue();
722  }
723 
727  inline void setAlwaysUseExistingViewport( bool use ) {
728  always_use_existing_viewport = use;
729  }
730 
734  return always_use_existing_viewport;
735  }
736 
739  static std::set< FrameBufferTextureGenerator * > fbo_nodes;
740 
741  protected:
742 
744  GLenum stringToInternalFormat( const string &format_string );
745 
747  GLenum stringToInternalDepthFormat( const string &s );
748 
750  GLenum stringToDepthFormat( const string &s );
751 
753  GLenum stringToDepthType( const string &s );
754 
757  bool checkFBOCompleteness();
758 
760  void initializeFBO();
761 
763  void createOutputTextures ();
764 
766  void setupScissor( bool needSinglePassStereo, float* viewports_size, int desired_fbo_width, int desired_fbo_height );
767 
775  void preProcessFBO(int srcX, int srcY, int w, int h, int depth);
776 
784  void blitDepthBuffer(GLenum src, GLenum dst, int srcX, int srcY, int w, int h);
785 
795  void blitColorBuffer(GLenum src, GLenum dst,
796  int srcX, int srcY, int w, int h, int src_index, int dst_index);
797 
805  void blitFBOBuffers(GLenum src, GLenum dst,
806  int srcX, int srcY, int w, int h );
807 
808 
816  bool resizeBuffers( H3DInt32 w, H3DInt32 h, H3DInt32 d );
817 
825  bool parseColorBufferStorage( std::string color_buffer_storage, std::string& style, int& index );
826 
828  void _check_gl_error(const char *file, int line);
829 
839  void clearColorBuffer(GLenum src, int x, int y, int _width, int _height,
840  GLfloat* value, GLint index );
841 
850  void clearBuffers(GLenum src, int x, int y, int _width, int _height, GLbitfield mask);
851 
853  class NeedMultiSample: public TypedField<SFBool, SFInt32>
854  {
855  public:
856  virtual void update();
857  };
858 
861  H3DUniquePtr< NeedMultiSample > needMultiSample;
862 
865  class GetNrSamples: public SFInt32{
866  public:
867  virtual void update();
868  };
869 
872  H3DUniquePtr<GetNrSamples> getNrSamples;
873 
876 
879 
881  vector<GLuint> color_ids;
882 
886 
889  vector<GLuint> multi_samples_color_ids;
890 
893 
896 
899 
904 
906  GLuint fbo_id;
907 
910  GLuint depth_id;
911 
913  GLuint stencil_id;
914 
917  std::vector< GLenum > draw_buffers;
918 
921 
923  RenderCallbackFunc render_func;
924 
927 
932 
936 
940 
941  protected:
943  class ResetPrintedFlag : public TypedField< SFBool, Types<Any<SFString,MFString> > >
944  {
945  public:
946  virtual void update (){
947  this->value = false;
948  }
949  };
951  class ResetPrintedFlags: public TypedField< MFBool,
952  MFString > {
953  public:
954  virtual void update(){
955  for( vector<bool>::iterator it = value.begin(); it!= value.end(); ++it) {
956 
957  (*it) = false;
958  }
959  }
960  };
961 
964  H3DUniquePtr< ResetPrintedFlag > depthWarningPrinted;
965 
968  H3DUniquePtr< ResetPrintedFlag > colorMismatchWarningPrinted;
969 
972  H3DUniquePtr< ResetPrintedFlags > colorInitWarningPrinted;
973 
974  bool support_dsa;
975 
976  bool use_depth_stencil;
977 
978  vector<GLfloat> clear_color_value;
979  };
980 }
981 
982 #endif
Contains different templates to modify field behaviour.
Contains the Field class.
Header file for GeneratedTexture.
Contains the MFColorRGBA field class.
Contains the MFString field class.
Header file for NavigationInfo, X3D scene-graph node.
Contains the SFColorRGBA field class.
Header file for ShadowCaster.
Contains the TypedField template class.
Header file for X3DBackgroundNode, X3D scene-graph node.
Header file for X3DGroupingNode, X3D scene-graph node.
Header file for X3DViewpointNode, X3D scene-graph node.
Specialized field class used to get the number of samples that can and will be used.
Definition: FrameBufferTextureGenerator.h:865
Specialized field class used to check if multi sample support is needed.
Definition: FrameBufferTextureGenerator.h:854
A field used to reset the waning printed flag.
Definition: FrameBufferTextureGenerator.h:944
virtual void update()
Make the field up to date given that an event has occured.
Definition: FrameBufferTextureGenerator.h:946
A field to reset multiple warning printed flags.
Definition: FrameBufferTextureGenerator.h:952
virtual void update()
Make the field up to date given that an event has occured.
Definition: FrameBufferTextureGenerator.h:954
The FrameBufferTextureGenerator node provides a mean to render a sub-scene into a texture instead of ...
Definition: FrameBufferTextureGenerator.h:209
bool last_resize_success
True if the last call to resizeBuffers from render() was true.
Definition: FrameBufferTextureGenerator.h:920
H3DSingleTextureNode * getDepthTexture()
Return the depth texture of current FrameBufferTextureGenerator.
Definition: FrameBufferTextureGenerator.h:708
static std::set< FrameBufferTextureGenerator * > fbo_nodes
The FrameBufferTextureGenerator that are currently in use in the application.
Definition: FrameBufferTextureGenerator.h:739
bool always_use_existing_viewport
If set to true the currently set up viewport when the render() function is called will be used for th...
Definition: FrameBufferTextureGenerator.h:931
H3DInt32 buffers_depth
The current depth(in pixels) of output textures and buffers.
Definition: FrameBufferTextureGenerator.h:903
H3DUniquePtr< SFBool > splitScene
An option to tell FBTG to split the children scene and render each shape into separate render target.
Definition: FrameBufferTextureGenerator.h:642
H3DUniquePtr< MFFrameBufferTextureGeneratorNode > externalFBOColorBuffers
Specifies the external FrameBufferTextureGenerator to be used for FBO_COPY_x and FBO_SHARE_x option o...
Definition: FrameBufferTextureGenerator.h:343
H3DUniquePtr< SFInt32 > scissorBoxWidth
scissor box width, will be used when useScissor is true When this value is negative,...
Definition: FrameBufferTextureGenerator.h:546
H3DUniquePtr< SFInt32 > framesBeforeStop
The frameBeforeStop is check when SPECIFIED_FRAME_ONLY is set and to provide the info about how many ...
Definition: FrameBufferTextureGenerator.h:476
H3DUniquePtr< SFBool > useInverseMasking
An option to change the regular stencil masking behavior.
Definition: FrameBufferTextureGenerator.h:665
RenderCallbackFunc render_func
The render callback function, if any.
Definition: FrameBufferTextureGenerator.h:923
GLuint multi_samples_fbo_id
The OpenGL fbo used for multi sample rendering.
Definition: FrameBufferTextureGenerator.h:892
H3DUniquePtr< SFGeneratedTextureNode > depthTexture
The texture node generated from depth buffers if specified in generateDepthTexture.
Definition: FrameBufferTextureGenerator.h:402
H3DUniquePtr< ResetPrintedFlags > colorInitWarningPrinted
Field used to control the warning printing of storage init C++ only field.
Definition: FrameBufferTextureGenerator.h:972
H3DUniquePtr< UpdateMode > update
The update field allows the user to request a regeneration of the texture.
Definition: FrameBufferTextureGenerator.h:468
H3DUniquePtr< SFViewpointNode > viewpoint
The X3DViewpointNode to use when rendering the scene.
Definition: FrameBufferTextureGenerator.h:483
H3DUniquePtr< SFInt32 > projectionHeight
Specify the height used to determine the local viewpoint's projection matrix if not specified the win...
Definition: FrameBufferTextureGenerator.h:580
H3DUniquePtr< MFString > colorBufferStorages
Defines what should be used as the color buffers for current FBO before rendering the sub-scene child...
Definition: FrameBufferTextureGenerator.h:337
H3DUniquePtr< MFColorRGBA > clearColors
Specified clearColors when there are more than one color output, use clearColors instead of clearColo...
Definition: FrameBufferTextureGenerator.h:622
H3DUniquePtr< SFInt32 > samples
The samples field determines how many samples to use for each pixel value in the textures.
Definition: FrameBufferTextureGenerator.h:444
AutoRef< ShadowCaster > shadow_caster
Reference to shadow caster used to cast shadows for shapes in scene graph in this FrameBufferTextureG...
Definition: FrameBufferTextureGenerator.h:935
H3DUniquePtr< SFString > depthBufferType
The depthBufferType field determines the precision and type of the depth buffer.
Definition: FrameBufferTextureGenerator.h:418
H3DInt32 buffers_height
The current width(in pixels) of output textures and buffers.
Definition: FrameBufferTextureGenerator.h:898
H3DUniquePtr< SFInt32 > nrLayers
The number of layers to a 3D texture or texture array output.
Definition: FrameBufferTextureGenerator.h:677
H3DUniquePtr< SFInt32 > widthInUse
It contains the actual width value used at realtime.
Definition: FrameBufferTextureGenerator.h:561
bool alwaysUseExistingViewpoint()
Returns the current value of alwaysUseExistingViewpoint.
Definition: FrameBufferTextureGenerator.h:733
H3DUniquePtr< SFBool > useStereo
An option to enable the use of same stereo setting as current window by default,it will be set to fal...
Definition: FrameBufferTextureGenerator.h:588
void ensureInitialized()
The ensureInitialized function makes sure that the output textures of the FrameBufferTextureGenerator...
Definition: FrameBufferTextureGenerator.h:686
bool isFBOInitialized()
Returns true if the fbo used by the node has been initialized,.
Definition: FrameBufferTextureGenerator.h:691
GLuint fbo_id
The id of the frame buffer object used to generate textures.
Definition: FrameBufferTextureGenerator.h:906
H3DUniquePtr< SFColorRGBA > clearColor
Specified clearColor used when useSpecifiedClearColor is true.
Definition: FrameBufferTextureGenerator.h:614
AutoRef< X3DGroupingNode > child_to_render
A group node container to gather all child node in MFChild field, used to gathering bound information...
Definition: FrameBufferTextureGenerator.h:939
H3DUniquePtr< ResetPrintedFlag > colorMismatchWarningPrinted
Field used to control the warning printing of size mismatch C++ only field.
Definition: FrameBufferTextureGenerator.h:968
H3DUniquePtr< SFNavigationInfo > navigationInfo
The NavigationInfo to be used when rendering the scene.
Definition: FrameBufferTextureGenerator.h:493
H3DUniquePtr< SFInt32 > height
The height of the output textures in pixels.
Definition: FrameBufferTextureGenerator.h:514
GLuint depth_id
The id of the depth buffer used with the fbo.
Definition: FrameBufferTextureGenerator.h:910
H3DUniquePtr< SFInt32 > scissorBoxHeight
scissor box height, will be used when useScissor is true When this value is negative,...
Definition: FrameBufferTextureGenerator.h:556
H3DUniquePtr< SFInt32 > width
The width of the output textures in pixels.
Definition: FrameBufferTextureGenerator.h:507
H3DUniquePtr< SFBool > useSpecifiedClearColor
An option to bypass the background no matter it is local or current active.
Definition: FrameBufferTextureGenerator.h:608
H3DUniquePtr< MFString > generateColorTextures
Defines the color buffer textures to generate and their type.
Definition: FrameBufferTextureGenerator.h:366
std::vector< GLenum > draw_buffers
Array containing [GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT .
Definition: FrameBufferTextureGenerator.h:917
GLuint getDepthId()
Returns the OpenGL depth id attached to fbo_id only valid if isFBOInitialized is true/.
Definition: FrameBufferTextureGenerator.h:703
H3DUniquePtr< ResetPrintedFlag > depthWarningPrinted
Field that control the depth warning output C++ field only.
Definition: FrameBufferTextureGenerator.h:964
vector< GLuint > color_ids
The OpenGL texture ids for all textures generated in the colorTextures field.
Definition: FrameBufferTextureGenerator.h:881
H3DUniquePtr< SFBool > useNavigation
An option to enable the use of user navigation which is used by the current window.
Definition: FrameBufferTextureGenerator.h:597
H3DUniquePtr< SFTexturePropertiesNode > depthTextureProperties
The TextureProperties to apply to the generated depth texture.
Definition: FrameBufferTextureGenerator.h:387
H3DUniquePtr< SFBool > useScissor
True to use scissor box to limit the rendering.
Definition: FrameBufferTextureGenerator.h:520
H3DUniquePtr< SFBool > generateDepthTexture
Determines if a depth texture should be generated or not.
Definition: FrameBufferTextureGenerator.h:373
vector< GLuint > getColorIds()
Returns the OpenGL color ids attached to fbo_id only valid if isFBOInitialized is true/.
Definition: FrameBufferTextureGenerator.h:714
H3DUniquePtr< GetNrSamples > getNrSamples
Specialized field used to get number of samples.
Definition: FrameBufferTextureGenerator.h:872
NodeVector getColorTextures()
Returns the colorTextures of current FrameBufferTextureGenerator only valid if isFBOInitialized is tr...
Definition: FrameBufferTextureGenerator.h:720
H3DUniquePtr< SFBool > generateStencilMask
An option to generate a stencil mask from this FBTG node, it will create a stencil mask of stencil va...
Definition: FrameBufferTextureGenerator.h:651
H3DUniquePtr< SFFrameBufferTextureGeneratorNode > externalFBODepthBuffer
Specifies the external FrameBufferTextureGenerator to be used for FBO_COPY and FBO_SHARE option of De...
Definition: FrameBufferTextureGenerator.h:323
vector< GLuint > multi_samples_color_ids
The OpenGL multi samples render buffer for color buffers when using multi sample rendering.
Definition: FrameBufferTextureGenerator.h:889
void * render_func_data
The specified callback function user data, if any.
Definition: FrameBufferTextureGenerator.h:926
H3DInt32 buffers_width
The current width(in pixels) of output textures and buffers.
Definition: FrameBufferTextureGenerator.h:895
int last_samples
previous sample value
Definition: FrameBufferTextureGenerator.h:878
GLuint getFBOId()
Returns the OpenGL fbo id used by the FrameBufferTextureGenerator.
Definition: FrameBufferTextureGenerator.h:697
GLuint stencil_id
The id of the render buffer used as stencil buffer with the fbo.
Definition: FrameBufferTextureGenerator.h:913
bool fbo_initialized
Flag used to determine if initializeFBO has been called or not.
Definition: FrameBufferTextureGenerator.h:875
H3DUniquePtr< MFGeneratedTextureNode > colorTextures
The texture nodes generated from color buffers specified in generateColorTextures.
Definition: FrameBufferTextureGenerator.h:392
H3DUniquePtr< SFInt32 > scissorBoxY
scissor box bottom limit, will be used when useScissor is true When this value is negative,...
Definition: FrameBufferTextureGenerator.h:536
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: FrameBufferTextureGenerator.h:680
H3DUniquePtr< SFInt32 > heightInUse
It contains the actual height value for this node used at realtime.
Definition: FrameBufferTextureGenerator.h:566
H3DUniquePtr< SFBackgroundNode > background
The X3DBackgroundNode to use when rendering the scene.
Definition: FrameBufferTextureGenerator.h:500
H3DUniquePtr< SFBool > useDSA
Controls whether the FrameBufferTextureGenerator should use direct state access features or not.
Definition: FrameBufferTextureGenerator.h:629
H3DUniquePtr< SFInt32 > projectionWidth
Specify the width used to determine the local viewpoint's projection matrix if not specified the wind...
Definition: FrameBufferTextureGenerator.h:573
H3DUniquePtr< SFInt32 > scissorBoxX
scissor box left limit, will be used when useScissor is true When this value is negative,...
Definition: FrameBufferTextureGenerator.h:528
GLuint multi_samples_depth_id
The OpenGL multi samples render buffer for depth buffer when using multi sample rendering.
Definition: FrameBufferTextureGenerator.h:885
H3DUniquePtr< SFBool > applyStencilMask
An option to let current FBTG apply the stencil masking, this option expect the stencil mask is provi...
Definition: FrameBufferTextureGenerator.h:658
void setAlwaysUseExistingViewport(bool use)
If set to true the currently set up viewport when the render() function is called will be used for th...
Definition: FrameBufferTextureGenerator.h:727
H3DUniquePtr< SFString > depthBufferStorage
Defines what should be used as the depth buffer for current FBO before rendering the sub-scene childr...
Definition: FrameBufferTextureGenerator.h:317
H3DUniquePtr< NeedMultiSample > needMultiSample
Specialized field used to check if multi sample support is needed.
Definition: FrameBufferTextureGenerator.h:861
H3DUniquePtr< MFTexturePropertiesNode > colorTextureProperties
The TextureProperties to apply to each generated color texture.
Definition: FrameBufferTextureGenerator.h:381
H3DUniquePtr< SFString > outputTextureType
The outputTextureType field determines the output type of the generated textures.
Definition: FrameBufferTextureGenerator.h:435
H3DUniquePtr< SFGeneratedTextureNode > colorTexture
The texture node generated from first color buffer specified in generateColorTextures.
Definition: FrameBufferTextureGenerator.h:397
This abstract node type is the base type for all texture nodes that is defined by a single texture.
Definition: H3DSingleTextureNode.h:45
The SFInt32 field contains one 32-bit integer.
Definition: SFInt32.h:41
TraverseInfo is a structure that is passed along when traversing the scene graph.
Definition: TraverseInfo.h:57
A template modifier class for adding type checking on the routes to any Field class.
Definition: TypedField.h:84
Template to make sure that the Nodes that are added to a MFNode are of a specified Node type.
Definition: MFNode.h:221
Template to make sure that the Node that is set in a SFNode is of a specified Node type.
Definition: SFNode.h:97
This abstract node type indicates that concrete node types derived from it contain children nodes and...
Definition: X3DGroupingNode.h:53
H3DDouble x
int H3DInt32
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194