working on texture manager
This commit is contained in:
1 parent
e04fcbb9bd
commit
be6a8cca9e
9 files changed
+92
-39
No files matched your search
@@ -129,7 +129,7 @@ namespace ZL {
|
||||
|
||||
// Load texture
|
||||
try {
|
||||
gameObj.texture = std::make_shared<Texture>(CreateTextureDataFromPng(objData.texturePath, zipPath.c_str()));
|
||||
gameObj.texture = renderer.textureManager.LoadFromPng(objData.texturePath, zipPath);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "GameObjectLoader: Failed to load texture for '" << objData.name << "': " << e.what() << std::endl;
|
||||
@@ -202,7 +202,7 @@ namespace ZL {
|
||||
|
||||
// Load texture
|
||||
try {
|
||||
intObj.texture = std::make_shared<Texture>(CreateTextureDataFromPng(objData.texturePath, zipPath.c_str()));
|
||||
intObj.texture = renderer.textureManager.LoadFromPng(objData.texturePath, zipPath);
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "GameObjectLoader: Failed to load texture for interactive '" << objData.name << "': " << e.what() << std::endl;
|
||||
|
||||
Reference in new issue
Block a user