#include <SLGLDepthBuffer.h>
◆ SLGLDepthBuffer()
| SLGLDepthBuffer::SLGLDepthBuffer |
( |
const SLVec2i & |
dimensions, |
|
|
SLenum |
magFilter = GL_NEAREST, |
|
|
SLenum |
minFilter = GL_NEAREST, |
|
|
SLint |
wrap = GL_REPEAT, |
|
|
SLfloat |
borderColor[] = nullptr, |
|
|
SLenum |
target = GL_TEXTURE_2D, |
|
|
SLstring |
name = "SM-DepthBuffer" |
|
) |
| |
Constructor for OpenGL depth buffer framebuffer used in shadow mapping
- Parameters
-
| dimensions | 2D vector pixel dimensions |
| magFilter | OpenGL magnification filter enum |
| minFilter | OpenGL minification filter enum |
| wrap | OpenGL texture wrapping enum |
| borderColor | |
| target | OpenGL texture target enum GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP |
| name | Name of the depth buffer |
◆ ~SLGLDepthBuffer()
| SLGLDepthBuffer::~SLGLDepthBuffer |
( |
| ) |
|
◆ bind()
| void SLGLDepthBuffer::bind |
( |
| ) |
|
Binds the OpenGL frame buffer object for the depth buffer.
◆ bindActive()
| void SLGLDepthBuffer::bindActive |
( |
SLuint |
texUnit | ) |
const |
Sets the active texture unit within the shader and binds the texture.
The uniform location loc must be requested before with glUniformLocation. The texture unit value must correspond to the number that is set with glUniform1i(loc, texUnit).
- Parameters
-
| texUnit | Texture Unit value |
◆ bindFace()
| void SLGLDepthBuffer::bindFace |
( |
SLenum |
face | ) |
const |
Binds a specific texture face of a cube map depth buffer.
◆ dimensions()
| SLVec2i SLGLDepthBuffer::dimensions |
( |
| ) |
|
|
inline |
◆ readPixels()
| SLfloat * SLGLDepthBuffer::readPixels |
( |
| ) |
const |
◆ target()
| SLint SLGLDepthBuffer::target |
( |
| ) |
|
|
inline |
◆ texID()
| SLint SLGLDepthBuffer::texID |
( |
| ) |
|
|
inline |
◆ unbind()
| void SLGLDepthBuffer::unbind |
( |
| ) |
|
Ends the usage of the depth buffer frame buffer.
◆ _dimensions
| SLVec2i SLGLDepthBuffer::_dimensions |
|
private |
◆ _fboID
| SLuint SLGLDepthBuffer::_fboID |
|
private |
◆ _prevFboID
| SLint SLGLDepthBuffer::_prevFboID |
|
private |
ID of the previously bound FB.
◆ _target
| SLenum SLGLDepthBuffer::_target |
|
private |
GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP.
◆ _texID
| SLuint SLGLDepthBuffer::_texID |
|
private |
The documentation for this class was generated from the following files: