| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

UniformBlock.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <vector>
5
6 #include <globjects/globjects_api.h>
7 #include <globjects/LocationIdentity.h>
8
9
10 namespace globjects
11 {
12
13
14 class Program;
15
16 class GLOBJECTS_API UniformBlock
17 {
18 friend class Program;
19 public:
20 UniformBlock();
21 UniformBlock(const Program * program, const LocationIdentity & m_identity);
22
23 const LocationIdentity & identity() const;
24
25 void setBinding(gl::GLuint bindingIndex);
26
27 void getActive(gl::GLenum pname, gl::GLint * params) const;
28 gl::GLint getActive(gl::GLenum pname) const;
29 std::vector<gl::GLint> getActive(gl::GLenum pname, gl::GLint paramCount) const;
30
31 std::vector<gl::GLint> getActiveUniformIndices() const;
32
33 std::string getName() const;
34
35 protected:
36 const Program * m_program;
37 LocationIdentity m_identity;
38 gl::GLuint m_bindingIndex;
39
40 gl::GLuint blockIndex() const;
41 void updateBinding() const;
42 };
43
44
45 } // namespace globjects
globjects::UniformBlock::m_program
const Program * m_program
Definition: UniformBlock.h:36
globjects::UniformBlock::m_identity
LocationIdentity m_identity
Definition: UniformBlock.h:37
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::UniformBlock
Definition: UniformBlock.h:16
globjects::Program
Wraps an OpenGL program.
Definition: Program.h:78
globjects::UniformBlock::m_bindingIndex
gl::GLuint m_bindingIndex
Definition: UniformBlock.h:38
globjects::LocationIdentity
Definition: LocationIdentity.h:16
LocationIdentity.h