Skip to content

Lightnet/raylib_module_editor_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raylib_module_editor_cpp

License: MIT

Status:

  • testing.

library:

  • raylib 5.5
  • raygui 4.0
  • flecs 4.1.1
  • imgui 1.92.4
  • rlimgui

Information:

Sample c++ for raylib with imgui and flecs. Note there will be c code as well for simple libraries. Flecs has c and c++.

Features:

  • transform 3d hierarchy
  • simple imgui
  • jolt physics
    • simple test
    • character controller test
  • custom phase
    • render camera 3d
    • imgui
    • render camera 2d
    • render 2d

Flecs:

There was different ways to set up depend build config on the query components.

singleton

struct main_context_t {
  Camera3D camera;
};
//...
void begin_camera_mode_3d_system(flecs::iter& it) {
  flecs::world world = it.world();
  if (!world.has<main_context_t>()) return;
  const main_context_t& ctx = world.get<main_context_t>();
  Camera3D& cam = const_cast<Camera3D&>(ctx.camera); // non-const ref
  BeginMode3D(cam);
}
//...
// Create the world
flecs::world world;
world.set(main_context_t{
  .camera = camera
});

Note this is sample and rework later. It to access singleton struct.

Notes:

  • raylib and jolt physics conflict with color from jolt name space.

Credits:

  • flecs community on discord.
  • raylib community from github, reddit and other repo.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published