22#include < Engine3DRadSpace\Graphics\Model3D.hpp>
33#include < Engine3DRadSpace\Math\Matrix4x4.hpp>
44#include < Engine3DRadSpace\Graphics\SpriteBatch.hpp>
5+ #include < Engine3DRadSpace/Core/IGame.hpp>
6+ #include < Engine3DRadSpace/Graphics\Rendering/RenderingManager.hpp>
57
68using namespace Engine3DRadSpace ;
79using namespace Engine3DRadSpace ::Content;
@@ -25,6 +27,8 @@ template<> bool AssetRenderer(IGraphicsDevice *device, const std::string &imageP
2527
2628 auto model = modelAsset->Get ();
2729
30+ auto renderer = Rendering::RenderingManager::CreateForward (device);
31+
2832 if (device && model)
2933 {
3034 auto boundingSphere = model->GetBoundingSphere ();
@@ -33,8 +37,8 @@ template<> bool AssetRenderer(IGraphicsDevice *device, const std::string &imageP
3337 for (auto && n : iota (0 , 3 ))
3438 {
3539 cmd->Clear (Colors::Gray);
36- model-> Draw (
37- Matrix4x4 () *
40+
41+ model-> SetTransform (
3842 Matrix4x4::CreateLookAtView (
3943 boundingSphere.Center + ((boundingSphere.Radius + 0 .5f ) *
4044 Vector3 (
@@ -44,10 +48,13 @@ template<> bool AssetRenderer(IGraphicsDevice *device, const std::string &imageP
4448 )),
4549 Vector3::Zero (),
4650 Vector3::UnitY ()
47- ) *
51+ ),
4852 Matrix4x4::CreatePerspectiveProjection (4 .f / 3 .f , 65 , 0 .01f , 500 .0f )
4953 );
5054
55+
56+ renderer->Draw (model, Rendering::RenderPassType::OpaqueNoShadow);
57+
5158 cmd->Present ();
5259 }
5360
0 commit comments