41 SLenum magFilter = GL_NEAREST,
42 SLenum minFilter = GL_NEAREST,
43 SLint internalFormat = GL_RGB16F,
44 SLint format = GL_FLOAT,
45 SLint wrap = GL_REPEAT);
unsigned int SLenum
analog to GLenum
unsigned int SLuint
analog to GLuint
string SLstring
Redefinition of standard types for platform independence.
Wrapper around an OpenGL framebuffer object for offscreen rendering.
SLuint texID
GL id of the colour attachment texture.
void activateAsTexture(int progId, const SLstring &samplerName, int textureUnit=0)
Binds the colour texture to a texture unit and sets the sampler uniform.
SLuint height
Height of the framebuffer in pixels.
~SLGLFbo()
Deletes the texture, the renderbuffer and the framebuffer.
SLuint fboID
GL id of the framebuffer object.
SLuint rboID
GL id of the depth renderbuffer.
SLGLFbo(SLuint w, SLuint h, SLenum magFilter=GL_NEAREST, SLenum minFilter=GL_NEAREST, SLint internalFormat=GL_RGB16F, SLint format=GL_FLOAT, SLint wrap=GL_REPEAT)
Creates the framebuffer, its colour texture and its depth renderbuffer.
SLuint width
Width of the framebuffer in pixels.