Move shader compilation over to raw opengl, errors display incorrect
This commit is contained in:
+10
-2
@@ -33,9 +33,13 @@ module Shader.Data
|
||||
, vert
|
||||
, geom
|
||||
, frag
|
||||
, vert'
|
||||
, geom'
|
||||
, frag'
|
||||
) where
|
||||
import Data.Vector (Vector)
|
||||
import Graphics.Rendering.OpenGL
|
||||
import Graphics.GL.Core43
|
||||
import Foreign
|
||||
import Control.Lens
|
||||
{- | Datatype containing the necessary information for a single shader. -}
|
||||
@@ -47,11 +51,11 @@ data FullShader = FullShader
|
||||
, _shadUnis :: Vector UniformLocation
|
||||
}
|
||||
data FullShader' = FullShader'
|
||||
{ _shadProg' :: GLuint
|
||||
{ _shadProg' :: GLuint -- should be shaderID
|
||||
, _shadVAO' :: VAO
|
||||
, _shadPrim' :: EPrimitiveMode
|
||||
, _shadTex' :: Maybe ShaderTexture
|
||||
, _shadUnis' :: Vector UniformLocation
|
||||
, _shadUnis' :: Vector GLint
|
||||
}
|
||||
{- | Vertex array object: contains the reference to the object,
|
||||
and its buffer targets. -}
|
||||
@@ -96,6 +100,10 @@ vert, geom, frag :: ShaderType
|
||||
vert = VertexShader
|
||||
geom = GeometryShader
|
||||
frag = FragmentShader
|
||||
vert', geom', frag' :: GLenum
|
||||
vert' = GL_VERTEX_SHADER
|
||||
geom' = GL_GEOMETRY_SHADER
|
||||
frag' = GL_FRAGMENT_SHADER
|
||||
makeLenses ''VAO
|
||||
makeLenses ''VBO
|
||||
makeLenses ''FullShader
|
||||
|
||||
Reference in New Issue
Block a user