From 32646973035dcb3f35c7501d0654607dfaeec091 Mon Sep 17 00:00:00 2001 From: Csaba Hruska Date: Fri, 29 Jan 2016 15:25:49 +0100 Subject: simplify Mesh data add some missing function --- src/LambdaCube/GL/Type.hs | 47 +++-------------------------------------------- 1 file changed, 3 insertions(+), 44 deletions(-) (limited to 'src/LambdaCube/GL/Type.hs') diff --git a/src/LambdaCube/GL/Type.hs b/src/LambdaCube/GL/Type.hs index 8f4bdd7..376fdf1 100644 --- a/src/LambdaCube/GL/Type.hs +++ b/src/LambdaCube/GL/Type.hs @@ -14,8 +14,9 @@ import Data.ByteString import Graphics.GL.Core33 -import Linear -import IR +import LambdaCube.Linear +import LambdaCube.IR +import LambdaCube.PipelineSchema type GLUniformName = ByteString @@ -66,21 +67,6 @@ data ArrayDesc - independent from pipeline - per object features: enable/disable visibility, set render ordering -} - -data ObjectArraySchema - = ObjectArraySchema - { primitive :: FetchPrimitive - , attributes :: Map String StreamType - } - deriving Show - -data PipelineSchema - = PipelineSchema - { objectArrays :: Map String ObjectArraySchema - , uniforms :: Map String InputType - } - deriving Show - data GLUniform = forall a. Storable a => GLUniform !InputType !(IORef a) instance Show GLUniform where @@ -322,33 +308,6 @@ sizeOfArrayType ArrHalf = 2 data Array -- array type, element count (NOT byte size!), setter = Array ArrayType Int BufferSetter --- dev hint: this should be InputType --- we restrict StreamType using type class --- subset of InputType, describes a stream type (in GPU side) -data StreamType - = Attribute_Word - | Attribute_V2U - | Attribute_V3U - | Attribute_V4U - | Attribute_Int - | Attribute_V2I - | Attribute_V3I - | Attribute_V4I - | Attribute_Float - | Attribute_V2F - | Attribute_V3F - | Attribute_V4F - | Attribute_M22F - | Attribute_M23F - | Attribute_M24F - | Attribute_M32F - | Attribute_M33F - | Attribute_M34F - | Attribute_M42F - | Attribute_M43F - | Attribute_M44F - deriving (Show,Eq,Ord) - toStreamType :: InputType -> Maybe StreamType toStreamType Word = Just Attribute_Word toStreamType V2U = Just Attribute_V2U -- cgit v1.2.3