tgx - a tiny 2D/3D graphics library
Version 1.1.4 highlights
SHADER_TEXTURE_AFFINE) alongside the existing perspective-correct texture mapper.drawMesh() overloads for sketches that want to restrict compiled shader paths per draw call.Renderer3D template paths in flash when RAM1/ITCM is tight.Full documentation is now available at https://vindar.github.io/tgx/
This library implements a set of classes that make it easy to draw 2D and 3D graphics onto a memory framebuffer. It is designed and optimized for 32-bit MCUs, yet it is cross-platform and also works on CPUs.
The library has been tested on:
Warning: The goal of the library is to draw graphics onto a memory framebuffer. As such, it does not provide any hardware or screen support. You will need a screen driver to display the framebuffer on a physical screen. If you are using a Teensy 4.0/4.1 with an ILI9341 screen, consider using my optimized driver.
Here are the main features of the library:
RGB565, RGB24, RGB32, RGB64, RGBf, and HSV. Every 2D/3D drawing operation is available for each color type.Image class encapsulates a memory framebuffer and enables the creation of sub-images (i.e., views) that share the same buffer. This provides an elegant and efficient way to clip all drawing operations to a specific region.RGB32 and RGB64 color types include an alpha channel for alpha blending. Types without an alpha channel still support basic blending via an opacity parameter available for most drawing primitives.Vec2, Vec3, Vec4 (vectors), Mat4 (4x4 matrices), and Box2 (2D box)..obj format) into C++ files that can be directly imported into an Arduino project.Note: The recommended way to create new TGX font headers is now tools/tgx_font.py or tools/cli_tools/tgx_font_cli.py. The companion tgx-font repository remains available for older projects and as a collection of plain and anti-aliased fonts.
/examples/ subfolder of the library and demonstrate how to use most of the library's features.No open issues yet, or sync has not completed.