1 #include <GLviewer/OffscreenRendering.hh>
2 #include <OpenGLFramework/Base/glfScreen.hh>
4 #ifdef BIAS_HAVE_CLASS_OFFSCREENRENDERING
22 depthBuffer_.Create(GL_DEPTH_COMPONENT24, imgWidth, imgHeight);
23 colorBuffer_.Create(GL_RGBA8, imgWidth, imgHeight);
26 fbo_.AttachRenderbuffer(depthBuffer_, GL_DEPTH_ATTACHMENT_EXT);
27 fbo_.AttachRenderbuffer(colorBuffer_, GL_COLOR_ATTACHMENT0_EXT);
29 fbo_.ClearDepthBuffer();
30 fbo_.ClearColorBuffer();
52 BIASWARN(
"OffscreenRendering has no valid framebuffer object, not initialised, returning NULL");
bool IsInitialized() const
int Init(int imgWidth, int imgHeight)
Exception class used for run-time errors in the OpenGLFramework.
const std::string & GetMessageString() const
Returns the description of the error including the file name and line number where the error occured...
static glfScreen & GetInstance()
Returns the global screen instance.
virtual void Bind() const
Makes this render target the currently used render target.
BIAS::glfFramebufferObject * GetFBO()