Carna  Version 3.3.2
Public Member Functions | Protected Member Functions | List of all members
Carna::base::Framebuffer::Binding Class Reference

Acts like MinimalBinding, but checks the bound framebuffer for validity and allows rendering. More...

#include <Framebuffer.h>

+ Inheritance diagram for Carna::base::Framebuffer::Binding:
+ Collaboration diagram for Carna::base::Framebuffer::Binding:

Public Member Functions

 Binding (Framebuffer &)
 Binds fbo as the current framebuffer. More...
 
- Public Member Functions inherited from Carna::base::Framebuffer::MinimalBinding
 MinimalBinding (Framebuffer &fbo)
 Binds fbo as the current framebuffer.
 
virtual ~MinimalBinding ()
 Retracts this binding and restores the previous one.
 
void setColorComponent (Texture< 2 > &renderTexture, unsigned int location=0)
 Attaches renderTexture as the color component at location of the bound framebuffer object. More...
 
void removeColorComponent (unsigned int location)
 Removes color component at location from bound framebuffer object. More...
 
Color readPixel (unsigned int x, unsigned int y, unsigned int location=0) const
 Reads the color of the pixel located at x and y within the color attachment at location. More...
 
const Framebufferframebuffer () const
 References the bound framebuffer.
 
virtual void refresh () const
 Re-performs this binding. This is useful if the currently bound framebuffer has been changed through a different mechanism, e.g. using OpenGL calls directly or by another API. More...
 

Protected Member Functions

virtual void refresh ()
 Re-performs the binding.
 

Additional Inherited Members

- Protected Attributes inherited from Carna::base::Framebuffer::MinimalBinding
Framebufferfbo
 References the bound framebuffer.
 

Detailed Description

Acts like MinimalBinding, but checks the bound framebuffer for validity and allows rendering.

Author
Leonid Kostrykin
Date
24.4.2011 - 25.3.2015

Definition at line 246 of file Framebuffer.h.

Constructor & Destructor Documentation

◆ Binding()

Carna::base::Framebuffer::Binding::Binding ( Framebuffer )
explicit

Binds fbo as the current framebuffer.

Exceptions
AssertionFailurethrown if the framebuffer is incomplete or its configuration is unsupported.

The documentation for this class was generated from the following file: