| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

globjects.h
Go to the documentation of this file.
1
2 #pragma once
3
4 #include <string>
5 #include <array>
6 #include <set>
7
8 #include <glbinding/gl/types.h>
9
10 #include <glbinding/ContextHandle.h>
11
12 #include <globjects/globjects_api.h>
13
14 #include <globjects/AbstractUniform.h>
15 #include <globjects/Buffer.h>
16 #include <globjects/Framebuffer.h>
17 #include <globjects/DebugMessage.h>
18 #include <globjects/Program.h>
19 #include <globjects/Shader.h>
20 #include <globjects/Object.h>
21 #include <globjects/VertexArray.h>
22
23
24 namespace glbinding
25 {
26
27
28 class Version;
29
30
31 } // namespace glbinding
32
33
34 namespace globjects
35 {
36
37
38 GLOBJECTS_API void init();
39 GLOBJECTS_API void init(glbinding::ContextHandle sharedContextId);
40
46 GLOBJECTS_API void detachAllObjects();
47
48 template <typename T, typename... Args>
49 void init(T strategy, Args... args);
50
51 template <typename T, typename... Args>
52 void init(glbinding::ContextHandle sharedContextId, T strategy, Args... args);
53
54 GLOBJECTS_API void registerCurrentContext();
55 GLOBJECTS_API void registerCurrentContext(glbinding::ContextHandle sharedContextId);
56 GLOBJECTS_API void setContext(glbinding::ContextHandle contextId);
57 GLOBJECTS_API void setCurrentContext();
58
59 GLOBJECTS_API std::string getString(gl::GLenum pname);
60 GLOBJECTS_API std::string getString(gl::GLenum pname, gl::GLuint index);
61
62 GLOBJECTS_API gl::GLint getInteger(gl::GLenum pname);
63 GLOBJECTS_API gl::GLenum getEnum(gl::GLenum pname);
64 GLOBJECTS_API gl::GLfloat getFloat(gl::GLenum pname);
65 GLOBJECTS_API gl::GLdouble getDouble(gl::GLenum pname);
66 GLOBJECTS_API gl::GLboolean getBoolean(gl::GLenum pname);
67
68 GLOBJECTS_API gl::GLint getInteger(gl::GLenum pname, gl::GLuint index);
69 GLOBJECTS_API gl::GLenum getEnum(gl::GLenum pname, gl::GLuint index);
70 GLOBJECTS_API gl::GLfloat getFloat(gl::GLenum pname, gl::GLuint index);
71 GLOBJECTS_API gl::GLdouble getDouble(gl::GLenum pname, gl::GLuint index);
72 GLOBJECTS_API gl::GLboolean getBoolean(gl::GLenum pname, gl::GLuint index);
73
74 GLOBJECTS_API std::string vendor();
75 GLOBJECTS_API std::string renderer();
76 GLOBJECTS_API std::string versionString();
77 GLOBJECTS_API glbinding::Version version();
78 GLOBJECTS_API bool isCoreProfile();
79
80 template <int Count>
81 std::array<gl::GLint, Count> getIntegers(gl::GLenum pname);
82 template <int Count>
83 std::array<gl::GLenum, Count> getEnums(gl::GLenum pname);
84 template <int Count>
85 std::array<gl::GLfloat, Count> getFloats(gl::GLenum pname);
86 template <int Count>
87 std::array<gl::GLdouble, Count> getDoubles(gl::GLenum pname);
88 template <int Count>
89 std::array<gl::GLboolean, Count> getBooleans(gl::GLenum pname);
90
91 GLOBJECTS_API const std::set<gl::GLextension> & availableExtensions();
92 GLOBJECTS_API const std::set<std::string> & unknownAvailableExtensions();
93
94 GLOBJECTS_API bool hasExtension(gl::GLextension extension);
95 GLOBJECTS_API bool hasExtension(const std::string & extensionName);
96 GLOBJECTS_API bool isInCoreProfile(gl::GLextension extension, const glbinding::Version & version);
97 GLOBJECTS_API bool isInCoreProfile(gl::GLextension extension);
98
99 GLOBJECTS_API void enable(gl::GLenum capability);
100 GLOBJECTS_API void disable(gl::GLenum capability);
101 GLOBJECTS_API bool isEnabled(gl::GLenum capability);
102 GLOBJECTS_API void setEnabled(gl::GLenum capability, bool enabled);
103 GLOBJECTS_API void enable(gl::GLenum capability, int index);
104 GLOBJECTS_API void disable(gl::GLenum capability, int index);
105 GLOBJECTS_API bool isEnabled(gl::GLenum capability, int index);
106 GLOBJECTS_API void setEnabled(gl::GLenum capability, int index, bool enabled);
107
108 GLOBJECTS_API void initializeStrategy(AbstractUniform::BindlessImplementation impl);
109 GLOBJECTS_API void initializeStrategy(Buffer::BindlessImplementation impl);
110 GLOBJECTS_API void initializeStrategy(Framebuffer::BindlessImplementation impl);
111 GLOBJECTS_API void initializeStrategy(DebugMessage::Implementation impl);
112 GLOBJECTS_API void initializeStrategy(Program::BinaryImplementation impl);
113 GLOBJECTS_API void initializeStrategy(Shader::IncludeImplementation impl);
114 GLOBJECTS_API void initializeStrategy(Object::NameImplementation impl);
115 GLOBJECTS_API void initializeStrategy(VertexArray::AttributeImplementation impl);
116
117
118 } // namespace globjects
119
120
121 #include <globjects/globjects.inl>
globjects::getDouble
GLOBJECTS_API gl::GLdouble getDouble(gl::GLenum pname)
globjects::getDoubles
std::array< gl::GLdouble, Count > getDoubles(gl::GLenum pname)
glbinding
Definition: glbindinglogging.h:11
globjects::initializeStrategy
GLOBJECTS_API void initializeStrategy(AbstractUniform::BindlessImplementation impl)
globjects::Buffer::BindlessImplementation
BindlessImplementation
Definition: Buffer.h:38
globjects::getBoolean
GLOBJECTS_API gl::GLboolean getBoolean(gl::GLenum pname)
globjects::isEnabled
GLOBJECTS_API bool isEnabled(gl::GLenum capability)
globjects::setContext
GLOBJECTS_API void setContext(glbinding::ContextHandle contextId)
Shader.h
globjects::disable
GLOBJECTS_API void disable(gl::GLenum capability)
globjects::Framebuffer::BindlessImplementation
BindlessImplementation
Definition: Framebuffer.h:49
globjects::getString
GLOBJECTS_API std::string getString(gl::GLenum pname)
globjects::isCoreProfile
GLOBJECTS_API bool isCoreProfile()
DebugMessage.h
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::getFloats
std::array< gl::GLfloat, Count > getFloats(gl::GLenum pname)
globjects::setEnabled
GLOBJECTS_API void setEnabled(gl::GLenum capability, bool enabled)
globjects::versionString
GLOBJECTS_API std::string versionString()
globjects::registerCurrentContext
GLOBJECTS_API void registerCurrentContext()
globjects::isInCoreProfile
GLOBJECTS_API bool isInCoreProfile(gl::GLextension extension, const glbinding::Version &version)
globjects::getInteger
GLOBJECTS_API gl::GLint getInteger(gl::GLenum pname)
globjects::getEnum
GLOBJECTS_API gl::GLenum getEnum(gl::GLenum pname)
globjects::Program::BinaryImplementation
BinaryImplementation
Definition: Program.h:85
globjects::hasExtension
GLOBJECTS_API bool hasExtension(gl::GLextension extension)
globjects::init
GLOBJECTS_API void init()
Buffer.h
Object.h
globjects::vendor
GLOBJECTS_API std::string vendor()
globjects::AbstractUniform::BindlessImplementation
BindlessImplementation
Definition: AbstractUniform.h:39
globjects::Shader::IncludeImplementation
IncludeImplementation
Definition: Shader.h:48
globjects::getBooleans
std::array< gl::GLboolean, Count > getBooleans(gl::GLenum pname)
globjects::renderer
GLOBJECTS_API std::string renderer()
globjects::availableExtensions
GLOBJECTS_API const std::set< gl::GLextension > & availableExtensions()
globjects::DebugMessage::Implementation
Implementation
Definition: DebugMessage.h:19
AbstractUniform.h
globjects::enable
GLOBJECTS_API void enable(gl::GLenum capability)
globjects::getIntegers
std::array< gl::GLint, Count > getIntegers(gl::GLenum pname)
globjects::unknownAvailableExtensions
GLOBJECTS_API const std::set< std::string > & unknownAvailableExtensions()
Framebuffer.h
Program.h
globjects::Object::NameImplementation
NameImplementation
Definition: Object.h:31
VertexArray.h
globjects::version
GLOBJECTS_API glbinding::Version version()
globjects::setCurrentContext
GLOBJECTS_API void setCurrentContext()
globjects::VertexArray::AttributeImplementation
AttributeImplementation
Definition: VertexArray.h:25
globjects::getEnums
std::array< gl::GLenum, Count > getEnums(gl::GLenum pname)
globjects::detachAllObjects
GLOBJECTS_API void detachAllObjects()
calls detach on every registered object
globjects::getFloat
GLOBJECTS_API gl::GLfloat getFloat(gl::GLenum pname)