Module

Graphics.WebGLAll

Package
purescript-webgl
Repository
jutaro/purescript-webgl

WebGL binding for purescript

Re-exports from Control.Monad.Eff.WebGL

#WebGl Source

data WebGl :: Effect

#EffWebGL Source

type EffWebGL eff a = Eff (webgl :: WebGl | eff) a

#runWebGl_ Source

runWebGl_ :: forall e a. Eff (webgl :: WebGl | e) a -> Eff e a

Re-exports from Graphics.WebGL

#WebGLProg Source

newtype WebGLProg

#WebGLContext Source

type WebGLContext = { canvasName :: String }

#Vec4 Source

data Vec4

#Vec3 Source

data Vec3

#Vec2 Source

data Vec2

#Uniform Source

newtype Uniform typ

Constructors

#Shaders Source

data Shaders bindings

Constructors

#Sampler2D Source

#Mat4 Source

data Mat4

#Mat3 Source

data Mat3

#Mat2 Source

data Mat2

#Float Source

data Float

#ContextAttributes Source

type ContextAttributes = { alpha :: Boolean, antialias :: Boolean, depth :: Boolean, failIfMajorPerformanceCaveat :: Boolean, preferLowPowerToHighPerformance :: Boolean, premultipliedAlpha :: Boolean, preserveDrawingBuffer :: Boolean, stencil :: Boolean }

#Buffer Source

type Buffer a = { bufferSize :: Int, bufferType :: Int, webGLBuffer :: WebGLBuffer a }

#Bool Source

data Bool

#Attribute Source

newtype Attribute typ

Constructors

#withShaders Source

withShaders :: forall a eff bindings. Shaders (Record bindings) -> (String -> EffWebGL eff a) -> ({ webGLProgram :: WebGLProg | bindings } -> EffWebGL eff a) -> EffWebGL eff a

#viewport Source

viewport :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGl | eff) Unit

#vertexPointer Source

vertexPointer :: forall typ eff. Attribute typ -> EffWebGL eff Unit

#setUniformFloats Source

setUniformFloats :: forall typ eff. Uniform typ -> Array Number -> EffWebGL eff Unit

#setUniformBoolean Source

setUniformBoolean :: forall typ eff. Uniform typ -> Boolean -> EffWebGL eff Unit

#runWebGLAttr Source

runWebGLAttr :: forall eff a. String -> ContextAttributes -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a

pures either a continuation which takes a String in the error case,

#runWebGL Source

runWebGL :: forall eff a. String -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a

Same as runWebGLAttr but uses default attributes (defContextAttributes)

#requestAnimationFrame Source

requestAnimationFrame :: forall eff a. Eff (webgl :: WebGl | eff) a -> Eff (webgl :: WebGl | eff) Unit

#makeBufferPrimDyn Source

makeBufferPrimDyn :: forall eff a. BufferTarget -> ArrayView a -> Eff (webgl :: WebGl | eff) (Buffer a)

#makeBufferPrim Source

makeBufferPrim :: forall eff a. BufferTarget -> ArrayView a -> Eff (webgl :: WebGl | eff) (Buffer a)

#makeBufferFloatDyn Source

makeBufferFloatDyn :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32)

#makeBufferFloat Source

makeBufferFloat :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32)

#makeBufferDyn Source

makeBufferDyn :: forall num eff a. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a)

#makeBuffer Source

makeBuffer :: forall num eff a. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a)

#isEnabled Source

isEnabled :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Boolean)

#isContextLost Source

isContextLost :: forall eff. Eff (webgl :: WebGl | eff) Boolean

#getCanvasWidth Source

getCanvasWidth :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int

#getCanvasHeight Source

getCanvasHeight :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int

#fillBuffer Source

fillBuffer :: forall eff a. Buffer a -> Int -> Array Number -> Eff (webgl :: WebGl | eff) Unit

#enableVertexAttribArray Source

enableVertexAttribArray :: forall a eff. Attribute a -> (Eff (webgl :: WebGl | eff) Unit)

#enable Source

enable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit)

#drawElements Source

drawElements :: forall eff. Mode -> Int -> EffWebGL eff Unit

#drawArr Source

drawArr :: forall typ eff a. Mode -> Buffer a -> Attribute typ -> EffWebGL eff Unit

#disableVertexAttribArray Source

disableVertexAttribArray :: forall a eff. Attribute a -> (Eff (webgl :: WebGl | eff) Unit)

#disable Source

disable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit)

#depthFunc Source

depthFunc :: forall eff. Func -> Eff (webgl :: WebGl | eff) Unit

#colorMask Source

colorMask :: forall eff. GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGl | eff) Unit

#clearStencil Source

clearStencil :: forall eff. GLint -> Eff (webgl :: WebGl | eff) Unit

#clearDepth Source

clearDepth :: forall eff. GLclampf -> Eff (webgl :: WebGl | eff) Unit

#clearColor Source

clearColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit

#clear Source

clear :: forall eff. Array Mask -> (Eff (webgl :: WebGl | eff) Unit)

#blendFuncSeparate Source

#blendFunc Source

blendFunc :: forall eff. BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit)

#blendEquationSeparate Source

blendEquationSeparate :: forall eff. BlendEquation -> BlendEquation -> (Eff (webgl :: WebGl | eff) Unit)

#blendEquation Source

blendEquation :: forall eff. BlendEquation -> (Eff (webgl :: WebGl | eff) Unit)

#blendColor Source

blendColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit

#bindBufAndSetVertexAttr Source

bindBufAndSetVertexAttr :: forall typ eff a. Buffer a -> Attribute typ -> Eff (webgl :: WebGl | eff) Unit

#bindBuf Source

bindBuf :: forall eff a. Buffer a -> Eff (webgl :: WebGl | eff) Unit

#bindAttribLocation Source

bindAttribLocation :: forall eff. WebGLProg -> Int -> String -> Eff (webgl :: WebGl | eff) Unit

Re-exports from Graphics.WebGLFramebuffer

#WebGLRendBuf Source

#WebGLBuf Source

#unbindRenderbuffer Source

unbindRenderbuffer :: forall eff. EffWebGL eff Unit

#unbindFramebuffer Source

unbindFramebuffer :: forall eff. EffWebGL eff Unit

#renderbufferStorage Source

#readPixels Source

readPixels :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Uint8Array -> Eff (webgl :: WebGl | eff) Uint8Array

#framebufferTexture2D Source

#framebufferRenderbuffer Source

#createRenderbuffer Source

#createFramebuffer Source

#checkFramebufferStatus Source

checkFramebufferStatus :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) GLenum

#bindRenderbuffer Source

#bindFramebuffer Source

bindFramebuffer :: forall eff. WebGLBuf -> EffWebGL eff Unit

Re-exports from Graphics.WebGLTexture

#WebGLTex Source

newtype WebGLTex

Constructors

#TexFilterSpec Source

#withTexture2D Source

withTexture2D :: forall typ eff. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit -> EffWebGL eff Unit

#unbindTexture Source

unbindTexture :: forall eff. TargetType -> EffWebGL eff Unit

#texture2DFor Source

texture2DFor :: forall eff a. String -> TexFilterSpec -> (WebGLTex -> EffWebGL eff a) -> EffWebGL eff Unit

#newTextureInit Source

newTextureInit :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex

#newTexture Source

newTexture :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex

#handleSubLoad2D Source

handleSubLoad2D :: forall a eff. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> EffWebGL eff Unit

#handleLoad2D Source

handleLoad2D :: forall a eff. WebGLTex -> TexFilterSpec -> a -> EffWebGL eff Unit

#createTexture Source

createTexture :: forall eff. Eff (webgl :: WebGl | eff) WebGLTex

#bindTexture Source

bindTexture :: forall eff. TargetType -> WebGLTex -> EffWebGL eff Unit

#activeTexture Source

activeTexture :: forall eff. Int -> Eff (webgl :: WebGl | eff) Unit