Browse Source

doc: we have a helper for flextGL updates now.

pull/234/head
Vladimír Vondruš 6 years ago
parent
commit
fb3c56f945
  1. 68
      doc/developers.dox

68
doc/developers.dox

@ -563,54 +563,38 @@ in inverse --- but usually @ref developers-deprecation "deprecate first".
@section developers-gl-extensions Checklist for adding / removing GL versions and extensions @section developers-gl-extensions Checklist for adding / removing GL versions and extensions
1. Install [flextGL](https://github.com/mosra/flextgl) 1. Install [flextGL](https://github.com/mosra/flextgl)
2. Go to `src/MagnumExternal/OpenGL/GL/`: 2. Go to `src/MagnumExternal/OpenGL/`:
- Update `extensions.txt` (bump a version or add/remove extensions) - Update `GL/extensions.txt`, `GLES2/extensions.txt`,
- Run @cb{.sh} .../flextGLgen.py -D . -t . extensions.txt @ce to generate `GLES2/Emscripten/extensions.txt`, `GLES3/extensions.txt`,
`flextGL.h`, `flextGL.cpp` and `flextGLPlatform.cpp` files `GLES3/Emscripten/extensions.txt` (bump versions or add/remove
3. Go to `src/MagnumExternal/OpenGL/GLES2/`:
- Update `extensions.txt` and `Emscripten/extensions.txt` (add/remove
extensions) extensions)
- Run @cb{.sh} .../flextGLgen.py -D . -t . extensions.txt @ce to generate - Run `./update-flextgl.sh` to update everything. Reason there is so many
`flextGL.h`, `flextGL.cpp`, `flextGLPlatform.cpp`, variants of the files are the following:
`flextGLWindowsDesktop.h`, `flextGLWindowsDesktop.cpp`, - Desktop GLES on Windows still links to the ancient `opengl32.dll`
`flextGLPlatformWindowsDesktop.cpp` and `flextGLPlatformIOS.cpp` files. which exports only OpenGL 1.1 symbols, so we have a special set of
Desktop GLES on Windows still links to the ancient `opengl32.dll` headers that queries pointers for everything above OpenGL 1.1
which exports only OpenGL 1.1 symbols, so we have a special set of (instead of everything above OpenGL ES 2.0).
headers that queries pointers for everything above OpenGL 1.1 (instead - iOS, on the other hand, doesn't have any extension loader mechanism
of everything above OpenGL ES 2.0). iOS, on the other hand, doesn't and all supported entrypoints are exported from the library, so we
have any extension loader mechanism and all supported entrypoints are set the function pointers to those exported symbols in case the
exported from the library, so we set the function pointers to those system GL header defines them.
exported symbols in case the system GL header defines them. - Emscripten doesn't have the ability to manually load extension
- Run @cb{.sh} .../flextGLgen.py -D . -t Emscripten/ Emscripten/extensions.txt @ce pointers, thus it has only header files.
to generate a stripped-down `flextGLEmscripten.h` file. Emscripten 3. Check @cb{.sh} git diff @ce for suspicious changes and whitespace-at-EOL
doesn't have the ability to manually load extension pointers, thus it 4. For every new added function, add an entry to `doc/opengl-mapping.dox`
has only header files. 5. For every new added limit query (various `GL_MIN_*` and `GL_MAX_*` macros
4. Go to `src/MagnumExternal/OpenGL/GLES3/`:
- Update `extensions.txt` and `Emscripten/extensions.txt` (bump a version
or add/remove extensions)
- Run @cb{.sh} .../flextGLgen.py -D . -t . extensions.txt @ce to generate
`flextGL.h`, `flextGL.cpp`, `flextGLPlatform.cpp`,
`flextGLWindowsDesktop.h`, `flextGLWindowsDesktop.cpp`,
`flextGLPlatformWindowsDesktop.cpp` and `flextGLPlatformIOS.cpp` files.
See above why there are so many.
- Run @cb{.sh} .../flextGLgen.py -D . -t Emscripten/ Emscripten/extensions.txt @ce
to generate a stripped-down `flextGLEmscripten.h` file. See above for
details.
5. Check @cb{.sh} git diff @ce for suspicious changes and whitespace-at-EOL
6. For every new added function, add an entry to `doc/opengl-mapping.dox`
7. For every new added limit query (various `GL_MIN_*` and `GL_MAX_*` macros
etc.), add an entry to the bottom of `doc/opengl-mapping.dox` etc.), add an entry to the bottom of `doc/opengl-mapping.dox`
8. Add a table listing the new version and all new extensions in it to 6. Add a table listing the new version and all new extensions in it to
`doc/opengl-support.dox` (take a list of them from the changelog in the `doc/opengl-support.dox` (take a list of them from the changelog in the
official spec PDF). Some extensions might be already present in the general official spec PDF). Some extensions might be already present in the general
extension list, move them out of there. extension list, move them out of there.
9. Add a new `requires-glXY`, `requires-glesXY` or `requires-webglXY` page 7. Add a new `requires-glXY`, `requires-glesXY` or `requires-webglXY` page
with @c \@m_footernavigation to `doc/opengl-support.dox`, mention it as a with @c \@m_footernavigation to `doc/opengl-support.dox`, mention it as a
@c \@subpage at a correct position in the list @c \@subpage at a correct position in the list
10. Add a new `requires-glXY`, `requires-glesXY` or `requires-webglXY` alias 8. Add a new `requires-glXY`, `requires-glesXY` or `requires-webglXY` alias
to `Doxyfile`, `Doxyfile-mcss` and `Doxyfile-public`, copypaste it from to `Doxyfile`, `Doxyfile-mcss` and `Doxyfile-public`, copypaste it from
existing and change the numbers existing and change the numbers
11. Add new version enum value: 9. Add new version enum value:
- to `src/Magnum/GL/Version.h` - to `src/Magnum/GL/Version.h`
- to debug output in `src/Magnum/GL/Version.cpp` - to debug output in `src/Magnum/GL/Version.cpp`
- to @ref GL::Extension::extensions() in `src/Magnum/GL/Context.cpp` - to @ref GL::Extension::extensions() in `src/Magnum/GL/Context.cpp`
@ -618,7 +602,7 @@ in inverse --- but usually @ref developers-deprecation "deprecate first".
- to specify GLSL version in `src/Magnum/GL/Shader.cpp` - to specify GLSL version in `src/Magnum/GL/Shader.cpp`
- to the list in `src/Magnum/Platform/gl-info.cpp` - to the list in `src/Magnum/Platform/gl-info.cpp`
- to the test in `src/Magnum/GL/Test/ContextTest.cpp` - to the test in `src/Magnum/GL/Test/ContextTest.cpp`
12. Add new extensions to `src/Magnum/GL/Extensions.h` 10. Add new extensions to `src/Magnum/GL/Extensions.h`
- order them by extension ID that is mentioned in every extension spec - order them by extension ID that is mentioned in every extension spec
file file
- update the numbering to stay monotonic and unique, round up start index - update the numbering to stay monotonic and unique, round up start index
@ -626,9 +610,9 @@ in inverse --- but usually @ref developers-deprecation "deprecate first".
- in case there's a lot of new extensions, @cpp Implementation::ExtensionCount @ce - in case there's a lot of new extensions, @cpp Implementation::ExtensionCount @ce
might needed to be increased might needed to be increased
- run `ContextTest` to verify everything is still okay - run `ContextTest` to verify everything is still okay
13. Update existing extensions with version in which they become core (last 11. Update existing extensions with version in which they become core (last
parameter of the `_extension()` macro) parameter of the `_extension()` macro)
14. Update extension list in `src/magnum/GL/Context.cpp` according to changes 12. Update extension list in `src/magnum/GL/Context.cpp` according to changes
in `src/Magnum/GL/Extensions.h` in `src/Magnum/GL/Extensions.h`
In order to remove GL functionality, be sure to touch all places mentioned In order to remove GL functionality, be sure to touch all places mentioned

Loading…
Cancel
Save