24 #define DTGLRENDERTEXTURE_FBO_DEBUG 0
26 #if DTGLRENDERTEXTURE_FBO_DEBUG
27 #include <tbb/atomic.h>
67 virtual bool init(
DtGlImageType colorFormat,
unsigned int minFilter,
unsigned int wrapMode);
72 virtual bool initWithExternalTexture(
unsigned int glColorTexId);
79 virtual bool initDepth(
unsigned int glDepthTexId);
82 virtual void activateForDrawingInto(
bool shouldClear =
true,
bool setViewport =
true);
86 virtual void copyFromFramebuffer(
unsigned int srcFbo,
unsigned int bufferBits);
90 virtual void copyFromTexture(
unsigned int srcTexture,
bool isDepth,
bool isArray =
false,
unsigned int srclayer = 0,
unsigned int layerCount = 1);
93 virtual void deactivateForDrawingInto();
96 virtual void setFboTextureLayer(
unsigned int layer);
99 virtual void bindColorTexture(
int unit);
102 virtual void bindDepthTexture(
int unit);
105 virtual void unbindColorTexture(
int unit);
108 virtual void unbindDepthTexture(
int unit);
111 virtual int width()
const;
114 virtual int height()
const;
117 virtual int layers()
const;
120 virtual unsigned int colorId()
const;
123 virtual unsigned int depthId()
const;
126 virtual int numSamples()
const;
129 virtual bool useMultiView()
const;
132 virtual bool usingStencil()
const;
134 virtual void setDeleteFbosOnDestruction(
bool val);
135 virtual bool deleteFbosOnDestruction(
void)
const;
142 virtual bool hasColorTexture(
void)
const;
155 virtual void initFBO(
const std::string& name);
173 #if DTGLRENDERTEXTURE_FBO_DEBUG
174 static tbb::atomic<int> theFBOCount;
DT_DLL_EXAMPLESCENEROOTPLUGIN void init(DtDe &anIG)
bool myIsFrameBufferValid
Definition: DtGlRenderToTexture.h:162
int myNumSamples
Definition: DtGlRenderToTexture.h:39
DtGlFboAndContext myFboId
Definition: DtGlRenderToTexture.h:148
bool myInitColor
Definition: DtGlRenderToTexture.h:42
A helper classes for creating a RTT target, optionally including depth buffer.
Definition: DtGlRenderToTexture.h:46
DtGlFboAndContext myMultisampleFboId
Definition: DtGlRenderToTexture.h:149
int myLayers
Definition: DtGlRenderToTexture.h:159
std::tuple< unsigned int, const void * > DtGlFboAndContext
an fbo and the context it was created in
Definition: DtGlObjects.h:19
std::string myName
Definition: DtGlRenderToTexture.h:36
Encapsulates an opengl object and the context it was created in.
std::string myName
Definition: DtGlRenderToTexture.h:169
Definition: DtGlImageType.h:30
unsigned int myMultisampleColorBuffer
Definition: DtGlRenderToTexture.h:150
bool myHasDepth
Definition: DtGlRenderToTexture.h:161
bool myDeleteFbosOnDestruction
Definition: DtGlRenderToTexture.h:153
bool myUseMultiView
Definition: DtGlRenderToTexture.h:41
int myLayers
Definition: DtGlRenderToTexture.h:40
A helper class for creating and managing OpenGL Shader programs.
DtGlImageType
Definition: DtGlImageType.h:15
Definition: DtGlRenderToTexture.h:34
bool myUseMultiView
Definition: DtGlRenderToTexture.h:163
int myWidth
Definition: DtGlRenderToTexture.h:37
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
int myNumSamples
Definition: DtGlRenderToTexture.h:171
int myWidth
Definition: DtGlRenderToTexture.h:157
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:151
int myHeight
Definition: DtGlRenderToTexture.h:38
int myHeight
Definition: DtGlRenderToTexture.h:158