20 #define DTGLRENDERTEXTURE_FBO_DEBUG 0
22 #if DTGLRENDERTEXTURE_FBO_DEBUG
23 #include <tbb/atomic.h>
46 DtGlRenderTexture(
const std::string& name,
int width,
int height,
int samples = 0,
int layers = 1,
bool useMultiView =
false);
57 virtual bool init(
unsigned int glColorTexId);
64 virtual bool initDepth(
unsigned int glDepthTexId);
67 virtual void activateForDrawingInto(
bool shouldClear =
true,
bool setViewport =
true);
71 virtual void copyFromFramebuffer(
unsigned int srcFbo,
unsigned int bufferBits);
75 virtual void copyFromTexture(
unsigned int srcTexture,
bool isDepth,
bool isArray =
false,
unsigned int srclayer = 0,
unsigned int layerCount = 1);
78 virtual void deactivateForDrawingInto();
81 virtual void bindColorTexture(
int unit);
84 virtual void bindDepthTexture(
int unit);
87 virtual void unbindColorTexture(
int unit);
90 virtual void unbindDepthTexture(
int unit);
93 virtual int width()
const;
96 virtual int height()
const;
99 virtual int layers()
const;
102 virtual unsigned int colorId()
const;
105 virtual unsigned int depthId()
const;
108 virtual int numSamples()
const;
111 virtual bool useMultiView()
const;
114 virtual bool usingStencil()
const;
116 virtual void setDeleteFbosOnDestruction(
bool val);
117 virtual bool deleteFbosOnDestruction(
void)
const;
119 virtual unsigned int fbo(
void)
const;
120 virtual unsigned int multiSampleFbo(
void)
const;
130 virtual void initFBO(
const std::string& name);
150 #if DTGLRENDERTEXTURE_FBO_DEBUG
151 static tbb::atomic<int> theFBOCount;
DtGlTexture * myDepthTexture
Definition: DtGlRenderToTexture.h:144
bool myIsFrameBufferValid
Definition: DtGlRenderToTexture.h:139
A helper classes for creating a RTT target, optionally including depth buffer.
Definition: DtGlRenderToTexture.h:31
int myLayers
Definition: DtGlRenderToTexture.h:136
std::string myName
Definition: DtGlRenderToTexture.h:146
Definition: DtGlImageType.h:28
unsigned int myMultisampleFboId
Definition: DtGlRenderToTexture.h:124
unsigned int myMultisampleColorBuffer
Definition: DtGlRenderToTexture.h:125
bool myHasDepth
Definition: DtGlRenderToTexture.h:138
bool myDeleteFbosOnDestruction
Definition: DtGlRenderToTexture.h:128
A helper classes for creating and managing OpenGL Shader programs.
unsigned int myFboId
Definition: DtGlRenderToTexture.h:123
DtGlImageType
Definition: DtGlImageType.h:15
Definition: DtGlImageType.h:20
DtGlTexture * myColorTexture
Definition: DtGlRenderToTexture.h:142
unsigned int GLenum
Definition: DtGlTextureBufferObject.h:18
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
bool myUseMultiView
Definition: DtGlRenderToTexture.h:140
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
int myNumSamples
Definition: DtGlRenderToTexture.h:148
int myWidth
Definition: DtGlRenderToTexture.h:134
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:126
int myHeight
Definition: DtGlRenderToTexture.h:135