glbinding  3.3.0.0
A C++ binding for the OpenGL API, generated using the gl.xml specification.
Loading...
Searching...
No Matches
Meta.h
Go to the documentation of this file.
1
2#pragma once
3
4
5#include <string>
6#include <utility>
7#include <vector>
8#include <set>
9#include <cstdint>
10
11#include <glbinding-aux/glbinding-aux_api.h>
12#include <glbinding-aux/glbinding-aux_features.h>
13
14#include <glbinding/gl/types.h>
16
17
18namespace glbinding
19{
20
21
22class Version;
23
24
25namespace aux
26{
27
28
33class GLBINDING_AUX_API Meta
34{
35public:
40 Meta() = delete;
41
49 static int glRevision();
50
61 static gl::GLbitfield getBitfield(const std::string & bitfield);
62
70 static std::vector<gl::GLbitfield> bitfields();
71
85 // static const std::string & getString(gl::GLenum glenum);
86
97 static gl::GLenum getEnum(const std::string & glenum);
98
106 static std::set<gl::GLenum> enums();
107
121 static const std::string & getString(const gl::GLboolean & glboolean);
122
133 static gl::GLboolean getBoolean(const std::string & boolean);
134
145 static const std::string & getString(gl::GLextension glextension);
146
157 static gl::GLextension getExtension(const std::string & extension);
158
166 static std::set<gl::GLextension> extensions();
167
181 static const std::set<gl::GLextension> extensions(const Version & version);
182
193 static const std::set<gl::GLextension> extensions(const std::string & glfunction);
194
205 static const std::set<Version> versions(const std::string & glfunction);
206
220 static const std::set<AbstractFunction *> functions(const Version & version);
221
232 static const std::set<AbstractFunction *> functions(gl::GLextension extension);
233
244 static const Version & version(gl::GLextension glextension);
245
253 static const std::set<Version> & versions();
254
265 static const std::string & getString(gl::AttribMask glbitfield);
266
277 static const std::string & getString(gl::BufferStorageMask glbitfield);
278
289 static const std::string & getString(gl::ClearBufferMask glbitfield);
290
301 static const std::string & getString(gl::ClientAttribMask glbitfield);
302
313 static const std::string & getString(gl::ContextFlagMask glbitfield);
314
325 static const std::string & getString(gl::ContextProfileMask glbitfield);
326
337 static const std::string & getString(gl::FfdMaskSGIX glbitfield);
338
349 static const std::string & getString(gl::FragmentShaderColorModMaskATI glbitfield);
350
361 static const std::string & getString(gl::FragmentShaderDestMaskATI glbitfield);
362
373 static const std::string & getString(gl::FragmentShaderDestModMaskATI glbitfield);
374
385 static const std::string & getString(gl::MapBufferAccessMask glbitfield);
386
397 static const std::string & getString(gl::MemoryBarrierMask glbitfield);
398
409 static const std::string & getString(gl::OcclusionQueryEventMaskAMD glbitfield);
410
421 static const std::string & getString(gl::PathFontStyle glbitfield);
422
433 static const std::string & getString(gl::PathMetricMask glbitfield);
434
445 static const std::string & getString(gl::PathRenderingMaskNV glbitfield);
446
457 static const std::string & getString(gl::PerformanceQueryCapsMaskINTEL glbitfield);
458
469 static const std::string & getString(gl::SyncObjectMask glbitfield);
470
481 static const std::string & getString(gl::TextureStorageMaskAMD glbitfield);
482
493 static const std::string & getString(gl::UnusedMask glbitfield);
494
505 static const std::string & getString(gl::UseProgramStageMask glbitfield);
506
517 static const std::string & getString(gl::VertexHintsMaskPGI glbitfield);
518
519
533 static const std::string & getString(gl::GLenum glenum);
534
545 static std::vector<std::string> getStrings(gl::GLenum glenum);
546
547
548private:
562 static size_t alphabeticalGroupIndex(const std::string & identifier, std::uint8_t prefixLength);
563};
564
565
566} } // namespace glbinding::aux
The Version class represents an OpenGL feature, consisting of major version and minor version,...
Definition Version.h:34
Provisioning of meta information about OpenGL extensions, functions and conversion of strings and sym...
Definition Meta.h:34
static const std::set< AbstractFunction * > functions(const Version &version)
Returns the set of functions that are required for the version.
static const std::string & getString(gl::FfdMaskSGIX glbitfield)
Convert bitfield to symbol name string representation.
static int glRevision()
Returns the revision of the parsed gl.xml file.
static const std::string & getString(gl::SyncObjectMask glbitfield)
Convert bitfield to symbol name string representation.
static const Version & version(gl::GLextension glextension)
Returns the first Version (Feature) that required the extension.
static const std::string & getString(gl::FragmentShaderDestModMaskATI glbitfield)
Convert bitfield to symbol name string representation.
static const std::set< Version > & versions()
Returns the list of all Versions (Features) known by the gl.xml.
static const std::set< gl::GLextension > extensions(const std::string &glfunction)
Returns the list of extensions that are requiring a function.
static const std::string & getString(gl::TextureStorageMaskAMD glbitfield)
Convert bitfield to symbol name string representation.
static std::set< gl::GLextension > extensions()
Returns the set of all extensions known by the gl.xml.
static const std::string & getString(gl::ClientAttribMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::MapBufferAccessMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::PathFontStyle glbitfield)
Convert bitfield to symbol name string representation.
Meta()=delete
Deleted Constructor as all functions are static.
static std::set< gl::GLenum > enums()
Returns the list of all enums known by the gl.xml.
static const std::string & getString(gl::PathRenderingMaskNV glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::AttribMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::ContextFlagMask glbitfield)
Convert bitfield to symbol name string representation.
static gl::GLenum getEnum(const std::string &glenum)
Converts a GLenum to a string.
static const std::set< Version > versions(const std::string &glfunction)
Returns the list of features that are requiring a function.
static gl::GLboolean getBoolean(const std::string &boolean)
Converts a string to a GLboolean symbol.
static const std::string & getString(gl::PerformanceQueryCapsMaskINTEL glbitfield)
Convert bitfield to symbol name string representation.
static gl::GLbitfield getBitfield(const std::string &bitfield)
Converts a string into a bitfield symbol.
static const std::string & getString(gl::MemoryBarrierMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::set< AbstractFunction * > functions(gl::GLextension extension)
Returns the set of functions that are required for the extension.
static const std::string & getString(const gl::GLboolean &glboolean)
Converts a GLboolean to a string.
static const std::string & getString(gl::GLextension glextension)
Converts a GLextension to its string representation.
static const std::string & getString(gl::FragmentShaderColorModMaskATI glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::FragmentShaderDestMaskATI glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::ContextProfileMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::GLenum glenum)
Convert enum to symbol name string representation.
static const std::string & getString(gl::ClearBufferMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::set< gl::GLextension > extensions(const Version &version)
Returns the set of extensions that are required for by the given version.
static const std::string & getString(gl::UseProgramStageMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::OcclusionQueryEventMaskAMD glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::UnusedMask glbitfield)
Convert bitfield to symbol name string representation.
static std::vector< std::string > getStrings(gl::GLenum glenum)
Convert enum to symbol name string representation.
static const std::string & getString(gl::BufferStorageMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::PathMetricMask glbitfield)
Convert bitfield to symbol name string representation.
static const std::string & getString(gl::VertexHintsMaskPGI glbitfield)
Convert bitfield to symbol name string representation.
static gl::GLextension getExtension(const std::string &extension)
Converts a string to an GLextension.
static std::vector< gl::GLbitfield > bitfields()
Returns the list of all bitfields known by the gl.xml.
Contains all the classes of glbinding.