CUGL 3.0
Cornell University Game Library
Loading...
Searching...
No Matches
Functions
cugl::graphics::stencil Namespace Reference

Functions

void clearBuffer (GLenum buffer)
 
void applyEffect (StencilEffect effect, std::shared_ptr< cugl::graphics::Shader > shader=nullptr)
 

Detailed Description

Platform independent stencil functions.

The functions in this apply a stencil affect to the given shader, wihout using direct OpenGL calls. They are designed this way as part of our ongoing transition to Vulkan.

Function Documentation

◆ applyEffect()

void cugl::graphics::stencil::applyEffect ( StencilEffect  effect,
std::shared_ptr< cugl::graphics::Shader shader = nullptr 
)

Configures the settings to apply the given effect.

Note that the shader parameter is only relevant in Vulkan, as OpenGL stencil operations are applied globally.

Parameters
effectThe stencil effect
shaderThe shader to apply the stencil operations to.

◆ clearBuffer()

void cugl::graphics::stencil::clearBuffer ( GLenum  buffer)

Clears the stencil buffer specified

Parameters
bufferThe stencil buffer (lower, upper, both)