11 #ifndef SLGLDEPTHBUFFER_H
12 #define SLGLDEPTHBUFFER_H
23 SLenum magFilter = GL_NEAREST,
24 SLenum minFilter = GL_NEAREST,
25 SLint wrap = GL_REPEAT,
26 SLfloat borderColor[] =
nullptr,
std::vector< SLGLDepthBuffer * > SLGLVDepthBuffer
Singleton class for global render state.
void bindActive(SLuint texUnit) const
Sets the active texture unit within the shader and binds the texture.
void bindFace(SLenum face) const
Binds a specific texture face of a cube map depth buffer.
SLuint _fboID
ID of the FB object.
SLint _prevFboID
ID of the previously bound FB.
SLenum _target
GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP.
SLVec2i _dimensions
Size of the texture.
void bind()
Binds the OpenGL frame buffer object for the depth buffer.
SLuint _texID
ID of the texture.
void unbind()
Ends the usage of the depth buffer frame buffer.
SLfloat * readPixels() const
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")
Base class for all other classes.
const SLstring & name() const