Repository navigation
It's been almost exactly 9 months and 142 commits since the last release. There are several major changes and additions since then, both to PortableGL itself and to the project more broadly. I'll try to summarize them below.
PortableGL Library Changes
- Add framebuffer objects: color, depth, and stencil attachments, multiple render targets, renderbuffers, separate draw and read bindings, glBlitFramebuffer, glReadPixels, and cubemap faces. See the FBO section in the header docs. MSAA is still unsupported
- Add float textures and float render targets (R32F, RG32F, RGBA32F). GL_RGBA16F is an alias of RGBA32F
- Add mipmaps for 1D, 2D, and cubemaps, including glGenerateMipmap and trilinear filtering
- Add textureLod(), textureGrad(), and pgl_lod_* helpers when you need to pick a level yourself
- Add sRGB sampling, plus pglSetTexSRGB() and pglSetTextureSRGB() to toggle it without re-uploading
- Add GL_TEXTURE_CUBE_MAP_SEAMLESS
- Add PGL_CORE_PROFILE. Incomplete mipmapped textures sample black, and rectangle wrap is limited to the clamp modes
- Add glClearBuffer* and the named-framebuffer variants, per-draw-buffer blending, and glColorMaski. Float color attachments blend unclamped
- Watertight triangle fill. Window XY snaps to 1/256 px and shared edges use integer tests, so dense meshes don't leave holes between triangles
- Clip X/Y to a 1024 px guard band around the viewport instead of the frustum. PGL_GUARD_BAND=0 restores the old clip. Near and far are unchanged
- Assemble points, lines, and triangles in chunks before drawing. Flat line colors now follow GL_FIRST_VERTEX_CONVENTION and GL_LAST_VERTEX_CONVENTION
- pglSetBackBuffer() takes a user_owned flag. Pass true if you own the pointer so PortableGL will not free or realloc it
- PGL_MAX_VERTICES and GL_MAX_VERTEX_ATTRIBS have to be defined together or not at all, and GL_MAX_VERTEX_ATTRIBS must be at least 4
- Texture filtering is float by default. Define PGL_DOUBLE_TEX_FILTER for the old double math
- Debug messages name the API function and include file and line. The default callback prints to stderr
- Add VAO direct-state functions. The binding index has to equal the attribute index
- Add pglGetTexture(), get_glContext(), back and depth buffer getters, and pglTextureAsRenderTarget()
- Fix many bugs, including texelFetch2D(), and replace always-on invariant checks with asserts
PortableGL Project Changes
- GitHub Actions runs the regression suites on Ubuntu in debug and release (tests). The README has tests, release, and Homebrew badges. macOS and Windows jobs are in the workflow and left off until the goldens are checked on those compilers
- The default test run is 144 tests, with new cases for FBOs, mipmaps, the guard band, watertight fill, and flat lines
- Added 7 new performance tests, 6 covering texturing which was not covered before, and 1 to test the new guard band clipping.
- Add GTK3, GTK4, Qt, Wayland, and FLTK starter programs in backends/
- Vendor SDL2 for Windows, check in Premake 5 binaries for Windows and Mac (arm and x64), and add build_windows_solution.bat. Example build instructions cover Linux, Windows, and Mac
- List portablegl-rs under bindings
- Update the texturing demos for mipmap filters, and add an FFmpeg video texture demo. FFmpeg itself is not vendored
- Update stb_image and the other stb headers in use, and keep working on rsw_math/crsw_math, including swizzles
External Projects and Announcements
- LearnPortableGL, my PGL ports of the learnopengl.com tutorial code, has made
tremendous progress. With all the new features implemented in 0.101.0, I've added 37 ports from chapters 5-8, bringing it to 93/97 programs finished. The last 4 missing are all in chapter 4, 1 that uses the UBOs which are unneeded in PGL, and 3 that use the geometry shader. - Shader Workshop, built with PGL, had it's first public release in May and has had 4 major releases since then. It is currently
free to download or purchase early for a 20% discount. A lot of the framebuffer, mipmap, and float-texture work in this release was prompted by features
I wanted to add to Shader Workshop. - New Patreon to support all my work including PortableGL. Still very new but I
hope to flesh it out over time. - New mailing list for PortableGL updates. Get emails about each new release and any other major PGL news.
Probably more things that I'm forgetting but hopefully that's most of it.
As always, let me know if you run into any bugs or have any other problems or suggestions