Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type WinId = Int
- data Drawcall s = Drawcall {
- drawcallFbo :: s -> (Either WinId (IO FBOKeys, IO ()), IO ())
- feedbackBuffer :: Maybe (s -> IO (GLuint, GLuint, GLuint, GLuint))
- primitiveName :: Int
- rasterizationName :: Maybe Int
- vertexSource :: String
- optionalGeometrySource :: Maybe String
- optionalFragmentSource :: Maybe String
- usedInputs :: [Int]
- usedVUniforms :: [Int]
- usedVSamplers :: [Int]
- usedGUniforms :: [Int]
- usedGSamplers :: [Int]
- usedFUniforms :: [Int]
- usedFSamplers :: [Int]
- primStrUBufferSize :: Int
- mapDrawcall :: (s -> s') -> Drawcall s' -> Drawcall s
- type Binding = Int
- data RenderIOState s = RenderIOState {
- uniformNameToRenderIO :: IntMap (s -> Binding -> IO ())
- samplerNameToRenderIO :: IntMap (s -> Binding -> IO Int)
- rasterizationNameToRenderIO :: IntMap (s -> IO ())
- transformFeedbackToRenderIO :: IntMap (s -> GLuint -> IO ())
- inputArrayToRenderIO :: IntMap (s -> [([Binding], GLuint, Int) -> ((IO [VAOKey], IO ()), IO ())])
- newRenderIOState :: RenderIOState s
- mapRenderIOState :: (s -> s') -> RenderIOState s' -> RenderIOState s -> RenderIOState s
- compileDrawcalls :: (Monad m, MonadIO m, MonadException m, ContextHandler ctx) => [IO (Drawcall s)] -> RenderIOState s -> ContextT ctx os m (s -> Render os ())
- safeGenerateDrawcalls :: [IO (Drawcall s)] -> IO ([(Drawcall s, [Int], [Int], [Int], [Int])], [String])
- innerCompile :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> IO (Either String ((IORef GLuint, IO ()), s -> Render os ()))
- createRenderer :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> GLuint -> Int -> IO ((IORef GLuint, IO ()), s -> Render os ())
- createFeedbackRenderer :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> GLuint -> (s -> IO (GLuint, GLuint, GLuint, GLuint)) -> Int -> IO ((IORef GLuint, IO ()), s -> Render os ())
- compileOpenGlShader :: GLuint -> String -> IO (Maybe String)
- linkProgram :: GLuint -> IO (Maybe String)
- createUniformBuffer :: Integral a => a -> IO GLuint
- addPrimitiveStreamUniform :: Word32 -> Int -> IntMap (s -> Binding -> IO ()) -> IntMap (s -> Binding -> IO ())
- bind :: IntMap (s -> Binding -> IO x) -> [(Int, Int)] -> s -> (x -> IO Bool) -> IO Bool
- orderedUnion :: Ord a => [a] -> [a] -> [a]
- oldAllocateWhichGiveStrangeResults :: Int -> [[Int]] -> [[Int]]
- allocateConsecutiveIndexes :: Int -> [[Int]] -> [[Int]]
- getFboError :: MonadIO m => m (Maybe String)
- whenJust' :: (Monad m, Monoid b) => Maybe a -> (a -> m b) -> m b
Documentation
Drawcall | |
|
mapDrawcall :: (s -> s') -> Drawcall s' -> Drawcall s Source #
data RenderIOState s Source #
RenderIOState | |
|
mapRenderIOState :: (s -> s') -> RenderIOState s' -> RenderIOState s -> RenderIOState s Source #
compileDrawcalls :: (Monad m, MonadIO m, MonadException m, ContextHandler ctx) => [IO (Drawcall s)] -> RenderIOState s -> ContextT ctx os m (s -> Render os ()) Source #
May throw a GPipeException
The multiple drawcalls to be compiled are intended to use the same environment s
(and only one is selected dynamically when rendering).
public
safeGenerateDrawcalls :: [IO (Drawcall s)] -> IO ([(Drawcall s, [Int], [Int], [Int], [Int])], [String]) Source #
innerCompile :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> IO (Either String ((IORef GLuint, IO ()), s -> Render os ())) Source #
createRenderer :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> GLuint -> Int -> IO ((IORef GLuint, IO ()), s -> Render os ()) Source #
createFeedbackRenderer :: RenderIOState s -> (Drawcall s, [Int], [Int], [Int], [Int]) -> GLuint -> (s -> IO (GLuint, GLuint, GLuint, GLuint)) -> Int -> IO ((IORef GLuint, IO ()), s -> Render os ()) Source #
addPrimitiveStreamUniform :: Word32 -> Int -> IntMap (s -> Binding -> IO ()) -> IntMap (s -> Binding -> IO ()) Source #
orderedUnion :: Ord a => [a] -> [a] -> [a] Source #