Note for cmake ODE must build first then raylib due to config in ODE conflicts.
raylib 5.5 ode 0.16.6 flecs v4.1.1
KEY_C = enable/disable mouse orbiting mouse motion to rotate camera Q and E keys to rotate the camera’s yaw left and right
| /********************************************************************* | |
| * raylib 5.5 + raygui – Hex-Bar Progress Bar (100% fill) | |
| * gcc raylib_hex01.c -o hexbar -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 | |
| *********************************************************************/ | |
| #define RAYGUI_IMPLEMENTATION | |
| #include "raylib.h" | |
| #include "raymath.h" | |
| #include "raygui.h" | |
| #include <stdio.h> |
| #define RAYLIB_IMPLEMENTATION // <-- tells raylib to include its source once | |
| #include <raylib.h> | |
| #include <Jolt/Jolt.h> | |
| #include <Jolt/RegisterTypes.h> | |
| #include <Jolt/Core/Factory.h> | |
| #include "Jolt/Physics/PhysicsSettings.h" | |
| #include <Jolt/Core/JobSystemThreadPool.h> | |
| #include <Jolt/Physics/PhysicsSystem.h> |
| #include "raylib.h" | |
| #include <ode/ode.h> | |
| #include <stdio.h> | |
| #include <math.h> // Ensure math.h is included for PI | |
| // Global ODE variables | |
| dWorldID world; | |
| dSpaceID space; | |
| dJointGroupID contactgroup; | |
| dGeomID floorGeom, cube1Geom, cube2Geom; |
Note for cmake ODE must build first then raylib due to config in ODE conflicts.
raylib 5.5 ode 0.16.6 flecs v4.1.1
KEY_C = enable/disable mouse orbiting mouse motion to rotate camera Q and E keys to rotate the camera’s yaw left and right
I kept it simple but with the raygui it easy to debug to control transform to update real time.
// Transform3D component
typedef struct {
Vector3 position; // Local position
Quaternion rotation; // Local rotation
Vector3 scale; // Local scale
Matrix localMatrix; // Local transform matrix
Matrix worldMatrix; // World transform matrix
bool isDirty; // Flag to indicate if transform needs updating| // flecs 4.1.1 | |
| // raylb 5.5 | |
| // ode 0.16.6 | |
| #include <stdio.h> | |
| #include <math.h> | |
| #include <stdlib.h> | |
| #include "raylib.h" | |
| #include "raymath.h" | |
| #include "ode/ode.h" | |
| #include "flecs.h" |
This guide outlines how to set up a hierarchical 3D transformation system using Flecs 4.x, focusing on correct entity-component-system (ECS) configuration, transformation order, and parent-child relationships. It is tailored for AI agents and developers building 3D applications (e.g., with OpenGL or other rendering APIs) where entities have position, rotation, and scale, and transformations are propagated through a parent-child hierarchy.Key Concepts1. Flecs Basics
Flecs: 4.1 Glad: 2.0.8 opengl: 330 sdl: 3.2 just sample test. cimgui: 1.92
This is just cube render set up test.
Sample test for getting the font working as cimgui conflict with font type from imgui.
rlgl_font.c main point.
raylib 5.5 cimgui
| // raylib 5.5 | |
| // flecs v4.1 | |
| // https://github.com/SanderMertens/flecs/blob/master/examples/c/systems/custom_pipeline/src/main.c | |
| // right mouse toggle camera capture | |
| // W,A,S,D = move camera when capture mouse | |
| // escape to close app | |
| // left mouse button to select cube | |
| #include <stdio.h> | |
| #include <flecs.h> |