2023.8
This commit is contained in:
parent
d5c8eb3d64
commit
eeacc05f69
|
@ -45,23 +45,23 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{26bd6e61-e36d-464a-a312-4110adf10083}</ProjectGuid>
|
||||
<RootNamespace>HelloTexturedCube</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -79,12 +79,6 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -93,6 +87,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -113,6 +108,7 @@ xcopy /y $(ProjectDir)src\HelloTexturedCube.dds $(OutDir)Data\Textures\</Command
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Game
|
||||
{
|
||||
namespace Game
|
||||
{
|
||||
class HelloTexturedCubeGame : public Singleton<HelloTexturedCubeGame>, public BaseGame
|
||||
{
|
||||
struct Vertex
|
||||
|
@ -49,7 +47,6 @@ namespace verus
|
|||
virtual void BaseGame_DrawView(CGI::RcViewDesc viewDesc) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(HelloTexturedCubeGame);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_QREF_GAME Game::RHelloTexturedCubeGame game = Game::HelloTexturedCubeGame::I()
|
||||
|
|
|
@ -45,23 +45,23 @@
|
|||
</None>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{bc17acd3-97eb-4d5c-a2c9-574cdaa7576b}</ProjectGuid>
|
||||
<RootNamespace>HelloTriangle</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -79,12 +79,6 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -93,6 +87,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -109,6 +104,7 @@
|
|||
<ConformanceMode>true</ConformanceMode>
|
||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Game
|
||||
{
|
||||
namespace Game
|
||||
{
|
||||
// Epigraph
|
||||
// "Vulkan – (it takes) 1000 lines to draw a triangle"
|
||||
// "- I thought you only needed 3 lines to draw a triangle"
|
||||
|
@ -49,7 +47,6 @@ namespace verus
|
|||
virtual void BaseGame_DrawView(CGI::RcViewDesc viewDesc) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(HelloTriangleGame);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_QREF_GAME Game::RHelloTriangleGame game = Game::HelloTriangleGame::I()
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}</ProjectGuid>
|
||||
<RootNamespace>PAKBuilder</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,18 +45,13 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -71,6 +66,7 @@
|
|||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{8269dcce-e226-46e4-b9f6-290ab5df2678}</ProjectGuid>
|
||||
<RootNamespace>RendererDirect3D11</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,12 +45,6 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -61,6 +55,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -80,6 +75,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class CommandBufferD3D11 : public BaseCommandBuffer
|
||||
{
|
||||
ComPtr<ID3D11DeviceContext> _pDeviceContext;
|
||||
|
@ -61,5 +59,4 @@ namespace verus
|
|||
void PrepareSubpass();
|
||||
};
|
||||
VERUS_TYPEDEFS(CommandBufferD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class RendererD3D11;
|
||||
|
||||
class ExtRealityD3D11 : public BaseExtReality
|
||||
|
@ -62,5 +60,4 @@ namespace verus
|
|||
virtual void EndAreaUpdate(PcVector4 pUserOffset) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(ExtRealityD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class GeometryD3D11 : public BaseGeometry
|
||||
{
|
||||
struct BufferEx
|
||||
|
@ -57,5 +55,4 @@ namespace verus
|
|||
ID3D11ShaderResourceView* GetD3DStructuredBufferSRV(int sbIndex) const { return _vStructuredBuffers[sbIndex]._pSRV.Get(); }
|
||||
};
|
||||
VERUS_TYPEDEFS(GeometryD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
D3D11_COMPARISON_FUNC ToNativeCompareOp(CompareOp compareOp);
|
||||
|
||||
UINT ToNativeCubeMapFace(CubeMapFace face);
|
||||
|
@ -20,5 +18,4 @@ namespace verus
|
|||
|
||||
CSZ ToNativeSemanticName(ViaUsage usage);
|
||||
DXGI_FORMAT ToNativeFormat(ViaUsage usage, ViaType type, int components);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class PipelineD3D11 : public BasePipeline
|
||||
{
|
||||
ComPtr<ID3D11VertexShader> _pVS;
|
||||
|
@ -51,5 +49,4 @@ namespace verus
|
|||
void FillBlendStateRenderTargets(RcPipelineDesc desc, int attachmentCount, D3D11_BLEND_DESC& blendDesc);
|
||||
};
|
||||
VERUS_TYPEDEFS(PipelineD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI::RP
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
namespace RP
|
||||
{
|
||||
class D3DAttachment
|
||||
{
|
||||
public:
|
||||
|
@ -71,6 +67,4 @@ namespace verus
|
|||
CubeMapFace _cubeMapFace = CubeMapFace::none;
|
||||
};
|
||||
VERUS_TYPEDEFS(D3DFramebuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
typedef Store<CommandBufferD3D11> TStoreCommandBuffers;
|
||||
typedef Store<GeometryD3D11> TStoreGeometry;
|
||||
typedef Store<PipelineD3D11> TStorePipelines;
|
||||
|
@ -93,7 +91,6 @@ namespace verus
|
|||
// </Resources>
|
||||
};
|
||||
VERUS_TYPEDEFS(RendererD3D11);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_QREF_RENDERER_D3D11 CGI::PRendererD3D11 pRendererD3D11 = CGI::RendererD3D11::P()
|
||||
|
|
|
@ -191,10 +191,10 @@ void ShaderD3D11::Done()
|
|||
for (auto& dsd : _vDescriptorSetDesc)
|
||||
dsd._pConstantBuffer.Reset();
|
||||
|
||||
for (auto& x : _mapCompiled)
|
||||
for (auto& [key, value] : _mapCompiled)
|
||||
{
|
||||
VERUS_FOR(i, +Stage::count)
|
||||
x.second._pBlobs[i].Reset();
|
||||
value._pBlobs[i].Reset();
|
||||
}
|
||||
|
||||
VERUS_DONE(ShaderD3D11);
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct ShaderInclude : public ID3DInclude
|
||||
{
|
||||
public:
|
||||
|
@ -104,5 +102,4 @@ namespace verus
|
|||
void OnError(CSZ s) const;
|
||||
};
|
||||
VERUS_TYPEDEFS(ShaderD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class TextureD3D11 : public BaseTexture
|
||||
{
|
||||
ComPtr<ID3D11Texture2D> _pTexture2D;
|
||||
|
@ -52,5 +50,4 @@ namespace verus
|
|||
static DXGI_FORMAT RemoveSRGB(DXGI_FORMAT format);
|
||||
};
|
||||
VERUS_TYPEDEFS(TextureD3D11);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{53923514-84B2-4B78-889A-8709C6BFA3A5}</ProjectGuid>
|
||||
<RootNamespace>RendererDirect3D12</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,12 +45,6 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -61,6 +55,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -80,6 +75,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class CommandBufferD3D12 : public BaseCommandBuffer
|
||||
{
|
||||
ComPtr<ID3D12CommandAllocator> _pOneTimeCommandAllocator;
|
||||
|
@ -67,5 +65,4 @@ namespace verus
|
|||
void PrepareSubpass();
|
||||
};
|
||||
VERUS_TYPEDEFS(CommandBufferD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class DescriptorHeap
|
||||
{
|
||||
ComPtr<ID3D12DescriptorHeap> _pDescriptorHeap;
|
||||
|
@ -57,5 +55,4 @@ namespace verus
|
|||
int GetOffset() const { return _offset; }
|
||||
};
|
||||
VERUS_TYPEDEFS(DynamicDescriptorHeap);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class RendererD3D12;
|
||||
|
||||
class ExtRealityD3D12 : public BaseExtReality
|
||||
|
@ -63,5 +61,4 @@ namespace verus
|
|||
virtual void EndAreaUpdate(PcVector4 pUserOffset) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(ExtRealityD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class GeometryD3D12 : public BaseGeometry
|
||||
{
|
||||
struct BufferEx
|
||||
|
@ -68,5 +66,4 @@ namespace verus
|
|||
void UpdateUtilization() const;
|
||||
};
|
||||
VERUS_TYPEDEFS(GeometryD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
D3D12_COMPARISON_FUNC ToNativeCompareOp(CompareOp compareOp);
|
||||
|
||||
UINT ToNativeCubeMapFace(CubeMapFace face);
|
||||
|
@ -23,5 +21,4 @@ namespace verus
|
|||
|
||||
CSZ ToNativeSemanticName(ViaUsage usage);
|
||||
DXGI_FORMAT ToNativeFormat(ViaUsage usage, ViaType type, int components);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class PipelineD3D12 : public BasePipeline
|
||||
{
|
||||
ComPtr<ID3D12PipelineState> _pPipelineState;
|
||||
|
@ -33,5 +31,4 @@ namespace verus
|
|||
void FillBlendStateRenderTargets(RcPipelineDesc desc, int attachmentCount, D3D12_BLEND_DESC& blendDesc);
|
||||
};
|
||||
VERUS_TYPEDEFS(PipelineD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI::RP
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
namespace RP
|
||||
{
|
||||
class D3DAttachment
|
||||
{
|
||||
public:
|
||||
|
@ -75,6 +71,4 @@ namespace verus
|
|||
CubeMapFace _cubeMapFace = CubeMapFace::none;
|
||||
};
|
||||
VERUS_TYPEDEFS(D3DFramebuffer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
typedef Store<CommandBufferD3D12> TStoreCommandBuffers;
|
||||
typedef Store<GeometryD3D12> TStoreGeometry;
|
||||
typedef Store<PipelineD3D12> TStorePipelines;
|
||||
|
@ -123,7 +121,6 @@ namespace verus
|
|||
virtual void UpdateUtilization() override;
|
||||
};
|
||||
VERUS_TYPEDEFS(RendererD3D12);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_QREF_RENDERER_D3D12 CGI::PRendererD3D12 pRendererD3D12 = CGI::RendererD3D12::P()
|
||||
|
|
|
@ -197,12 +197,12 @@ void ShaderD3D12::Done()
|
|||
|
||||
_pRootSignature.Reset(); // Can be shared with another shader, don't check ref count.
|
||||
|
||||
for (auto& x : _mapCompiled)
|
||||
for (auto& [key, value] : _mapCompiled)
|
||||
{
|
||||
VERUS_FOR(i, +Stage::count)
|
||||
{
|
||||
VERUS_COM_RELEASE_CHECK(x.second._pBlobs[i].Get());
|
||||
x.second._pBlobs[i].Reset();
|
||||
VERUS_COM_RELEASE_CHECK(value._pBlobs[i].Get());
|
||||
value._pBlobs[i].Reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct ShaderInclude : public ID3DInclude
|
||||
{
|
||||
public:
|
||||
|
@ -113,5 +111,4 @@ namespace verus
|
|||
void UpdateUtilization() const;
|
||||
};
|
||||
VERUS_TYPEDEFS(ShaderD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class TextureD3D12 : public BaseTexture
|
||||
{
|
||||
struct ResourceEx
|
||||
|
@ -58,5 +56,4 @@ namespace verus
|
|||
static DXGI_FORMAT RemoveSRGB(DXGI_FORMAT format);
|
||||
};
|
||||
VERUS_TYPEDEFS(TextureD3D12);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{C9195A1C-9224-4B40-BBBC-AA90EF3BE3E0}</ProjectGuid>
|
||||
<RootNamespace>RendererVulkan</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,12 +45,6 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -61,6 +55,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -80,6 +75,7 @@
|
|||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<AdditionalIncludeDirectories>$(ProjectDir)src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class CommandBufferVulkan : public BaseCommandBuffer
|
||||
{
|
||||
VkCommandBuffer _commandBuffers[BaseRenderer::s_ringBufferSize] = {};
|
||||
|
@ -54,5 +52,4 @@ namespace verus
|
|||
VkCommandBuffer GetVkCommandBuffer() const;
|
||||
};
|
||||
VERUS_TYPEDEFS(CommandBufferVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,18 +98,18 @@ bool Descriptors::CreatePool(bool freeDescriptorSet)
|
|||
vkdpci.flags = freeDescriptorSet ? VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT : 0;
|
||||
Vector<VkDescriptorPoolSize> vDescriptorPoolSizes;
|
||||
vDescriptorPoolSizes.reserve(_mapTypeCount.size());
|
||||
for (const auto& kv : _mapTypeCount)
|
||||
for (const auto& [key, value] : _mapTypeCount)
|
||||
{
|
||||
VkDescriptorPoolSize vkdps;
|
||||
vkdps.type = kv.first;
|
||||
vkdps.descriptorCount = kv.second;
|
||||
vkdps.type = key;
|
||||
vkdps.descriptorCount = value;
|
||||
vDescriptorPoolSizes.push_back(vkdps);
|
||||
|
||||
switch (kv.first)
|
||||
switch (key)
|
||||
{
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
|
||||
vkdpci.maxSets += kv.second;
|
||||
vkdpci.maxSets += value;
|
||||
}
|
||||
}
|
||||
vkdpci.poolSizeCount = Utils::Cast32(vDescriptorPoolSizes.size());
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class Descriptors : public Object
|
||||
{
|
||||
typedef Map<VkDescriptorType, int> TMapTypeCount;
|
||||
|
@ -63,5 +61,4 @@ namespace verus
|
|||
}
|
||||
};
|
||||
VERUS_TYPEDEFS(Descriptors);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class RendererVulkan;
|
||||
|
||||
class ExtRealityVulkan : public BaseExtReality
|
||||
|
@ -61,5 +59,4 @@ namespace verus
|
|||
virtual void EndAreaUpdate(PcVector4 pUserOffset) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(ExtRealityVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class GeometryVulkan : public BaseGeometry
|
||||
{
|
||||
static const int s_maxStorageBuffers = 8;
|
||||
|
@ -72,5 +70,4 @@ namespace verus
|
|||
void UpdateUtilization() const;;
|
||||
};
|
||||
VERUS_TYPEDEFS(GeometryVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
VkCompareOp ToNativeCompareOp(CompareOp compareOp);
|
||||
|
||||
uint32_t ToNativeCubeMapFace(CubeMapFace face);
|
||||
|
@ -25,5 +23,4 @@ namespace verus
|
|||
|
||||
int ToNativeLocation(ViaUsage usage, int usageIndex);
|
||||
VkFormat ToNativeFormat(ViaUsage usage, ViaType type, int components);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class PipelineVulkan : public BasePipeline
|
||||
{
|
||||
VkPipeline _pipeline = VK_NULL_HANDLE;
|
||||
|
@ -27,5 +25,4 @@ namespace verus
|
|||
void FillColorBlendAttachmentStates(RcPipelineDesc desc, int attachmentCount, VkPipelineColorBlendAttachmentState vkpcbas[]);
|
||||
};
|
||||
VERUS_TYPEDEFS(PipelineVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
enum class HostAccess : int
|
||||
{
|
||||
forbidden,
|
||||
|
@ -211,7 +209,6 @@ namespace verus
|
|||
bool IsAdvancedLineRasterizationSupported() const { return _advancedLineRasterization; }
|
||||
};
|
||||
VERUS_TYPEDEFS(RendererVulkan);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
|
|
@ -209,12 +209,12 @@ void ShaderVulkan::Done()
|
|||
for (auto& x : _vDescriptorSetDesc)
|
||||
VERUS_VULKAN_DESTROY(x._buffer, vmaDestroyBuffer(pRendererVulkan->GetVmaAllocator(), x._buffer, x._vmaAllocation));
|
||||
_vDescriptorSetDesc.clear();
|
||||
for (auto& kv : _mapCompiled)
|
||||
for (auto& [key, value] : _mapCompiled)
|
||||
{
|
||||
VERUS_FOR(i, +Stage::count)
|
||||
{
|
||||
VERUS_VULKAN_DESTROY(kv.second._shaderModules[i],
|
||||
vkDestroyShaderModule(pRendererVulkan->GetVkDevice(), kv.second._shaderModules[i], pRendererVulkan->GetAllocator()));
|
||||
VERUS_VULKAN_DESTROY(value._shaderModules[i],
|
||||
vkDestroyShaderModule(pRendererVulkan->GetVkDevice(), value._shaderModules[i], pRendererVulkan->GetAllocator()));
|
||||
}
|
||||
}
|
||||
_mapCompiled.clear();
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class ShaderVulkan : public BaseShader
|
||||
{
|
||||
public:
|
||||
|
@ -82,5 +80,4 @@ namespace verus
|
|||
void UpdateUtilization() const;
|
||||
};
|
||||
VERUS_TYPEDEFS(ShaderVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class TextureVulkan : public BaseTexture
|
||||
{
|
||||
struct BufferEx
|
||||
|
@ -59,5 +57,4 @@ namespace verus
|
|||
static VkFormat RemoveSRGB(VkFormat format);
|
||||
};
|
||||
VERUS_TYPEDEFS(TextureVulkan);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}</ProjectGuid>
|
||||
<RootNamespace>TextureTool</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,18 +45,13 @@
|
|||
<Import Project="..\Verus\Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
@ -71,6 +66,7 @@
|
|||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
|
|
70
Verus.sln
70
Verus.sln
|
@ -1,25 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29613.14
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.7.34003.232
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Verus", "Verus\Verus.vcxproj", "{B154D670-E4B1-4D8A-885C-69546A5BD833}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloTexturedCube", "HelloTexturedCube\HelloTexturedCube.vcxproj", "{26BD6E61-E36D-464A-A312-4110ADF10083}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloTriangle", "HelloTriangle\HelloTriangle.vcxproj", "{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PAKBuilder", "PAKBuilder\PAKBuilder.vcxproj", "{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RendererDirect3D11", "RendererDirect3D11\RendererDirect3D11.vcxproj", "{8269DCCE-E226-46E4-B9F6-290AB5DF2678}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RendererDirect3D12", "RendererDirect3D12\RendererDirect3D12.vcxproj", "{53923514-84B2-4B78-889A-8709C6BFA3A5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RendererVulkan", "RendererVulkan\RendererVulkan.vcxproj", "{C9195A1C-9224-4B40-BBBC-AA90EF3BE3E0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VulkanShaderCompiler", "VulkanShaderCompiler\VulkanShaderCompiler.vcxproj", "{1EA5F5D1-9138-406D-871B-3CD75343E14C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PAKBuilder", "PAKBuilder\PAKBuilder.vcxproj", "{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TextureTool", "TextureTool\TextureTool.vcxproj", "{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloTriangle", "HelloTriangle\HelloTriangle.vcxproj", "{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Verus", "Verus\Verus.vcxproj", "{B154D670-E4B1-4D8A-885C-69546A5BD833}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloTexturedCube", "HelloTexturedCube\HelloTexturedCube.vcxproj", "{26BD6E61-E36D-464A-A312-4110ADF10083}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RendererDirect3D11", "RendererDirect3D11\RendererDirect3D11.vcxproj", "{8269DCCE-E226-46E4-B9F6-290AB5DF2678}"
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VulkanShaderCompiler", "VulkanShaderCompiler\VulkanShaderCompiler.vcxproj", "{1EA5F5D1-9138-406D-871B-3CD75343E14C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
@ -27,10 +27,22 @@ Global
|
|||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Debug|x64.Build.0 = Debug|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Release|x64.ActiveCfg = Release|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Release|x64.Build.0 = Release|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Debug|x64.Build.0 = Debug|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Release|x64.ActiveCfg = Release|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Release|x64.Build.0 = Release|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Debug|x64.Build.0 = Debug|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Release|x64.ActiveCfg = Release|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Release|x64.Build.0 = Release|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Debug|x64.Build.0 = Debug|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Release|x64.ActiveCfg = Release|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Release|x64.Build.0 = Release|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Debug|x64.Build.0 = Debug|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Release|x64.ActiveCfg = Release|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Release|x64.Build.0 = Release|x64
|
||||
{53923514-84B2-4B78-889A-8709C6BFA3A5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{53923514-84B2-4B78-889A-8709C6BFA3A5}.Debug|x64.Build.0 = Debug|x64
|
||||
{53923514-84B2-4B78-889A-8709C6BFA3A5}.Release|x64.ActiveCfg = Release|x64
|
||||
|
@ -39,30 +51,18 @@ Global
|
|||
{C9195A1C-9224-4B40-BBBC-AA90EF3BE3E0}.Debug|x64.Build.0 = Debug|x64
|
||||
{C9195A1C-9224-4B40-BBBC-AA90EF3BE3E0}.Release|x64.ActiveCfg = Release|x64
|
||||
{C9195A1C-9224-4B40-BBBC-AA90EF3BE3E0}.Release|x64.Build.0 = Release|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Debug|x64.Build.0 = Debug|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Release|x64.ActiveCfg = Release|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Release|x64.Build.0 = Release|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Debug|x64.Build.0 = Debug|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Release|x64.ActiveCfg = Release|x64
|
||||
{EBF1E2F9-65AA-419D-A3D3-AD66EB086E57}.Release|x64.Build.0 = Release|x64
|
||||
{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}.Debug|x64.Build.0 = Debug|x64
|
||||
{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}.Release|x64.ActiveCfg = Release|x64
|
||||
{5A1A3E76-7F69-48B6-B1E3-F6BB281B7E73}.Release|x64.Build.0 = Release|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Debug|x64.Build.0 = Debug|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Release|x64.ActiveCfg = Release|x64
|
||||
{BC17ACD3-97EB-4D5C-A2C9-574CDAA7576B}.Release|x64.Build.0 = Release|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Debug|x64.Build.0 = Debug|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Release|x64.ActiveCfg = Release|x64
|
||||
{26BD6E61-E36D-464A-A312-4110ADF10083}.Release|x64.Build.0 = Release|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Debug|x64.Build.0 = Debug|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Release|x64.ActiveCfg = Release|x64
|
||||
{8269DCCE-E226-46E4-B9F6-290AB5DF2678}.Release|x64.Build.0 = Release|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Debug|x64.Build.0 = Debug|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Release|x64.ActiveCfg = Release|x64
|
||||
{B154D670-E4B1-4D8A-885C-69546A5BD833}.Release|x64.Build.0 = Release|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Debug|x64.Build.0 = Debug|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Release|x64.ActiveCfg = Release|x64
|
||||
{1EA5F5D1-9138-406D-871B-3CD75343E14C}.Release|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<IncludePath>C:\Compressonator_4.3.206\include;C:\Home\Projects\Verus\verus\Verus\src;C:\Home\Middleware\AMD Tootle 2.3\include;C:\Home\Middleware\bullet3-2.89\src;C:\Home\Middleware\bullet3-2.89\Extras;C:\Home\Middleware\libogg-1.3.5\include;C:\Home\Middleware\libvorbis-1.3.7\include;C:\Home\Middleware\openal-soft-1.22.0-bin\include;C:\Home\Middleware\OpenXR-SDK-release-1.0.27\include;C:\Home\Middleware\SDL2-2.0.22\include;C:\Home\Middleware\WinPixEventRuntime\include;C:\VulkanSDK\1.3.239.0\Include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Compressonator_4.3.206\lib\VS2019\x64;C:\Home\Middleware\bullet3-2.89\bin;C:\Home\Middleware\AMD Tootle 2.3\lib;C:\Home\Middleware\libogg-1.3.5\lib;C:\Home\Middleware\libvorbis-1.3.7\lib2;C:\Home\Middleware\openal-soft-1.22.0-bin\libs\Win64;C:\Home\Middleware\OpenXR-SDK-release-1.0.27\lib;C:\Home\Middleware\SDL2-2.0.22\lib\x64;C:\Home\Middleware\WinPixEventRuntime\lib;C:\VulkanSDK\1.3.239.0\Lib;$(LibraryPath)</LibraryPath>
|
||||
<IncludePath>C:\Compressonator_4.3.206\include;C:\Home\Projects\Verus\verus\Verus\src;C:\Home\Middleware\AMD Tootle 2.3\include;C:\Home\Middleware\bullet3-3.25\src;C:\Home\Middleware\bullet3-3.25\Extras;C:\Home\Middleware\libogg-1.3.5\include;C:\Home\Middleware\libvorbis-1.3.7\include;C:\Home\Middleware\openal-soft-1.22.0-bin\include;C:\Home\Middleware\OpenXR-SDK-release-1.0.27\include;C:\Home\Middleware\SDL2-2.0.22\include;C:\Home\Middleware\WinPixEventRuntime\include;C:\VulkanSDK\1.3.239.0\Include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>C:\Compressonator_4.3.206\lib\VS2019\x64;C:\Home\Middleware\bullet3-3.25\bin;C:\Home\Middleware\AMD Tootle 2.3\lib;C:\Home\Middleware\libogg-1.3.5\lib;C:\Home\Middleware\libvorbis-1.3.7\lib2;C:\Home\Middleware\openal-soft-1.22.0-bin\libs\Win64;C:\Home\Middleware\OpenXR-SDK-release-1.0.27\lib;C:\Home\Middleware\SDL2-2.0.22\lib\x64;C:\Home\Middleware\WinPixEventRuntime\lib;C:\VulkanSDK\1.3.239.0\Lib;$(LibraryPath)</LibraryPath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup />
|
||||
|
|
|
@ -11,23 +11,23 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<VCProjectVersion>17.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{B154D670-E4B1-4D8A-885C-69546A5BD833}</ProjectGuid>
|
||||
<RootNamespace>Verus</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0.20348.0</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.22000.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<PlatformToolset>v143</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
|
@ -45,12 +45,6 @@
|
|||
<Import Project="Verus.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
|
@ -60,6 +54,7 @@
|
|||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>verus.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -78,6 +73,7 @@
|
|||
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||
<PrecompiledHeaderFile>verus.h</PrecompiledHeaderFile>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
<LanguageStandard>stdcpp20</LanguageStandard>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>
|
||||
|
@ -216,7 +212,6 @@
|
|||
<ClInclude Include="src\Global\Macros.h" />
|
||||
<ClInclude Include="src\Global\Global.h" />
|
||||
<ClInclude Include="src\Global\STL.h" />
|
||||
<ClInclude Include="src\Global\SyntaxHighlight.h" />
|
||||
<ClInclude Include="src\Global\Typedef.h" />
|
||||
<ClInclude Include="src\IO\StreamPtr.h" />
|
||||
<ClInclude Include="src\IO\Vwx.h" />
|
||||
|
|
|
@ -165,9 +165,6 @@
|
|||
<ClInclude Include="src\Global\STL.h">
|
||||
<Filter>src\Global</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Global\SyntaxHighlight.h">
|
||||
<Filter>src\Global</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src\Global\Typedef.h">
|
||||
<Filter>src\Global</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::AI
|
||||
{
|
||||
namespace AI
|
||||
{
|
||||
struct TaskDriverDelegate
|
||||
{
|
||||
virtual void TaskDriver_OnTask(CSZ task, CSZ mode) = 0;
|
||||
|
@ -55,5 +53,4 @@ namespace verus
|
|||
void AddTask(CSZ name, float chance, float intervalMin, float intervalMax, CSZ mode = nullptr);
|
||||
};
|
||||
VERUS_TYPEDEFS(TaskDriver);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::AI
|
||||
{
|
||||
namespace AI
|
||||
{
|
||||
class Turret
|
||||
{
|
||||
float _targetPitch = 0;
|
||||
|
@ -34,5 +32,4 @@ namespace verus
|
|||
void LookAt(RcVector3 rayFromTurret, bool instantly = false);
|
||||
};
|
||||
VERUS_TYPEDEFS(Turret);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
struct AnimationDelegate
|
||||
{
|
||||
virtual void Animation_OnEnd(CSZ name) {}
|
||||
|
@ -110,5 +108,4 @@ namespace verus
|
|||
int* GetTriggerStatesArray() { return _vTriggerStates.empty() ? nullptr : _vTriggerStates.data(); }
|
||||
};
|
||||
VERUS_TYPEDEFS(Animation);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
template<typename T, bool angle = false>
|
||||
class Elastic
|
||||
{
|
||||
|
@ -131,5 +129,4 @@ namespace verus
|
|||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -462,16 +462,16 @@ void Motion::Bone::DeleteRedundantKeyframes(float boneAccLength)
|
|||
// Which keyframe can be removed with the least error?
|
||||
float leastError = threshold;
|
||||
int frameWithLeastError = -1;
|
||||
for (const auto& kv : mapSaved)
|
||||
for (const auto& [key, value] : mapSaved)
|
||||
{
|
||||
const int excludeFrame = kv.first;
|
||||
const int excludeFrame = key;
|
||||
if (!excludeFrame || _pMotion->GetFrameCount() == excludeFrame)
|
||||
continue;
|
||||
_mapRot.clear();
|
||||
for (const auto& kv2 : mapSaved)
|
||||
for (const auto& [key2, value2] : mapSaved)
|
||||
{
|
||||
if (kv2.first != excludeFrame)
|
||||
_mapRot[kv2.first] = kv2.second;
|
||||
if (key2 != excludeFrame)
|
||||
_mapRot[key2] = value2;
|
||||
}
|
||||
|
||||
float accError = 0;
|
||||
|
@ -523,16 +523,16 @@ void Motion::Bone::DeleteRedundantKeyframes(float boneAccLength)
|
|||
// Which keyframe can be removed with the least error?
|
||||
float leastError = threshold;
|
||||
int frameWithLeastError = -1;
|
||||
for (const auto& kv : mapSaved)
|
||||
for (const auto& [key, value] : mapSaved)
|
||||
{
|
||||
const int excludeFrame = kv.first;
|
||||
const int excludeFrame = key;
|
||||
if (!excludeFrame || _pMotion->GetFrameCount() == excludeFrame)
|
||||
continue;
|
||||
_mapPos.clear();
|
||||
for (const auto& kv2 : mapSaved)
|
||||
for (const auto& [key2, value2] : mapSaved)
|
||||
{
|
||||
if (kv2.first != excludeFrame)
|
||||
_mapPos[kv2.first] = kv2.second;
|
||||
if (key2 != excludeFrame)
|
||||
_mapPos[key2] = value2;
|
||||
}
|
||||
|
||||
float accError = 0;
|
||||
|
@ -584,16 +584,16 @@ void Motion::Bone::DeleteRedundantKeyframes(float boneAccLength)
|
|||
// Which keyframe can be removed with the least error?
|
||||
float leastError = threshold;
|
||||
int frameWithLeastError = -1;
|
||||
for (const auto& kv : mapSaved)
|
||||
for (const auto& [key, value] : mapSaved)
|
||||
{
|
||||
const int excludeFrame = kv.first;
|
||||
const int excludeFrame = key;
|
||||
if (!excludeFrame || _pMotion->GetFrameCount() == excludeFrame)
|
||||
continue;
|
||||
_mapScale.clear();
|
||||
for (const auto& kv2 : mapSaved)
|
||||
for (const auto& [key2, value2] : mapSaved)
|
||||
{
|
||||
if (kv2.first != excludeFrame)
|
||||
_mapScale[kv2.first] = kv2.second;
|
||||
if (key2 != excludeFrame)
|
||||
_mapScale[key2] = value2;
|
||||
}
|
||||
|
||||
float accError = 0;
|
||||
|
@ -927,10 +927,10 @@ void Motion::Done()
|
|||
Motion::PBone Motion::GetBoneByIndex(int index)
|
||||
{
|
||||
int i = 0;
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
if (i == index)
|
||||
return &kv.second;
|
||||
return &value;
|
||||
i++;
|
||||
}
|
||||
return nullptr;
|
||||
|
@ -989,9 +989,9 @@ void Motion::Serialize(IO::RStream stream)
|
|||
stream << _fps;
|
||||
stream << GetBoneCount();
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
stream.WriteString(_C(bone.GetName()));
|
||||
bone.Serialize(stream, version);
|
||||
}
|
||||
|
@ -1078,27 +1078,27 @@ void Motion::DeleteRedundantKeyframes(Map<String, float>& mapBoneAccLengths)
|
|||
|
||||
void Motion::DeleteOddKeyframes()
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second.DeleteOddKeyframes();
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value.DeleteOddKeyframes();
|
||||
}
|
||||
|
||||
void Motion::InsertLoopKeyframes()
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second.InsertLoopKeyframes();
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value.InsertLoopKeyframes();
|
||||
}
|
||||
|
||||
void Motion::Cut(int frame, bool before)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second.Cut(frame, before);
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value.Cut(frame, before);
|
||||
_frameCount = before ? _frameCount - frame : frame + 1;
|
||||
}
|
||||
|
||||
void Motion::Fix(bool speedLimit)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second.Fix(speedLimit);
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value.Fix(speedLimit);
|
||||
}
|
||||
|
||||
void Motion::ProcessTriggers(float time, PMotionDelegate p, int* pUserTriggerStates)
|
||||
|
@ -1110,9 +1110,9 @@ void Motion::ProcessTriggers(float time, PMotionDelegate p, int* pUserTriggerSta
|
|||
nativeTime = GetNativeDuration() - nativeTime;
|
||||
|
||||
int i = 0;
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
PBone pBone = &kv.second;
|
||||
PBone pBone = &value;
|
||||
int state = 0;
|
||||
if (!(_reversed && nativeTime < _fpsInv * 0.5f)) // Avoid edge case for the first frame in reverse.
|
||||
pBone->ComputeTriggerAt(nativeTime, state);
|
||||
|
@ -1132,9 +1132,9 @@ void Motion::ProcessTriggers(float time, PMotionDelegate p, int* pUserTriggerSta
|
|||
void Motion::ResetTriggers(int* pUserTriggerStates)
|
||||
{
|
||||
int i = 0;
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
PBone pBone = &kv.second;
|
||||
PBone pBone = &value;
|
||||
int state = 0;
|
||||
if (_reversed)
|
||||
pBone->ComputeTriggerAt(GetNativeDuration(), state);
|
||||
|
@ -1153,9 +1153,9 @@ void Motion::SkipTriggers(float time, int* pUserTriggerStates)
|
|||
nativeTime = GetNativeDuration() - nativeTime;
|
||||
|
||||
int i = 0;
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
PBone pBone = &kv.second;
|
||||
PBone pBone = &value;
|
||||
int state;
|
||||
pBone->ComputeTriggerAt(nativeTime, state);
|
||||
if (pUserTriggerStates)
|
||||
|
@ -1242,14 +1242,14 @@ void Motion::Exec(CSZ code, PBone pBone, Bone::Channel channel)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (auto& bone : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
if (!strcmp(what, "rot"))
|
||||
bone.second._mapRot.clear();
|
||||
value._mapRot.clear();
|
||||
if (!strcmp(what, "pos"))
|
||||
bone.second._mapPos.clear();
|
||||
value._mapPos.clear();
|
||||
if (!strcmp(what, "scale"))
|
||||
bone.second._mapScale.clear();
|
||||
value._mapScale.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
struct MotionDelegate
|
||||
{
|
||||
virtual void Motion_OnTrigger(CSZ name, int state) = 0;
|
||||
|
@ -297,9 +295,9 @@ namespace verus
|
|||
template<typename T>
|
||||
void ForEachBone(const T& fn)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
if (Continue::no == fn(kv.second))
|
||||
if (Continue::no == fn(value))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -338,5 +336,4 @@ namespace verus
|
|||
static bool ExtractNestBone(CSZ name, SZ nestBone);
|
||||
};
|
||||
VERUS_TYPEDEFS(Motion);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
class Orbit
|
||||
{
|
||||
Matrix3 _matrix;
|
||||
|
@ -43,5 +41,4 @@ namespace verus
|
|||
void SetMaxPitch(float a) { _maxPitch = a; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Orbit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
// Shaker can load standard wav file, 8-bit mono, and use it as a function of time.
|
||||
// Works well for camera's shaking effects.
|
||||
class Shaker
|
||||
|
@ -45,5 +43,4 @@ namespace verus
|
|||
void SetLooping(float looping) { _looping = looping; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Shaker);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,8 +16,8 @@ Skeleton::~Skeleton()
|
|||
void Skeleton::operator=(RcSkeleton that)
|
||||
{
|
||||
Init();
|
||||
for (const auto& kv : that._mapBones)
|
||||
_mapBones[kv.first] = kv.second;
|
||||
for (const auto& [key, value] : that._mapBones)
|
||||
_mapBones[key] = value;
|
||||
_primaryBoneCount = that._primaryBoneCount;
|
||||
}
|
||||
|
||||
|
@ -36,9 +36,9 @@ void Skeleton::Draw(bool bindPose, PcTransform3 pMat, int selected)
|
|||
{
|
||||
VERUS_QREF_DD;
|
||||
dd.Begin(CGI::DebugDraw::Type::lines, pMat, false);
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
PcBone pBone = &kv.second;
|
||||
PcBone pBone = &value;
|
||||
PcBone pParent = FindBone(_C(pBone->_parentName));
|
||||
if (pParent)
|
||||
{
|
||||
|
@ -58,9 +58,9 @@ void Skeleton::Draw(bool bindPose, PcTransform3 pMat, int selected)
|
|||
}
|
||||
}
|
||||
}
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
PcBone pBone = &kv.second;
|
||||
PcBone pBone = &value;
|
||||
const Transform3 mat = bindPose ? pBone->_matFromBoneSpace : pBone->_matFinal * pBone->_matFromBoneSpace;
|
||||
|
||||
const float scale = 0.04f;
|
||||
|
@ -122,10 +122,10 @@ Skeleton::PcBone Skeleton::FindBone(CSZ name) const
|
|||
|
||||
Skeleton::PBone Skeleton::FindBoneByIndex(int index)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
if (kv.second._shaderIndex == index)
|
||||
return &kv.second;
|
||||
if (value._shaderIndex == index)
|
||||
return &value;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -134,9 +134,9 @@ void Skeleton::ApplyMotion(RMotion motion, float time, int layeredMotionCount, P
|
|||
{
|
||||
if (_ragdollMode)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (bone._pRigidBody)
|
||||
{
|
||||
btTransform btr;
|
||||
|
@ -176,9 +176,9 @@ void Skeleton::ApplyMotion(RMotion motion, float time, int layeredMotionCount, P
|
|||
_pLayeredMotions = pLayeredMotions;
|
||||
|
||||
ResetBones();
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (!bone._ready)
|
||||
{
|
||||
_pCurrentBone = &bone;
|
||||
|
@ -198,9 +198,9 @@ void Skeleton::ApplyMotion(RMotion motion, float time, int layeredMotionCount, P
|
|||
|
||||
void Skeleton::UpdateUniformBufferArray(mataff* p) const
|
||||
{
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
RcBone bone = kv.second;
|
||||
RcBone bone = value;
|
||||
if (bone._shaderIndex >= 0 && bone._shaderIndex < VERUS_MAX_BONES)
|
||||
p[bone._shaderIndex] = bone._matFinal.UniformBufferFormat();
|
||||
}
|
||||
|
@ -208,17 +208,17 @@ void Skeleton::UpdateUniformBufferArray(mataff* p) const
|
|||
|
||||
void Skeleton::ResetFinalPose()
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
kv.second._matFinal = Transform3::identity();
|
||||
kv.second._matFinalInv = Transform3::identity();
|
||||
value._matFinal = Transform3::identity();
|
||||
value._matFinalInv = Transform3::identity();
|
||||
}
|
||||
}
|
||||
|
||||
void Skeleton::ResetBones()
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second._ready = false;
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value._ready = false;
|
||||
}
|
||||
|
||||
void Skeleton::RecursiveBoneUpdate()
|
||||
|
@ -300,8 +300,8 @@ void Skeleton::RecursiveBoneUpdate()
|
|||
|
||||
void Skeleton::InsertBonesIntoMotion(RMotion motion) const
|
||||
{
|
||||
for (const auto& kv : _mapBones)
|
||||
motion.InsertBone(_C(kv.first));
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
motion.InsertBone(_C(key));
|
||||
}
|
||||
|
||||
void Skeleton::DeleteOutsiders(RMotion motion) const
|
||||
|
@ -332,9 +332,9 @@ void Skeleton::AdjustPrimaryBones(const Vector<String>& vPrimaryBones)
|
|||
if (inverse)
|
||||
std::swap(addPri, addSec);
|
||||
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
RcBone bone = kv.second;
|
||||
RcBone bone = value;
|
||||
if (vPrimaryBones.end() != std::find(vPrimaryBones.begin(), vPrimaryBones.end(), bone._name))
|
||||
mapSort[bone._shaderIndex + addPri] = bone._name;
|
||||
else
|
||||
|
@ -343,11 +343,11 @@ void Skeleton::AdjustPrimaryBones(const Vector<String>& vPrimaryBones)
|
|||
|
||||
_primaryBoneCount = 0;
|
||||
|
||||
for (const auto& kv : mapSort)
|
||||
for (const auto& [key, value] : mapSort)
|
||||
{
|
||||
if (kv.first < secondaryOffset) // Primary bone:
|
||||
if (key < secondaryOffset) // Primary bone:
|
||||
{
|
||||
PBone pBone = FindBone(_C(kv.second));
|
||||
PBone pBone = FindBone(_C(value));
|
||||
const int newIndex = Utils::Cast32(_mapPrimary.size());
|
||||
_mapPrimary[pBone->_shaderIndex] = newIndex;
|
||||
pBone->_shaderIndex = newIndex;
|
||||
|
@ -355,7 +355,7 @@ void Skeleton::AdjustPrimaryBones(const Vector<String>& vPrimaryBones)
|
|||
}
|
||||
else // Secondary bone:
|
||||
{
|
||||
PBone pBone = FindBone(_C(kv.second));
|
||||
PBone pBone = FindBone(_C(value));
|
||||
PcBone pParent = FindBone(_C(pBone->_parentName));
|
||||
bool isPrimary = false;
|
||||
while (!isPrimary)
|
||||
|
@ -400,9 +400,9 @@ void Skeleton::LoadRigInfo(CSZ url)
|
|||
|
||||
void Skeleton::LoadRigInfoFromPtr(SZ p)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
bone._rigRot = Vector3(0);
|
||||
bone._cRot = Vector3(0);
|
||||
bone._cLimits = Vector3(0);
|
||||
|
@ -419,9 +419,9 @@ void Skeleton::LoadRigInfoFromPtr(SZ p)
|
|||
float massCheck = 0;
|
||||
if (p)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
bone._rigBone = false;
|
||||
}
|
||||
|
||||
|
@ -498,12 +498,12 @@ void Skeleton::BeginRagdoll(RcTransform3 matW, RcVector3 impulse, CSZ bone)
|
|||
const float sleepL = 1.6f;
|
||||
const float sleepA = 2.5f;
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
kv.second._ready = true;
|
||||
for (auto& [key, value] : _mapBones)
|
||||
value._ready = true;
|
||||
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
PcBone pBone = &kv.second;
|
||||
PcBone pBone = &value;
|
||||
PBone pParent = FindBone(_C(pBone->_parentName));
|
||||
|
||||
if (pParent && pParent->_rigBone && !pParent->_pShape) // Create a shape for parent bone:
|
||||
|
@ -574,9 +574,9 @@ void Skeleton::BeginRagdoll(RcTransform3 matW, RcVector3 impulse, CSZ bone)
|
|||
const Transform3 matInitC = Transform3::rotationZYX(Vector3(-VERUS_PI / 2, 0, -VERUS_PI / 2));
|
||||
|
||||
// Create leaf actors and joints:
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
PBone pBone = &kv.second;
|
||||
PBone pBone = &value;
|
||||
PBone pParent = pBone;
|
||||
do
|
||||
{
|
||||
|
@ -667,9 +667,9 @@ void Skeleton::EndRagdoll()
|
|||
{
|
||||
VERUS_QREF_BULLET;
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (bone._pConstraint)
|
||||
{
|
||||
bullet.GetWorld()->removeConstraint(bone._pConstraint);
|
||||
|
@ -678,9 +678,9 @@ void Skeleton::EndRagdoll()
|
|||
}
|
||||
}
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (bone._pRigidBody)
|
||||
{
|
||||
bullet.GetWorld()->removeRigidBody(bone._pRigidBody);
|
||||
|
@ -700,9 +700,9 @@ void Skeleton::EndRagdoll()
|
|||
|
||||
void Skeleton::BakeMotion(RMotion motion, int frame, bool kinect)
|
||||
{
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
RcBone bone = kv.second;
|
||||
RcBone bone = value;
|
||||
if (kinect && !IsKinectBone(_C(bone._name)))
|
||||
continue;
|
||||
PcBone pParent = FindBone(_C(bone._parentName));
|
||||
|
@ -792,9 +792,9 @@ void Skeleton::AdaptBindPoseOf(RcSkeleton that)
|
|||
// TODO: improve.
|
||||
|
||||
const Point3 origin(0);
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone boneDst = kv.second;
|
||||
RBone boneDst = value;
|
||||
PBone pParentDst = FindBone(_C(boneDst._parentName));
|
||||
PcBone pBoneSrc = that.FindBone(_C(boneDst._name));
|
||||
PcBone pParentSrc = pBoneSrc ? that.FindBone(_C(pBoneSrc->_parentName)) : nullptr;
|
||||
|
@ -850,10 +850,10 @@ void Skeleton::SimpleIK(CSZ boneDriven, CSZ boneDriver, RcVector3 dirDriverSpace
|
|||
|
||||
void Skeleton::ProcessKinectData(const BYTE* p, RMotion motion, int frame)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
kv.second._matFinal = Transform3::identity();
|
||||
kv.second._matExternal = Transform3::identity();
|
||||
value._matFinal = Transform3::identity();
|
||||
value._matExternal = Transform3::identity();
|
||||
}
|
||||
|
||||
UINT64 timestamp;
|
||||
|
@ -925,9 +925,9 @@ void Skeleton::ProcessKinectData(const BYTE* p, RMotion motion, int frame)
|
|||
shTwist *= 1 - abs(shAxis.getY());
|
||||
}
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (!IsKinectBone(_C(bone._name)))
|
||||
continue;
|
||||
#if 0
|
||||
|
@ -970,9 +970,9 @@ void Skeleton::ProcessKinectData(const BYTE* p, RMotion motion, int frame)
|
|||
|
||||
VERUS_FOR(i, 4)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (IsKinectBone(_C(bone._name)) && !IsKinectLeafBone(_C(bone._name)))
|
||||
continue;
|
||||
PBone pParent = FindBone(_C(bone._parentName));
|
||||
|
@ -985,10 +985,10 @@ void Skeleton::ProcessKinectData(const BYTE* p, RMotion motion, int frame)
|
|||
|
||||
BakeMotion(motion, frame, true);
|
||||
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
kv.second._matFinal = Transform3::identity();
|
||||
kv.second._matExternal = Transform3::identity();
|
||||
value._matFinal = Transform3::identity();
|
||||
value._matExternal = Transform3::identity();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1033,9 +1033,9 @@ void Skeleton::LoadKinectBindPose(CSZ xml)
|
|||
mapData[pElem->Attribute("n")] = pos;
|
||||
}
|
||||
|
||||
for (const auto& kv : _mapBones)
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
{
|
||||
RBone bone = kv.second;
|
||||
RBone bone = value;
|
||||
if (!IsKinectBone(_C(bone._name)))
|
||||
continue;
|
||||
PBone pParent = FindBone(_C(bone._parentName));
|
||||
|
@ -1229,9 +1229,9 @@ Vector3 Skeleton::GetHighestSpeed(RMotion motion, CSZ name, RcVector3 scale, boo
|
|||
|
||||
void Skeleton::ComputeBoneLengths(Map<String, float>& m, bool accumulated)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
for (auto& [key, value] : _mapBones)
|
||||
{
|
||||
RcBone bone = kv.second;
|
||||
RcBone bone = value;
|
||||
PcBone pParentBone = FindBone(_C(bone._parentName));
|
||||
float len = 0;
|
||||
if (pParentBone)
|
||||
|
@ -1261,7 +1261,7 @@ void Skeleton::ComputeBoneLengths(Map<String, float>& m, bool accumulated)
|
|||
}
|
||||
if (accumulated) // Add leaf bone lengths?
|
||||
{
|
||||
for (auto& kv : m)
|
||||
kv.second += 0.02f;
|
||||
for (auto& [key, value] : m)
|
||||
value += 0.02f;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
// Standard skeleton, which can be animated using motion object.
|
||||
// X3D format can support up to 256 bones, but the hardware has certain limitations.
|
||||
// With Shader Model 2.0 the shader can hold about 32 bone matrices.
|
||||
|
@ -110,15 +108,15 @@ namespace verus
|
|||
template<typename F>
|
||||
void ForEachBone(const F& fn)
|
||||
{
|
||||
for (auto& kv : _mapBones)
|
||||
if (Continue::no == fn(kv.second))
|
||||
for (auto& [key, value] : _mapBones)
|
||||
if (Continue::no == fn(value))
|
||||
return;
|
||||
}
|
||||
template<typename F>
|
||||
void ForEachBone(const F& fn) const
|
||||
{
|
||||
for (const auto& kv : _mapBones)
|
||||
if (Continue::no == fn(kv.second))
|
||||
for (const auto& [key, value] : _mapBones)
|
||||
if (Continue::no == fn(value))
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -159,5 +157,4 @@ namespace verus
|
|||
void ComputeBoneLengths(Map<String, float>& m, bool accumulated = false);
|
||||
};
|
||||
VERUS_TYPEDEFS(Skeleton);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Anim
|
||||
{
|
||||
namespace Anim
|
||||
{
|
||||
// Warp manages sphere-based deformations to create such effects like dangling and speech.
|
||||
// Any other part of the mesh can also be deformed.
|
||||
// Warp's zone objects can use motion object or can simulate spring physics,
|
||||
|
@ -79,5 +77,4 @@ namespace verus
|
|||
void SetPreview(CSZ preview) { _preview = preview; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Warp);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,10 +11,7 @@ namespace verus
|
|||
void Free_App();
|
||||
}
|
||||
|
||||
namespace verus
|
||||
namespace verus::App
|
||||
{
|
||||
namespace App
|
||||
{
|
||||
void RunEventLoop();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::App
|
||||
{
|
||||
namespace App
|
||||
{
|
||||
enum class DisplayMode : int
|
||||
{
|
||||
exclusiveFullscreen,
|
||||
|
@ -188,5 +186,4 @@ namespace verus
|
|||
float GetScale() const;
|
||||
};
|
||||
VERUS_TYPEDEFS(Settings);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::App
|
||||
{
|
||||
namespace App
|
||||
{
|
||||
class UndoManager : public Object
|
||||
{
|
||||
public:
|
||||
|
@ -67,5 +65,4 @@ namespace verus
|
|||
int GetNextUndo() const { return _nextUndo; }
|
||||
};
|
||||
VERUS_TYPEDEFS(UndoManager);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::App
|
||||
{
|
||||
namespace App
|
||||
{
|
||||
class Window : public Object
|
||||
{
|
||||
SDL_Window* _pWnd = nullptr;
|
||||
|
@ -37,5 +35,4 @@ namespace verus
|
|||
SDL_Window* GetSDL() const { return _pWnd; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Window);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,14 +68,14 @@ void AudioSystem::Update()
|
|||
_streamPlayers[i].Update();
|
||||
|
||||
// Update every frame:
|
||||
for (auto& x : TStoreSounds::_map)
|
||||
x.second.Update();
|
||||
for (auto& [key, value] : TStoreSounds::_map)
|
||||
value.Update();
|
||||
|
||||
// Update ~15 times per second:
|
||||
if (timer.IsEventEvery(67))
|
||||
{
|
||||
for (auto& x : TStoreSounds::_map)
|
||||
x.second.UpdateHRTF();
|
||||
for (auto& [key, value] : TStoreSounds::_map)
|
||||
value.UpdateHRTF();
|
||||
|
||||
if (VMath::lengthSqr(_listenerDirection) > 0.1f &&
|
||||
VMath::lengthSqr(_listenerUp) > 0.1f)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
typedef StoreUnique<String, Sound> TStoreSounds;
|
||||
class AudioSystem : public Singleton<AudioSystem>, public Object, private TStoreSounds
|
||||
{
|
||||
|
@ -41,5 +39,4 @@ namespace verus
|
|||
static CSZ GetSingletonFailMessage() { return "Make_Audio(); // FAIL.\r\n"; }
|
||||
};
|
||||
VERUS_TYPEDEFS(AudioSystem);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#include "verus.h"
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
size_t read_func(void* ptr, size_t size, size_t nmemb, void* datasource)
|
||||
{
|
||||
POggDataSource pDS = static_cast<POggDataSource>(datasource);
|
||||
|
@ -43,5 +41,4 @@ namespace verus
|
|||
}
|
||||
|
||||
const ov_callbacks g_oggCallbacks = { read_func, seek_func, close_func, tell_func };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
struct OggDataSource
|
||||
{
|
||||
const BYTE* _p = nullptr;
|
||||
|
@ -19,5 +17,4 @@ namespace verus
|
|||
long tell_func(void*);
|
||||
|
||||
extern const ov_callbacks g_oggCallbacks;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
struct SoundFlags
|
||||
{
|
||||
enum
|
||||
|
@ -148,5 +146,4 @@ namespace verus
|
|||
return _sounds[i];
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
class Source
|
||||
{
|
||||
friend class SourcePtr; // _pSound @ Attach().
|
||||
|
@ -53,5 +51,4 @@ namespace verus
|
|||
void Done();
|
||||
};
|
||||
VERUS_TYPEDEFS(SourcePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Audio
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
class Track : public IO::AsyncDelegate
|
||||
{
|
||||
Vector<BYTE> _vOggEncodedTrack;
|
||||
|
@ -79,5 +77,4 @@ namespace verus
|
|||
void SetGain(float gain);
|
||||
};
|
||||
VERUS_TYPEDEFS(StreamPlayer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
// View can be a smaller portion of framebuffer with an offset.
|
||||
enum class ViewportScissorFlags : UINT32
|
||||
{
|
||||
|
@ -109,5 +107,4 @@ namespace verus
|
|||
class CommandBufferPwns : public Pwns<CommandBufferPwn, COUNT>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,8 @@
|
|||
|
||||
#define VERUS_XR_DESTROY(xr, fn) {if (XR_NULL_HANDLE != xr) {fn; xr = XR_NULL_HANDLE;}}
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class BaseExtReality : public Object
|
||||
{
|
||||
struct ActionEx
|
||||
|
@ -119,5 +117,4 @@ namespace verus
|
|||
// </AreaAndUser>
|
||||
};
|
||||
VERUS_TYPEDEFS(BaseExtReality);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class BaseCommandBuffer;
|
||||
|
||||
struct GeometryDesc
|
||||
|
@ -68,5 +66,4 @@ namespace verus
|
|||
class GeometryPwns : public Pwns<GeometryPwn, COUNT>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct PipelineDesc
|
||||
{
|
||||
GeometryPtr _geometry;
|
||||
|
@ -88,5 +86,4 @@ namespace verus
|
|||
class PipelinePwns : public Pwns<PipelinePwn, COUNT>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
enum class Gapi : int
|
||||
{
|
||||
unknown,
|
||||
|
@ -104,10 +102,9 @@ namespace verus
|
|||
virtual void UpdateUtilization() {}
|
||||
};
|
||||
VERUS_TYPEDEFS(BaseRenderer);
|
||||
}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
typedef CGI::PBaseRenderer(*PFNCREATERENDERER)(UINT32 version, CGI::BaseRendererDesc* pDesc);
|
||||
typedef PBaseRenderer(*PFNCREATERENDERER)(UINT32 version, BaseRendererDesc* pDesc);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct ShaderDesc
|
||||
{
|
||||
CSZ _url = nullptr;
|
||||
|
@ -99,5 +97,4 @@ namespace verus
|
|||
class ShaderPwns : public Pwns<ShaderPwn, COUNT>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct SamplerDesc
|
||||
{
|
||||
Vector4 _borderColor = Vector4(0);
|
||||
|
@ -152,5 +150,4 @@ namespace verus
|
|||
class TexturePwns : public Pwns<TexturePwn, COUNT>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class DebugDraw : public Singleton<DebugDraw>, public Object
|
||||
{
|
||||
#include "../Shaders/DebugDraw.inc.hlsl"
|
||||
|
@ -73,5 +71,4 @@ namespace verus
|
|||
UINT32 color);
|
||||
};
|
||||
VERUS_TYPEDEFS(DebugDraw);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
enum class LightType : int
|
||||
{
|
||||
none,
|
||||
|
@ -225,5 +223,4 @@ namespace verus
|
|||
void BakeSpritesCleanup();
|
||||
};
|
||||
VERUS_TYPEDEFS(DeferredShading);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
template<typename T>
|
||||
class DynamicBuffer : public GeometryPwn
|
||||
{
|
||||
|
@ -85,5 +83,4 @@ namespace verus
|
|||
return true;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
// See: https://vulkan.gpuinfo.org/listformats.php?platform=android
|
||||
enum class Format : int
|
||||
{
|
||||
|
@ -50,5 +48,4 @@ namespace verus
|
|||
srgbBC3, // Deprecated RGBA.
|
||||
srgbBC7 // RGBA.
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI::RP
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
namespace RP
|
||||
{
|
||||
class Attachment
|
||||
{
|
||||
public:
|
||||
|
@ -88,6 +84,4 @@ namespace verus
|
|||
Dependency& Mode(int mode);
|
||||
};
|
||||
VERUS_TYPEDEFS(Dependency);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
struct RendererDelegate
|
||||
{
|
||||
virtual void Renderer_OnDraw() = 0;
|
||||
|
@ -205,5 +203,4 @@ namespace verus
|
|||
void AddUtilization(CSZ name, INT64 value, INT64 total);
|
||||
};
|
||||
VERUS_TYPEDEFS(Renderer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class RendererParser
|
||||
{
|
||||
static int StrCompare(const void* pA, const void* pB);
|
||||
|
@ -16,5 +14,4 @@ namespace verus
|
|||
static int ExpectStencilOp(CSZ& p, char end, bool skipSpace);
|
||||
static int SkipSpace(CSZ& p);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class Scheduled
|
||||
{
|
||||
UINT64 _doneFrame = UINT64_MAX;
|
||||
|
@ -17,5 +15,4 @@ namespace verus
|
|||
bool IsScheduledAllowed();
|
||||
};
|
||||
VERUS_TYPEDEFS(Scheduled);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
class TextureRAM : public BaseTexture
|
||||
{
|
||||
Vector<BYTE> _vBuffer;
|
||||
|
@ -24,5 +22,4 @@ namespace verus
|
|||
const BYTE* GetData() const { VERUS_RT_ASSERT(IsLoaded()); return _vBuffer.data(); }
|
||||
};
|
||||
VERUS_TYPEDEFS(TextureRAM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::CGI
|
||||
{
|
||||
namespace CGI
|
||||
{
|
||||
enum class CompareOp : int
|
||||
{
|
||||
never,
|
||||
|
@ -213,5 +211,4 @@ namespace verus
|
|||
int _index = 0; // To distinguish between left and right eye or player index in split screen mode.
|
||||
};
|
||||
VERUS_TYPEDEFS(ViewDesc);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
#define VERUS_CT_ASSERT(x) static_assert(x, "VERUS_CT_ASSERT")
|
||||
#define VERUS_CT_ASSERT(x) static_assert(x)
|
||||
|
|
|
@ -6,10 +6,8 @@
|
|||
#define VERUS_LOG_INFO(txt) {StringStream ss_Log; ss_Log << txt; D::Log::I().Write(_C(ss_Log.str()), std::this_thread::get_id(), __FILE__, __LINE__, D::Log::Severity::info);}
|
||||
#define VERUS_LOG_DEBUG(txt) {StringStream ss_Log; ss_Log << txt; D::Log::I().Write(_C(ss_Log.str()), std::this_thread::get_id(), __FILE__, __LINE__, D::Log::Severity::debug);}
|
||||
|
||||
namespace verus
|
||||
namespace verus::D
|
||||
{
|
||||
namespace D
|
||||
{
|
||||
class Log : public Singleton<Log>
|
||||
{
|
||||
public:
|
||||
|
@ -34,5 +32,4 @@ namespace verus
|
|||
static CSZ GetSeverityLetter(Severity severity);
|
||||
static String ExtractFilename(CSZ filename);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::D
|
||||
{
|
||||
namespace D
|
||||
{
|
||||
class Recoverable : public RuntimeError
|
||||
{
|
||||
public:
|
||||
|
@ -27,7 +25,6 @@ namespace verus
|
|||
}
|
||||
};
|
||||
VERUS_TYPEDEFS(Recoverable);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_RECOVERABLE verus::D::Recoverable(std::this_thread::get_id(), __FILE__, __LINE__)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::D
|
||||
{
|
||||
namespace D
|
||||
{
|
||||
// See: https://marknelson.us/posts/2007/11/13/no-exceptions.html
|
||||
class RuntimeError : public std::exception
|
||||
{
|
||||
|
@ -62,7 +60,6 @@ namespace verus
|
|||
bool IsRaised() const { return !!strlen(what()); }
|
||||
};
|
||||
VERUS_TYPEDEFS(RuntimeError);
|
||||
}
|
||||
}
|
||||
|
||||
#define VERUS_RUNTIME_ERROR verus::D::RuntimeError(std::this_thread::get_id(), __FILE__, __LINE__)
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
class Bloom : public Singleton<Bloom>, public Object
|
||||
{
|
||||
#include "../Shaders/Bloom.inc.hlsl"
|
||||
|
@ -65,5 +63,4 @@ namespace verus
|
|||
void ToggleEditMode() { _editMode = !_editMode; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Bloom);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
class Blur : public Singleton<Blur>, public Object
|
||||
{
|
||||
#include "../Shaders/Blur.inc.hlsl"
|
||||
|
@ -123,5 +121,4 @@ namespace verus
|
|||
void SetDofRadius(float radius) { _dofRadius = radius; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Blur);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
class Cinema : public Singleton<Cinema>, public Object
|
||||
{
|
||||
#include "../Shaders/Cinema.inc.hlsl"
|
||||
|
@ -36,5 +34,4 @@ namespace verus
|
|||
void ToggleEditMode() { _editMode = !_editMode; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Cinema);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
enum class BillboardType : int
|
||||
{
|
||||
none,
|
||||
|
@ -184,5 +182,4 @@ namespace verus
|
|||
Transform3 GetBillboardMatrix(int index, float size, float spin, RcVector3 up, RcVector3 normal, RTransform3 matAim);
|
||||
};
|
||||
VERUS_TYPEDEFS(Particles);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
class Ssao : public Singleton<Ssao>, public Object
|
||||
{
|
||||
#include "../Shaders/Ssao.inc.hlsl"
|
||||
|
@ -43,5 +41,4 @@ namespace verus
|
|||
void ToggleEditMode() { _editMode = !_editMode; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Ssao);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Effects
|
||||
{
|
||||
namespace Effects
|
||||
{
|
||||
class Ssr : public Singleton<Ssr>, public Object
|
||||
{
|
||||
#include "../Shaders/Ssr.inc.hlsl"
|
||||
|
@ -51,5 +49,4 @@ namespace verus
|
|||
void ToggleEditMode() { _editMode = !_editMode; }
|
||||
};
|
||||
VERUS_TYPEDEFS(Ssr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Extra
|
||||
{
|
||||
namespace Extra
|
||||
{
|
||||
struct BaseConvertDelegate;
|
||||
|
||||
class BaseConvert
|
||||
|
@ -240,5 +238,4 @@ namespace verus
|
|||
virtual bool BaseConvert_CanOverwriteFile(CSZ filename) { return true; }
|
||||
};
|
||||
VERUS_TYPEDEFS(BaseConvertDelegate);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Extra
|
||||
{
|
||||
namespace Extra
|
||||
{
|
||||
class ConvertGLTF : public Singleton<ConvertGLTF>, public Object, public BaseConvert
|
||||
{
|
||||
public:
|
||||
|
@ -72,5 +70,4 @@ namespace verus
|
|||
static glm::mat4 GetNodeMatrix(const tinygltf::Node& node);
|
||||
};
|
||||
VERUS_TYPEDEFS(ConvertGLTF);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::Extra
|
||||
{
|
||||
namespace Extra
|
||||
{
|
||||
class ConvertX : public Singleton<ConvertX>, public Object, public BaseConvert
|
||||
{
|
||||
public:
|
||||
|
@ -123,5 +121,4 @@ namespace verus
|
|||
String GetXmlMaterial(int i);
|
||||
};
|
||||
VERUS_TYPEDEFS(ConvertX);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::GUI
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
template<typename T>
|
||||
struct Animated
|
||||
{
|
||||
|
@ -114,5 +112,4 @@ namespace verus
|
|||
void SetTimeout(float t);
|
||||
};
|
||||
VERUS_TYPEDEFS(Animator);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::GUI
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
class Bars : public Widget
|
||||
{
|
||||
float _aspectRatio = 21 / 9.f;
|
||||
|
@ -20,5 +18,4 @@ namespace verus
|
|||
virtual void Parse(pugi::xml_node node) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(Bars);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
// Copyright (C) 2021-2022, Dmitry Maluev (dmaluev@gmail.com). All rights reserved.
|
||||
#pragma once
|
||||
|
||||
namespace verus
|
||||
namespace verus::GUI
|
||||
{
|
||||
namespace GUI
|
||||
{
|
||||
class Button : public Widget
|
||||
{
|
||||
Label _label;
|
||||
|
@ -23,5 +21,4 @@ namespace verus
|
|||
virtual void Parse(pugi::xml_node node) override;
|
||||
};
|
||||
VERUS_TYPEDEFS(Button);
|
||||
}
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue