mirror of
https://github.com/JoeyDeVries/LearnOpenGL.git
synced 2026-01-30 20:13:22 +08:00
Fix the compilation issue on Mac
This commit is contained in:
@@ -98,7 +98,8 @@ int main()
|
|||||||
|
|
||||||
// load entities
|
// load entities
|
||||||
// -----------
|
// -----------
|
||||||
Entity ourEntity(Model(FileSystem::getPath("resources/objects/planet/planet.obj")));
|
Model model = Model(FileSystem::getPath("resources/objects/planet/planet.obj"));
|
||||||
|
Entity ourEntity(model);
|
||||||
ourEntity.transform.setLocalPosition({ 10, 0, 0 });
|
ourEntity.transform.setLocalPosition({ 10, 0, 0 });
|
||||||
const float scale = 0.75;
|
const float scale = 0.75;
|
||||||
ourEntity.transform.setLocalScale({ scale, scale, scale });
|
ourEntity.transform.setLocalScale({ scale, scale, scale });
|
||||||
@@ -108,7 +109,8 @@ int main()
|
|||||||
|
|
||||||
for (unsigned int i = 0; i < 10; ++i)
|
for (unsigned int i = 0; i < 10; ++i)
|
||||||
{
|
{
|
||||||
lastEntity->addChild(Model(FileSystem::getPath("resources/objects/planet/planet.obj")));
|
Model model = Model(FileSystem::getPath("resources/objects/planet/planet.obj"));
|
||||||
|
lastEntity->addChild(model);
|
||||||
lastEntity = lastEntity->children.back().get();
|
lastEntity = lastEntity->children.back().get();
|
||||||
|
|
||||||
//Set tranform values
|
//Set tranform values
|
||||||
|
|||||||
Reference in New Issue
Block a user