29 #ifndef RE_OGLFramebuffer_h
30 #define RE_OGLFramebuffer_h
39 class re_FrameBufferAttachment;
81 const char *
getName() {
return myName.isstring()?(
const char *)myName:
""; }
129 int colorbufnum = 0);
133 int colorbufnum = 0);
136 int colorbufnum = 0);
139 int colorbufnum = 0);
146 int colorbufnum = 0);
150 bool verifyBufferAttachment(
RE_Render *r,
173 static const char *getFBOErrorMessage(
RE_FBOStatus status);
179 bool bind(
RE_Render *r,
bool for_draw =
true);
184 bool switch_only =
false,
185 bool restore_ms =
true);
193 int colorbufnum = 0,
bool initview =
true);
199 int colorbufnum = 0);
209 int colorbufnum = 0);
212 int colorbufnum = 0);
217 void drawToBuffers(
RE_Render *r,
int num,
const int *bufferlist);
236 bool readAsyncFromBuffers(
RE_Render *r,
int num,
int *bufferlist);
242 int colorbufnum = 0);
259 bool freeme =
false);
264 {
return detach( r, buffer_type, colorbufnum ,
true); }
280 RE_BufferBindMode bindmode = RE_BIND_DRAW);
286 bool initImpl(
RE_Render *r,
bool generate);
289 re_FrameBufferAttachment *attach,
293 bool hasColorBuffer()
const;
294 bool hasDepthBuffer()
const;
297 RE_BufferBindMode bindmode = RE_BIND_DRAW);
301 unsigned getGLBuffer()
const;
311 RE_BufferBindMode myOpenMode;
317 int myDrawBuffersMask;
319 bool myPrevMultisample;
320 bool mySavedMultisample;
338 void setFormat(
RE_GPUType data_type,
int vectorsize);
339 void setResolution(
int w,
int h);
350 {
return myFormatType; }
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 GLsizei GLenum GLenum const void * image
GLuint const GLchar * name
GLubyte GLubyte GLubyte GLubyte w
void interruptDraw(RE_Render *r)
GLint GLsizei GLsizei height
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint getID() const
Raw GL ID of the FBO.
GLfloat GLfloat GLfloat GLfloat h
void resumeDraw(RE_Render *r)
RE_GPUType getFormatType() const
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.