Initial pass at shadows from level geometry

This commit is contained in:
jgk
2021-06-29 15:27:26 +02:00
parent 089dcc3f5d
commit 3d16c33d33
20 changed files with 181 additions and 74 deletions
+17 -1
View File
@@ -7,6 +7,7 @@ module Shader.Data
, VBO (..)
, FullShader (..)
, ShaderTexture (..)
, EPrimitiveMode (..)
-- | Lens functions
, vao
, vaoVBO
@@ -25,6 +26,7 @@ import Picture.Data
import Graphics.Rendering.OpenGL
import Foreign
import Control.Lens
--import Graphics.GL.Types
{- | Vertex array object: contains the reference to the object,
and its buffer targets. -}
data VAO = VAO
@@ -46,7 +48,7 @@ data FullShader = FullShader
{ _shaderProgram :: Program
, _shaderVAO :: VAO
, _shaderPokeStrategy :: RenderType -> [[Float]]-- -> F.FoldM IO RenderType Int
, _shaderDrawPrimitive :: PrimitiveMode
, _shaderDrawPrimitive :: EPrimitiveMode
, _shaderTexture :: Maybe ShaderTexture
, _shaderCustomUnis :: [UniformLocation]
}
@@ -54,5 +56,19 @@ data FullShader = FullShader
newtype ShaderTexture = ShaderTexture
{ _textureObject :: TextureObject }
data EPrimitiveMode
= EPoints
| ELines
| ELinesAdjacency
| ELineLoop
| ELineStrip
| ETriangles
| ETriangleStrip
| ETriangleFan
| EQuads
| EQuadStrip
| EPolygon
| EPatches
makeLenses ''VAO
makeLenses ''FullShader