00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00017 *** BORDEAUX, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Mike Heck (MMM yyyy) 00022 **=======================================================================*/ 00023 00024 00025 #ifndef _SO_FRONTBUFFERGROUP_ 00026 #define _SO_FRONTBUFFERGROUP_ 00027 00028 #include <Inventor/nodes/SoSeparator.h> 00029 #include <Inventor/fields/SoSFBool.h> 00030 00032 // 00033 // Class: SoFrontBufferGroup 00034 // 00035 // Grouping node that delays rendering its children until all other nodes 00036 // have been traversed *and* the buffer swap has occured (if the drawable 00037 // is double buffered). The result is that shapes under this node are 00038 // drawn in the OpenGL "front buffer" after the buffer swap. 00039 // 00040 // This is useful if part of the scene (for example a very large volume for 00041 // volume rendering) takes a long time to render. Most of the scene is 00042 // drawn normally (double buffered), then the slow part of the scene renders 00043 // as you watch. Typically the application will check for input events and 00044 // abort the front buffer rendering if the user starts another interaction. 00045 // 00046 // The enable field can be used to select delayed or normal rendering. For 00047 // example the application might use normal (double buffered) rendering for 00048 // small volumes and front buffer rendering for large volumes. 00049 // 00050 // All non-rendering actions are inherited as is from SoSeparator. 00051 // 00053 class SoDEPRECATED SoFrontBufferGroup : public SoSeparator { 00116 00117 SO_NODE_HEADER(SoFrontBufferGroup); 00118 00119 public: 00120 00121 // Fields 00126 SoSFBool enable; 00127 00131 SoFrontBufferGroup(); 00132 00133 private: 00134 // Implement actions 00135 virtual void GLRender(SoGLRenderAction *action); 00136 virtual void GLRenderBelowPath(SoGLRenderAction *action); 00137 virtual void GLRenderInPath(SoGLRenderAction *action); 00138 virtual void GLRenderOffPath(SoGLRenderAction *action); 00139 virtual int32_t getRenderUnitID() const; 00140 00141 private: 00142 static void initClass(); 00143 static void exitClass(); 00144 static void setNoDelay(SbBool flag); 00145 static SbBool getNoDelay(); 00146 00147 private: 00148 // Destructor 00149 virtual ~SoFrontBufferGroup(); 00150 00151 private: 00152 static SbBool noDelay; // global override for enable field 00153 }; 00154 00155 #endif /* _SO_FRONTBUFFERGROUP_ */ 00156 00157 00158