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

#include <GLDepthTexture.h>

Public Member Functions

 GLDepthTexture (GLint magFilter=GL_LINEAR, GLint minFilter=GL_LINEAR, GLint wrapX=GL_CLAMP_TO_EDGE, GLint wrapY=GL_CLAMP_TO_EDGE)
 Create a depth texture with initial sampler parameters.
 ~GLDepthTexture ()
 Destroy and delete the GL texture name.
const GLuint getId () const
 Retrieve the OpenGL texture object name.
void setEmpty (uint32_t width, uint32_t height, GLDepthDataType dataType=GLDepthDataType::DEPTH24)
 Allocate empty depth storage of the requested size/format.
void setFilter (GLint magFilter, GLint minFilter)
 Update the filtering parameters on the bound texture.
Introspection
uint32_t getHeight () const
 Face height in texels.
uint32_t getWidth () const
 Face width in texels.
GLDepthDataType getType () const
 Depth storage type used for allocation.

Constructor & Destructor Documentation

◆ GLDepthTexture()

GLDepthTexture::GLDepthTexture ( GLint magFilter = GL_LINEAR,
GLint minFilter = GL_LINEAR,
GLint wrapX = GL_CLAMP_TO_EDGE,
GLint wrapY = GL_CLAMP_TO_EDGE )
inline

Create a depth texture with initial sampler parameters.

Parameters
magFilterMagnification filter (e.g., GL_LINEAR).
minFilterMinification filter (e.g., GL_LINEAR).
wrapXWrap mode for S (x) coordinate (e.g., GL_CLAMP_TO_EDGE).
wrapYWrap mode for T (y) coordinate (e.g., GL_CLAMP_TO_EDGE).
Postcondition
A texture name is generated, parameters are applied, and depth comparison is enabled (GL_COMPARE_REF_TO_TEXTURE with GL_LESS).

◆ ~GLDepthTexture()

GLDepthTexture::~GLDepthTexture ( )
inline

Destroy and delete the GL texture name.

Member Function Documentation

◆ getHeight()

uint32_t GLDepthTexture::getHeight ( ) const
inline

Face height in texels.

Here is the caller graph for this function:

◆ getId()

const GLuint GLDepthTexture::getId ( ) const
inline

Retrieve the OpenGL texture object name.

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

◆ getType()

GLDepthDataType GLDepthTexture::getType ( ) const
inline

Depth storage type used for allocation.

◆ getWidth()

uint32_t GLDepthTexture::getWidth ( ) const
inline

Face width in texels.

Here is the caller graph for this function:

◆ setEmpty()

void GLDepthTexture::setEmpty ( uint32_t width,
uint32_t height,
GLDepthDataType dataType = GLDepthDataType::DEPTH24 )
inline

Allocate empty depth storage of the requested size/format.

Parameters
widthWidth in texels.
heightHeight in texels.
dataTypeDepth format to allocate (DEPTH16/DEPTH24/DEPTH32).
Postcondition
Internal storage is defined at level 0; pixel store alignment is set to 1 for pack/unpack.

◆ setFilter()

void GLDepthTexture::setFilter ( GLint magFilter,
GLint minFilter )
inline

Update the filtering parameters on the bound texture.

Parameters
magFilterMagnification filter.
minFilterMinification filter.

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