Graphics pipeline iteration
Lot of code. Not working yet
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user