Graphics pipeline iteration

Lot of code.
Not working yet
This commit is contained in:
2025-03-09 22:52:08 -04:00
parent a366d75fdc
commit a9fe4683fb
24 changed files with 1100 additions and 80 deletions

View File

@@ -74,18 +74,21 @@ void JulietApplication::Init()
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,
},
ColorTargetDescription colorTargetDescription = {};
colorTargetDescription.Format = GetSwapChainTextureFormat(GraphicsDevice, MainWindow);
GraphicsPipelineCreateInfo pipelineCI = {};
pipelineCI.VertexShader = vertexShader;
pipelineCI.FragmentShader = fragmentShader;
pipelineCI.PrimitiveType = PrimitiveType::TriangleList;
pipelineCI.TargetInfo = {
.ColorTargetDescriptions = &colorTargetDescription,
.NumColorTargets = 1,
};
pipelineCI.RasterizerState.FillMode = FillMode::Solid;
GraphicsPipeline* mainPipeline = CreateGraphicsPipeline(GraphicsDevice, pipelineCI);
if (vertexShader)
{
DestroyShader(GraphicsDevice, vertexShader);