Package: opengl-registry
opengl-registryopengl-registry Documentationopengl-registry on PyPIopengl-registry on GithubA tool for extracting information from the OpenGL API Registry.The registry is currently located on github in the KhronosGroup organization:https://raw.githubusercontent.com/KhronosGroup/OpenGL-Registry/master/xml/gl.xmlSetting Up From SourceClone the repo and enter the project directory.
We assume the user will set up a virtualenv.pip install -e .This will install the package in editable mode
meaning you can keep changing the source without
having to install it for every change.If you actually want to install the package and have
no desire to modify its contents:pip install .Running TestsWe usetoxfor running tests covering py3.4, py3.6 and py3.7 with flake9 and coverage.pipinstall-rtests/requirements.txt# All environmentstox# Specific environmentstox-epy36
tox-epy37
tox-epy38
tox-epy39
tox-epep8Building Docspipinstall-rdocs/requirements.txt
pythonsetup.pybuild_sphinxRegistry InfoThe registry is simply a huge xml file usually namedgl.xmlcontaining
information about enums and functions. These are then referenced in
features (opengl/es versions) and extensions. This also includes
required and removed enums and functions as the versions progress.<registry><!-- GL type definitions. --><types><type>typedefunsignedint<name>GLenum</name>;</type><type>typedefunsignedchar<name>GLboolean</name>;</type>...</types><!-- An attempt to group enums together (not critical information) --><groups><groupname="CullFaceMode"><enumname="GL_BACK"/><enumname="GL_FRONT"/><enumname="GL_FRONT_AND_BACK"/></group>...</groups><!-- Multiple enums blocks with the enum names and values. Can point to a group --><enumsnamespace="GL"group="ContextProfileMask"type="bitmask"><enumvalue="0x00000001"name="GL_CONTEXT_CORE_PROFILE_BIT"/><enumvalue="0x00000002"name="GL_CONTEXT_COMPATIBILITY_PROFILE_BIT"/></enums>...<!-- Details information about every GL function --><commandsnamespace="GL"><command><proto>void<name>glDrawArrays</name></proto><paramgroup="PrimitiveType"><ptype>GLenum</ptype><name>mode</name></param><param><ptype>GLint</ptype><name>first</name></param><param><ptype>GLsizei</ptype><name>count</name></param><glxtype="render"opcode="193"/></command>...</command><!-- Multiple feature blocks for each opengl version.These include the required and remove sectionreferencing command names and enum names.Only including parts of GL 3.2 as it shows removal.--><featureapi="gl"name="GL_VERSION_1_1"number="1.1">...</feature><featureapi="gl"name="GL_VERSION_1_2"number="1.2">...</feature><featureapi="gl"name="GL_VERSION_1_3"number="1.3">...</feature><featureapi="gl"name="GL_VERSION_1_4"number="1.4">...</feature><featureapi="gl"name="GL_VERSION_1_5"number="1.5">...</feature><featureapi="gl"name="GL_VERSION_2_0"number="2.0">...</feature><featureapi="gl"name="GL_VERSION_2_1"number="2.1">...</feature><featureapi="gl"name="GL_VERSION_3_0"number="3.0">...</feature><featureapi="gl"name="GL_VERSION_3_1"number="3.1">...</feature><featureapi="gl"name="GL_VERSION_3_2"number="3.2"><require><enumname="GL_CONTEXT_CORE_PROFILE_BIT"/><enumname="GL_CONTEXT_COMPATIBILITY_PROFILE_BIT"/><enumname="GL_LINES_ADJACENCY"/><enumname="GL_LINE_STRIP_ADJACENCY"/>...</require><requirecomment="Reuse ARB_draw_elements_base_vertex"><commandname="glDrawElementsBaseVertex"/><commandname="glDrawRangeElementsBaseVertex"/><commandname="glDrawElementsInstancedBaseVertex"/><commandname="glMultiDrawElementsBaseVertex"/></require><removeprofile="core"comment="Compatibility-only GL 1.0 features removed from GL 3.2"><commandname="glNewList"/><commandname="glEndList"/><commandname="glCallList"/><commandname="glCallLists"/><commandname="glDeleteLists"/>...</remove><removeprofile="core"comment="Compatibility-only GL 1.1 features removed from GL 3.2"><enumname="GL_QUADS"/><enumname="GL_POLYGON"/>...</remove>...</feature><featureapi="gl"name="GL_VERSION_3_3"number="3.3">...</feature><featureapi="gl"name="GL_VERSION_4_0"number="4.0">...</feature><featureapi="gl"name="GL_VERSION_4_1"number="4.1">...</feature><featureapi="gl"name="GL_VERSION_4_2"number="4.2">...</feature><featureapi="gl"name="GL_VERSION_4_3"number="4.3">...</feature><featureapi="gl"name="GL_VERSION_4_4"number="4.4">...</feature><featureapi="gl"name="GL_VERSION_4_5"number="4.5">...</feature><featureapi="gl"name="GL_VERSION_4_6"number="4.6">...</feature><!-- There will also be feature blocks for gles --><!-- Extension definitions are similar to features.The numer of extensions gathered here is staggering,but they can be filtered on the ``supported`` fieldto make it easier to handle.--><extensions><extensionname="GL_EXT_debug_label"supported="gl|glcore|gles2"><require><enumname="GL_PROGRAM_PIPELINE_OBJECT_EXT"/><enumname="GL_PROGRAM_OBJECT_EXT"/><enumname="GL_SHADER_OBJECT_EXT"/><enumname="GL_BUFFER_OBJECT_EXT"/><enumname="GL_QUERY_OBJECT_EXT"/><enumname="GL_VERTEX_ARRAY_OBJECT_EXT"/><commandname="glLabelObjectEXT"/><commandname="glGetObjectLabelEXT"/></require><requirecomment="Depends on OpenGL ES 3.0"><enumname="GL_SAMPLER"/><enumname="GL_TRANSFORM_FEEDBACK"/></require></extension><extensionname="GL_EXT_debug_marker"supported="gl|glcore|gles1|gles2"><require><commandname="glInsertEventMarkerEXT"/><commandname="glPushGroupMarkerEXT"/><commandname="glPopGroupMarkerEXT"/></require></extension>...</extension></registry>