Tech debt: replace the remaining OpenGL constants with our own (drop GL/glcorearb.h and the glext package) #620

Closed
opened 2026-10-10 01:58:52 +00:00 by sky_line · 2 comments
Owner

The OpenGL renderer is gone, but GL/glcorearb.h (from the glext package, via indra/llrender/llglheaders.h) still supplies ~40 constants and the GLenum / GLuint types, used purely as data:

  • Media plugin protocol: CEF / VLC / GStreamer plugins describe their pixel format with GL enums as message values (media_plugin_cef.cpp:737, media_plugin_libvlc.cpp:562, media_plugin_gstreamer10.cpp:826).
  • Texture / image format codes in LL's texture layer (GL_RGB, GL_ALPHA, GL_LUMINANCE(_ALPHA), GL_SRGB(_ALPHA), S3TC DXT1/3/5, ...), including raw 0x1906 /*GL_ALPHA*/ in llrendervkbackend.cpp.
  • Render-state API leftovers: GL_TRUE / GL_FALSE, GL_LEQUAL / GL_GREATER / GL_LESS, GL_CULL_FACE, GL_BLEND, GL_QUAD, ... in LLRender calls that the Vulkan backend translates.

Do

Replace them with our own constants and names (no GL_ / GL type names anywhere, so GL and Vulkan are never confused): e.g. an LLPixelFormat / LLTexFormat enum for image and plugin formats, an LLDepthFunc / blend / cull enum (or plain bool) for state, and true/false for GL_TRUE/GL_FALSE. The media plugin message values must keep the same numbers (wire format between the viewer and plugin processes), or the protocol changes together on both sides. Then drop llglheaders.h's include, the glext package (autobuild.xml + regenerated 3p_manifest.json) and its cmake references.

The OpenGL renderer is gone, but `GL/glcorearb.h` (from the `glext` package, via `indra/llrender/llglheaders.h`) still supplies ~40 constants and the GLenum / GLuint types, used purely as data: - **Media plugin protocol:** CEF / VLC / GStreamer plugins describe their pixel format with GL enums as message values (`media_plugin_cef.cpp:737`, `media_plugin_libvlc.cpp:562`, `media_plugin_gstreamer10.cpp:826`). - **Texture / image format codes** in LL's texture layer (GL_RGB, GL_ALPHA, GL_LUMINANCE(_ALPHA), GL_SRGB(_ALPHA), S3TC DXT1/3/5, ...), including raw `0x1906 /*GL_ALPHA*/` in `llrendervkbackend.cpp`. - **Render-state API leftovers:** GL_TRUE / GL_FALSE, GL_LEQUAL / GL_GREATER / GL_LESS, GL_CULL_FACE, GL_BLEND, GL_QUAD, ... in LLRender calls that the Vulkan backend translates. ## Do Replace them with our own constants and names (no GL_ / GL type names anywhere, so GL and Vulkan are never confused): e.g. an `LLPixelFormat` / `LLTexFormat` enum for image and plugin formats, an `LLDepthFunc` / blend / cull enum (or plain bool) for state, and `true`/`false` for GL_TRUE/GL_FALSE. The media plugin message values must keep the same numbers (wire format between the viewer and plugin processes), or the protocol changes together on both sides. Then drop `llglheaders.h`'s include, the `glext` package (autobuild.xml + regenerated 3p_manifest.json) and its cmake references.
sky_line added this to the Slipstream project 2026-10-10 01:58:52 +00:00
Author
Owner

Built and pushed (5f9502cf69): remaining OpenGL constants/types replaced with our own enums. Shipped in 1.2.0. It builds and runs, but media plugins (CEF/VLC/GStreamer pixel format messages) and the texture format paths have not all been exercised, so it moves to Testing. Dropping the glext package itself is tracked under #77.

Built and pushed (5f9502cf69): remaining OpenGL constants/types replaced with our own enums. Shipped in 1.2.0. It builds and runs, but media plugins (CEF/VLC/GStreamer pixel format messages) and the texture format paths have not all been exercised, so it moves to Testing. Dropping the glext package itself is tracked under #77.
Author
Owner

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).

Shipped in a published release and tested; closing (testing-lane sweep 2026-10-11).
sky_line 2026-10-11 13:25:17 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#620
No description provided.