Remove list layer while poking

This commit is contained in:
jgk
2021-06-12 02:08:42 +02:00
parent 0cb0c752e2
commit 02a2d3920d
4 changed files with 45 additions and 45 deletions
+10 -9
View File
@@ -22,19 +22,20 @@ makeShader
-> [ShaderType] -- ^ Filetype extensions
-> [Int] -- ^ The input vertex sizes
-> PrimitiveMode
-> (RenderType -> [[[Float]]]) -- ^ Poke strategy: method for creating a list of vertex data to be bound
-> (RenderType -> [[Float]]) -- ^ Poke strategy: method for creating a list of vertex data to be bound
-> IO (FullShader)
makeShader s shaderlist sizes pm renStrat = do
(prog,unis) <- makeSourcedShader s shaderlist
vaob <- setupVAO sizes
return $ FullShader { _shaderProgram = prog
, _shaderMatrixUniform = unis
, _shaderVAO = vaob
, _shaderPokeStrategy = renStrat
, _shaderDrawPrimitive = pm
, _shaderTexture = Nothing
, _shaderCustomUnis = []
}
return $ FullShader
{ _shaderProgram = prog
, _shaderMatrixUniform = unis
, _shaderVAO = vaob
, _shaderPokeStrategy = renStrat
, _shaderDrawPrimitive = pm
, _shaderTexture = Nothing
, _shaderCustomUnis = []
}
-- | Compile shader and get its uniform locations.
-- supposes the shader code is in the shader folder, with the string names
+1 -1
View File
@@ -47,7 +47,7 @@ data FullShader = FullShader
{ _shaderProgram :: Program
, _shaderMatrixUniform :: UniformLocation
, _shaderVAO :: VAO
, _shaderPokeStrategy :: RenderType -> [[[Float]]]-- -> F.FoldM IO RenderType Int
, _shaderPokeStrategy :: RenderType -> [[Float]]-- -> F.FoldM IO RenderType Int
, _shaderDrawPrimitive :: PrimitiveMode
, _shaderTexture :: Maybe ShaderTexture
, _shaderCustomUnis :: [UniformLocation]