diff --git a/src/samples/dolphin/dolphin.cpp b/src/samples/dolphin/dolphin.cpp index 76526ae..cc4de00 100755 --- a/src/samples/dolphin/dolphin.cpp +++ b/src/samples/dolphin/dolphin.cpp @@ -55,6 +55,13 @@ void Dolphin::onInit() water.shouldBeFrustumCulled = false; water.shouldBeBackfaceCulled = false; + printf("Loading seabed...\n"); + seabed.loadObj("seabed/", "seabed", 10.0F, false); + seabed.position.set(0, -250.0F, 0); + texRepo->addByMesh("seabed/", seabed, BMP); + seabed.shouldBeBackfaceCulled = false; + seabed.shouldBeFrustumCulled = false; + skybox.loadObj("skybox/", "skybox", 400.0F, false); skybox.shouldBeFrustumCulled = false; @@ -137,6 +144,7 @@ void Dolphin::onUpdate() engine->renderer->draw(water); engine->renderer->draw(skybox); engine->renderer->draw(waterbox); + engine->renderer->draw(seabed); for (u8 i = 0; i < OYSTERS_COUNT; i++) { if (oysters[i].isActive()) diff --git a/src/samples/dolphin/dolphin.hpp b/src/samples/dolphin/dolphin.hpp index 273f0ef..0a42568 100755 --- a/src/samples/dolphin/dolphin.hpp +++ b/src/samples/dolphin/dolphin.hpp @@ -36,13 +36,19 @@ public: static float engineFPS; private: + /*DO NOT TOUCH ORDER OF DECLARATION! + GCC BUG CAUSES RENDERING TO FAIL IN ANY OTHER ORDER OF DECLARATION!*/ + Mesh seabed; + Mesh island; + Mesh skybox; LightBulb bulb; Player player; Camera camera; - Mesh island, skybox, water, waterbox; Collectible *oysters; TextureRepository *texRepo; Sprite waterOverlay; + Mesh water; + Mesh waterbox; }; #endif