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 : Damien DALLA ROSA (Apr 2011) 00022 **=======================================================================*/ 00023 00024 #if !defined(SO_VERTEXATTRIBFEEDBACK_H) 00025 #define SO_VERTEXATTRIBFEEDBACK_H 00026 00027 #include <Inventor/fields/SoSFBool.h> 00028 #include <Inventor/fields/SoSFEnum.h> 00029 #include <Inventor/nodes/SoSeparator.h> 00030 #include <Inventor/SbPImpl.h> 00031 00032 class SoGLBufferObject; 00033 00034 SO_PIMPL_PUBLIC_DECLARATION(SoVertexAttribFeedback) 00035 00036 00091 class SoVertexAttribFeedback : public SoSeparator 00092 { 00093 SO_NODE_HEADER( SoVertexAttribFeedback ); 00094 SO_PIMPL_PUBLIC_HEADER(SoVertexAttribFeedback) 00095 00096 // ----------------------- Public usage -------------------------------------- 00097 00098 public: 00099 00104 enum BufferMode 00105 { 00109 INTERLEAVED, 00110 00112 SEPARATE 00113 }; 00114 00118 enum PrimitiveType 00119 { 00121 LINES, 00123 POINTS, 00125 TRIANGLES 00126 }; 00127 00137 SoSFBool disableFragmentProcessing; 00138 00150 SoSFBool autoResizeBuffers; 00151 00159 SoSFBool queryGeneratedPrimitivesCount; 00160 00165 SoSFEnum buffersMode; 00166 00171 SoSFEnum primitiveType; 00172 00176 SoVertexAttribFeedback(); 00177 00198 void registerFeedback(const SbString& varyingName, SoBufferObject* bufferObject, int primitiveSize = -1); 00199 00205 void unregisterFeedback(const SbString& varyingName); 00206 00214 int getGeneratedPrimitivesCount() const; 00215 00224 static SbBool isSupported(SoState* state); 00225 00226 private: 00227 00228 virtual void callback(SoCallbackAction *action); 00229 virtual void getBoundingBox(SoGetBoundingBoxAction *action); 00230 virtual void getMatrix(SoGetMatrixAction *action); 00231 virtual void handleEvent(SoHandleEventAction *action); 00232 virtual void rayPick(SoRayPickAction *action); 00233 virtual void search(SoSearchAction *action); 00234 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action); 00235 virtual void distribute(SoDistributeAction* action); 00236 virtual void GLRenderInPath(SoGLRenderAction *action); 00237 virtual void GLRenderOffPath(SoGLRenderAction *action); 00238 virtual void GLRenderBelowPath(SoGLRenderAction*); 00239 00240 private: 00241 00243 static void initClass(); 00244 00246 static void exitClass(); 00247 00248 private: 00249 00251 virtual ~SoVertexAttribFeedback(); 00252 00253 private: 00254 00255 void commonConstructor(); 00256 }; 00257 00258 #endif // SO_VERTEXATTRIBFEEDBACK_H 00259 00260 00261