Pre shader refactor commit
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user