Helper class for creating frame buffer objects and render buffer objects.
More...
#include <sgct/offscreenbuffer.h>
|
| | OffScreenBuffer (unsigned int internalFormat) |
| | ~OffScreenBuffer () |
| void | createFBO (int width, int height, int samples=1) |
| void | resizeFBO (int width, int height, int samples=1) |
| void | attachColorTexture (unsigned int texId, unsigned int attachment) const |
| void | attachDepthTexture (unsigned int texId) const |
| void | attachCubeMapTexture (unsigned int texId, unsigned int face, unsigned int attachment) const |
| void | attachCubeMapDepthTexture (unsigned int texId, unsigned int face) const |
| void | bind () const |
| | Bind framebuffer, auto-set multisampling and draw buffers.
|
| void | bind (bool isMultisampled, int n, const unsigned int *bufs) const |
| | Bind framebuffer.
|
| void | bindBlit () const |
| void | blit () const |
| bool | isMultiSampled () const |
Helper class for creating frame buffer objects and render buffer objects.
◆ OffScreenBuffer()
| sgct::OffScreenBuffer::OffScreenBuffer |
( |
unsigned int | internalFormat | ) |
|
|
explicit |
◆ ~OffScreenBuffer()
| sgct::OffScreenBuffer::~OffScreenBuffer |
( |
| ) |
|
◆ attachColorTexture()
| void sgct::OffScreenBuffer::attachColorTexture |
( |
unsigned int | texId, |
|
|
unsigned int | attachment ) const |
- Parameters
-
| texId | GL id of the texture to attach |
| attachment | The gl attachment enum in the form of GL_COLOR_ATTACHMENTi |
◆ attachCubeMapDepthTexture()
| void sgct::OffScreenBuffer::attachCubeMapDepthTexture |
( |
unsigned int | texId, |
|
|
unsigned int | face ) const |
◆ attachCubeMapTexture()
| void sgct::OffScreenBuffer::attachCubeMapTexture |
( |
unsigned int | texId, |
|
|
unsigned int | face, |
|
|
unsigned int | attachment ) const |
- Parameters
-
| texId | GL id of the texture to attach |
| face | The target cubemap face |
| attachment | The gl attachment enum in the form of GL_COLOR_ATTACHMENTi |
◆ attachDepthTexture()
| void sgct::OffScreenBuffer::attachDepthTexture |
( |
unsigned int | texId | ) |
const |
◆ bind() [1/2]
| void sgct::OffScreenBuffer::bind |
( |
| ) |
const |
Bind framebuffer, auto-set multisampling and draw buffers.
◆ bind() [2/2]
| void sgct::OffScreenBuffer::bind |
( |
bool | isMultisampled, |
|
|
int | n, |
|
|
const unsigned int * | bufs ) const |
Bind framebuffer.
- Parameters
-
| isMultisampled | true if MSAA should be used |
| n | Number of color buffers |
| bufs | Array with color buffers (GL_COLOR_ATTACHMENTn) |
◆ bindBlit()
| void sgct::OffScreenBuffer::bindBlit |
( |
| ) |
const |
◆ blit()
| void sgct::OffScreenBuffer::blit |
( |
| ) |
const |
◆ createFBO()
| void sgct::OffScreenBuffer::createFBO |
( |
int | width, |
|
|
int | height, |
|
|
int | samples = 1 ) |
◆ isMultiSampled()
| bool sgct::OffScreenBuffer::isMultiSampled |
( |
| ) |
const |
◆ resizeFBO()
| void sgct::OffScreenBuffer::resizeFBO |
( |
int | width, |
|
|
int | height, |
|
|
int | samples = 1 ) |
◆ unbind()
| void sgct::OffScreenBuffer::unbind |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: