00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined(SO_RENDERTOTARGET_H)
00025 #define SO_RENDERTOTARGET_H
00026
00027 #include <Inventor/fields/SoMFEnum.h>
00028 #include <Inventor/fields/SoMFNode.h>
00029 #include <Inventor/fields/SoSFBool.h>
00030 #include <Inventor/fields/SoSFFloat.h>
00031 #include <Inventor/fields/SoSFInt32.h>
00032 #include <Inventor/fields/SoSFVec2i32.h>
00033 #include <Inventor/fields/SoSFVec4f.h>
00034 #include <Inventor/nodes/SoSeparator.h>
00035 #include <Inventor/SbPImpl.h>
00036
00037 SO_PIMPL_PUBLIC_DECLARATION(SoRenderToTarget)
00038
00039
00142 class SoRenderToTarget : public SoSeparator
00143 {
00144 SO_NODE_HEADER( SoRenderToTarget );
00145 SO_PIMPL_PUBLIC_HEADER(SoRenderToTarget)
00146
00147 public:
00148
00154 enum Attachment
00155 {
00157 COLOR0,
00158 COLOR1,
00159 COLOR2,
00160 COLOR3,
00161 COLOR4,
00162 COLOR5,
00163 COLOR6,
00164 COLOR7,
00165 COLOR8,
00166 COLOR9,
00167 COLOR10,
00168 COLOR11,
00169 COLOR12,
00170 COLOR13,
00171 COLOR14,
00172 COLOR15,
00173 DEPTH,
00174 STENCIL,
00175 DEPTH_STENCIL,
00177 LAST_ENTRY
00178 };
00179
00183 enum Mode
00184 {
00189 AUTO,
00190
00195 INTERNAL,
00196
00200 TARGET_COPY,
00201
00205 NONE
00206 };
00207
00217 SoMFEnum modes;
00218
00228 SoMFNode targets;
00229
00236 SoMFInt32 layers;
00237
00241 SoSFBool clearTargets;
00242
00246 SoSFVec4f clearColorValue;
00247
00251 SoSFFloat clearDepthValue;
00252
00256 SoSFInt32 clearStencilValue;
00257
00266 SoSFFloat antialiasingQuality;
00267
00273 SoSFVec2i32 size;
00274
00281 SoSFBool enableFragmentsQuery;
00282
00286 SoRenderToTarget();
00287
00294 static SbBool isSupported(SoState* state = NULL);
00295
00302 int getRasterizedSamplesCount() const;
00303
00304 private:
00305
00307 static void initClass();
00308
00310 static void exitClass();
00311
00312 private:
00313
00315 virtual void GLRenderBelowPath(SoGLRenderAction *action);
00316
00318 virtual void GLRenderInPath(SoGLRenderAction *action);
00319
00321 virtual void GLRenderOffPath(SoGLRenderAction *action);
00322
00323 private:
00325 virtual ~SoRenderToTarget();
00326
00327 private:
00328
00329 void commonConstructor();
00330 };
00331
00332 #endif // SO_RENDERTOTEXTURE_H
00333
00334
00335