Loading...
Searching...
No Matches
Gfx::CGLFramebuffer Class Reference

Implementation of CFramebuffer interface in OpenGL 3.0+. More...

`#include <src/graphics/opengl/glframebuffer.h>`

Inheritance diagram for Gfx::CGLFramebuffer:
[legend]

## Public Member Functions

| CGLFramebuffer (const FramebufferParams &params)
bool | Create () override
| Creates this framebuffer.
void | Destroy () override
| Destroys this framebuffer.
bool | IsDefault () override
| Returns true if this is default framebuffer.
int | GetWidth () override
| Returns width of buffers in this framebuffer.
int | GetHeight () override
| Returns height of buffers in this framebuffer.
int | GetDepth () override
| Returns depth size in bits.
int | GetSamples () override
| Returns number of samples or 1 if multisampling is not supported.
int | GetColorTexture () override
| Returns texture that contains color buffer or 0 if not available.
int | GetDepthTexture () override
| Returns texture that contains depth buffer or 0 if not available.
void | Bind () override
| Binds this framebuffer to context.
void | Unbind () override
| Unbinds this framebuffer from context.
void | CopyToScreen (int fromX, int fromY, int fromWidth, int fromHeight, int toX, int toY, int toWidth, int toHeight) override
| Copies content of color buffer to screen.

## Protected Attributes

FramebufferParams | m_params
int | m_width
int | m_height
int | m_depth
int | m_samples
GLuint | m_fbo
GLuint | m_colorRenderbuffer
GLuint | m_colorTexture
GLuint | m_depthRenderbuffer
GLuint | m_depthTexture

## Static Protected Attributes

static GLuint | m_currentFBO = 0

## Detailed Description

Implementation of CFramebuffer interface in OpenGL 3.0+.

Implementation of CFramebuffer interface in legacy OpenGL.

Provides the concrete implementation of core framebuffers. Can be used in OpenGL 3.0+ and with ARB_framebuffer_object supported.

Provides the concrete implementation of extension framebuffers. Can be used with EXT_framebuffer_object supported.

## Member Function Documentation

## Create()

bool Gfx::CGLFramebuffer::Create | ( |  | ) |

override virtual

Creates this framebuffer.

Implements Gfx::CFramebuffer.

## Destroy()

void Gfx::CGLFramebuffer::Destroy | ( |  | ) |

override virtual

Destroys this framebuffer.

Implements Gfx::CFramebuffer.

## IsDefault()

bool Gfx::CGLFramebuffer::IsDefault | ( |  | ) |

override virtual

Returns true if this is default framebuffer.

Implements Gfx::CFramebuffer.

## GetWidth()

int Gfx::CGLFramebuffer::GetWidth | ( |  | ) |

override virtual

Returns width of buffers in this framebuffer.

Implements Gfx::CFramebuffer.

## GetHeight()

int Gfx::CGLFramebuffer::GetHeight | ( |  | ) |

override virtual

Returns height of buffers in this framebuffer.

Implements Gfx::CFramebuffer.

## GetDepth()

int Gfx::CGLFramebuffer::GetDepth | ( |  | ) |

override virtual

Returns depth size in bits.

Implements Gfx::CFramebuffer.

## GetSamples()

int Gfx::CGLFramebuffer::GetSamples | ( |  | ) |

override virtual

Returns number of samples or 1 if multisampling is not supported.

Implements Gfx::CFramebuffer.

## GetColorTexture()

int Gfx::CGLFramebuffer::GetColorTexture | ( |  | ) |

override virtual

Returns texture that contains color buffer or 0 if not available.

Implements Gfx::CFramebuffer.

## GetDepthTexture()

int Gfx::CGLFramebuffer::GetDepthTexture | ( |  | ) |

override virtual

Returns texture that contains depth buffer or 0 if not available.

Implements Gfx::CFramebuffer.

## Bind()

void Gfx::CGLFramebuffer::Bind | ( |  | ) |

override virtual

Binds this framebuffer to context.

Implements Gfx::CFramebuffer.

## Unbind()

void Gfx::CGLFramebuffer::Unbind | ( |  | ) |

override virtual

Unbinds this framebuffer from context.

Implements Gfx::CFramebuffer.

## CopyToScreen()

void Gfx::CGLFramebuffer::CopyToScreen | ( | int | fromX,
|  | int | fromY,
|  | int | fromWidth,
|  | int | fromHeight,
|  | int | toX,
|  | int | toY,
|  | int | toWidth,
|  | int | toHeight )

override virtual

Copies content of color buffer to screen.

Implements Gfx::CFramebuffer.

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

- src/graphics/opengl/glframebuffer.h
- src/graphics/opengl/glframebuffer.cpp