Vp::DepthAttachment
Depth attachment using a Renderbuffer.
#include "Viewport/framebuffer/DepthAttachment.h"
Public Functions
| Name | |
|---|---|
| DepthAttachment(bool stencil, GLsizei width, GLsizei height, bool useRenderbuffer)<br>Creates a depth buffer using a 2D texture or read-only renderbuffer. | |
| DepthAttachment(const DepthAttachment & attchmt)<br>Copy constructor // TODO: (DR)(CRIT) Update this. | |
| void | bind() const |
| void | create() |
| void | dispose() |
| void | resize(int width, int height) |
Public Attributes
| Name | |
|---|---|
| int | m_height <br>Height in pixels. |
| GLuint | m_id <br>ID of the created object (renderbuffer or texture) |
| GLint | m_magFilter |
| GLint | m_minFilter |
| bool | m_multisampled <br>Use MSAA texture. |
| unsigned int | m_samples <br>Number of MSAA samples if multisampled. |
| bool | m_stencil <br>Whether the specified depth format includes a stencil buffer. |
| bool | m_syncSize |
| GLint | m_textureWrapS |
| GLint | m_textureWrapT |
| bool | m_useRenderbuffer |
| int | m_width <br>Width in pixels. |
Public Functions Documentation
function DepthAttachment
cpp
DepthAttachment(
bool stencil,
GLsizei width,
GLsizei height,
bool useRenderbuffer
)Creates a depth buffer using a 2D texture or read-only renderbuffer.
Parameters:
- useRenderbuffer Whether to use a renderbuffer or a 2D texture for storage.
function DepthAttachment
cpp
DepthAttachment(
const DepthAttachment & attchmt
)Copy constructor // TODO: (DR)(CRIT) Update this.
function bind
cpp
void bind() constfunction create
cpp
void create()function dispose
cpp
void dispose()function resize
cpp
void resize(
int width,
int height
)Public Attributes Documentation
variable m_height
cpp
int m_height;Height in pixels.
variable m_id
cpp
GLuint m_id {0};ID of the created object (renderbuffer or texture)
variable m_magFilter
cpp
GLint m_magFilter {GL_NEAREST};variable m_minFilter
cpp
GLint m_minFilter {GL_NEAREST};variable m_multisampled
cpp
bool m_multisampled {false};Use MSAA texture.
variable m_samples
cpp
unsigned int m_samples {4};Number of MSAA samples if multisampled.
variable m_stencil
cpp
bool m_stencil;Whether the specified depth format includes a stencil buffer.
variable m_syncSize
cpp
bool m_syncSize {true};variable m_textureWrapS
cpp
GLint m_textureWrapS {GL_REPEAT};variable m_textureWrapT
cpp
GLint m_textureWrapT {GL_REPEAT};variable m_useRenderbuffer
cpp
bool m_useRenderbuffer {true};variable m_width
cpp
int m_width;Width in pixels.
Updated on 2026-09-11 at 21:24:25 +0000