Pre shader refactor commit

This commit is contained in:
jgk
2021-03-10 14:31:50 +01:00
parent d3c8504d21
commit fe2abc9266
5 changed files with 27 additions and 16 deletions
+17
View File
@@ -11,6 +11,16 @@ import Geometry.Data
import Control.Lens
import Foreign
import Graphics.Rendering.OpenGL hiding (Point (..),translate,scale,imageHeight,imageWidth)
data VAO = VAO
{ _vao :: VertexArrayObject
, _vaoBufferTargets :: [(BufferObject,Ptr Float,Int)]
}
makeLenses ''VAO
type RGBA = (Float,Float,Float,Float)
type Color = (Float,Float,Float,Float)
@@ -55,6 +65,13 @@ flat4 (x,y,z,w) = [x,y,z,w]
{-# INLINE flat3 #-}
{-# INLINE flat4 #-}
data FullShader = FullShader
{ _shaderProgram :: Program
, _shaderUniforms :: [UniformLocation]
, _shaderVAO :: VAO
-- , _shaderPokeStrategy :: [Ptr Float] -> F.FoldM IO RenderType Int
}
data RenderType
= RenderPoly [(Point3,Point4)]
| RenderText [(Point3,Point4,Point3)]