22 #define DTGLRENDERTEXTURE_FBO_DEBUG 0
24 #if DTGLRENDERTEXTURE_FBO_DEBUG
25 #include <tbb/atomic.h>
73 virtual bool init(
unsigned int glColorTexId);
80 virtual bool initDepth(
unsigned int glDepthTexId);
83 virtual void activateForDrawingInto(
bool shouldClear =
true,
bool setViewport =
true);
87 virtual void copyFromFramebuffer(
unsigned int srcFbo,
unsigned int bufferBits);
91 virtual void copyFromTexture(
unsigned int srcTexture,
bool isDepth,
bool isArray =
false,
unsigned int srclayer = 0,
unsigned int layerCount = 1);
94 virtual void deactivateForDrawingInto();
97 virtual void setFboTextureLayer(
unsigned int layer);
100 virtual void bindColorTexture(
int unit);
103 virtual void bindDepthTexture(
int unit);
106 virtual void unbindColorTexture(
int unit);
109 virtual void unbindDepthTexture(
int unit);
112 virtual int width()
const;
115 virtual int height()
const;
118 virtual int layers()
const;
121 virtual unsigned int colorId()
const;
124 virtual unsigned int depthId()
const;
127 virtual int numSamples()
const;
130 virtual bool useMultiView()
const;
133 virtual bool usingStencil()
const;
135 virtual void setDeleteFbosOnDestruction(
bool val);
136 virtual bool deleteFbosOnDestruction(
void)
const;
143 virtual bool hasColorTexture(
void)
const;
156 virtual void initFBO(
const std::string& name);
176 #if DTGLRENDERTEXTURE_FBO_DEBUG
177 static tbb::atomic<int> theFBOCount;
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
bool myIsFrameBufferValid
Definition: DtGlRenderToTexture.h:165
int myNumSamples
Definition: DtGlRenderToTexture.h:40
DtGlFboAndContext myFboId
Definition: DtGlRenderToTexture.h:149
bool myInitColor
Definition: DtGlRenderToTexture.h:43
A helper classes for creating a RTT target, optionally including depth buffer.
Definition: DtGlRenderToTexture.h:47
DtGlFboAndContext myMultisampleFboId
Definition: DtGlRenderToTexture.h:150
int myLayers
Definition: DtGlRenderToTexture.h:162
std::string myName
Definition: DtGlRenderToTexture.h:37
std::string myName
Definition: DtGlRenderToTexture.h:172
Definition: DtGlImageType.h:28
unsigned int myMultisampleColorBuffer
Definition: DtGlRenderToTexture.h:151
bool myHasDepth
Definition: DtGlRenderToTexture.h:164
bool myDeleteFbosOnDestruction
Definition: DtGlRenderToTexture.h:154
bool myUseMultiView
Definition: DtGlRenderToTexture.h:42
int myLayers
Definition: DtGlRenderToTexture.h:41
A helper class for creating and managing OpenGL Shader programs.
DtGlImageType
Definition: DtGlImageType.h:15
Definition: DtGlImageType.h:20
std::tuple< unsigned int, void * > DtGlFboAndContext
Definition: DtGlRenderToTexture.h:30
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
Definition: DtGlRenderToTexture.h:35
bool myUseMultiView
Definition: DtGlRenderToTexture.h:166
int myWidth
Definition: DtGlRenderToTexture.h:38
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
int myNumSamples
Definition: DtGlRenderToTexture.h:174
int myWidth
Definition: DtGlRenderToTexture.h:160
enum representing an OpenGL image type
A helper classes for creating a RTT target, optionally including depth buffer.
Definition: DtGlTexture.h:20
unsigned int myMultisampleDepthBuffer
Definition: DtGlRenderToTexture.h:152
int myHeight
Definition: DtGlRenderToTexture.h:39
int myHeight
Definition: DtGlRenderToTexture.h:161