| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

Capability.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <map>
5
6 #include <glbinding/gl/types.h>
7
8 #include <globjects/globjects_api.h>
9
10
11 namespace globjects
12 {
13
14
15 class GLOBJECTS_API Capability
16 {
17 public:
18 Capability(gl::GLenum capability);
19 Capability(gl::GLenum capability, bool enabled);
20
21 gl::GLenum capability() const;
22
23 void enable();
24 void disable();
25 bool isEnabled() const;
26
27 void enable(int index);
28 void disable(int index);
29 bool isEnabled(int index) const;
30
31 void apply();
32
33 protected:
34 gl::GLenum m_capability;
35
36 bool m_enabled;
37 std::map<int, bool> m_indexEnabled;
38 };
39
40
41 } // namespace globjects
globjects::isEnabled
GLOBJECTS_API bool isEnabled(gl::GLenum capability)
globjects::Capability::m_capability
gl::GLenum m_capability
Definition: Capability.h:34
globjects::disable
GLOBJECTS_API void disable(gl::GLenum capability)
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::Capability::m_indexEnabled
std::map< int, bool > m_indexEnabled
Definition: Capability.h:37
globjects::Capability::m_enabled
bool m_enabled
Definition: Capability.h:36
globjects::Capability
Definition: Capability.h:15
globjects::enable
GLOBJECTS_API void enable(gl::GLenum capability)