CGVIS Utils
Loading...
Searching...
No Matches
GLDepthBuffer Class Reference

#include <GLDepthBuffer.h>

Public Member Functions

 GLDepthBuffer (uint32_t width=0, uint32_t height=0)
 Construct a depth renderbuffer and allocate storage.
 ~GLDepthBuffer ()
 Destroy and delete the GL renderbuffer name.
const GLuint getId () const
 Retrieve the OpenGL renderbuffer object name.
void setSize (uint32_t width, uint32_t height)
 Reallocate storage to a new size.
Introspection
uint32_t getWidth () const
 Stored width in pixels.
uint32_t getHeight () const
 Stored height in pixels.

Constructor & Destructor Documentation

◆ GLDepthBuffer()

GLDepthBuffer::GLDepthBuffer ( uint32_t width = 0,
uint32_t height = 0 )

Construct a depth renderbuffer and allocate storage.

Parameters
widthInitial width in pixels.
heightInitial height in pixels.

Creates a GL renderbuffer name and allocates a depth component storage for the specified dimensions.

◆ ~GLDepthBuffer()

GLDepthBuffer::~GLDepthBuffer ( )

Destroy and delete the GL renderbuffer name.

Member Function Documentation

◆ getHeight()

uint32_t GLDepthBuffer::getHeight ( ) const
inline

Stored height in pixels.

◆ getId()

const GLuint GLDepthBuffer::getId ( ) const

Retrieve the OpenGL renderbuffer object name.

Returns
GLuint of the managed depth renderbuffer.
Here is the caller graph for this function:

◆ getWidth()

uint32_t GLDepthBuffer::getWidth ( ) const
inline

Stored width in pixels.

◆ setSize()

void GLDepthBuffer::setSize ( uint32_t width,
uint32_t height )

Reallocate storage to a new size.

Parameters
widthNew width in pixels.
heightNew height in pixels.

Updates internal bookkeeping and calls glRenderbufferStorage with a depth format for the new dimensions.


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