Lines Matching defs:and
32 This document describes the Khronos OpenGL API Registry XML schema, and provides
33 some additional information about using the registry and scripts to generate
34 C header files. The underlying XML files and scripts, as well as headers
49 The registry uses an XML representation of the API and a set of Python 3
51 with an XML schema and validator. Outside users are welcome to submit pull
52 requests on github, although the XML schema itself is mature and unlikely to
55 Other APIs defined by Khronos, such as Vulkan and OpenXR, use a similar XML
60 extension loaders, and it may be desirable to construct XSLT or other
67 in a Linux command-line environment and have Python 3, the lxml Python
68 bindings, and libxml installed, you should just be able to invoke
69 \code{make} and generate C/C++ header files for all the following
73 \item \code{GL/glext.h} - OpenGL 1.2 (and later) compatibility profile
82 \item \code{GL/glxext.h} - GLX 1.3 (and later) API + extensions
88 Starting with the Makefile rules and inspecting the files \code{gl.xml},
89 \code{genheaders.py}, and \code{reg.py} will be necessary if you want to
94 environment, there are equivalent versions of Python and GNU Make, although
103 API name and profile name are required, as shown in the Makefile
104 examples. Additionally, specific versions and extensions can be required
106 the relevant interfaces and creates a C-language header file for them.
108 and core profiles, OpenGL ES 1 / 2 / 3, GLX, and WGL headers.
112 the C types and definitions in the XML to something appropriate to their
118 several objects and methods for loading registries and extracting
119 interfaces and extensions for use in header generation. There is some
121 extensive exists yet, and it's possible the Python scripts will evolve
129 containing \tag{types}, \tag{enums}, \tag{commands}, \tag{feature}, and
138 \item OpenGL and OpenGL ES - \code{gl.xml}
147 Types and enumerants can have different definitions depending on the API
149 in the OpenGL and OpenGL ES APIs, for example. Features and extensions
159 name. As used in \code{genheaders.py} and \code{gl.xml}, the API names
160 are \code{gl}, \code{gles1}, and \code{gles2}, corresponding to OpenGL,
161 OpenGL ES 1, and OpenGL ES 2/3, respectively.
185 that can be used for parameter validation and more expressive types
221 API types may have different definitions for e.g. GL ES and GL.
304 \attr{kind} attribute defined, and and the comma separated elemenst
316 some of the group annotations used for return and parameter types.
366 \attr{group} attribute defined, and that attribute matches a \tag{group}
389 \item \attr{start}, \attr{end} - integers defining the start and end of
392 enumerant allocations within a namespace, and are made by the
402 Each \tag{enums} block contains zero or more \tag{enum} and \tag{unused}
419 When processed into a C header, and assuming all these tokens were
443 between GL and GL ES).
445 specific type. Currently only \code{u} and \code{ull} are used,
446 for \code{unsigned} 32- and 64-bit integer values, respectively.
447 Separated from the \attr{value} field since this eases parsing and
448 sorting of values, and is rarely used.
476 values and is not needed for header generation.
481 \item \attr{start}, \attr{end} - integers defining the start and end of
532 \item \tag{proto} must be the first element, and is a tag defining the C
536 its name and type, as described below. If a command takes no
541 tag are optional and may be in any order:
557 and other APIs such as EGL and WGL don't use GLX at all.
564 The \tag{proto} tag defines the return type and name of a command.
580 legal C code describing the return type and name of a command. In addition
584 \item The \tag{ptype} tag is optional, and contains text which is a
585 valid type name found in \tag{type} tag, and indicates that this
587 to succeed. Builtin C types, and any derived types which are
590 \item The \tag{name} tag is required, and contains the command name
597 The \tag{param} tag defines the type and name of a parameter.
609 parameter values, and possibly current GL state as well.
623 legal C code describing the type and name of a function parameter. In
627 \item The \tag{ptype} tag is optional, and contains text which is a
628 valid type name found in \tag{type} tag, and indicates that this
630 to succeed. Builtin C types, and any derived types which are
633 \item The \tag{name} tag is required, and contains the command name
662 is the set of interfaces (enumerants and commands) defined by a
663 particular API and version, such as OpenGL 4.0 or OpenGL ES 3.0, and
686 Zero or more \tag{require} and \tag{remove} tags (see
751 similar to \tag{feature}, but instead of having \attr{version} and
760 \code{\^{}} and \code{\$} bracketing it, which should match the
771 Zero or more \tag{require} and \tag{remove} tags (see
810 \section{Required and Removed Interfaces (\tag{require} and \tag{remove} tags)}
813 A \tag{require} block defines a set of interfaces (types, enumerants and
819 the tag name and behavior, the contents of \tag{require} and
822 \subsection{Attributes of \tag{require} and \tag{remove} tags}
840 \subsection{Contents of \tag{require} and \tag{remove} tags}
851 \item \attr{comment} - arbitrary string (optional and unused).
859 \item \attr{comment} - arbitrary string (optional and unused).
870 \item \attr{comment} - arbitrary string (optional and unused).
879 \subsection{Stability of the XML Database and Schema}
882 The new registry schema, scripts, and databases are evolving in response
883 to feedback and to Khronos' own wishlist. This means the XML schema is
887 extensions and API versions, and to general cleanup, such as
888 canonicalization of the XML or sorting of \tag{command} and
897 There are lots of tools and additional tags that would make the XML format
898 more expressive and the tools more capable. Khronos is open to hosting
900 of the API and bindings to it.
906 sorts of aliases, such as commands equivalent in behavior and
911 \subsection{Type Annotations and Relationship to \code{.spec} Files}
915 and array length information from the old \code{.spec} files, which
920 \attr{group} attributes on \tag{proto} and \tag{param} tags specifying
921 that the corresponding return type belongs to a group, and \attr{len}
926 they date from SGI's OpenGL 1.1 implementation, and have not been
928 parameters which {\bf could} be given a group, and in many cases, the
930 later versions of OpenGL and OpenGL extensions. The group names are
935 in \code{enum.spec}, and \code{enumext.spec}. Many additional group
936 names were used in the annotations in \code{gl.spec}, and they
952 \code{handleARB}, \code{Int32}, and \code{sync}.
958 are retained in \tag{proto} and \tag{param} \attr{group} attributes, but
966 \code{ClampedFixed}, and \code{CoordD}.
973 \tag{proto} and \tag{param} \attr{group} attributes, but no definition
980 A few examples of such groups are \code{List} and \code{Path}.
986 \code{enum.spec} and \code{enumext.spec} are retained in \tag{proto} and
996 \code{BinormalPointerTypeEXT}, and \code{SpriteParameterNameSGIX}.
1023 pull request 428), update document title and make minor tweaks to
1024 reflect this not being the only Khronos XML API schema in use, and
1026 \item 2020-01-11 - Add \attr{group} attribute to \tag{enum} tags, and
1032 \item 2013-06-24 - Add \tag{groups} and \tag{group} tags, renamed
1033 \tag{enums} attribute \attr{class} to \attr{group}, and add
1034 parameter type annotation attributes \attr{group} and \attr{len}
1035 to both \tag{proto} and \tag{param}. Add