raylib: remove rl namespace
This will allow us to use rlImGUI
This commit is contained in:
@@ -4,26 +4,26 @@
|
||||
|
||||
namespace Ley {
|
||||
|
||||
Model::Model(const std::string &obj, const std::string &texture) {
|
||||
cModel::cModel(const std::string &obj, const std::string &texture) {
|
||||
std::filesystem::path asset_path("assets");
|
||||
std::filesystem::path obj_path(obj);
|
||||
_obj_path = to_utf8(asset_path / obj_path);
|
||||
_model = rl::LoadModel(_obj_path.c_str());
|
||||
_model = LoadModel(_obj_path.c_str());
|
||||
std::filesystem::path texture_path(texture);
|
||||
_texture_path = to_utf8(asset_path / texture_path);
|
||||
_texture = rl::LoadTexture(_texture_path.c_str());
|
||||
_model.materials[0].maps[rl::MATERIAL_MAP_DIFFUSE].texture = _texture;
|
||||
_texture = LoadTexture(_texture_path.c_str());
|
||||
_model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = _texture;
|
||||
_position = {0.0f, 0.0f, 0.0f};
|
||||
}
|
||||
|
||||
Model::~Model() {
|
||||
rl::UnloadTexture(_texture);
|
||||
rl::UnloadModel(_model);
|
||||
cModel::~cModel() {
|
||||
UnloadTexture(_texture);
|
||||
UnloadModel(_model);
|
||||
}
|
||||
|
||||
Model Model::create(const std::string &obj_path,
|
||||
cModel cModel::create(const std::string &obj_path,
|
||||
const std::string &texture_path) {
|
||||
return Model(obj_path, texture_path);
|
||||
return cModel(obj_path, texture_path);
|
||||
}
|
||||
|
||||
} // namespace Ley
|
||||
|
||||
Reference in New Issue
Block a user