spice-0.3.2.1: An FRP-based game engine written in Haskell.

Safe HaskellNone
LanguageHaskell2010

FRP.Spice.Graphics

Description

This module re-exports a number of modules having to do with graphics.

Synopsis

Documentation

renderPoint :: Vector Float -> Scene Source

Rendering a point.

renderRectangle :: Vector Float -> Vector Float -> Scene Source

Rendering a rectangle.

renderSquare :: Vector Float -> Float -> Scene Source

Rendering a square.

data Color Source

Representing a Color using four Float representing reg, green, blue, and the alpha mask respectively. The Floats are in a range from 0-1, representing Ints from 0-255.

Constructors

Color 

Instances

bindColor :: Color -> Scene Source

Converting a color to an action in a Scene.

color4f :: Float -> Float -> Float -> Float -> Color Source

A synonym for the Color constructor.

color3f :: Float -> Float -> Float -> Color Source

Constructing a Color from 3 Floats, defaulting the alpha mask to 1.0.

color4i :: Int -> Int -> Int -> Int -> Color Source

Creating a Color from 4 Ints. The ints, similarly to color4f represent red, green, blue, and the alpha mask respectively. The ints should be in the range of 0-255. (Note: color4i is functionally equivalent (and also equivalent in source code) to calling color4f with each of its arguments divided by 255.)

color3i :: Int -> Int -> Int -> Color Source

Constructing a Color from 3 Ints, defaulting the alpha mask to 255.

black :: Color Source

The color black.

white :: Color Source

The color white.

red :: Color Source

The color red.

green :: Color Source

The color green.

blue :: Color Source

The color blue.

type Scene = SceneT () Source

The commonly used instance of SceneT

fromElements :: [Element] -> Scene Source

Constructing a SceneT from a list of elements.

renderScene :: Scene -> IO () Source

Rendering a whole Scene (renders each Element from first in list to last in list.)

togl :: Float -> GLfloat Source

Converting a Float to a GLfloat