h-raylib-4.5.3.1: Raylib bindings for Haskell
Safe HaskellSafe-Inferred
LanguageHaskell2010

Raylib.Util

Synopsis

Documentation

cameraDirectionRay :: Camera3D -> Ray Source #

Gets the direction of a camera as a ray.

whileWindowOpen Source #

Arguments

:: (a -> IO 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.

-> IO 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_ :: (a -> IO a) -> a -> IO () Source #

Same as whileWindowOpen, but discards the final state.

whileWindowOpen0 :: IO () -> IO () Source #

Same as whileWindowOpen, but without application state.

setMaterialShader Source #

Arguments

:: 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).