8#ifndef META_OCEAN_PLATFORM_GL_TEXTURE_FRAMEBUFFER_H
9#define META_OCEAN_PLATFORM_GL_TEXTURE_FRAMEBUFFER_H
46 inline unsigned int samples()
const;
80 bool bindToProgram(
const GLuint programId,
const std::string& attributeName,
const unsigned int index = 0u);
98 explicit inline operator bool()
const;
122inline TextureFramebuffer::operator bool()
const
Context & context()
Returns the associated context of this object.
Definition ContextAssociated.h:87
This class encapsulates an OpenGL context.
Definition platform/gl/Context.h:29
TextureFramebuffer()=default
Creates a new framebuffer object.
bool release()
Releases this framebuffer.
virtual bool resize(const unsigned int width, const unsigned int height, const GLenum internalFormat=GL_RGBA)
Resizes the off-screen framebuffer.
GLuint textureId() const
Returns the id of the texture of this framebuffer.
Definition platform/gl/TextureFramebuffer.h:117
unsigned int samples() const
Returns the number of samples.
Definition platform/gl/TextureFramebuffer.h:112
unsigned int samples_
The number of samples.
Definition platform/gl/TextureFramebuffer.h:109
virtual bool unbind()
Unbinds the framebuffer as target framebuffer.
bool setSamples(const unsigned int samples)
(Re-)sets the number of samples of this texture framebuffer.
GLuint objectId_
The id of the framebuffer object.
Definition platform/gl/TextureFramebuffer.h:103
virtual bool bind()
Binds the framebuffer as target framebuffer.
TextureFramebuffer(Context &context)
Creates a new framebuffer object with know associated context.
bool bindToProgram(const GLuint programId, const std::string &attributeName, const unsigned int index=0u)
Bind this texture to a given shader program.
GLuint textureId_
The id of the texture.
Definition platform/gl/TextureFramebuffer.h:106
The namespace covering the entire Ocean framework.
Definition Accessor.h:15