Safe Haskell | Safe-Infered |
---|
- newtype LCM w e a = LCM {}
- runLCM :: RenderSystem r vb ib q t1 p lp => r -> [ImageLoader] -> LCM (World r vb ib q t1 p lp) e a -> IO ()
- inLCM :: (w -> IO w) -> LCM w e ()
- peekLCM :: LCM w e w
- pokeLCM :: w -> LCM w e ()
- throwLCM :: e -> LCM w e a
- catchLCM :: LCM w a a -> LCM w e a
- errorLCM :: String -> String -> LCM w e ()
- debugLCM :: String -> String -> LCM w e ()
- data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => FlattenScene vb ib t lp = FlattenScene {}
- data RenderSystem r vb ib q t p lp => World r vb ib q t p lp = World {
- wrResource :: ResourceLibrary vb ib t p lp
- wrRenderSystem :: r
- wrScene :: Scene vb ib t lp
- wrTargets :: Map String (RenderTarget t lp)
- wrRenderOptions :: IntMap RenderGroupOptions
- wrImageLoaders :: [ImageLoader]
- updateWorld :: (w -> w) -> LCM w e ()
- updateResource :: RenderSystem r vb ib q t p lp => (ResourceLibrary vb ib t p lp -> ResourceLibrary vb ib t p lp) -> LCM (World r vb ib q t p lp) e ()
- mapScene :: RenderSystem r vb ib q t p lp => (Scene vb ib t lp -> Scene vb ib t lp) -> World r vb ib q t p lp -> World r vb ib q t p lp
- mapTargets :: RenderSystem r vb ib q t p lp => (Map String (RenderTarget t lp) -> Map String (RenderTarget t lp)) -> World r vb ib q t p lp -> World r vb ib q t p lp
- mkWorld :: RenderSystem r vb ib q t p lp => r -> [ImageLoader] -> World r vb ib q t p lp
- mkResource :: (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, GpuProgram p, LinkedGpuProgram lp) => ResourceLibrary vb ib t p lp
- mkScene :: (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => Scene vb ib t lp
- data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, GpuProgram p, LinkedGpuProgram lp) => ResourceLibrary vb ib t p lp = ResourceLibrary {
- rlResourceGroups :: [ResourceGroup]
- rlMeshMap :: Map String (Mesh vb ib)
- rlMaterialMap :: Map String (Material t lp)
- rlTextureMap :: Map String t
- rlGpuProgramMap :: Map String (GpuProgramDescriptor p)
- rlLinkedGpuProgramMap :: Map (String, String, String) lp
- rlCompositorMap :: Map String (Compositor t lp)
- data Camera = Camera {}
- cameraProjectionMatrix :: FloatType -> Camera -> Mat4
- data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => SceneObject vb ib t lp
- data (Texture t, LinkedGpuProgram lp) => RenderTarget t lp = RenderTarget {}
- data (Texture t, LinkedGpuProgram lp) => Viewport t lp = Viewport {
- vpLeft :: FloatType
- vpTop :: FloatType
- vpWidth :: FloatType
- vpHeight :: FloatType
- vpCamera :: String
- vpCompositors :: [Compositor t lp]
- vpBackColour :: ColourValue
- vpClearEveryFrame :: Bool
- vpClearBuffers :: FrameBufferType
- getViewportSize :: (Texture t, LinkedGpuProgram lp) => RenderTarget t lp -> Viewport t lp -> (Int, Int, Int, Int)
- data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => SceneNode vb ib t lp = SceneNode {
- snName :: String
- snObject :: [SceneObject vb ib t lp]
- snTransform :: Proj4
- data Sky
- data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => Scene vb ib t lp = Scene {}
- addVMesh :: RenderSystem r vb ib q t p lp => String -> VMesh -> LCM (World r vb ib q t p lp) e ()
- getVMesh :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e VMesh
- addMesh :: RenderSystem r vb ib q t p lp => String -> Mesh vb ib -> World r vb ib q t p lp -> World r vb ib q1 t p lp
- getMesh :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e (Mesh vb ib)
- loadMaterialResources :: RenderSystem rs vb ib q t p lp => Material t lp -> LCM (World rs vb ib q t p lp) e (Material t lp)
- getLoadedMaterial :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e (Maybe (Material t lp))
- setEntityMaterial :: RenderSystem r vb ib q t p lp => [String] -> Entity vb ib t lp -> LCM (World r vb ib q t p lp) e (Entity vb ib t lp)
- createEntity :: (RenderSystem r vb ib q t p lp, Enum rqp) => String -> String -> rqp -> LCM (World r vb ib q t p lp) e (Entity vb ib t lp)
- readFile :: RenderSystem r vb ib q t p lp => FilePath -> LCM (World r vb ib q t p lp) e ByteString
- readFile' :: RenderSystem r vb ib q t p lp => FilePath -> LCM (World r vb ib q t p lp) e ByteString
- loadFile :: [ResourceGroup] -> FilePath -> IO (Maybe ByteString)
- renderFlatScene :: RenderSystem r vb ib q t p lp => FloatType -> String -> FlattenScene vb ib t lp -> LCM (World r vb ib q t p lp) e ()
- addRenderTexture :: RenderSystem r vb ib q a p lp => String -> Int -> Int -> LCM (World r vb ib q a p lp) e ()
- addRenderWindow :: RenderSystem r vb ib q t p lp => String -> Int -> Int -> [LCM (World r vb ib q t p lp) e (Viewport t lp)] -> LCM (World r vb ib q t p lp) e ()
- mkCompositorChain :: RenderSystem r vb ib q t p lp => [Compositor t lp] -> LCM (World r vb ib q t p lp) e [Compositor t lp]
- viewport :: RenderSystem r vb ib q t p lp => FloatType -> FloatType -> FloatType -> FloatType -> String -> [String] -> LCM (World r vb ib q t p lp) e (Viewport t lp)
- updateTargetSize :: RenderSystem rs vb ib q t p lp => String -> Int -> Int -> LCM (World rs vb ib q t p lp) e ()
World transformation
runLCM :: RenderSystem r vb ib q t1 p lp => r -> [ImageLoader] -> LCM (World r vb ib q t1 p lp) e a -> IO ()Source
Embed a LambdaCube program in IO. The embedding manages a world, therefore it requires all the information to create one: the render system and a list of image loaders.
World
data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => FlattenScene vb ib t lp Source
data RenderSystem r vb ib q t p lp => World r vb ib q t p lp Source
World | |
|
updateWorld :: (w -> w) -> LCM w e ()Source
updateResource :: RenderSystem r vb ib q t p lp => (ResourceLibrary vb ib t p lp -> ResourceLibrary vb ib t p lp) -> LCM (World r vb ib q t p lp) e ()Source
mapScene :: RenderSystem r vb ib q t p lp => (Scene vb ib t lp -> Scene vb ib t lp) -> World r vb ib q t p lp -> World r vb ib q t p lpSource
mapTargets :: RenderSystem r vb ib q t p lp => (Map String (RenderTarget t lp) -> Map String (RenderTarget t lp)) -> World r vb ib q t p lp -> World r vb ib q t p lpSource
mkWorld :: RenderSystem r vb ib q t p lp => r -> [ImageLoader] -> World r vb ib q t p lpSource
mkResource :: (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, GpuProgram p, LinkedGpuProgram lp) => ResourceLibrary vb ib t p lpSource
mkScene :: (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => Scene vb ib t lpSource
Resource
data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, GpuProgram p, LinkedGpuProgram lp) => ResourceLibrary vb ib t p lp Source
ResourceLibrary | |
|
SceneGraph
Camera description.
Camera | |
|
cameraProjectionMatrix :: FloatType -> Camera -> Mat4Source
data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => SceneObject vb ib t lp Source
data (Texture t, LinkedGpuProgram lp) => RenderTarget t lp Source
data (Texture t, LinkedGpuProgram lp) => Viewport t lp Source
Viewport | |
|
getViewportSize :: (Texture t, LinkedGpuProgram lp) => RenderTarget t lp -> Viewport t lp -> (Int, Int, Int, Int)Source
data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => SceneNode vb ib t lp Source
SceneNode | |
|
data (HardwareVertexBuffer vb, HardwareIndexBuffer ib, Texture t, LinkedGpuProgram lp) => Scene vb ib t lp Source
:: RenderSystem r vb ib q t p lp | |
=> String | The name of the mesh in the world. |
-> VMesh | The mesh to add. |
-> LCM (World r vb ib q t p lp) e () |
Add a new vector mesh to the world.
getVMesh :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e VMeshSource
Retrieve a vector mesh from the world by name.
addMesh :: RenderSystem r vb ib q t p lp => String -> Mesh vb ib -> World r vb ib q t p lp -> World r vb ib q1 t p lpSource
getMesh :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e (Mesh vb ib)Source
loadMaterialResources :: RenderSystem rs vb ib q t p lp => Material t lp -> LCM (World rs vb ib q t p lp) e (Material t lp)Source
getLoadedMaterial :: RenderSystem r vb ib q t p lp => String -> LCM (World r vb ib q t p lp) e (Maybe (Material t lp))Source
setEntityMaterial :: RenderSystem r vb ib q t p lp => [String] -> Entity vb ib t lp -> LCM (World r vb ib q t p lp) e (Entity vb ib t lp)Source
createEntity :: (RenderSystem r vb ib q t p lp, Enum rqp) => String -> String -> rqp -> LCM (World r vb ib q t p lp) e (Entity vb ib t lp)Source
readFile :: RenderSystem r vb ib q t p lp => FilePath -> LCM (World r vb ib q t p lp) e ByteStringSource
Get the raw data for a resource in a lazy bytestring given its path. The data is cached, so this does not necessarily require disk I/O.
readFile' :: RenderSystem r vb ib q t p lp => FilePath -> LCM (World r vb ib q t p lp) e ByteStringSource
Get the raw data for a resource in a strict bytestring given its path. The data is cached, so this does not necessarily require disk I/O.
loadFile :: [ResourceGroup] -> FilePath -> IO (Maybe ByteString)Source
renderFlatScene :: RenderSystem r vb ib q t p lp => FloatType -> String -> FlattenScene vb ib t lp -> LCM (World r vb ib q t p lp) e ()Source
:: RenderSystem r vb ib q a p lp | |
=> String | The name of the texture. |
-> Int | Width in texels. |
-> Int | Height in texels. |
-> LCM (World r vb ib q a p lp) e () |
Create a new texture.
:: RenderSystem r vb ib q t p lp | |
=> String | The name of the window. |
-> Int | The width of the window in pixels. |
-> Int | The height of the window in pixels. |
-> [LCM (World r vb ib q t p lp) e (Viewport t lp)] | The actions describing the viewports to use. |
-> LCM (World r vb ib q t p lp) e () |
Specify the viewports to display in the window.
mkCompositorChain :: RenderSystem r vb ib q t p lp => [Compositor t lp] -> LCM (World r vb ib q t p lp) e [Compositor t lp]Source
Create render textures, and setup compositor chain.
:: RenderSystem r vb ib q t p lp | |
=> FloatType | Viewport x position. |
-> FloatType | Viewport y position. |
-> FloatType | Viewport width. |
-> FloatType | Viewport height. |
-> String | The camera associated with the viewport. |
-> [String] | The compositor chain to process the image with. |
-> LCM (World r vb ib q t p lp) e (Viewport t lp) |
Create a viewport and attach given compositors.