Framebuffer Object (FBO)
More...
#include <Framebuffer.hpp>
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
class Framebuffer< TexType, ColorCount, DepthType, UseDepth >
Framebuffer Object (FBO)
- Parameters
-
TexType | Type of the textures attached to the framebuffer. |
ColorCount | Number of Color buffers (attachments). |
- Todo:
- More initialization options!
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
Default constructor.
- Parameters
-
size | Resolution of the framebuffer (internal textures). |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
Constructor for a rectangular framebuffer.
- Parameters
-
width | X Resolution of the framebuffer (internal textures). |
height | Y Resolution of the framebuffer (internal textures). |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
void Framebuffer< TexType, ColorCount, DepthType, UseDepth >::attach |
( |
const Texture & |
tex, |
|
|
GLenum |
attachment |
|
) |
| const |
|
inline |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
void Framebuffer< TexType, ColorCount, DepthType, UseDepth >::attach |
( |
const Renderbuffer & |
buf, |
|
|
GLenum |
attachment |
|
) |
| const |
|
inline |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
Bind this framebuffer.
- Parameters
-
target | (FramebufferTarget::)Draw, Read or All |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
virtual void Framebuffer< TexType, ColorCount, DepthType, UseDepth >::cleanup |
( |
| ) |
|
|
overridevirtual |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
void Framebuffer< TexType, ColorCount, DepthType, UseDepth >::clear |
( |
| ) |
const |
Clear the framebuffer.
Equivalent to a call to clear(GLenum target) with Buffer::Color if any color buffer is attached to it, and Buffer::Depth if using depth.
- See also
- clear(GLenum target)
-
glClear
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
Clear the framebuffer.
- Parameters
-
- See also
- clear()
-
glClear
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
TexType& Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getColor |
( |
unsigned int |
i = 0 | ) |
|
|
inline |
- Parameters
-
i | Index of the color buffer. |
- Returns
- Texture attachment to ith color buffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
const TexType& Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getColor |
( |
unsigned int |
i = 0 | ) |
const |
|
inline |
- Parameters
-
i | Index of the color buffer. |
- Returns
- Texture attachment to ith color buffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
TexType& Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getDepth |
( |
| ) |
|
|
inline |
- Returns
- Texture of the Depth buffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
const DepthType& Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getDepth |
( |
| ) |
const |
|
inline |
- Returns
- Texture of the Depth buffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
size_t Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getHeight |
( |
| ) |
const |
|
inline |
- Returns
- Height of the framebuffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
size_t Framebuffer< TexType, ColorCount, DepthType, UseDepth >::getWidth |
( |
| ) |
const |
|
inline |
- Returns
- Width of the framebuffer.
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
virtual void Framebuffer< TexType, ColorCount, DepthType, UseDepth >::init |
( |
| ) |
|
|
overridevirtual |
template<typename TexType = Texture2D, unsigned int ColorCount = 1, typename DepthType = Renderbuffer, bool UseDepth = true>
Unbind any FBO currently bound to target.
(Restore default framebuffer)
- Parameters
-
The documentation for this class was generated from the following file: