Linting
This commit is contained in:
+30
-3
@@ -1,14 +1,38 @@
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
{-
|
||||
Datatypes used to setup and pass data to shaders.
|
||||
-}
|
||||
module Shader.Data
|
||||
where
|
||||
( VAO (..)
|
||||
, FullShader (..)
|
||||
, ShaderTexture (..)
|
||||
-- lens functions
|
||||
, vao
|
||||
, vaoBufferTargets
|
||||
|
||||
, shaderProgram
|
||||
, shaderUniforms
|
||||
, shaderVAO
|
||||
, shaderPokeStrategy
|
||||
, shaderDrawPrimitive
|
||||
, shaderTexture
|
||||
, shaderCustomUnis
|
||||
|
||||
-- , textureObject
|
||||
) where
|
||||
import Graphics.Rendering.OpenGL
|
||||
import Foreign
|
||||
import Control.Lens
|
||||
|
||||
{- Vertex array object: contains the reference to the object,
|
||||
and its buffer targets.
|
||||
-}
|
||||
data VAO = VAO
|
||||
{ _vao :: VertexArrayObject
|
||||
, _vaoBufferTargets :: [(BufferObject,Ptr Float,Int)]
|
||||
}
|
||||
{-
|
||||
Datatype containing the necessary information for a single shader.
|
||||
-}
|
||||
data FullShader a = FullShader
|
||||
{ _shaderProgram :: Program
|
||||
, _shaderUniforms :: [UniformLocation]
|
||||
@@ -18,7 +42,10 @@ data FullShader a = FullShader
|
||||
, _shaderTexture :: Maybe ShaderTexture
|
||||
, _shaderCustomUnis :: Maybe [UniformLocation]
|
||||
}
|
||||
data ShaderTexture = ShaderTexture
|
||||
{-
|
||||
Datatype containing the reference to a texture object.
|
||||
-}
|
||||
newtype ShaderTexture = ShaderTexture
|
||||
{ _textureObject :: TextureObject }
|
||||
|
||||
makeLenses ''VAO
|
||||
|
||||
Reference in New Issue
Block a user