Loading...
Searching...
No Matches
Sampler.h
Go to the documentation of this file.
#pragma once
#include <glbinding/gl/types.h>
#include <globjects/globjects_api.h>
#include <globjects/Object.h>
namespace globjects
{
class GLOBJECTS_API Sampler : public Object
{
public:
Sampler();
static Sampler * fromId(gl::GLuint id);
virtual void accept(ObjectVisitor & visitor) override;
void bind(gl::GLuint unit) const;
static void unbind(gl::GLuint unit);
void setParameter(gl::GLenum name, gl::GLenum value);
void setParameter(gl::GLenum name, gl::GLint value);
void setParameter(gl::GLenum name, gl::GLfloat value);
gl::GLint getParameteri(gl::GLenum pname) const;
gl::GLfloat getParameterf(gl::GLenum pname) const;
virtual gl::GLenum objectType() const override;
protected:
Sampler(IDResource * resource);
virtual ~Sampler();
};
} // namespace globjects
Object.h
globjects::Object
Superclass of all wrapped OpenGL objects.
Definition Object.h:27
globjects::ObjectVisitor
Implements a Visitor Pattern to iterate over all tracked globjects objects.
Definition ObjectVisitor.h:30
globjects::Sampler
Wraps OpenGL sampler objects.
Definition Sampler.h:19
globjects::Sampler::objectType
virtual gl::GLenum objectType() const override
globjects::Sampler::accept
virtual void accept(ObjectVisitor &visitor) override
globjects::Sampler::Sampler
Sampler(IDResource *resource)
globjects::Sampler::Sampler
Sampler()
globjects::Sampler::setParameter
void setParameter(gl::GLenum name, gl::GLenum value)
globjects::Sampler::setParameter
void setParameter(gl::GLenum name, gl::GLfloat value)
globjects::Sampler::unbind
static void unbind(gl::GLuint unit)
globjects::Sampler::fromId
static Sampler * fromId(gl::GLuint id)
globjects::Sampler::getParameteri
gl::GLint getParameteri(gl::GLenum pname) const
globjects::Sampler::getParameterf
gl::GLfloat getParameterf(gl::GLenum pname) const
globjects::Sampler::bind
void bind(gl::GLuint unit) const
globjects::Sampler::setParameter
void setParameter(gl::GLenum name, gl::GLint value)
globjects::Sampler::~Sampler
virtual ~Sampler()
globjects
Contains all the classes that wrap OpenGL functionality.