7#define IMGUI_DEFINE_MATH_OPERATORS
15#include <unordered_map>
22 return Color{c[0], c[1], c[2], c[3]};
59 void run(
bool play =
true);
Color to_rl_color(const FxVec4ui8 &c)
Runs and draws an FxScene in a raylib window.
Texture2D get_or_load_texture(const std::string &path)
std::unordered_map< std::string, Texture2D > m_textureCache
FxVec2f world_to_screen(const FxVec2f &world) const
void set_background(const std::string &filepath)
void set_real_time_factor(const double &rt_factor)
std::function< void(FxRylbRenderer &)> m_func_draw_callback
void set_draw_callback(const std::function< void(FxRylbRenderer &)> &callback)
double m_real_time_factor
FxVec2f screen_to_world(const FxVec2f &screen) const
void set_background(const FxVec4ui8 &color)
Texture2D m_backgroundTexture
void draw_ui(double curr_rt_factor)
bool m_hasBackgroundTexture
double get_real_time_factor() const
FxRylbRenderer(FxScene &scene, int fps=60, unsigned int scale=100)
Owns a simulated world and advances it with step().
Single-precision 2D vector.