![]() |
TGX 1.1.4
A tiny 2D/3D graphics library optimized for 32 bits microcontrollers.
|
Optional Teensy 4.x helpers for placing selected Renderer3D template instantiations in flash memory. More...
#include "tgx_config.h"Go to the source code of this file.
Macros | |
| #define | TGX_RENDERER3D_FLASH_SECTION(NAME) __attribute__((section(".flashmem.tgx.renderer3d." NAME))) |
| #define | TGX_RENDERER3D_FLASH_CAT_(A, B) A##B |
| #define | TGX_RENDERER3D_FLASH_CAT(A, B) TGX_RENDERER3D_FLASH_CAT_(A, B) |
| #define | TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH(RENDERER3D_OBJECT) TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_sphere_, __LINE__)) |
| Explicitly instantiate the solid sphere drawing path in Teensy 4.x flash. More... | |
| #define | TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH_(RENDERER3D_OBJECT, RENDERER_T) |
| #define | TGX_RENDERER3D_FLASH_SPHERE_STRIP_PATH(RENDERER3D_OBJECT) TGX_RENDERER3D_FLASH_SPHERE_STRIP_PATH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_sphere_strip_, __LINE__)) |
| #define | TGX_RENDERER3D_FLASH_SPHERE_STRIP_PATH_(RENDERER3D_OBJECT, RENDERER_T) |
| #define | TGX_PLACE_RENDERER3D_SPHERE_PATH_IN_FLASH(RENDERER3D_OBJECT) |
| #define | TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH(RENDERER3D_OBJECT) TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_cone_, __LINE__)) |
| Explicitly instantiate the cylinder/cone/truncated-cone path in Teensy 4.x flash. More... | |
| #define | TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH_(RENDERER3D_OBJECT, RENDERER_T) |
| #define | TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH(RENDERER3D_OBJECT) TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_mesh3d_, __LINE__)) |
| Explicitly instantiate the default legacy Mesh3D path in Teensy 4.x flash. More... | |
| #define | TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH_(RENDERER3D_OBJECT, RENDERER_T) |
| #define | TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH(RENDERER3D_OBJECT) TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_mesh3dv2_, __LINE__)) |
| Explicitly instantiate the default Mesh3Dv2 helper path in Teensy 4.x flash. More... | |
| #define | TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH_(RENDERER3D_OBJECT, RENDERER_T) |
Optional Teensy 4.x helpers for placing selected Renderer3D template instantiations in flash memory.
| #define TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH | ( | RENDERER3D_OBJECT | ) | TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_sphere_, __LINE__)) |
Explicitly instantiate the solid sphere drawing path in Teensy 4.x flash.
Use this macro once at namespace/global scope, after declaring the Renderer3D object. It is a no-op on non-Teensy4 targets.
| #define TGX_RENDERER3D_FLASH_SPHERE_CORE_PATH_ | ( | RENDERER3D_OBJECT, | |
| RENDERER_T | |||
| ) |
| #define TGX_RENDERER3D_FLASH_SPHERE_STRIP_PATH_ | ( | RENDERER3D_OBJECT, | |
| RENDERER_T | |||
| ) |
| #define TGX_PLACE_RENDERER3D_SPHERE_PATH_IN_FLASH | ( | RENDERER3D_OBJECT | ) |
| #define TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH | ( | RENDERER3D_OBJECT | ) | TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_cone_, __LINE__)) |
Explicitly instantiate the cylinder/cone/truncated-cone path in Teensy 4.x flash.
The shared triangle, clipping and rasterizer helpers are deliberately left in their normal sections because they are also used by other hot rendering paths.
| #define TGX_PLACE_RENDERER3D_TRUNCATED_CONE_PATH_IN_FLASH_ | ( | RENDERER3D_OBJECT, | |
| RENDERER_T | |||
| ) |
| #define TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH | ( | RENDERER3D_OBJECT | ) | TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_mesh3d_, __LINE__)) |
Explicitly instantiate the default legacy Mesh3D path in Teensy 4.x flash.
This covers the regular drawMesh(mesh, ...) overload. Advanced drawMesh<SHADERS>(mesh, ...) calls are intentionally not instantiated by this macro.
| #define TGX_PLACE_RENDERER3D_MESH3D_PATH_IN_FLASH_ | ( | RENDERER3D_OBJECT, | |
| RENDERER_T | |||
| ) |
| #define TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH | ( | RENDERER3D_OBJECT | ) | TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH_(RENDERER3D_OBJECT, TGX_RENDERER3D_FLASH_CAT(_tgx_renderer3d_flash_mesh3dv2_, __LINE__)) |
Explicitly instantiate the default Mesh3Dv2 helper path in Teensy 4.x flash.
The public non-template wrapper is inline and tiny; the heavy helper is the part that is placed in flash. Advanced drawMesh<SHADERS>(mesh, ...) calls are intentionally not instantiated by this macro.
| #define TGX_PLACE_RENDERER3D_MESH3DV2_PATH_IN_FLASH_ | ( | RENDERER3D_OBJECT, | |
| RENDERER_T | |||
| ) |