Share wall points in buffer, part 1
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user