Commit 0bb1a961 authored by chili's avatar chili
Browse files

add test cube to app scene

parent 99e15f43
...@@ -15,9 +15,11 @@ App::App() ...@@ -15,9 +15,11 @@ App::App()
: :
wnd( 1280,720,"The Donkey Fart Box" ), wnd( 1280,720,"The Donkey Fart Box" ),
light( wnd.Gfx() ), light( wnd.Gfx() ),
plane( wnd.Gfx(),3.0f ) plane( wnd.Gfx(),3.0f ),
cube( wnd.Gfx(),4.0f )
{ {
plane.SetPos( { 1.0f,17.0f,-1.0f } ); plane.SetPos( { -5.0f,17.0f,-1.0f } );
cube.SetPos( { 3.0f,14.0f,-2.0f } );
wnd.Gfx().SetProjection( dx::XMMatrixPerspectiveLH( 1.0f,9.0f / 16.0f,0.5f,40.0f ) ); wnd.Gfx().SetProjection( dx::XMMatrixPerspectiveLH( 1.0f,9.0f / 16.0f,0.5f,40.0f ) );
} }
...@@ -32,6 +34,7 @@ void App::DoFrame() ...@@ -32,6 +34,7 @@ void App::DoFrame()
nano2.Draw( wnd.Gfx() ); nano2.Draw( wnd.Gfx() );
light.Draw( wnd.Gfx() ); light.Draw( wnd.Gfx() );
plane.Draw( wnd.Gfx() ); plane.Draw( wnd.Gfx() );
cube.Draw( wnd.Gfx() );
while( const auto e = wnd.kbd.ReadKey() ) while( const auto e = wnd.kbd.ReadKey() )
{ {
...@@ -103,6 +106,7 @@ void App::DoFrame() ...@@ -103,6 +106,7 @@ void App::DoFrame()
nano.ShowWindow( "Model 1" ); nano.ShowWindow( "Model 1" );
nano2.ShowWindow( "Model 2" ); nano2.ShowWindow( "Model 2" );
plane.SpawnControlWindow( wnd.Gfx() ); plane.SpawnControlWindow( wnd.Gfx() );
cube.SpawnControlWindow( wnd.Gfx() );
// present // present
wnd.Gfx().EndFrame(); wnd.Gfx().EndFrame();
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "Camera.h" #include "Camera.h"
#include "PointLight.h" #include "PointLight.h"
#include "TestPlane.h" #include "TestPlane.h"
#include "TestCube.h"
#include "Mesh.h" #include "Mesh.h"
#include <set> #include <set>
...@@ -29,4 +30,5 @@ private: ...@@ -29,4 +30,5 @@ private:
Model nano{ wnd.Gfx(),"Models\\nano_textured\\nanosuit.obj" }; Model nano{ wnd.Gfx(),"Models\\nano_textured\\nanosuit.obj" };
Model nano2{ wnd.Gfx(),"Models\\nano_textured\\nanosuit.obj" }; Model nano2{ wnd.Gfx(),"Models\\nano_textured\\nanosuit.obj" };
TestPlane plane; TestPlane plane;
TestCube cube;
}; };
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment