![]() |
LibCarna Version 3.4.0
|
Maintains the binding of a Framebuffer in a RAII-manner. More...
#include <Framebuffer.hpp>
Inheritance diagram for LibCarna::base::Framebuffer::MinimalBinding:
Collaboration diagram for LibCarna::base::Framebuffer::MinimalBinding:Public Member Functions | |
| 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. | |
| void | removeColorComponent (unsigned int location) |
| Removes color component at location from bound framebuffer object. | |
| 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. | |
| const Framebuffer & | framebuffer () 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. | |
Protected Attributes | |
| Framebuffer & | fbo |
| References the bound framebuffer. | |
Maintains the binding of a Framebuffer in a RAII-manner.
Bound framebuffers are not checked for validity. Allows manipulation of the bound framebuffer, but not rendering. Use a full Binding if you want to render to the framebuffer.
Definition at line 164 of file Framebuffer.hpp.
| Color LibCarna::base::Framebuffer::MinimalBinding::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.
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.
Removes color component at location from bound framebuffer object.
| void LibCarna::base::Framebuffer::MinimalBinding::setColorComponent | ( | Texture< 2 > & | renderTexture, |
| unsigned int | location = 0 |
||
| ) |
Attaches renderTexture as the color component at location of the bound framebuffer object.
If there was another color component bound to location previously, it is replaced.
|
protected |
References the bound framebuffer.
Definition at line 233 of file Framebuffer.hpp.
Written by Leonid Kostrykin © 2021–2025. Based on Carna (© 2010-2016).
Documentation generated by Doxygen