-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | A Simple Graphics Library from the SimpleH framework.
--
-- synopsis: A Simple Graphics Library from the SimpleH framework.
@package SimpleGL
@version 0.9.1
module SimpleH.GL.Texture
data Texture
imageTexture :: MonadError [Char] (Either e) => DynamicImage -> IO (Either e Texture)
readTexture :: FilePath -> IO (Either String Texture)
readTextures :: Traversable t => t FilePath -> IO (Either String (t Texture))
readTextures' :: Traversable t => t FilePath -> IO (t Texture)
instance Show Texture
instance Graphics Texture
module SimpleH.GL
-- | A two-element vector
data V2 t
V2 :: !t -> !t -> V2 t
-- | A three-element vector
data V3 t
V3 :: !t -> !t -> !t -> V3 t
-- | A three-element vector
data V4 t
V4 :: !t -> !t -> !t -> !t -> V4 t
class Graphics g
draw :: Graphics g => g -> IO ()
type EventHandler = Event Seconds Position -> Event Seconds (Button, KeyButtonState) -> IO (Event Seconds (IO ()))
type Position = V2 Coord
type Title = String
-- | Create an OpenGL window and sinks all events into the given handler.
spawnWindow :: Title -> EventHandler -> IO ()
data Button
CharKey :: Char -> Button
SpecialKey :: SpecialKey -> Button
MouseButton :: MouseButton -> Button
-- | Key or button state.
data KeyButtonState :: *
Release :: KeyButtonState
Press :: KeyButtonState
-- | A 2-dimensional size, measured in pixels.
data Size :: *
Size :: !GLsizei -> !GLsizei -> Size
-- | A concrete implementation of a read-only state variable, carrying an
-- IO action to read the value.
data GettableStateVar a :: * -> *
-- | A concrete implementation of a write-only state variable, carrying an
-- IO action to write the new value.
data SettableStateVar a :: * -> *
type Scene t = [Widget t]
data Widget t
Shape :: [ShapeProp] -> (Shape t) -> Widget t
SubScene :: [Transform t] -> (Scene t) -> Widget t
data Transform t
Translate :: !t -> !t -> !t -> Transform t
Rotate :: !t -> (V3 t) -> Transform t
Zoom :: !t -> !t -> !t -> Transform t
data Shape t
Polygon :: [Vertex t] -> Shape t
data ShapeProp
Texture :: Texture -> ShapeProp
data Vertex t
Vertex :: [VertexProp t] -> !t -> !t -> !t -> Vertex t
data VertexProp t
Color :: (V4 t) -> VertexProp t
TexCoord :: (V2 t) -> VertexProp t
clearScreen :: IO ()
drawScene :: Scene Coord -> IO ()
-- | Swap the back and front color buffers of the window. If
-- AutoPollEvent is enabled by enableSpecial (which is the
-- default), it also polls for new events before the swapping.
swapBuffers :: IO ()
type Coord = GLfloat
white :: Num t => V4 t
black :: Num t => V4 t
grey :: Num t => t -> V4 t
gray :: Num t => t -> V4 t
red :: Num t => V4 t
green :: Num t => V4 t
blue :: Num t => V4 t
yellow :: (Num t, Semigroup t) => V4 t
magenta :: (Num t, Semigroup t) => V4 t
cyan :: (Num t, Semigroup t) => V4 t
vert :: t -> t -> t -> Vertex t
cvert :: VertexProp t -> t -> t -> t -> Vertex t
instance Eq Button
instance Show Button
instance Applicative Vertex3
instance Unit Vertex3
instance Functor Vertex3
instance Applicative Vector3
instance Unit Vector3
instance Functor Vector3
instance Graphics ShapeProp
instance Graphics (VertexProp Coord)
instance Graphics (Vertex Coord)
instance Graphics (Shape Coord)
instance Graphics (Widget Coord)
instance Ring Coord
instance Monoid Coord
instance Semigroup Coord