Safe Haskell | None |
---|---|
Language | Haskell2010 |
- initGelatin :: IO Bool
- newWindow :: Int -> Int -> String -> Maybe Monitor -> Maybe Window -> IO Window
- loadGeomRenderSource :: IO GeomRenderSource
- loadBezRenderSource :: IO BezRenderSource
- loadMaskRenderSource :: IO MaskRenderSource
- loadRenderSource :: RenderDef -> IO RenderSource
- loadTexture :: DynamicImage -> IO GLuint
- loadTextureUnit :: Maybe GLuint -> DynamicImage -> IO GLuint
- unloadTexture :: GLuint -> IO ()
- loadImageAsTexture :: FilePath -> IO (Maybe GLuint)
- filledTriangleRendering :: Window -> GeomRenderSource -> [Triangle (V2 Float)] -> Fill -> IO Rendering
- colorRendering :: Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V4 Float] -> IO Rendering
- colorBezRendering :: Window -> BezRenderSource -> [Bezier (V2 Float)] -> [Triangle (V4 Float)] -> IO Rendering
- colorFontRendering :: Window -> GeomRenderSource -> BezRenderSource -> FontString -> (V2 Float -> V4 Float) -> IO Rendering
- textureRendering :: Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering
- textureUnitRendering :: Maybe GLint -> Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering
- maskRendering :: Window -> MaskRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering
- transformRendering :: Transform -> Rendering -> Rendering
- stencilMask :: IO () -> IO () -> IO ()
- alphaMask :: Window -> MaskRenderSource -> IO () -> IO () -> IO Rendering
- toTexture :: Window -> IO () -> IO GLuint
- toTextureUnit :: Maybe GLuint -> Window -> IO () -> IO GLuint
- clipTexture :: GLuint -> ClippingArea -> IO GLuint
- calculateDpi :: IO Dpi
Documentation
initGelatin :: IO Bool Source
Initializes the system. This must be called before creating a window. Returns True when initialization was successful.
:: Int | Width |
-> Int | Height |
-> String | Title |
-> Maybe Monitor | The monitor to fullscreen into. |
-> Maybe Window | A window to share OpenGL contexts with. |
-> IO Window |
Creates a window. This can only be called after initializing with
initGelatin
.
loadGeomRenderSource :: IO GeomRenderSource Source
Loads a new shader program and attributes for rendering geometry.
loadBezRenderSource :: IO BezRenderSource Source
Loads a new shader progarm and attributes for rendering beziers.
loadMaskRenderSource :: IO MaskRenderSource Source
Loads a new shader program and attributes for masking textures.
loadTexture :: DynamicImage -> IO GLuint Source
loadTextureUnit :: Maybe GLuint -> DynamicImage -> IO GLuint Source
unloadTexture :: GLuint -> IO () Source
loadImageAsTexture :: FilePath -> IO (Maybe GLuint) Source
filledTriangleRendering :: Window -> GeomRenderSource -> [Triangle (V2 Float)] -> Fill -> IO Rendering Source
Creates and returns a renderer that renders a given string of triangles with the given filling.
colorRendering :: Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V4 Float] -> IO Rendering Source
Creates and returns a renderer that renders the given colored geometry.
colorBezRendering :: Window -> BezRenderSource -> [Bezier (V2 Float)] -> [Triangle (V4 Float)] -> IO Rendering Source
Creates and returns a renderer that renders the given colored beziers.
colorFontRendering :: Window -> GeomRenderSource -> BezRenderSource -> FontString -> (V2 Float -> V4 Float) -> IO Rendering Source
TODO: textureFontRendering and then fontRendering.
Creates and returns a renderer that renders a given FontString.
textureRendering :: Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering Source
Creates and returns a renderer that renders a textured geometry using the texture bound to GL_TEXTURE0.
textureUnitRendering :: Maybe GLint -> Window -> GeomRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering Source
Creates and returns a renderer that renders the given textured geometry using the specified texture binding.
maskRendering :: Window -> MaskRenderSource -> GLuint -> [V2 Float] -> [V2 Float] -> IO Rendering Source
Creates and returns a renderer that masks a textured rectangular area with another texture.
transformRendering :: Transform -> Rendering -> Rendering Source
stencilMask :: IO () -> IO () -> IO () Source
Creates an IO () drawing computation that masks an IO () drawing computation with another using a stencil test.
alphaMask :: Window -> MaskRenderSource -> IO () -> IO () -> IO Rendering Source
Creates a rendering that masks an IO () drawing computation with the alpha value of another.
toTextureUnit :: Maybe GLuint -> Window -> IO () -> IO GLuint Source
clipTexture :: GLuint -> ClippingArea -> IO GLuint Source
Sub-samples a texture using the given coordinate box and creates a new
texture. Keep in mind that OpenGL texture coordinates are flipped from
normal
graphics coordinates (y = 0 is the bottom of the texture). That
fact has bitten the author a number of times while clipping a texture
created with toTexture
and toUnitTexture
.
calculateDpi :: IO Dpi Source