|
WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
|
Simple OpenGL framebuffer object wrapper for off-screen rendering. More...
#include <ViewportFBO.h>
Public Member Functions | |
| void | create (int w, int h) |
| Allocate GPU resources at the given resolution. | |
| void | resize (int w, int h) |
| Resize the FBO; destroys and recreates if dimensions changed. | |
| void | bind () const |
| Bind this FBO as the current render target. | |
| void | unbind () const |
| Unbind (revert to the default framebuffer). | |
| void | destroy () |
| Release all GPU resources. | |
Public Attributes | |
| GLuint | fbo = 0 |
| Framebuffer object handle. | |
| GLuint | colorTex = 0 |
| Colour attachment (GL_RGBA8 texture). | |
| GLuint | depthRbo = 0 |
| Depth attachment (GL_DEPTH_COMPONENT24 renderbuffer). | |
| int | width = 0 |
| Current width in pixels. | |
| int | height = 0 |
| Current height in pixels. | |
Simple OpenGL framebuffer object wrapper for off-screen rendering.
Manages the lifetime of an FBO, colour texture, and depth renderbuffer. Used by the viewport to render the 3D scene into an ImGui image.
Definition at line 9 of file ViewportFBO.h.
|
inline |
Bind this FBO as the current render target.
Definition at line 53 of file ViewportFBO.h.
|
inline |
Allocate GPU resources at the given resolution.
Definition at line 18 of file ViewportFBO.h.
|
inline |
Release all GPU resources.
Definition at line 59 of file ViewportFBO.h.
|
inline |
Resize the FBO; destroys and recreates if dimensions changed.
Definition at line 43 of file ViewportFBO.h.
|
inline |
Unbind (revert to the default framebuffer).
Definition at line 56 of file ViewportFBO.h.
| GLuint ViewportFBO::colorTex = 0 |
Colour attachment (GL_RGBA8 texture).
Definition at line 12 of file ViewportFBO.h.
| GLuint ViewportFBO::depthRbo = 0 |
Depth attachment (GL_DEPTH_COMPONENT24 renderbuffer).
Definition at line 13 of file ViewportFBO.h.
| GLuint ViewportFBO::fbo = 0 |
Framebuffer object handle.
Definition at line 11 of file ViewportFBO.h.
| int ViewportFBO::height = 0 |
Current height in pixels.
Definition at line 15 of file ViewportFBO.h.
| int ViewportFBO::width = 0 |
Current width in pixels.
Definition at line 14 of file ViewportFBO.h.