29 #ifndef RE_OGLFramebuffer_h
30 #define RE_OGLFramebuffer_h
42 class re_FrameBufferAttachment;
84 const char *
getName() {
return myName.isstring()?(
const char *)myName:
""; }
132 int colorbufnum = 0);
136 int colorbufnum = 0);
139 int colorbufnum = 0);
142 int colorbufnum = 0);
149 int colorbufnum = 0);
153 bool verifyBufferAttachment(
RE_Render *r,
176 static const char *getFBOErrorMessage(
RE_FBOStatus status);
182 bool bind(
RE_Render *r,
bool for_draw =
true);
187 bool switch_only =
false,
188 bool restore_ms =
true);
196 int colorbufnum = 0,
bool initview =
true);
202 int colorbufnum = 0);
212 int colorbufnum = 0);
215 int colorbufnum = 0);
220 void drawToBuffers(
RE_Render *r,
int num,
const int *bufferlist);
239 bool readAsyncFromBuffers(
RE_Render *r,
int num,
int *bufferlist);
245 int colorbufnum = 0);
262 bool freeme =
false);
267 {
return detach( r, buffer_type, colorbufnum ,
true); }
283 RE_BufferBindMode bindmode = RE_BIND_DRAW);
289 bool initImpl(
RE_Render *r,
bool generate);
292 re_FrameBufferAttachment *attach,
296 bool hasColorBuffer()
const;
297 bool hasDepthBuffer()
const;
300 RE_BufferBindMode bindmode = RE_BIND_DRAW);
304 unsigned getGLBuffer()
const;
310 GLint myUnbindFramebuffer = -1;
318 RE_BufferBindMode myOpenMode;
324 int myDrawBuffersMask;
326 bool myPrevMultisample;
327 bool mySavedMultisample;
347 void setFormat(
RE_GPUType data_type,
int vectorsize);
348 void setResolution(
int w,
int h);
359 {
return myFormatType; }
GLenum GLuint GLenum GLsizei const GLchar * buf
bool detachAndFree(RE_Render *r, RE_BufferAttachment buffer_type=RE_COLOR_BUFFER, int colorbufnum=0)
GT_API const UT_StringHolder filename
virtual bool init(RE_Render *r)=0
GLenum GLenum GLsizei void * image
GLint GLsizei GLsizei height
void interruptDraw(RE_Render *r)
__hostdev__ void setOrigin(const T &ijk)
#define UT_NON_COPYABLE(CLASS)
Define deleted copy constructor and assignment operator inside a class.
GLuint const GLchar * name
GLuint getID() const
Raw GL ID of the FBO.
GLfloat GLfloat GLfloat GLfloat h
void resumeDraw(RE_Render *r)
RE_GPUType getFormatType() const
GLubyte GLubyte GLubyte GLubyte w
bool isActiveDraw()
Returns true if the framebuffer is being drawn to.
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.