| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

Sampler.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <glbinding/gl/types.h>
5
6 #include <globjects/globjects_api.h>
7 #include <globjects/Object.h>
8
9
10 namespace globjects
11 {
12
13
18 class GLOBJECTS_API Sampler : public Object
19 {
20 public:
21 Sampler();
22 static Sampler * fromId(gl::GLuint id);
23
24 virtual void accept(ObjectVisitor & visitor) override;
25
26 void bind(gl::GLuint unit) const;
27 static void unbind(gl::GLuint unit);
28
29 void setParameter(gl::GLenum name, gl::GLenum value);
30 void setParameter(gl::GLenum name, gl::GLint value);
31 void setParameter(gl::GLenum name, gl::GLfloat value);
32
33 gl::GLint getParameteri(gl::GLenum pname) const;
34 gl::GLfloat getParameterf(gl::GLenum pname) const;
35
36 virtual gl::GLenum objectType() const override;
37
38 protected:
39 Sampler(IDResource * resource);
40 virtual ~Sampler();
41 };
42
43
44 } // namespace globjects
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::Object
Superclass of all wrapped OpenGL objects.
Definition: Object.h:26
globjects::Sampler
Wraps OpenGL sampler objects.
Definition: Sampler.h:18
globjects::ObjectVisitor
Implements a Visitor Pattern to iterate over all tracked globjects objects.
Definition: ObjectVisitor.h:29
Object.h