15bd8deadSopenharmony_ci// Copyright 2017-2021 The Khronos Group Inc.
25bd8deadSopenharmony_ci// SPDX-License-Identifier: CC-BY-4.0
35bd8deadSopenharmony_ci
45bd8deadSopenharmony_ci= OpenGL-Registry
55bd8deadSopenharmony_ci
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci== OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciThis site contains the API and Extension registries for the OpenGL family
105bd8deadSopenharmony_ciAPIs - OpenGL, OpenGL ES, and OpenGL SC. It includes API specifications;
115bd8deadSopenharmony_cispecifications of Khronos- and vendor-approved extensions; header files
125bd8deadSopenharmony_cicorresponding to the specifications; the XML API Registry defining each
135bd8deadSopenharmony_ciAPI; and related tools and scripts.
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ciIt does not contain the OpenGL and OpenGL ES Reference Pages, which are in
165bd8deadSopenharmony_cithe KhronosGroup/OpenGL-Refpages repository.
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciIf you want to add an extension specification to the Registry, correct an
195bd8deadSopenharmony_ciexisting specification, request allocation of enumerants and other
205bd8deadSopenharmony_cicontrolled resources in the OpenGL / GLX / WGL namespaces, or otherwise
215bd8deadSopenharmony_cichange the Registry, propose a pull request against the OpenGL-Registry
225bd8deadSopenharmony_cirepository and adding the appropriate extension specifications, making changes
235bd8deadSopenharmony_cito the appropriate XML file, etc. Note that any changes you propose to
245bd8deadSopenharmony_cireserved values in the registry are not official until your pull request is
255bd8deadSopenharmony_ci*accepted* into the main branch.
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciFeel free to post issues on the repository if it's unclear how to do
285bd8deadSopenharmony_cisomething you need to with extensions, or if you find any problems.
295bd8deadSopenharmony_ci
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci== Please Don't File API And GLSL Bugs Here!
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciThe OpenGL-Registry repository isn't the right place to report problems with
345bd8deadSopenharmony_cithe OpenGL and OpenGL ES API and Shading Language Specifications.
355bd8deadSopenharmony_ci
365bd8deadSopenharmony_ciFor API (both core and extension) issues, please use the issue tracker in
375bd8deadSopenharmony_cithe https://github.com/KhronosGroup/OpenGL-API repository.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ciFor Shading Language (both core and extension) issues, please use the issue
405bd8deadSopenharmony_citracker in the https://github.com/KhronosGroup/OpenGL-GLSL repository.
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciPlease tag your issues with +[OpenGL]+ or +[OpenGL ES]+ in the title, if
435bd8deadSopenharmony_cithey are specific to that API and/or Shading Language.
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ciReporting problems with the registry *itself*, including missing or badly
465bd8deadSopenharmony_ciformed extension documents, headers, or XML files, should be done using the
475bd8deadSopenharmony_ciOpenGL-Registry issue tracker.
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci
505bd8deadSopenharmony_ci=== Defining New Extensions
515bd8deadSopenharmony_ci
525bd8deadSopenharmony_ciTo create a new extension specification, take these steps:
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci* Request one or more blocks of unused enumerants for GL, GLX, or WGL
555bd8deadSopenharmony_ci  depending on the needs of your extension, by adding the reservation(s) to
565bd8deadSopenharmony_ci  the end of gl.xml, glx.xml, and/or wgl.xml.
575bd8deadSopenharmony_ci* Once the pull request modifying the XML files is accepted into main, you
585bd8deadSopenharmony_ci  have control of those enumerant blocks.
595bd8deadSopenharmony_ci* Create an extension specification, following the model of existing vendor
605bd8deadSopenharmony_ci  specifications under extensions/*vendor*/ .
615bd8deadSopenharmony_ci* Obtain whatever degree of review, implementation, and signoff you need
625bd8deadSopenharmony_ci  from affected parties before declaring the extension complete.
635bd8deadSopenharmony_ci* Add the extension specification under extensions/*vendor*/*extension* .
645bd8deadSopenharmony_ci* Modify extensions/registry.py to include the extension, using the next
655bd8deadSopenharmony_ci  free ARB, GL, and/or ES extension numbers (depending on which API the
665bd8deadSopenharmony_ci  extension is defined for). Execute the python script nextfree.py in the
675bd8deadSopenharmony_ci  extensions/ directory to find the next free numbers.
685bd8deadSopenharmony_ci* Once registry.py is updated, 'make' in extensions/ to update the PHP
695bd8deadSopenharmony_ci  include files which are used to show an index of extensions on the
705bd8deadSopenharmony_ci  registry website. This requires GNU make and Python 3.
715bd8deadSopenharmony_ci* Add the extension number(s) to the extension specification in the 'Number'
725bd8deadSopenharmony_ci  block.
735bd8deadSopenharmony_ci* Add the extension interfaces and enumerant assignments to xml/gl.xml,
745bd8deadSopenharmony_ci  glx.xml, and/or wgl.xml following existing examples. Verify that the
755bd8deadSopenharmony_ci  relevant extension headers are generated with the correct interfaces by
765bd8deadSopenharmony_ci  running 'make' in xml/. This requires the lxml Python module.
775bd8deadSopenharmony_ci* Once the pull request adding the extension specification and modifying
785bd8deadSopenharmony_ci  registry.py is accepted, your extension is registered.
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ciThere are some documents under the docs/ directory describing some of the
815bd8deadSopenharmony_ciprocesses for making extensions, but they are largely out of date. They may
825bd8deadSopenharmony_cibe updated or removed over time:
835bd8deadSopenharmony_ci
845bd8deadSopenharmony_ci* link:docs/rules.html[How to create extensions]
855bd8deadSopenharmony_ci* link:docs/enums.html[Enumerant allocation policies]
865bd8deadSopenharmony_ci* link:docs/template.txt[Extension specification template]
875bd8deadSopenharmony_ci* link:docs/promoting.html[Extension promotion guidelines]
885bd8deadSopenharmony_ci* link:docs/reserved.txt[GLX opcode registry (rarely updated)]
895bd8deadSopenharmony_ci* link:docs/syntaxrules.txt[OpenGL Syntax Rules (updated 2006/12/13)]
905bd8deadSopenharmony_ci* link:docs/GLSLExtensionRules.txt[OpenGL Shading Language Extension Conventions (updated 2006/12/18)]
915bd8deadSopenharmony_ci* link:docs/fog_coord.txt[Extension Specification Example]
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci=== Repository Contents
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci* ABI - OpenGL ABI for Linux
975bd8deadSopenharmony_ci* api - Header files for all APIs
985bd8deadSopenharmony_ci** api/ES - Headers for OpenGL ES
995bd8deadSopenharmony_ci** api/GL - Headers for OpenGL
1005bd8deadSopenharmony_ci** api/SC - Headers for OpenGL SC
1015bd8deadSopenharmony_ci** Note that the OpenGL ES and OpenGL SC headers all depend on the shared
1025bd8deadSopenharmony_ci   https://www.khronos.org/registry/EGL/api/KHR/khrplatform.h[khrplatform.h]
1035bd8deadSopenharmony_ci   This file is maintained in the http://www.khronos.org/registry/EGL/[EGL
1045bd8deadSopenharmony_ci   Registry].
1055bd8deadSopenharmony_ci* docs - Miscellaneous documentation on creating extensions, mostly out of date.
1065bd8deadSopenharmony_ci* extensions - Extension specifications for all APIs
1075bd8deadSopenharmony_ci** extensions/registry.py - combined extension registry for all APIs
1085bd8deadSopenharmony_ci** extensions/makeindex.py - create HTML extension indices from registry.py
1095bd8deadSopenharmony_ci* index_{es,gl,sc}.php - Index files for the website, linking to specifications, headers, and extensions relevant to each API
1105bd8deadSopenharmony_ci* specs - API and Shading Language Specifications for all APIs
1115bd8deadSopenharmony_ci** specs/es - OpenGL ES Specifications
1125bd8deadSopenharmony_ci** specs/gl - OpenGL Specifications
1135bd8deadSopenharmony_ci** specs/sc - OpenGL SC Specifications
1145bd8deadSopenharmony_ci* xml - XML API Registry and related tools
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci
1175bd8deadSopenharmony_ci=== There Sure Is A Lot Of Stuff In Here!
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ciYes, there sure is. The specs/ directory contains over 125 MB of PDFs,
1205bd8deadSopenharmony_ciincluding the latest specs for each version of OpenGL and OpenGL ES. While
1215bd8deadSopenharmony_cithis may be somewhat distressing to people who just want to add a single
1225bd8deadSopenharmony_ciextension, due to the repository download time, the *primary* purpose of
1235bd8deadSopenharmony_cithis repository is to be the backing store for the web registry on
1245bd8deadSopenharmony_cikhronos.org. Fortunately git is very efficient, so once you've done the
1255bd8deadSopenharmony_ciinitial repository clone, updates will be small and quick.
126