Skip to content

Commit

Permalink
load 3 models and switch between them
Browse files Browse the repository at this point in the history
  • Loading branch information
max committed May 3, 2020
1 parent d8600ae commit 97cb935
Show file tree
Hide file tree
Showing 13 changed files with 206 additions and 99 deletions.
237 changes: 150 additions & 87 deletions HelloTriangleApplication.cpp

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion RenderObject.cpp

This file was deleted.

1 change: 1 addition & 0 deletions RenderObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ struct RenderObject {
VkSampler textureSampler;

glm::mat4 modelMatrix;
bool shouldRender = false;
};

35 changes: 31 additions & 4 deletions VulkanTest.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -176,23 +176,50 @@
</ItemGroup>
<ItemGroup>
<ClCompile Include="HelloTriangleApplication.cpp" />
<ClCompile Include="RenderObject.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VulkanTest.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="small.ico" />
<Image Include="textures\bernstein.jpg" />
<Image Include="textures\texture.jpg" />
<Image Include="textures\viking_room.png" />
<Image Include="textures\bernstein_desc.png" />
<Image Include="textures\bernstein_texture.png" />
<Image Include="textures\propane_desc.png" />
<Image Include="textures\propane_texture.png" />
<Image Include="textures\water_desc.png" />
<Image Include="textures\water_texture.png" />
<Image Include="VulkanTest.ico" />
</ItemGroup>
<ItemGroup>
<None Include="shaders\shader.frag" />
<None Include="shaders\shader.vert" />
</ItemGroup>
<ItemGroup>
<Object Include="models\bernstein.obj">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Object>
<Object Include="models\propane.obj">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Object>
<Object Include="models\quad.obj">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Object>
<Object Include="models\water.obj">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Object>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down
31 changes: 24 additions & 7 deletions VulkanTest.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@
<ClCompile Include="HelloTriangleApplication.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="RenderObject.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="VulkanTest.rc">
Expand All @@ -63,16 +60,22 @@
<Image Include="VulkanTest.ico">
<Filter>Resource Files</Filter>
</Image>
<Image Include="textures\bernstein.jpg">
<Image Include="textures\water_texture.png">
<Filter>Source Files\textures</Filter>
</Image>
<Image Include="textures\texture.jpg">
<Image Include="textures\bernstein_desc.png">
<Filter>Source Files\textures</Filter>
</Image>
<Image Include="textures\viking_room.png">
<Image Include="textures\bernstein_texture.png">
<Filter>Source Files\textures</Filter>
</Image>
<Image Include="textures\water_texture.png">
<Image Include="textures\propane_desc.png">
<Filter>Source Files\textures</Filter>
</Image>
<Image Include="textures\propane_texture.png">
<Filter>Source Files\textures</Filter>
</Image>
<Image Include="textures\water_desc.png">
<Filter>Source Files\textures</Filter>
</Image>
</ItemGroup>
Expand All @@ -84,4 +87,18 @@
<Filter>Source Files\shaders</Filter>
</None>
</ItemGroup>
<ItemGroup>
<Object Include="models\propane.obj">
<Filter>Source Files\models</Filter>
</Object>
<Object Include="models\quad.obj">
<Filter>Source Files\models</Filter>
</Object>
<Object Include="models\water.obj">
<Filter>Source Files\models</Filter>
</Object>
<Object Include="models\bernstein.obj">
<Filter>Source Files\models</Filter>
</Object>
</ItemGroup>
</Project>
Binary file removed textures/bernstein.jpg
Binary file not shown.
Binary file added textures/bernstein_desc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/bernstein_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/propane_desc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/propane_texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed textures/texture.jpg
Binary file not shown.
Binary file removed textures/viking_room.png
Binary file not shown.
Binary file added textures/water_desc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 97cb935

Please sign in to comment.