Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type Vec2 = V2 Float
- type Vec3 = V3 Float
- type Vec4 = V4 Float
- type BVec2 = V2 Bool
- type BVec3 = V3 Bool
- type BVec4 = V4 Bool
- type IVec2 = V2 Int32
- type IVec3 = V3 Int32
- type IVec4 = V4 Int32
- type UVec2 = V2 Word32
- type UVec3 = V3 Word32
- type UVec4 = V4 Word32
- type Mat2 = M22 Float
- type Mat3 = M33 Float
- type Mat4 = M44 Float
- type Mat2x3 = M23 Float
- type Mat2x4 = M24 Float
- type Mat3x2 = M32 Float
- type Mat3x4 = M34 Float
- type Mat4x2 = M42 Float
- type Mat4x3 = M43 Float
- newtype HalfFloat = HalfFloat Word16
- newtype FixedFloat = FixedFloat Int32
- newtype Int2_10x3 = Int210x3 Int32
- newtype Word2_10x3 = Word2_10x3 Int32
- newtype Word4444 = Word4444 Word16
- newtype Word5551 = Word5551 Word16
- newtype Word565 = Word565 Word16
- newtype Word10f11f11f = Word10f11f11f Word32
- newtype Word5999 = Word5999 Word32
- newtype Word24_8 = Word24_8 Word32
- newtype FloatWord24_8 = FloatWord24_8 (Float, Word32)
- type family SizeOf f :: Nat
- type family Aligned x :: Nat
- type family Stride list :: Nat
- castGL :: (CmpNat (Aligned (SizeOf x)) (Aligned (SizeOf y)) ~ EQ) => p x -> p y
- data Uniform p a
- class UnifVal a
- data Attrib p a
- class VertexAttribute a
- class GLType a => AttrElement a
- type family Vectorize a :: *
- type family VDim v :: Nat
- class VertexAttributeArray attr src
- class AttrStruct a p b | a -> p
- class Storable a => GLStorable a where
- pokeArrayGL :: Ptr a -> [a] -> GL ()
Shading Language Base Types
GLSL types.
Vertex Attribute Array Source Datatypes
newtype FixedFloat Source
newtype Word2_10x3 Source
Texture Pixel Formats
newtype Word10f11f11f Source
newtype FloatWord24_8 Source
Type-Level Utilities
type family SizeOf f :: Nat Source
SizeOf Float = 4 | |
SizeOf HalfFloat = 2 | |
SizeOf FixedFloat = 4 | |
SizeOf Word8 = 1 | |
SizeOf Word16 = 2 | |
SizeOf Word32 = 4 | |
SizeOf Int8 = 1 | |
SizeOf Int16 = 2 | |
SizeOf Int32 = 4 | |
SizeOf Int2_10x3 = 4 | |
SizeOf Word2_10x3 = 4 | |
SizeOf Word4444 = 2 | |
SizeOf Word5551 = 2 | |
SizeOf Word10f11f11f = 4 | |
SizeOf Word5999 = 4 | |
SizeOf Word24_8 = 4 | |
SizeOf FloatWord24_8 = 8 | |
SizeOf (V2 a) = 2 * SizeOf a | |
SizeOf (V3 a) = 3 * SizeOf a | |
SizeOf (V4 a) = 4 * SizeOf a | |
SizeOf Double = 8 |
castGL :: (CmpNat (Aligned (SizeOf x)) (Aligned (SizeOf y)) ~ EQ) => p x -> p y Source
Type cast between size equivalent structures like
Buffer (V2 HalfFloat) -> Buffer Int32
.
Uniform Variable
Vertex Attribute
class GLType a => AttrElement a Source
The 3rd argument of glVertexAttribI?Pointer
type family Vectorize a :: * Source
Temporarily gives a vector representation for type comparison.
Vectorize Int2_10x3 = V4 Int2_10x3 | |
Vectorize Word2_10x3 = V4 Word2_10x3 | |
Vectorize (f Int2_10x3) = f (V4 Int2_10x3) | |
Vectorize (f Word2_10x3) = f (V4 Word2_10x3) | |
Vectorize (f a) = f a | |
Vectorize a = V1 a |
class VertexAttributeArray attr src Source
glVertexAttribPtr
VertexAttributeArray Float a Source | |
(Integral a, Integral b) => VertexAttributeArray a b Source | a = Int or Word32, b = Int or Word 8/16/32. |
class Storable a => GLStorable a where Source
Matrices are transposed.
pokeArrayGL :: Ptr a -> [a] -> GL () Source
Storable a => GLStorable a Source | |
(Storable (f (g a)), Storable (g (f a)), VertexAttribute (f (g Float)), Functor f, Distributive g) => GLStorable (f (g a)) Source |