raylib: remove rl namespace

This will allow us to use rlImGUI
This commit is contained in:
2026-02-26 15:28:53 +01:00
parent dd29dc4f73
commit c2cc6e22e9
3 changed files with 44 additions and 47 deletions

View File

@@ -1,26 +1,25 @@
#pragma once
#include <string>
namespace rl {
#include "raylib.h"
}
namespace Ley {
class Model {
class cModel {
private:
Model(const std::string &obj_path, const std::string &texture_path);
cModel(const std::string &obj_path, const std::string &texture_path);
public:
static Model create(const std::string &obj_path, const std::string &texture_path);
~Model();
void setPosition(rl::Vector3 position) { _position = position; }
rl::Vector3 getPosition() const { return _position; }
rl::Model getModel() const { return _model; }
void Draw(rl::Color color) const { rl::DrawModel(_model, _position, 1.0f, color); }
static cModel create(const std::string &obj_path, const std::string &texture_path);
~cModel();
void setPosition(Vector3 position) { _position = position; }
Vector3 getPosition() const { return _position; }
Model getModel() const { return _model; }
void Draw(Color color) const { DrawModel(_model, _position, 1.0f, color); }
private:
rl::Model _model;
rl::Texture2D _texture;
rl::Vector3 _position;
Model _model;
Texture2D _texture;
Vector3 _position;
std::string _obj_path;
std::string _texture_path;
};