diff --git a/demo/demo/main.cpp b/demo/demo/main.cpp index ff0734b3ed729c6c267a09f82bb0d07b02bc92cb..4e736d2f32dabc6e5341133c7f7ccccd2476d6eb 100644 --- a/demo/demo/main.cpp +++ b/demo/demo/main.cpp @@ -106,11 +106,11 @@ int main(int argc, const char* argv[]) { // create the application fggl::App app( &moduleManager, "fggl-demo" ); - auto* assetFinder = app.service<fggl::assets::CheckinAdapted>(); - assetFinder->discover("core"); - // force asset loading { + auto* assetFinder = app.service<fggl::assets::CheckinAdapted>(); + assetFinder->discover("core"); + auto* assets = app.service<fggl::assets::AssetManager>(); auto* loader = app.service<fggl::assets::Loader>(); loader->load("ui/click.ogg", fggl::audio::ASSET_CLIP_SHORT, assets); diff --git a/fggl/gfx/ogl4/meshes.cpp b/fggl/gfx/ogl4/meshes.cpp index 2d0e164756d0ba974692f8be514e5904210772ef..c0f0c2ffdb7aef5f6e389aff4b3a6be29df9904e 100644 --- a/fggl/gfx/ogl4/meshes.cpp +++ b/fggl/gfx/ogl4/meshes.cpp @@ -205,9 +205,12 @@ namespace fggl::gfx::ogl4 { } Material* mat = new Material(); + mat->m_diffCol = FALLBACK_COLOUR; + mat->m_specCol= FALLBACK_COLOUR; + mat->m_diffuse = manager->get<ogl::Texture>(FALLBACK_TEX); mat->m_specular = manager->get<ogl::Texture>(FALLBACK_TEX); - mat->m_normals = manager->get<ogl::Texture>(FALLBACK_TEX); + mat->m_normals = manager->get<ogl::Texture>(SOLID_TEX); return manager->set(FALLBACK_MAT, mat); } diff --git a/include/fggl/gfx/ogl4/fallback.hpp b/include/fggl/gfx/ogl4/fallback.hpp index 62d22607c5eecebf79d1e3f6df31f2620a2a0fc1..5c466d46db5bb4a08e35ec31e0d85775a2632d23 100644 --- a/include/fggl/gfx/ogl4/fallback.hpp +++ b/include/fggl/gfx/ogl4/fallback.hpp @@ -66,6 +66,7 @@ namespace fggl::gfx::ogl4 { constexpr const assets::AssetID FALLBACK_TEX = assets::make_asset_id("fallback", "FALLBACK_TEX"); constexpr const assets::AssetID FALLBACK_MAT = assets::make_asset_id("fallback", "FALLBACK_MAT"); constexpr const assets::AssetID SOLID_TEX = assets::make_asset_id("fallback", "SOLID_TEX"); + constexpr const math::vec3 FALLBACK_COLOUR {1.0F, 0.0F, 1.0F}; } // namespace fggl::gfx::ogl4