Commit eaec9510 authored by chili's avatar chili
Browse files

demonstration assortment of drawables

parent 7b5a8d68
#include "App.h"
#include "Melon.h"
#include "Pyramid.h"
#include "Box.h"
#include <memory>
#include <algorithm>
#include "ChiliMath.h"
App::App()
:
wnd( 800,600,"The Donkey Fart Box" )
{
std::mt19937 rng( std::random_device{}() );
std::uniform_real_distribution<float> adist( 0.0f,3.1415f * 2.0f );
std::uniform_real_distribution<float> ddist( 0.0f,3.1415f * 1.0f );
std::uniform_real_distribution<float> odist( 0.0f,3.1415f * 0.08f );
std::uniform_real_distribution<float> rdist( 6.0f,20.0f );
for( auto i = 0; i < 180; i++ )
class Factory
{
boxes.push_back( std::make_unique<Box>(
wnd.Gfx(),rng,adist,
ddist,odist,rdist
) );
}
public:
Factory( Graphics& gfx )
:
gfx( gfx )
{}
std::unique_ptr<Drawable> operator()()
{
switch( typedist( rng ) )
{
case 0:
return std::make_unique<Pyramid>(
gfx,rng,adist,ddist,
odist,rdist
);
case 1:
return std::make_unique<Box>(
gfx,rng,adist,ddist,
odist,rdist,bdist
);
case 2:
return std::make_unique<Melon>(
gfx,rng,adist,ddist,
odist,rdist,longdist,latdist
);
default:
assert( false && "bad drawable type in factory" );
return {};
}
}
private:
Graphics& gfx;
std::mt19937 rng{ std::random_device{}() };
std::uniform_real_distribution<float> adist{ 0.0f,PI * 2.0f };
std::uniform_real_distribution<float> ddist{ 0.0f,PI * 0.5f };
std::uniform_real_distribution<float> odist{ 0.0f,PI * 0.08f };
std::uniform_real_distribution<float> rdist{ 6.0f,20.0f };
std::uniform_real_distribution<float> bdist{ 0.4f,3.0f };
std::uniform_int_distribution<int> latdist{ 5,20 };
std::uniform_int_distribution<int> longdist{ 10,40 };
std::uniform_int_distribution<int> typedist{ 0,2 };
};
Factory f( wnd.Gfx() );
drawables.reserve( nDrawables );
std::generate_n( std::back_inserter( drawables ),nDrawables,f );
wnd.Gfx().SetProjection( DirectX::XMMatrixPerspectiveLH( 1.0f,3.0f / 4.0f,0.5f,40.0f ) );
}
void App::DoFrame()
{
const auto dt = timer.Mark();
wnd.Gfx().ClearBuffer( 0.07f,0.0f,0.12f );
for( auto& d : drawables )
{
d->Update( dt );
d->Draw( wnd.Gfx() );
}
wnd.Gfx().EndFrame();
}
App::~App()
{}
int App::Go()
{
while( true )
......@@ -33,19 +90,4 @@ int App::Go()
}
DoFrame();
}
}
App::~App()
{}
void App::DoFrame()
{
auto dt = timer.Mark();
wnd.Gfx().ClearBuffer( 0.07f,0.0f,0.12f );
for( auto& b : boxes )
{
b->Update( dt );
b->Draw( wnd.Gfx() );
}
wnd.Gfx().EndFrame();
}
\ No newline at end of file
......@@ -14,5 +14,6 @@ private:
private:
Window wnd;
ChiliTimer timer;
std::vector<std::unique_ptr<class Box>> boxes;
std::vector<std::unique_ptr<class Drawable>> drawables;
static constexpr size_t nDrawables = 180;
};
\ No newline at end of file
#include "Box.h"
#include "BindableBase.h"
#include "GraphicsThrowMacros.h"
#include "Sphere.h"
#include "Cube.h"
Box::Box( Graphics& gfx,
......@@ -9,7 +9,8 @@ Box::Box( Graphics& gfx,
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist )
std::uniform_real_distribution<float>& rdist,
std::uniform_real_distribution<float>& bdist )
:
r( rdist( rng ) ),
droll( ddist( rng ) ),
......@@ -30,20 +31,19 @@ Box::Box( Graphics& gfx,
{
dx::XMFLOAT3 pos;
};
auto model = Sphere::Make<Vertex>();
model.Transform( dx::XMMatrixScaling( 1.0f,1.0f,1.2f ) );
const auto model = Cube::Make<Vertex>();
AddStaticBind( std::make_unique<VertexBuffer>( gfx,model.vertices ) );
auto pvs = std::make_unique<VertexShader>( gfx,L"VertexShader.cso" );
auto pvs = std::make_unique<VertexShader>( gfx,L"ColorIndexVS.cso" );
auto pvsbc = pvs->GetBytecode();
AddStaticBind( std::move( pvs ) );
AddStaticBind( std::make_unique<PixelShader>( gfx,L"PixelShader.cso" ) );
AddStaticBind( std::make_unique<PixelShader>( gfx,L"ColorIndexPS.cso" ) );
AddStaticIndexBuffer( std::make_unique<IndexBuffer>( gfx,model.indices ) );
struct ConstantBuffer2
struct PixelShaderConstants
{
struct
{
......@@ -51,20 +51,22 @@ Box::Box( Graphics& gfx,
float g;
float b;
float a;
} face_colors[6];
} face_colors[8];
};
const ConstantBuffer2 cb2 =
const PixelShaderConstants cb2 =
{
{
{ 1.0f,0.0f,1.0f },
{ 1.0f,1.0f,1.0f },
{ 1.0f,0.0f,0.0f },
{ 0.0f,1.0f,0.0f },
{ 0.0f,0.0f,1.0f },
{ 1.0f,1.0f,0.0f },
{ 0.0f,0.0f,1.0f },
{ 1.0f,0.0f,1.0f },
{ 0.0f,1.0f,1.0f },
{ 0.0f,0.0f,0.0f },
}
};
AddStaticBind( std::make_unique<PixelConstantBuffer<ConstantBuffer2>>( gfx,cb2 ) );
AddStaticBind( std::make_unique<PixelConstantBuffer<PixelShaderConstants>>( gfx,cb2 ) );
const std::vector<D3D11_INPUT_ELEMENT_DESC> ied =
{
......@@ -80,6 +82,12 @@ Box::Box( Graphics& gfx,
}
AddBind( std::make_unique<TransformCbuf>( gfx,*this ) );
// model deformation transform (per instance, not stored as bind)
dx::XMStoreFloat3x3(
&mt,
dx::XMMatrixScaling( 1.0f,1.0f,bdist( rng ) )
);
}
void Box::Update( float dt ) noexcept
......@@ -94,8 +102,10 @@ void Box::Update( float dt ) noexcept
DirectX::XMMATRIX Box::GetTransformXM() const noexcept
{
return DirectX::XMMatrixRotationRollPitchYaw( pitch,yaw,roll ) *
DirectX::XMMatrixTranslation( r,0.0f,0.0f ) *
DirectX::XMMatrixRotationRollPitchYaw( theta,phi,chi ) *
DirectX::XMMatrixTranslation( 0.0f,0.0f,20.0f );
namespace dx = DirectX;
return dx::XMLoadFloat3x3( &mt ) *
dx::XMMatrixRotationRollPitchYaw( pitch,yaw,roll ) *
dx::XMMatrixTranslation( r,0.0f,0.0f ) *
dx::XMMatrixRotationRollPitchYaw( theta,phi,chi ) *
dx::XMMatrixTranslation( 0.0f,0.0f,20.0f );
}
......@@ -8,7 +8,8 @@ public:
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist );
std::uniform_real_distribution<float>& rdist,
std::uniform_real_distribution<float>& bdist );
void Update( float dt ) noexcept override;
DirectX::XMMATRIX GetTransformXM() const noexcept override;
private:
......@@ -27,4 +28,6 @@ private:
float dtheta;
float dphi;
float dchi;
// model transform
DirectX::XMFLOAT3X3 mt;
};
\ No newline at end of file
float4 main( float4 color : Color ) : SV_Target
{
return color;
}
\ No newline at end of file
cbuffer CBuf
{
matrix transform;
};
struct VSOut
{
float4 color : Color;
float4 pos : SV_Position;
};
VSOut main( float3 pos : Position,float4 color : Color )
{
VSOut vso;
vso.pos = mul( float4(pos,1.0f),transform );
vso.color = color;
return vso;
}
\ No newline at end of file
cbuffer CBuf
{
float4 face_colors[6];
float4 face_colors[8];
};
float4 main( uint tid : SV_PrimitiveID ) : SV_Target
{
return face_colors[(tid/2) % 6];
return face_colors[(tid/2) % 8];
}
\ No newline at end of file
#include "Melon.h"
#include "BindableBase.h"
#include "GraphicsThrowMacros.h"
#include "Sphere.h"
Melon::Melon( Graphics& gfx,
std::mt19937& rng,
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist,
std::uniform_int_distribution<int>& longdist,
std::uniform_int_distribution<int>& latdist )
:
r( rdist( rng ) ),
droll( ddist( rng ) ),
dpitch( ddist( rng ) ),
dyaw( ddist( rng ) ),
dphi( odist( rng ) ),
dtheta( odist( rng ) ),
dchi( odist( rng ) ),
chi( adist( rng ) ),
theta( adist( rng ) ),
phi( adist( rng ) )
{
namespace dx = DirectX;
if( !IsStaticInitialized() )
{
auto pvs = std::make_unique<VertexShader>( gfx,L"ColorIndexVS.cso" );
auto pvsbc = pvs->GetBytecode();
AddStaticBind( std::move( pvs ) );
AddStaticBind( std::make_unique<PixelShader>( gfx,L"ColorIndexPS.cso" ) );
struct PixelShaderConstants
{
struct
{
float r;
float g;
float b;
float a;
} face_colors[8];
};
const PixelShaderConstants cb2 =
{
{
{ 1.0f,1.0f,1.0f },
{ 1.0f,0.0f,0.0f },
{ 0.0f,1.0f,0.0f },
{ 1.0f,1.0f,0.0f },
{ 0.0f,0.0f,1.0f },
{ 1.0f,0.0f,1.0f },
{ 0.0f,1.0f,1.0f },
{ 0.0f,0.0f,0.0f },
}
};
AddStaticBind( std::make_unique<PixelConstantBuffer<PixelShaderConstants>>( gfx,cb2 ) );
const std::vector<D3D11_INPUT_ELEMENT_DESC> ied =
{
{ "Position",0,DXGI_FORMAT_R32G32B32_FLOAT,0,0,D3D11_INPUT_PER_VERTEX_DATA,0 },
};
AddStaticBind( std::make_unique<InputLayout>( gfx,ied,pvsbc ) );
AddStaticBind( std::make_unique<Topology>( gfx,D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST ) );
}
struct Vertex
{
dx::XMFLOAT3 pos;
};
auto model = Sphere::MakeTesselated<Vertex>( latdist( rng ),longdist( rng ) );
// deform vertices of model by linear transformation
model.Transform( dx::XMMatrixScaling( 1.0f,1.0f,1.2f ) );
AddBind( std::make_unique<VertexBuffer>( gfx,model.vertices ) );
AddIndexBuffer( std::make_unique<IndexBuffer>( gfx,model.indices ) );
AddBind( std::make_unique<TransformCbuf>( gfx,*this ) );
}
void Melon::Update( float dt ) noexcept
{
roll += droll * dt;
pitch += dpitch * dt;
yaw += dyaw * dt;
theta += dtheta * dt;
phi += dphi * dt;
chi += dchi * dt;
}
DirectX::XMMATRIX Melon::GetTransformXM() const noexcept
{
namespace dx = DirectX;
return dx::XMMatrixRotationRollPitchYaw( pitch,yaw,roll ) *
dx::XMMatrixTranslation( r,0.0f,0.0f ) *
dx::XMMatrixRotationRollPitchYaw( theta,phi,chi ) *
dx::XMMatrixTranslation( 0.0f,0.0f,20.0f );
}
#pragma once
#include "DrawableBase.h"
class Melon : public DrawableBase<Melon>
{
public:
Melon( Graphics& gfx,std::mt19937& rng,
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist,
std::uniform_int_distribution<int>& longdist,
std::uniform_int_distribution<int>& latdist );
void Update( float dt ) noexcept override;
DirectX::XMMATRIX GetTransformXM() const noexcept override;
private:
// positional
float r;
float roll = 0.0f;
float pitch = 0.0f;
float yaw = 0.0f;
float theta;
float phi;
float chi;
// speed (delta/s)
float droll;
float dpitch;
float dyaw;
float dtheta;
float dphi;
float dchi;
};
\ No newline at end of file
#include "Pyramid.h"
#include "BindableBase.h"
#include "GraphicsThrowMacros.h"
#include "Cone.h"
Pyramid::Pyramid( Graphics& gfx,
std::mt19937& rng,
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist )
:
r( rdist( rng ) ),
droll( ddist( rng ) ),
dpitch( ddist( rng ) ),
dyaw( ddist( rng ) ),
dphi( odist( rng ) ),
dtheta( odist( rng ) ),
dchi( odist( rng ) ),
chi( adist( rng ) ),
theta( adist( rng ) ),
phi( adist( rng ) )
{
namespace dx = DirectX;
if( !IsStaticInitialized() )
{
struct Vertex
{
dx::XMFLOAT3 pos;
struct
{
unsigned char r;
unsigned char g;
unsigned char b;
unsigned char a;
} color;
};
auto model = Cone::MakeTesselated<Vertex>( 4 );
// set vertex colors for mesh
model.vertices[0].color = { 255,255,0 };
model.vertices[1].color = { 255,255,0 };
model.vertices[2].color = { 255,255,0 };
model.vertices[3].color = { 255,255,0 };
model.vertices[4].color = { 255,255,80 };
model.vertices[5].color = { 255,10,0 };
// deform mesh linearly
model.Transform( dx::XMMatrixScaling( 1.0f,1.0f,0.7f ) );
AddStaticBind( std::make_unique<VertexBuffer>( gfx,model.vertices ) );
auto pvs = std::make_unique<VertexShader>( gfx,L"ColorBlendVS.cso" );
auto pvsbc = pvs->GetBytecode();
AddStaticBind( std::move( pvs ) );
AddStaticBind( std::make_unique<PixelShader>( gfx,L"ColorBlendPS.cso" ) );
AddStaticIndexBuffer( std::make_unique<IndexBuffer>( gfx,model.indices ) );
const std::vector<D3D11_INPUT_ELEMENT_DESC> ied =
{
{ "Position",0,DXGI_FORMAT_R32G32B32_FLOAT,0,0,D3D11_INPUT_PER_VERTEX_DATA,0 },
{ "Color",0,DXGI_FORMAT_R8G8B8A8_UNORM,0,12,D3D11_INPUT_PER_VERTEX_DATA,0 },
};
AddStaticBind( std::make_unique<InputLayout>( gfx,ied,pvsbc ) );
AddStaticBind( std::make_unique<Topology>( gfx,D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST ) );
}
else
{
SetIndexFromStatic();
}
AddBind( std::make_unique<TransformCbuf>( gfx,*this ) );
}
void Pyramid::Update( float dt ) noexcept
{
roll += droll * dt;
pitch += dpitch * dt;
yaw += dyaw * dt;
theta += dtheta * dt;
phi += dphi * dt;
chi += dchi * dt;
}
DirectX::XMMATRIX Pyramid::GetTransformXM() const noexcept
{
namespace dx = DirectX;
return dx::XMMatrixRotationRollPitchYaw( pitch,yaw,roll ) *
dx::XMMatrixTranslation( r,0.0f,0.0f ) *
dx::XMMatrixRotationRollPitchYaw( theta,phi,chi ) *
dx::XMMatrixTranslation( 0.0f,0.0f,20.0f );
}
#pragma once
#include "DrawableBase.h"
class Pyramid : public DrawableBase<Pyramid>
{
public:
Pyramid( Graphics& gfx,std::mt19937& rng,
std::uniform_real_distribution<float>& adist,
std::uniform_real_distribution<float>& ddist,
std::uniform_real_distribution<float>& odist,
std::uniform_real_distribution<float>& rdist );
void Update( float dt ) noexcept override;
DirectX::XMMATRIX GetTransformXM() const noexcept override;
private:
// positional
float r;
float roll = 0.0f;
float pitch = 0.0f;
float yaw = 0.0f;
float theta;
float phi;
float chi;
// speed (delta/s)
float droll;
float dpitch;
float dyaw;
float dtheta;
float dphi;
float dchi;
};
\ No newline at end of file
......@@ -159,8 +159,10 @@
<ClCompile Include="IndexBuffer.cpp" />
<ClCompile Include="InputLayout.cpp" />
<ClCompile Include="Keyboard.cpp" />
<ClCompile Include="Melon.cpp" />
<ClCompile Include="Mouse.cpp" />
<ClCompile Include="PixelShader.cpp" />
<ClCompile Include="Pyramid.cpp" />
<ClCompile Include="Topology.cpp" />
<ClCompile Include="TransformCbuf.cpp" />
<ClCompile Include="VertexBuffer.cpp" />
......@@ -191,10 +193,12 @@
<ClInclude Include="IndexedTriangleList.h" />
<ClInclude Include="InputLayout.h" />
<ClInclude Include="Keyboard.h" />
<ClInclude Include="Melon.h" />
<ClInclude Include="Mouse.h" />
<ClInclude Include="PixelShader.h" />
<ClInclude Include="Plane.h" />
<ClInclude Include="Prism.h" />
<ClInclude Include="Pyramid.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="Sphere.h" />
<ClInclude Include="Topology.h" />
......@@ -217,33 +221,61 @@
<None Include="DXTrace.inl" />
</ItemGroup>
<ItemGroup>
<FxCompile Include="PixelShader.hlsl">
<FxCompile Include="ColorBlendPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
</FxCompile>
<FxCompile Include="ColorBlendVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
</FxCompile>
<FxCompile Include="VertexShader.hlsl">
<FxCompile Include="ColorIndexPS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Pixel</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
</FxCompile>
<FxCompile Include="ColorIndexVS.hlsl">
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4.0</ShaderModel>
<ShaderType Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Vertex</ShaderType>
<ShaderModel Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4.0</ShaderModel>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
<ObjectFileOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)%(Filename).cso</ObjectFileOutput>
</FxCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
......
......@@ -102,6 +102,12 @@
<ClCompile Include="Box.cpp">
<Filter>Source Files\Drawable</Filter>
</ClCompile>
<ClCompile Include="Pyramid.cpp">
<Filter>Source Files\Drawable</Filter>
</ClCompile>
<ClCompile Include="Melon.cpp">
<Filter>Source Files\Drawable</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="WindowsMessageMap.h">
......@@ -206,6 +212,12 @@
<ClInclude Include="Prism.h">
<Filter>Header Files\Geometry</Filter>
</ClInclude>
<ClInclude Include="Melon.h">
<Filter>Header Files\Drawable</Filter>
</ClInclude>
<ClInclude Include="Pyramid.h">
<Filter>Header Files\Drawable</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="hw3d.rc">
......@@ -229,10 +241,16 @@
</None>
</ItemGroup>
<ItemGroup>
<FxCompile Include="VertexShader.hlsl">
<FxCompile Include="ColorBlendPS.hlsl">
<Filter>Shader</Filter>
</FxCompile>
<FxCompile Include="ColorBlendVS.hlsl">
<Filter>Shader</Filter>
</FxCompile>
<FxCompile Include="ColorIndexPS.hlsl">
<Filter>Shader</Filter>
</FxCompile>
<FxCompile Include="PixelShader.hlsl">
<FxCompile Include="ColorIndexVS.hlsl">
<Filter>Shader</Filter>
</FxCompile>
</ItemGroup>
......
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