fix, but still not working

This commit is contained in:
nek0 2022-12-03 08:42:00 +01:00
parent 45d180484f
commit 139f208377
2 changed files with 5 additions and 4 deletions

View file

@ -89,11 +89,12 @@ initVulkan window = do
rainbowVertexShader <- loadShader vulkanLogicalDevice "shadersrc/rainbow.vert" "vert"
rainbowFragmentShader <- loadShader vulkanLogicalDevice "shadersrc/rainbow.frag" "frag"
meshVertexShader <- loadShader vulkanLogicalDevice "shadersrc/mesh.vert" "vert"
meshFragmentShader <- loadShader vulkanLogicalDevice "shadersrc/rainbow.frag" "frag"
renderPass <- createRenderPass vulkanLogicalDevice (Khr.format surfaceFormat)
pipelineLayout <- createPipelineLayout vulkanLogicalDevice
let redContainer = ShaderContainer (Just redVertexShader) (Just redFragmentShader)
rainbowContainer = ShaderContainer (Just rainbowVertexShader) (Just rainbowFragmentShader)
meshContainer = ShaderContainer (Just meshVertexShader) Nothing
meshContainer = ShaderContainer (Just meshVertexShader) (Just meshFragmentShader)
redPipelines <-
createGraphicsPipelines
vulkanLogicalDevice

View file

@ -24,9 +24,9 @@ loadMeshes
:: V.Vector Vertex
loadMeshes =
V.fromList
[ Vertex (V3 0.5 0.5 0) (V3 0 1 0) (V4 0 0 0 0)
, Vertex (V3 (-0.5) 0.5 0) (V3 0 1 0) (V4 0 0 0 0)
, Vertex (V3 0 (-0.5) 0) (V3 0 1 0) (V4 0 0 0 0)
[ Vertex (V3 0.5 0.5 0) (V3 0 0 0) (V4 0 1 0 1)
, Vertex (V3 (-0.5) 0.5 0) (V3 0 0 0) (V4 0 1 0 1)
, Vertex (V3 0 (-0.5) 0) (V3 0 0 0) (V4 0 1 0 1)
]
uploadMesh