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/SoSFVec2i32.h>
00032 #include <Inventor/nodes/SoSeparator.h>
00033
00034 class SoRenderToTargetImpl;
00035
00036
00136 class SoRenderToTarget : public SoSeparator
00137 {
00138 SO_NODE_HEADER( SoRenderToTarget );
00139
00140 public:
00141
00147 enum Attachment
00148 {
00150 COLOR0,
00151 COLOR1,
00152 COLOR2,
00153 COLOR3,
00154 COLOR4,
00155 COLOR5,
00156 COLOR6,
00157 COLOR7,
00158 COLOR8,
00159 COLOR9,
00160 COLOR10,
00161 COLOR11,
00162 COLOR12,
00163 COLOR13,
00164 COLOR14,
00165 COLOR15,
00166 DEPTH,
00167 STENCIL,
00169 LAST_ENTRY
00170 };
00171
00175 enum Mode
00176 {
00181 AUTO,
00182
00187 INTERNAL,
00188
00192 TARGET_COPY,
00193
00197 NONE
00198 };
00199
00209 SoMFEnum modes;
00210
00220 SoMFNode targets;
00221
00228 SoMFInt32 layers;
00229
00233 SoSFBool clearTargets;
00234
00243 SoSFFloat antialiasingQuality;
00244
00250 SoSFVec2i32 size;
00251
00258 SoSFBool enableFragmentsQuery;
00259
00263 SoRenderToTarget();
00264
00271 static SbBool isSupported(SoState* state = NULL);
00272
00279 int getRasterizedSamplesCount() const;
00280
00281 private:
00282
00284 static void initClass();
00285
00287 static void exitClass();
00288
00290 virtual void notify(SoNotList *list);
00291
00292 private:
00293
00295 virtual void GLRenderBelowPath(SoGLRenderAction *action);
00296
00298 virtual void GLRenderInPath(SoGLRenderAction *action);
00299
00301 virtual void GLRenderOffPath(SoGLRenderAction *action);
00302
00303 private:
00305 virtual ~SoRenderToTarget();
00306
00307 private:
00308 SoRenderToTargetImpl* m_impl;
00309 };
00310
00311 #endif // SO_RENDERTOTEXTURE_H
00312
00313
00314