SDL2 Lands Long-Sought Geometry Render API

LINUX GAMING --

While not making it for last week’s SDL 2.0.16 release, merged on Wednesday to the SDL2 development code is an “SDL_GeometryRender” interface that stems from feature requests going back nearly a decade for this graphics API independent triangle rendering API.

Going back to 2012 was a bug report about desiring the ability with SDL to be able to render polygons with an SDL-defined API. And then in 2013 was a patch about adding a SDL_RenderGeometry interface that at the time allowed geometry rendering with OpenGL / OpenGL ES (ES2).

In 2021, SDL_RenderGeometry is being introduced after a lot of work in recent months by developer Sylvain Becker to get SDL to a point where it has its own API for allowing triangles to be rendered with per-vertex colors.

This interface to render a list of triangles is then backed by either software rendering or OpenGL / OpenGL ES / OpenGL ES 2 / Direct3D 9 / Direct3D 11 / Apple Metal depending upon the platform.

This new interface has also been tested to see that it can integrate with the likes of DearImGui, Spine, Nuklear, Libroket, and Microui.

This merge request opened since March and merged yesterday contains more details on this implementation.

Dumb Otaku
Scroll to Top