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;
305 #if defined(EXPERIMENTAL_QOPENGLWIDGET)
306 GLint myUnbindFramebuffer = -1;
314 RE_BufferBindMode myOpenMode;
320 int myDrawBuffersMask;
322 bool myPrevMultisample;
323 bool mySavedMultisample;
341 void setFormat(
RE_GPUType data_type,
int vectorsize);
342 void setResolution(
int w,
int h);
353 {
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)
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.