hn.today

I still teach OpenGL ES 3.0

eliasfarhan.ch108 points70 comments
Screenshot of I still teach OpenGL ES 3.0

Elias Farhan argues that OpenGL ES 3.0 remains a practical choice for teaching introductory computer graphics, despite its age and the industry’s shift toward newer APIs. The course asks students to build a specific 3D scene, not a general-purpose, data-driven renderer, so it does not require the capabilities or architecture of a modern graphics API. Moving to another API would mean rewriting and updating the teaching materials, and would be worthwhile only if its benefits justified that work. OpenGL ES 3.0 also lets students run essentially the same C++ program and shaders on Windows, Linux, Android, Nintendo Switch, and WebGL 2; the web target lets them publish working demos. Its driver-managed synchronization reduces setup complexity, though that convenience brings driver overhead. The course still encounters practical issues, including Windows laptops selecting integrated graphics rather than a discrete GPU.

Students complete two or three feature samples each week, gradually building a 3D scene and shared abstractions in a class repository. Those abstractions clarify awkward OpenGL concepts: a Pipeline wraps shaders, uniform updates, cached uniform locations, and texture binding; shaders are checked at build time with glslangValidator. Buffer and VertexInput classes hide buffer allocation and vertex-array setup, while supporting instanced attributes as a workaround for OpenGL ES 3.0’s lack of shader storage buffers. A Texture class simplifies image loading and cubemaps, and Assimp handles model import. Farhan’s position is that this API’s portability and manageable complexity suit the course’s learning goals, even as students encounter its limitations and setup quirks.

Read on eliasfarhan.ch70 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Gforth 1.0

Gforth 1.0

Gforth 1.0 adds richer source literals and interpreter extensions, along with tools for browsing code, finding word uses, and inspecting stacks. It also introduces multicore tasking, message queues, C callbacks, and documented stability goals. (gforth.org)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.