module Graphics.LambdaCube.GpuProgram where import Graphics.LambdaCube.GpuProgramParams data GpuProgramType = GPT_VERTEX_PROGRAM | GPT_FRAGMENT_PROGRAM | GPT_GEOMETRY_PROGRAM deriving Eq class Eq p => GpuProgram p class Eq lp => LinkedGpuProgram lp --where -- lgpVertexProgramName :: lp -> String -- lgpFragmentProgramName :: lp -> String -- lgpGeometryProgramName :: lp -> String {- class GpuProgram p where gpType :: p -> GpuProgramType -- ^ The type of the program gpFilename :: p -> String -- ^ The name of the file to load source from (may be blank) gpSource :: p -> String -- ^ The assembler source of the program (may be blank until file loaded) gpLoadFromFile :: p -> Bool -- ^ Whether we need to load source from file or not gpSyntaxCode :: p -> String -- ^ Syntax code e.g. arbvp1, vs_2_0 etc gpSkeletalAnimation :: p -> Bool -- ^ Does this (vertex) program include skeletal animation? gpMorphAnimation :: p -> Bool -- ^ Does this (vertex) program include morph animation? gpPoseAnimation :: p -> Int -- ^ Does this (vertex) program include pose animation (count of number of poses supported) gpVertexTextureFetch :: p -> Bool -- ^ Does this (vertex) program require support for vertex texture fetch? gpNeedsAdjacencyInfo :: p -> Bool -- ^ Does this (geometry) program require adjacency information? gpDefaultParams :: p -> GpuProgramParameters -- ^ The default parameters for use with this object gpCompileError :: p -> Bool -- ^ Did we encounter a compilation error? -} data GpuProgram p => GpuProgramDescriptor p = GpuProgramDescriptor { gpdName :: String , gpdType :: GpuProgramType -- ^ The type of the program , gpdFilename :: String -- ^ The name of the file to load source from (may be blank) -- , gpdSource :: String -- ^ The assembler source of the program (may be blank until file loaded) -- , gpdLoadFromFile :: Bool -- ^ Whether we need to load source from file or not , gpdSyntaxCode :: String -- ^ Syntax code e.g. arbvp1, vs_2_0 etc , gpdAttach :: [String] , gpdSkeletalAnimation :: Bool -- ^ Does this (vertex) program include skeletal animation? , gpdMorphAnimation :: Bool -- ^ Does this (vertex) program include morph animation? , gpdPoseAnimation :: Int -- ^ Does this (vertex) program include pose animation (count of number of poses supported) , gpdVertexTextureFetch :: Bool -- ^ Does this (vertex) program require support for vertex texture fetch? , gpdNeedsAdjacencyInfo :: Bool -- ^ Does this (geometry) program require adjacency information? , gpdDefaultParams :: GpuProgramParameters -- ^ The default parameters for use with this object -- , gpdCompileError :: Bool -- ^ Did we encounter a compilation error? , gpdGpuProgram :: Maybe p -- /** Record of logical to physical buffer maps. Mandatory for low-level -- programs or high-level programs which set their params the same way. */ -- mutable GpuLogicalBufferStruct mFloatLogicalToPhysical; -- /** Record of logical to physical buffer maps. Mandatory for low-level -- programs or high-level programs which set their params the same way. */ -- mutable GpuLogicalBufferStruct mIntLogicalToPhysical; -- /// Parameter name -> ConstantDefinition map, shared instance used by all parameter objects -- mutable GpuNamedConstants mConstantDefs; -- /// File from which to load named constants manually -- String mManualNamedConstantsFile; -- bool mLoadedManualNamedConstants; } -- deriving Eq