| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

TransformFeedback.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <vector>
5 #include <array>
6
7 #include <glbinding/gl/types.h>
8
9 #include <globjects/globjects_api.h>
10 #include <globjects/Object.h>
11
12
13 namespace globjects
14 {
15
16
17 class Program;
18
58 class GLOBJECTS_API TransformFeedback : public Object
59 {
60 public:
61 TransformFeedback();
62
63 virtual void accept(ObjectVisitor & visitor) override;
64
65 void bind() const;
66 static void unbind();
67
68 void begin(gl::GLenum primitiveMode);
69 void pause();
70 void resume();
71 void end();
72
73 void draw(gl::GLenum primitiveMode) const;
74
75 void setVaryings(const Program * program, gl::GLsizei count, const char ** varyingNames, gl::GLenum bufferMode);
76
77 void setVaryings(const Program * program, const std::vector<std::string> & varyingNames, gl::GLenum bufferMode);
78
79 template <std::size_t Count>
80 void setVaryings(const Program * program, const std::array<std::string, Count> & varyingNames, gl::GLenum bufferMode);
81
82 static bool isTransformFeedback(gl::GLuint id);
83
84 virtual gl::GLenum objectType() const override;
85
86 protected:
87 virtual ~TransformFeedback();
88
89 void bind(gl::GLenum target) const;
90 static void unbind(gl::GLenum target);
91 };
92
93
94 } // namespace globjects
95
96
97 #include <globjects/TransformFeedback.inl>
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::Object
Superclass of all wrapped OpenGL objects.
Definition: Object.h:26
globjects::Program
Wraps an OpenGL program.
Definition: Program.h:78
globjects::TransformFeedback
Interface to use transform feedback.
Definition: TransformFeedback.h:58
globjects::ObjectVisitor
Implements a Visitor Pattern to iterate over all tracked globjects objects.
Definition: ObjectVisitor.h:29
Object.h