module Graphics.LambdaCube.GpuProgramUsage where import Graphics.LambdaCube.GpuProgram --import Graphics.LambdaCube.GpuProgramParams {-| This class makes the usage of a vertex and fragment programs (low-level or high-level), with a given set of parameters, explicit. @remarks Using a vertex or fragment program can get fairly complex; besides the fairly rudimentary process of binding a program to the GPU for rendering, managing usage has few complications, such as: This class packages up those details so you don't have to worry about them. For example, this class lets you define a high-level program and set up the parameters for it, without having loaded the program (which you normally could not do). When the program is loaded and compiled, this class will then validate the parameters you supplied earlier and turn them into runtime parameters. @par Just incase it wasn't clear from the above, this class provides linkage to both GpuProgram and HighLevelGpuProgram, despite its name. -} data GpuProgramUsage = GpuProgramUsage { --gpuType :: GpuProgramType -- , gpuParent :: Pass gpuProgramName :: String -- , gpuProgram :: Maybe p -- ^ The program link -- , gpuProgram :: Either String (GpuProgramDescriptor p) -- ^ The program link -- , gpuParameters :: GpuProgramParameters -- ^ program parameters -- , gpuRecreateParams :: Bool -- ^ Whether to recreate parameters next load } deriving Eq