![]() |
TGX 1.1.1
A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.
|
The library is cross-platform: it can be used on a CPU or on an embedded platform together with PlatformIO or the Arduino framework.
It is written in pure C++ and all the sources are located in the /src subdirectory. This source folder contains both the header files (.h) and the implementation files (.cpp, .inl).
The library has no external dependency.
With the Arduino IDE.
Install the library directly from within the library manager of the IDE: [Sketch] > [Include Library] > [Manage Libraries] and then search for tgx and install the latest version.
With PlatformIO.
Install the library directly from within VSCode/PlatformIO: [PIO Home] > [libraries] then search for tgx , select it and press [add to Project].
There are two options:
\src directory directly into the target project directory..cpp files to be compiled together with the project's source files.Building a library file.
Alternatively, it is possible to build a standalone library file. A CMake configuration CMakeLists.txt is provided at the root of the library:
mkdir buildcd buildcmake ..make to build the library. TGX can now be added to any project by appending TGX's /src subdirectory to the project's include path and adding the library to the linker.TGX also provides optional desktop tools to create and inspect generated TGX assets: images, meshes and fonts. These tools are not needed to compile a sketch that already contains its assets, but they are useful when preparing new models, textures or fonts.
The tools use Python. Mesh conversion also builds small native helpers, so it requires CMake and a C++ compiler on the development computer. After installing TGX, run:
See TGX tools for the complete setup and usage overview.