Share wall points in buffer, part 1

This commit is contained in:
jgk
2021-07-11 15:17:40 +02:00
parent 5e21a6527d
commit 37d3e0ce63
3 changed files with 26 additions and 5 deletions
+16
View File
@@ -1,5 +1,6 @@
module Shader.Compile
( makeShader
, makeShaderUsingShaderVAO
, makeSourcedShader
, setupVAO
) where
@@ -13,6 +14,21 @@ import Control.Monad
--import Control.Lens
import Graphics.Rendering.OpenGL hiding (Point,translate,scale,imageHeight)
-- | Takes the VAO and poke strategy from another shader
makeShaderUsingShaderVAO
:: String -- ^ First part of the name of the shader
-> [ShaderType] -- ^ Filetype extensions
-> EPrimitiveMode
-> FullShader
-> IO FullShader
makeShaderUsingShaderVAO s shaderlist pm fs = do
prog <- makeSourcedShader s shaderlist
return $ fs
{_shaderProgram = prog
, _shaderDrawPrimitive = pm
, _shaderTexture = Nothing
, _shaderCustomUnis = []
}
{- |
Compiles a full shader found within the shader directory.
The shader is made up of files begining with the inputted string with extensions .vert, .geom etc.