First pass graphics pipeline. Not functional
This commit is contained in:
@@ -144,6 +144,7 @@
|
|||||||
<ClInclude Include="include\Graphics\Colors.h"/>
|
<ClInclude Include="include\Graphics\Colors.h"/>
|
||||||
<ClInclude Include="include\Graphics\Graphics.h"/>
|
<ClInclude Include="include\Graphics\Graphics.h"/>
|
||||||
<ClInclude Include="include\Graphics\GraphicsConfig.h"/>
|
<ClInclude Include="include\Graphics\GraphicsConfig.h"/>
|
||||||
|
<ClInclude Include="include\Graphics\GraphicsPipeline.h" />
|
||||||
<ClInclude Include="include\Graphics\RenderPass.h"/>
|
<ClInclude Include="include\Graphics\RenderPass.h"/>
|
||||||
<ClInclude Include="include\Graphics\Shader.h" />
|
<ClInclude Include="include\Graphics\Shader.h" />
|
||||||
<ClInclude Include="include\Graphics\Texture.h"/>
|
<ClInclude Include="include\Graphics\Texture.h"/>
|
||||||
@@ -165,6 +166,7 @@
|
|||||||
<ClInclude Include="src\Core\Networking\SocketPlatformImpl.h"/>
|
<ClInclude Include="src\Core\Networking\SocketPlatformImpl.h"/>
|
||||||
<ClInclude Include="src\Core\HAL\Win32.h"/>
|
<ClInclude Include="src\Core\HAL\Win32.h"/>
|
||||||
<ClInclude Include="src\Graphics\D3D12\D3D12Common.h"/>
|
<ClInclude Include="src\Graphics\D3D12\D3D12Common.h"/>
|
||||||
|
<ClInclude Include="src\Graphics\D3D12\D3D12GraphicsPipeline.h" />
|
||||||
<ClInclude Include="src\Graphics\D3D12\D3D12RenderPass.h"/>
|
<ClInclude Include="src\Graphics\D3D12\D3D12RenderPass.h"/>
|
||||||
<ClInclude Include="src\Graphics\D3D12\D3D12Shader.h"/>
|
<ClInclude Include="src\Graphics\D3D12\D3D12Shader.h"/>
|
||||||
<ClInclude Include="src\Graphics\D3D12\D3D12Synchronization.h"/>
|
<ClInclude Include="src\Graphics\D3D12\D3D12Synchronization.h"/>
|
||||||
@@ -206,6 +208,7 @@
|
|||||||
<ClCompile Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp"/>
|
<ClCompile Include="src\Core\Networking\Win32\Win32SocketPlatformImpl.cpp"/>
|
||||||
<ClCompile Include="src\Engine\Engine.cpp"/>
|
<ClCompile Include="src\Engine\Engine.cpp"/>
|
||||||
<ClCompile Include="src\Graphics\D3D12\D3D12Common.cpp"/>
|
<ClCompile Include="src\Graphics\D3D12\D3D12Common.cpp"/>
|
||||||
|
<ClCompile Include="src\Graphics\D3D12\D3D12GraphicsPipeline.cpp" />
|
||||||
<ClCompile Include="src\Graphics\D3D12\D3D12RenderPass.cpp"/>
|
<ClCompile Include="src\Graphics\D3D12\D3D12RenderPass.cpp"/>
|
||||||
<ClCompile Include="src\Graphics\D3D12\D3D12Shader.cpp"/>
|
<ClCompile Include="src\Graphics\D3D12\D3D12Shader.cpp"/>
|
||||||
<ClCompile Include="src\Graphics\D3D12\D3D12Synchronization.cpp"/>
|
<ClCompile Include="src\Graphics\D3D12\D3D12Synchronization.cpp"/>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <Core/HAL/Display/Display.h>
|
#include <Core/HAL/Display/Display.h>
|
||||||
#include <Core/Math/Shape.h>
|
#include <Core/Math/Shape.h>
|
||||||
#include <Graphics/GraphicsConfig.h>
|
#include <Graphics/GraphicsConfig.h>
|
||||||
|
#include <Graphics/GraphicsPipeline.h>
|
||||||
#include <Graphics/RenderPass.h>
|
#include <Graphics/RenderPass.h>
|
||||||
#include <Graphics/Shader.h>
|
#include <Graphics/Shader.h>
|
||||||
#include <Juliet.h>
|
#include <Juliet.h>
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
// Graphics Interface
|
// Graphics Interface
|
||||||
namespace Juliet
|
namespace Juliet
|
||||||
{
|
{
|
||||||
|
|
||||||
// Opaque types
|
// Opaque types
|
||||||
struct CommandList;
|
struct CommandList;
|
||||||
struct GraphicsDevice;
|
struct GraphicsDevice;
|
||||||
@@ -91,6 +93,7 @@ namespace Juliet
|
|||||||
// SwapChain
|
// SwapChain
|
||||||
extern JULIET_API bool AcquireSwapChainTexture(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window,
|
extern JULIET_API bool AcquireSwapChainTexture(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window,
|
||||||
Texture** swapChainTexture);
|
Texture** swapChainTexture);
|
||||||
|
extern JULIET_API TextureFormat GetSwapChainTextureFormat(NonNullPtr<GraphicsDevice> device, NonNullPtr<Window> window);
|
||||||
|
|
||||||
// Command List
|
// Command List
|
||||||
extern JULIET_API CommandList* AcquireCommandList(NonNullPtr<GraphicsDevice> device, QueueType queueType = QueueType::Graphics);
|
extern JULIET_API CommandList* AcquireCommandList(NonNullPtr<GraphicsDevice> device, QueueType queueType = QueueType::Graphics);
|
||||||
@@ -109,5 +112,10 @@ namespace Juliet
|
|||||||
|
|
||||||
// Shaders
|
// Shaders
|
||||||
extern JULIET_API Shader* CreateShader(NonNullPtr<GraphicsDevice> device, String filename, ShaderCreateInfo& shaderCreateInfo);
|
extern JULIET_API Shader* CreateShader(NonNullPtr<GraphicsDevice> device, String filename, ShaderCreateInfo& shaderCreateInfo);
|
||||||
extern JULIET_API void DestroyShader(NonNullPtr<GraphicsDevice> driver, NonNullPtr<Shader> shader);
|
extern JULIET_API void DestroyShader(NonNullPtr<GraphicsDevice> device, NonNullPtr<Shader> shader);
|
||||||
|
|
||||||
|
// Pipelines
|
||||||
|
extern JULIET_API GraphicsPipeline* CreateGraphicsPipeline(NonNullPtr<GraphicsDevice> device,
|
||||||
|
GraphicsPipelineCreateInfo& createInfo);
|
||||||
|
|
||||||
} // namespace Juliet
|
} // namespace Juliet
|
||||||
|
|||||||
61
Juliet/include/Graphics/GraphicsPipeline.h
Normal file
61
Juliet/include/Graphics/GraphicsPipeline.h
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <Graphics/Shader.h>
|
||||||
|
|
||||||
|
namespace Juliet
|
||||||
|
{
|
||||||
|
// Forward Declare
|
||||||
|
struct ColorTargetDescription;
|
||||||
|
|
||||||
|
enum class FillMode : uint8
|
||||||
|
{
|
||||||
|
Wireframe,
|
||||||
|
Solid
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class CullMode : uint8
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Front,
|
||||||
|
Back
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class FrontFace : uint8
|
||||||
|
{
|
||||||
|
CounterClockwise,
|
||||||
|
Clockwise
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class PrimitiveType : uint8
|
||||||
|
{
|
||||||
|
TriangleList,
|
||||||
|
TriangleStrip,
|
||||||
|
LineList,
|
||||||
|
LineStrip,
|
||||||
|
PointList,
|
||||||
|
};
|
||||||
|
|
||||||
|
struct RasterizerState
|
||||||
|
{
|
||||||
|
FillMode FillMode;
|
||||||
|
CullMode CullMode;
|
||||||
|
FrontFace FrontFace;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GraphicsPipelineTargetInfo
|
||||||
|
{
|
||||||
|
const ColorTargetDescription* ColorTargetDescriptions;
|
||||||
|
size_t NumColorTargets;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GraphicsPipelineCreateInfo
|
||||||
|
{
|
||||||
|
Shader* VertexShader;
|
||||||
|
Shader* FragmentShader;
|
||||||
|
RasterizerState RasterizerState;
|
||||||
|
PrimitiveType PrimitiveType;
|
||||||
|
GraphicsPipelineTargetInfo TargetInfo;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Opaque type
|
||||||
|
struct GraphicsPipeline;
|
||||||
|
} // namespace Juliet
|
||||||
@@ -41,6 +41,17 @@ namespace Juliet
|
|||||||
StoreOperation StoreOperation;
|
StoreOperation StoreOperation;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ColorTargetBlendState
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ColorTargetDescription
|
||||||
|
{
|
||||||
|
TextureFormat Format;
|
||||||
|
ColorTargetBlendState BlendState;
|
||||||
|
};
|
||||||
|
|
||||||
// Opaque Type
|
// Opaque Type
|
||||||
struct RenderPass;
|
struct RenderPass;
|
||||||
} // namespace Juliet
|
} // namespace Juliet
|
||||||
|
|||||||
14
Juliet/src/Graphics/D3D12/D3D12GraphicsPipeline.cpp
Normal file
14
Juliet/src/Graphics/D3D12/D3D12GraphicsPipeline.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#include <pch.h>
|
||||||
|
|
||||||
|
#include <Graphics/D3D12/D3D12GraphicsPipeline.h>
|
||||||
|
|
||||||
|
#include <Core/Common/NonNullPtr.h>
|
||||||
|
#include <Graphics/GraphicsDevice.h>
|
||||||
|
|
||||||
|
namespace Juliet::D3D12
|
||||||
|
{
|
||||||
|
GraphicsPipeline* CreateGraphicsPipeline(NonNullPtr<GPUDriver> driver, GraphicsPipelineCreateInfo& createInfo)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
} // namespace Juliet::D3D12
|
||||||
15
Juliet/src/Graphics/D3D12/D3D12GraphicsPipeline.h
Normal file
15
Juliet/src/Graphics/D3D12/D3D12GraphicsPipeline.h
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <Core/Common/NonNullPtr.h>
|
||||||
|
|
||||||
|
namespace Juliet
|
||||||
|
{
|
||||||
|
struct GraphicsPipelineCreateInfo;
|
||||||
|
struct GPUDriver;
|
||||||
|
struct GraphicsPipeline;
|
||||||
|
} // namespace Juliet
|
||||||
|
|
||||||
|
namespace Juliet::D3D12
|
||||||
|
{
|
||||||
|
extern GraphicsPipeline* CreateGraphicsPipeline(NonNullPtr<GPUDriver> driver, GraphicsPipelineCreateInfo& createInfo);
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <Core/Common/NonNullPtr.h>
|
#include <Core/Common/NonNullPtr.h>
|
||||||
#include <Core/HAL/DynLib/DynamicLibrary.h>
|
#include <Core/HAL/DynLib/DynamicLibrary.h>
|
||||||
#include <Core/Memory/Allocator.h>
|
#include <Core/Memory/Allocator.h>
|
||||||
|
#include <Graphics/D3D12/D3D12GraphicsPipeline.h>
|
||||||
#include <Graphics/D3D12/D3D12RenderPass.h>
|
#include <Graphics/D3D12/D3D12RenderPass.h>
|
||||||
#include <Graphics/D3D12/D3D12Synchronization.h>
|
#include <Graphics/D3D12/D3D12Synchronization.h>
|
||||||
#include <Graphics/D3D12/DX12CommandList.h>
|
#include <Graphics/D3D12/DX12CommandList.h>
|
||||||
@@ -596,30 +597,25 @@ namespace Juliet::D3D12
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Assign Functions to the device
|
// Assign Functions to the device
|
||||||
device->DestroyDevice = DestroyGraphicsDevice;
|
device->DestroyDevice = DestroyGraphicsDevice;
|
||||||
|
device->AttachToWindow = AttachToWindow;
|
||||||
device->AttachToWindow = AttachToWindow;
|
device->DetachFromWindow = DetachFromWindow;
|
||||||
device->DetachFromWindow = DetachFromWindow;
|
device->AcquireSwapChainTexture = AcquireSwapChainTexture;
|
||||||
|
device->GetSwapChainTextureFormat = GetSwapChainTextureFormat;
|
||||||
device->AcquireSwapChainTexture = AcquireSwapChainTexture;
|
device->AcquireCommandList = AcquireCommandList;
|
||||||
|
device->SubmitCommandLists = SubmitCommandLists;
|
||||||
device->AcquireCommandList = AcquireCommandList;
|
device->BeginRenderPass = BeginRenderPass;
|
||||||
device->SubmitCommandLists = SubmitCommandLists;
|
device->EndRenderPass = EndRenderPass;
|
||||||
|
device->SetViewPort = SetViewPort;
|
||||||
device->BeginRenderPass = BeginRenderPass;
|
device->SetScissorRect = SetScissorRect;
|
||||||
device->EndRenderPass = EndRenderPass;
|
device->SetBlendConstants = SetBlendConstants;
|
||||||
|
device->SetStencilReference = SetStencilReference;
|
||||||
device->SetViewPort = SetViewPort;
|
device->Wait = Wait;
|
||||||
device->SetScissorRect = SetScissorRect;
|
device->QueryFence = QueryFence;
|
||||||
device->SetBlendConstants = SetBlendConstants;
|
device->ReleaseFence = ReleaseFence;
|
||||||
device->SetStencilReference = SetStencilReference;
|
device->CreateShader = CreateShader;
|
||||||
|
device->DestroyShader = DestroyShader;
|
||||||
device->Wait = Wait;
|
device->CreateGraphicsPipeline = CreateGraphicsPipeline;
|
||||||
device->QueryFence = QueryFence;
|
|
||||||
device->ReleaseFence = ReleaseFence;
|
|
||||||
|
|
||||||
device->CreateShader = CreateShader;
|
|
||||||
device->DestroyShader = DestroyShader;
|
|
||||||
|
|
||||||
device->Driver = driver;
|
device->Driver = driver;
|
||||||
driver->GraphicsDevice = device;
|
driver->GraphicsDevice = device;
|
||||||
|
|||||||
@@ -192,6 +192,21 @@ namespace Juliet::D3D12
|
|||||||
return AcquireSwapChainTexture(false, commandList, window, swapChainTexture);
|
return AcquireSwapChainTexture(false, commandList, window, swapChainTexture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextureFormat GetSwapChainTextureFormat(NonNullPtr<GPUDriver> driver, NonNullPtr<Window> window)
|
||||||
|
{
|
||||||
|
auto* d3d12Driver = static_cast<D3D12Driver*>(driver.Get());
|
||||||
|
|
||||||
|
auto* windowData = d3d12Driver->WindowData;
|
||||||
|
if (!windowData)
|
||||||
|
{
|
||||||
|
LogError(LogCategory::Graphics, "Cannot get swapchain format. Window has no Swapchain");
|
||||||
|
return TextureFormat::Invalid;
|
||||||
|
}
|
||||||
|
|
||||||
|
Assert(windowData->Window == window.Get());
|
||||||
|
return windowData->SwapChainTextureContainers[windowData->WindowFrameCounter].Header.CreateInfo.Format;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Internal
|
namespace Internal
|
||||||
{
|
{
|
||||||
bool CreateSwapChain(NonNullPtr<D3D12Driver> driver, NonNullPtr<D3D12WindowData> windowData,
|
bool CreateSwapChain(NonNullPtr<D3D12Driver> driver, NonNullPtr<D3D12WindowData> windowData,
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ namespace Juliet::D3D12
|
|||||||
struct D3D12WindowData;
|
struct D3D12WindowData;
|
||||||
|
|
||||||
extern bool AcquireSwapChainTexture(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window, Texture** swapChainTexture);
|
extern bool AcquireSwapChainTexture(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window, Texture** swapChainTexture);
|
||||||
|
extern TextureFormat GetSwapChainTextureFormat(NonNullPtr<GPUDriver> driver, NonNullPtr<Window> window);
|
||||||
|
|
||||||
namespace Internal
|
namespace Internal
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ namespace Juliet
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextureFormat GetSwapChainTextureFormat(NonNullPtr<GraphicsDevice> device, NonNullPtr<Window> window)
|
||||||
|
{
|
||||||
|
return device->GetSwapChainTextureFormat(device->Driver, window);
|
||||||
|
}
|
||||||
|
|
||||||
CommandList* AcquireCommandList(NonNullPtr<GraphicsDevice> device, QueueType queueType /* = QueueType::Graphics */)
|
CommandList* AcquireCommandList(NonNullPtr<GraphicsDevice> device, QueueType queueType /* = QueueType::Graphics */)
|
||||||
{
|
{
|
||||||
GPUDriver* driver = device->Driver;
|
GPUDriver* driver = device->Driver;
|
||||||
@@ -213,4 +218,8 @@ namespace Juliet
|
|||||||
device->DestroyShader(device->Driver, shader);
|
device->DestroyShader(device->Driver, shader);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GraphicsPipeline* CreateGraphicsPipeline(NonNullPtr<GraphicsDevice> device, GraphicsPipelineCreateInfo& createInfo)
|
||||||
|
{
|
||||||
|
device->CreateGraphicsPipeline(device->Driver, createInfo);
|
||||||
|
}
|
||||||
} // namespace Juliet
|
} // namespace Juliet
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
#include <Core/Common/NonNullPtr.h>
|
#include <Core/Common/NonNullPtr.h>
|
||||||
#include <Graphics/Graphics.h>
|
#include <Graphics/Graphics.h>
|
||||||
#include <Graphics/GraphicsConfig.h>
|
#include <Graphics/GraphicsConfig.h>
|
||||||
|
#include <Graphics/GraphicsPipeline.h>
|
||||||
#include <Graphics/Texture.h>
|
#include <Graphics/Texture.h>
|
||||||
|
|
||||||
namespace Juliet
|
namespace Juliet
|
||||||
@@ -44,6 +45,7 @@ namespace Juliet
|
|||||||
|
|
||||||
// SwapChain
|
// SwapChain
|
||||||
bool (*AcquireSwapChainTexture)(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window, Texture** swapChainTexture);
|
bool (*AcquireSwapChainTexture)(NonNullPtr<CommandList> commandList, NonNullPtr<Window> window, Texture** swapChainTexture);
|
||||||
|
TextureFormat (*GetSwapChainTextureFormat)(NonNullPtr<GPUDriver> driver, NonNullPtr<Window> window);
|
||||||
|
|
||||||
// CommandLists
|
// CommandLists
|
||||||
CommandList* (*AcquireCommandList)(NonNullPtr<GPUDriver> driver, QueueType queueType);
|
CommandList* (*AcquireCommandList)(NonNullPtr<GPUDriver> driver, QueueType queueType);
|
||||||
@@ -68,6 +70,9 @@ namespace Juliet
|
|||||||
Shader* (*CreateShader)(NonNullPtr<GPUDriver> driver, ByteBuffer shaderByteCode, ShaderCreateInfo& shaderCreateInfo);
|
Shader* (*CreateShader)(NonNullPtr<GPUDriver> driver, ByteBuffer shaderByteCode, ShaderCreateInfo& shaderCreateInfo);
|
||||||
void (*DestroyShader)(NonNullPtr<GPUDriver> driver, NonNullPtr<Shader> shader);
|
void (*DestroyShader)(NonNullPtr<GPUDriver> driver, NonNullPtr<Shader> shader);
|
||||||
|
|
||||||
|
// Pipeline
|
||||||
|
GraphicsPipeline* (*CreateGraphicsPipeline)(NonNullPtr<GPUDriver> driver, GraphicsPipelineCreateInfo& createInfo);
|
||||||
|
|
||||||
const char* Name = "Unknown";
|
const char* Name = "Unknown";
|
||||||
GPUDriver* Driver = nullptr;
|
GPUDriver* Driver = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
#include <Core/Common/String.h>
|
#include <Core/Common/String.h>
|
||||||
#include <Core/Memory/Utils.h>
|
#include <Core/Memory/Utils.h>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <Graphics/GraphicsPipeline.h>
|
||||||
|
|
||||||
// TODO : Replace with message box from framework + call main and not winmain + subsystem
|
// TODO : Replace with message box from framework + call main and not winmain + subsystem
|
||||||
// TODO : Think how to do the draw pipeline.
|
// TODO : Think how to do the draw pipeline.
|
||||||
@@ -60,15 +61,38 @@ void JulietApplication::Init()
|
|||||||
|
|
||||||
{
|
{
|
||||||
// Create graphics pipeline
|
// Create graphics pipeline
|
||||||
// TODO: Assets management that handles path to assets or something.
|
String entryPoint = WrapString("main");
|
||||||
String shaderPath = WrapString("../../../Assets/compiled/Triangle.vert.dxil");
|
|
||||||
ShaderCreateInfo shaderCI = {};
|
ShaderCreateInfo shaderCI = {};
|
||||||
shaderCI.Stage = ShaderStage::Vertex;
|
shaderCI.EntryPoint = entryPoint;
|
||||||
shaderCI.EntryPoint = WrapString("main");
|
|
||||||
Shader* shader = CreateShader(GraphicsDevice, shaderPath, shaderCI);
|
// TODO: Assets management that handles path to assets or something.
|
||||||
if (shader)
|
String shaderPath = WrapString("../../../Assets/compiled/Triangle.vert.dxil");
|
||||||
|
shaderCI.Stage = ShaderStage::Vertex;
|
||||||
|
Shader* vertexShader = CreateShader(GraphicsDevice, shaderPath, shaderCI);
|
||||||
|
|
||||||
|
shaderPath = WrapString("../../../Assets/compiled/SolidColor.frag.dxil");
|
||||||
|
shaderCI.Stage = ShaderStage::Fragment;
|
||||||
|
Shader* fragmentShader = CreateShader(GraphicsDevice, shaderPath, shaderCI);
|
||||||
|
|
||||||
|
ColorTargetDescription colorTargetDescription = { .Format = GetSwapChainTextureFormat(GraphicsDevice, MainWindow) };
|
||||||
|
GraphicsPipelineCreateInfo pipelineCI = {
|
||||||
|
.VertexShader = vertexShader,
|
||||||
|
.FragmentShader = fragmentShader,
|
||||||
|
.PrimitiveType = PrimitiveType::TriangleList,
|
||||||
|
.TargetInfo = {
|
||||||
|
.ColorTargetDescriptions = &colorTargetDescription,
|
||||||
|
.NumColorTargets = 1,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
pipelineCI.RasterizerState.FillMode = FillMode::Solid;
|
||||||
|
|
||||||
|
if (vertexShader)
|
||||||
{
|
{
|
||||||
DestroyShader(GraphicsDevice, shader);
|
DestroyShader(GraphicsDevice, vertexShader);
|
||||||
|
}
|
||||||
|
if (fragmentShader)
|
||||||
|
{
|
||||||
|
DestroyShader(GraphicsDevice, fragmentShader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user