opengles-0.8.3: Functional interface for OpenGL 4.1+ and OpenGL ES 2.0+

Safe HaskellNone
LanguageHaskell2010

Graphics.OpenGLES.Types

Contents

Synopsis

Shading Language Base Types

GLSL types.

Vertex Attribute Array Source Datatypes

Texture Pixel Formats

Type-Level Utilities

type family Aligned x :: Nat Source

Equations

Aligned 0 = 0 
Aligned 1 = 4 
Aligned 2 = 4 
Aligned 3 = 4 
Aligned x = 4 + Aligned (x - 4) 

type family Stride list :: Nat Source

Equations

Stride `[]` = 0 
Stride (x : xs) = Aligned (SizeOf x) + Stride xs 

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

data Uniform p a Source

class UnifVal a Source

Minimal complete definition

glUniform

Vertex Attribute

data Attrib p a Source

Instances

class VertexAttribute a Source

GLSL vertex attribute type

Minimal complete definition

glVertexAttrib

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.

type family VDim v :: Nat Source

Dimentions of a vector.

Equations

VDim V1 = 1 
VDim V2 = 2 
VDim V3 = 3 
VDim V4 = 4 

class VertexAttributeArray attr src Source

Minimal complete definition

glVertexAttribPtr

Instances

VertexAttributeArray Float a Source 
(Integral a, Integral b) => VertexAttributeArray a b Source

a = Int or Word32, b = Int or Word 8/16/32.

class AttrStruct a p b | a -> p Source

A set of VertexAttributes packed in a Buffer

Minimal complete definition

glVertexBuffer

class Storable a => GLStorable a where Source

Matrices are transposed.

Methods

pokeArrayGL :: Ptr a -> [a] -> GL () Source

Instances

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