Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- withWindow :: (MonadIO m, MonadMask m) => Int -> Int -> String -> Int -> (WindowResources -> m b) -> m b
- drawing :: (MonadIO m, MonadMask m) => m b -> m b
- mode2D :: (MonadIO m, MonadMask m) => Camera2D -> m b -> m b
- mode3D :: (MonadIO m, MonadMask m) => Camera3D -> m b -> m b
- textureMode :: (MonadIO m, MonadMask m) => RenderTexture -> m b -> m b
- shaderMode :: (MonadIO m, MonadMask m) => Shader -> m b -> m b
- blendMode :: (MonadIO m, MonadMask m) => BlendMode -> m b -> m b
- scissorMode :: (MonadIO m, MonadMask m) => Int -> Int -> Int -> Int -> m b -> m b
- vrStereoMode :: (MonadIO m, MonadMask m) => VrStereoConfig -> m b -> m b
- whileWindowOpen :: MonadIO m => (a -> m a) -> a -> m a
- whileWindowOpen_ :: MonadIO m => (a -> m a) -> a -> m ()
- whileWindowOpen0 :: MonadIO m => m () -> m ()
- cameraDirectionRay :: Camera3D -> Ray
- setMaterialShader :: Model -> Int -> Shader -> Model
- inGHCi :: Bool
- data WindowResources
- class Freeable a where
Bracket functions
withWindow :: (MonadIO m, MonadMask m) => Int -> Int -> String -> Int -> (WindowResources -> m b) -> m b Source #
textureMode :: (MonadIO m, MonadMask m) => RenderTexture -> m b -> m b Source #
vrStereoMode :: (MonadIO m, MonadMask m) => VrStereoConfig -> m b -> m b Source #
Game loop functions
:: MonadIO m | |
=> (a -> m a) | The game loop. Its only argument should be the current application state, and it should return a new state. |
-> a | The initial application state. |
-> m a | The application state after the last frame. |
Calls the game loop every frame as long as the window is open. For larger projects, instead of using this function, consider making a custom game loop for flexibility.
whileWindowOpen_ :: MonadIO m => (a -> m a) -> a -> m () Source #
Same as whileWindowOpen
, but discards the final state.
whileWindowOpen0 :: MonadIO m => m () -> m () Source #
Same as whileWindowOpen
, but without application state.
Miscellaneous
cameraDirectionRay :: Camera3D -> Ray Source #
Gets the direction of a camera as a ray.
:: Model | The model to operate on |
-> Int | The index of the material |
-> Shader | The shader to use |
-> Model | The modified model |
Sets the shader of a material at a specific index (WARNING: This will fail if the index provided is out of bounds).
data WindowResources Source #
class Freeable a where Source #
Nothing