OpenGL and OpenGL ES Reference Pages

repository·main·Indexed 19 days ago

https://github.com/khronosgroup/opengl-refpages

Source files and generated documentation for OpenGL and OpenGL ES reference pages. Includes Docbook-based source material and XHTML for OpenGL ES 1.1, 3.0, 3.1, and 3.2, covering API entry points for buffer management, shader and program control, texture operations, and GLSL built-in functions and variables. Also provides access to OpenGL 2.1 man page XML sources.

Tokens
15.1K
Snippets
12
Records
38
Agent score
67%

What's inside opengl-refpages

  1. Understand the OpenGL-Refpages directory structure

    main

    The repository contains separate reference page sets for different versions of OpenGL and OpenGL ES. You can find documentation for the following APIs in their respective directories:

    • es1.1: OpenGL ES 1.1 (fixed function)
    • es2.0: OpenGL ES 2.0
    • es3.0: OpenGL ES 3.0
    • es3.1: OpenGL ES 3.1
    • es3: OpenGL ES 3.x (tracks the latest ES version, currently 3.2)
    • gl2.1: OpenGL 2.1 (including fixed functionality)
    • gl4: OpenGL 4.x (tracks the latest GL version, currently 4.6)
  2. Obtain the OpenGL 2.1 man page XML sources

    main

    The OpenGL man pages are available as Docbook XML sources via the Khronos Subversion server. You can perform an anonymous, read-only checkout to obtain the source files, generated XHTML+MathML files, and supporting build/XSL infrastructure.

    Prerequisites: To successfully use or build these files, you should have a working knowledge of:

    • Subversion (SVN)
    • Docbook
    • XML
    • XSLT
    • Linux package management (if on Linux)

    Note that significant Docbook, XML, and XSL infrastructure may need to be installed on your system before you can work with these sources.

    svn co --username anonymous --password anonymous https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man/ man
  3. Build the OpenGL reference pages

    main

    The reference pages are built using Docbook 4 and 5 toolchains (DTDs, XSL, etc.) and GNU Make. Requirements vary by operating system.

    Debian / Ubuntu / WSL

    Install the following packages:

    • xsltproc (or libxslt)
    • docbook-xsl and docbook-xsl-ns (or docbook-style-xsl)
    • w3-dtd-mathml
    • docbook-mathml (or manually install the Docbook MathML Module 1.1 into your local XML catalog)
    • make (GNU Make)

    Note on Performance: If processing is extremely slow, your XML catalog might not be resolving stylesheet URIs locally. You can verify this by running xsltproc commands with the --nonet argument.

    macOS

    • Install docbook and docbook-xls via Homebrew.
    • Ensure xsltproc is installed (you may need xcode-tools).
    • To view equations correctly, copy the Docbook MathML module into the subdirectories for the specific OpenGL versions.

    Cygwin

    Building is possible, but specific package names and instructions are not currently provided.

  4. Access OpenGL and OpenGL ES Reference Pages

    main

    The OpenGL-Refpages repository provides complete descriptions of API commands and shading language functions for various versions of OpenGL and OpenGL ES.

    Current API Versions

    • OpenGL ES 3.2 and OpenGL ES Shading Language 3.20
    • OpenGL 4.6 and OpenGL Shading Language 4.60

    Older API Versions

    Note that current version reference pages include version support information for older versions (e.g., OpenGL 3.x). However, the following older pages are still available:

    • OpenGL ES 3.1 and OpenGL ES Shading Language 3.10
    • OpenGL ES 3.0 and OpenGL ES Shading Language 3.00
    • OpenGL ES 2.0
    • OpenGL ES 1.1
    • OpenGL 2.1 (Includes GLX, GLU, and fixed-function GL compatibility profile APIs)
  5. Explore OpenGL ES 3.0 API Entry Points

    main

    The OpenGL ES 3.0 API provides a set of entry points for controlling the graphics pipeline, managing buffers, textures, shaders, and programs. The API is organized alphabetically. Key functional areas include:

    • Buffer and Memory Management: Functions like glBindBuffer, glBufferData, and glMapBufferRange for managing data in GPU memory.
    • Shader and Program Management: Functions like glCreateShader, glCompileShader, glAttachShader, and glLinkProgram for the programmable pipeline.
    • Texture and Sampler Control: Functions like glBindTexture, glTexImage2D, and glGenSamplers for handling image data.
    • Rendering State and Commands: Functions like glEnable, glDisable, glViewport, and glDrawArrays to control the rendering state and execute draw calls.
    • Query and Sync: Functions like glBeginQuery and glFenceSync for synchronization and performance monitoring.
    • Data Retrieval: Functions like glGetError, glGetIntegerv, and glGetBufferParameteriv to inspect the current state.
  6. Browse OpenGL ES 3.2 API Entry Points

    main
    The OpenGL ES 3.2 reference documentation provides an alphabetical index of API entry points (functions). Developers can use this index to locate specific commands for buffer management, shader manipulation, texture operations, and state configuration. Each entry links to a detailed reference page describing the function's parameters, return values, and side effects.
  7. Query OpenGL 4 API functions by category

    main

    The OpenGL 4 documentation index provides a categorized list of API functions. Developers can navigate through functional groups such as:

    • Buffer and Memory Management: Functions like glMapBuffer, glMemoryBarrier, and glNamedBufferData.
    • Framebuffer and Renderbuffer Operations: Including glNamedFramebufferDrawBuffer and glNamedRenderbufferStorage.
    • Shader and Program Management: Including glLinkProgram, glProgramUniform, and glShaderSource.
    • Texture Operations: Including glTexImage2D, glTexStorage2D, and glTextureView.
    • Vertex Attribute Configuration: Including glVertexAttribPointer, glVertexAttribFormat, and glVertexArrayVertexBuffer.
    • State and Parameter Control: Including glPointSize, glPolygonMode, and glPixelStorei.
    • Viewport and Scissor Tests: Including glViewport, glScissor, and glViewportIndexed.

    Each function link leads to a detailed reference page describing its parameters, return values, and usage requirements.

  8. Browse OpenGL ES 3.1 API Entry Points

    main

    The OpenGL ES 3.1 reference pages provide a comprehensive index of the API functions available in version 3.1. The index is organized alphabetically to help developers locate specific commands for buffer management, shader operations, texture manipulation, and vertex attribute configuration.

    Key functional groups available in the index include:

    • Buffer & Memory Management: Commands like glBindBuffer, glBufferData, and glMapBufferRange.
    • Shader & Program Control: Commands like glCreateShader, glLinkProgram, and glUseProgram.
    • Texture Operations: Commands like glTexImage2D, glTexParameter, and glGenerateMipmap.
    • Vertex Attributes: Commands like glVertexAttribPointer, glEnableVertexAttribArray, and glBindVertexArray.
    • State & Query: Commands like glEnable, glDisable, and various glGet* functions for querying state and errors.
  9. Access the OpenGL 4.x Reference Index

    main
    The OpenGL 4.x Reference Pages index provides a comprehensive alphabetical listing of API entry points, including functions for buffer management, texture manipulation, shader compilation, and state querying. Users can navigate through the index to find specific function documentation, which is organized by the first letter of the function name.
  10. Explore GLSL Functions in OpenGL ES 3.0

    main

    GLSL (OpenGL Shading Language) provides a wide range of built-in functions for use within shaders. These functions are categorized by their mathematical or logical purpose:

    • Mathematical Functions: Includes trigonometric (sin, cos, acos), exponential (exp, pow), and power/root functions (sqrt, inversesqrt).
    • Vector and Matrix Operations: Functions for manipulating vectors and matrices, such as dot, cross, normalize, length, distance, matrixCompMult, and outerProduct.
    • Comparison and Logic: Functions like equal, notEqual, lessThan, greaterThan, any, and all for conditional logic.
    • Rounding and Clamping: Functions like ceil, floor, fract, round, and clamp for numerical manipulation.
    • Built-in Variables (GLSL Built-ins): Special variables available in shaders such as gl_Position, gl_FragCoord, gl_VertexID, and gl_InstanceID.