diff --git a/README.md b/README.md index 7bb4813..9f09968 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ Binding to WebGL for purescript. - This modules should be imported like: -~~~ -import Control.Monad.Eff.WebGL as GL + +``` +import Effect.WebGL as GL import Graphics.WebGL as GL import Graphics.WebGLTexture as GL import Graphics.WebGLFramebuffer as GL -~~~ +``` I started with generating the raw interface by parsing the Kronos IDL and generating a low level binding to Graphics.WebGLRaw. This can be found in the package @@ -37,18 +37,18 @@ that you don't pick a value which is not allowed. Start up by calling runWebGL with the canvas name to be used, an error handler and a continuation which takes a context with the canvas name and runs with -the effect EffWebGL. This will fail if the browser does not support webgl. +the Effect. This will fail if the browser does not support webgl. -~~~ +``` runWebGL "glcanvas" (\s -> alert s) \ context -> do -~~~ +``` Then you need to define the fshader and vshader in the shader language as two strings. The Shaders constructor takes the two strings and has an additional phantom type, which defines the bindings between purescript and the graphic processor. E.g.: -~~~ +``` shaders :: Shaders {aVertexPosition :: Attribute Vec3, uPMatrix :: Uniform Mat4, uMVMatrix:: Uniform Mat4} shaders = Shaders """precision mediump float; @@ -67,30 +67,32 @@ shaders = Shaders gl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0); } """ -~~~ +``` Although type safety is guaranteed in the purescript world, currently the correctness of your types is not checked against the shading language definitions. Be careful as unused variables in the sahder code will be optimized away and the binding will not be correct then. By calling -~~~ + +``` withShaders shaders (\s -> alert s) \ bindings -> do -~~~ +``` + compile the shaders, and the returned bindings are a record, with a type that matches the shaders phantom type, plus an additional field, which holds the WebGlShaderProgram, which is needed for some procedures. So here is the withShaders type: -~~~ -withShaders :: forall bindings eff a. Shaders (Object bindings) -> (String -> EffWebGL eff a) -> - ({webGLProgram :: WebGLProg | bindings} -> EffWebGL eff a) -> EffWebGL eff a -~~~ +``` +withShaders :: forall bindings a. Shaders (Object bindings) -> (String -> Effect a) -> + ({webGLProgram :: WebGLProg | bindings} -> Effect a) -> Effect a +``` You can then bind values to uniforms and make buffers and draw. This is just on a slightly higher leven then calling the original webgl procedures. Eg: -~~~ +``` let pMatrix = M.makePerspective 45 (canvasWidth / canvasHeight) 0.1 100.0 setUniformFloats bindings.uPMatrix (M.toArray pMatrix) @@ -102,12 +104,12 @@ higher leven then calling the original webgl procedures. Eg: (-1.0), (-1.0), 0.0, 1.0, (-1.0), 0.0] drawArr TRIANGLES buf1 bindings.aVertexPosition -~~~ +``` Textures are supported via the module Graphics.WebGLTexture. A texture can be created by: -~~~ +``` texture2DFor "crate.gif" MIPMAP \texture -> do -~~~ +``` The interface is not stable, but the basic constructs (effect, shaders) will not be dropped. diff --git a/bower.json b/bower.json index 8502e23..31bd53a 100644 --- a/bower.json +++ b/bower.json @@ -6,9 +6,7 @@ "Michael Karg " ], "description": "WebGL binding for purescript", - "keywords": [ - "purescript" - ], + "keywords": ["purescript"], "repository": { "type": "git", "url": "git://github.com/jutaro/purescript-webgl.git" @@ -26,27 +24,20 @@ "package.json" ], "dependencies": { - "purescript-prelude": "^3.1.0", - "purescript-monoid": "^3.1.0", - "purescript-control": "^3.3.1", - "purescript-invariant": "^3.0.0", - "purescript-maybe": "^3.0.0", - "purescript-functions": "^3.0.0", - "purescript-arraybuffer-types": "^2.0.0", - "purescript-typedarray": "^2.1.0", - "purescript-vector": "^2.0.0", - "purescript-matrix": "^2.1.0", - "purescript-extensions": "^2.2.0", - "purescript-integers": "^3.1.0", - "purescript-foldable-traversable": "^3.6.1", - "purescript-eff": "^3.1.0", - "purescript-either": "^3.1.0", - "purescript-tuples": "^4.1.0", - "purescript-unfoldable": "^3.0.0", - "purescript-canvas": "^3.1.0" - }, - "resolutions": { + "purescript-prelude": "^4.0.0", + "purescript-control": "^4.1.0", + "purescript-invariant": "^4.0.0", + "purescript-maybe": "^4.0.0", + "purescript-functions": "^4.0.0", "purescript-arraybuffer-types": "^2.0.0", - "purescript-extensions": "^2.2.0" + "purescript-typedarray": "mgmeier/purescript-typedarray#master", + "purescript-vector": "AlexMouton/purescript-vector#compiler-0.12", + "purescript-matrix": "AlexMouton/purescript-matrix#compiler-0.12", + "purescript-integers": "^4.0.0", + "purescript-foldable-traversable": "^4.0.0", + "purescript-either": "^4.0.0", + "purescript-tuples": "^5.0.0", + "purescript-unfoldable": "^4.0.0", + "purescript-canvas": "^4.0.0" } } diff --git a/docs/Control/Monad/Eff/WebGL.md b/docs/Control/Monad/Eff/WebGL.md index 6c4f078..808e748 100644 --- a/docs/Control/Monad/Eff/WebGL.md +++ b/docs/Control/Monad/Eff/WebGL.md @@ -1,23 +1,15 @@ -## Module Control.Monad.Eff.WebGL +## Module Effect.WebGL WebGL binding for purescript #### `WebGl` -``` purescript +```purescript data WebGl :: ! ``` -#### `EffWebGL` - -``` purescript -type EffWebGL eff a = Eff (webgl :: WebGl | eff) a -``` - #### `runWebGl_` -``` purescript -runWebGl_ :: forall a e. Eff (webgl :: WebGl | e) a -> Eff e a +```purescript +runWebGl_ :: forall e. Effect a -> Effect a ``` - - diff --git a/docs/Graphics/WebGL.md b/docs/Graphics/WebGL.md index f5cc1e4..779a39f 100644 --- a/docs/Graphics/WebGL.md +++ b/docs/Graphics/WebGL.md @@ -4,260 +4,260 @@ WebGL binding for purescript #### `WebGLContext` -``` purescript +```purescript type WebGLContext = { canvasName :: String } ``` #### `ContextAttributes` -``` purescript +```purescript type ContextAttributes = { alpha :: Boolean, depth :: Boolean, stencil :: Boolean, antialias :: Boolean, premultipliedAlpha :: Boolean, preserveDrawingBuffer :: Boolean, preferLowPowerToHighPerformance :: Boolean, failIfMajorPerformanceCaveat :: Boolean } ``` #### `defContextAttributes` -``` purescript +```purescript defContextAttributes :: ContextAttributes ``` #### `runWebGLAttr` -``` purescript -runWebGLAttr :: forall a eff. String -> ContextAttributes -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +```purescript +runWebGLAttr :: forall a. String -> ContextAttributes -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a ``` pures either a continuation which takes a String in the error case, #### `runWebGL` -``` purescript -runWebGL :: forall a eff. String -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +```purescript +runWebGL :: forall a. String -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a ``` Same as runWebGLAttr but uses default attributes (defContextAttributes) #### `Uniform` -``` purescript +```purescript newtype Uniform typ = Uniform { uLocation :: WebGLUniformLocation, uName :: String, uType :: Int } ``` #### `Attribute` -``` purescript +```purescript newtype Attribute typ = Attribute { aLocation :: GLint, aName :: String, aItemType :: Int, aItemSize :: Int } ``` #### `Vec2` -``` purescript +```purescript data Vec2 ``` #### `Vec3` -``` purescript +```purescript data Vec3 ``` #### `Vec4` -``` purescript +```purescript data Vec4 ``` #### `Mat2` -``` purescript +```purescript data Mat2 ``` #### `Mat3` -``` purescript +```purescript data Mat3 ``` #### `Mat4` -``` purescript +```purescript data Mat4 ``` #### `Sampler2D` -``` purescript +```purescript data Sampler2D ``` #### `Bool` -``` purescript +```purescript data Bool ``` #### `Float` -``` purescript +```purescript data Float ``` #### `WebGLProg` -``` purescript +```purescript newtype WebGLProg ``` #### `Shaders` -``` purescript +```purescript data Shaders bindings = Shaders String String ``` #### `requestAnimationFrame` -``` purescript -requestAnimationFrame :: forall a eff. Eff (webgl :: WebGl | eff) a -> Eff (webgl :: WebGl | eff) Unit +```purescript +requestAnimationFrame :: forall a. Effect a -> Effect Unit ``` #### `withShaders` -``` purescript -withShaders :: forall bindings eff a. Shaders ({ | bindings }) -> (String -> EffWebGL eff a) -> ({ webGLProgram :: WebGLProg | bindings } -> EffWebGL eff a) -> EffWebGL eff a +```purescript +withShaders :: forall bindings a. Shaders ({ | bindings }) -> (String -> Effect a) -> ({ webGLProgram :: WebGLProg | bindings } -> Effect a) -> Effect a ``` #### `bindAttribLocation` -``` purescript -bindAttribLocation :: forall eff. WebGLProg -> Int -> String -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindAttribLocation :: WebGLProg -> Int -> String -> Effect Unit ``` #### `Buffer` -``` purescript +```purescript type Buffer a = { webGLBuffer :: WebGLBuffer, bufferType :: Int, bufferSize :: Int } ``` #### `makeBufferFloat` -``` purescript -makeBufferFloat :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32) +```purescript +makeBufferFloat :: Array Number -> Effect (Buffer Float32) ``` #### `makeBufferFloatDyn` -``` purescript -makeBufferFloatDyn :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32) +```purescript +makeBufferFloatDyn :: Array Number -> Effect (Buffer Float32) ``` #### `makeBuffer` -``` purescript -makeBuffer :: forall a eff num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a) +```purescript +makeBuffer :: forall a num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Effect (Buffer a) ``` #### `makeBufferDyn` -``` purescript -makeBufferDyn :: forall a eff num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a) +```purescript +makeBufferDyn :: forall a num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Effect (Buffer a) ``` #### `fillBuffer` -``` purescript -fillBuffer :: forall a eff. Buffer a -> Int -> Array Number -> Eff (webgl :: WebGl | eff) Unit +```purescript +fillBuffer :: forall a. Buffer a -> Int -> Array Number -> Effect Unit ``` #### `setUniformFloats` -``` purescript -setUniformFloats :: forall eff typ. Uniform typ -> Array Number -> EffWebGL eff Unit +```purescript +setUniformFloats :: forall typ. Uniform typ -> Array Number -> Effect Unit ``` #### `setUniformBoolean` -``` purescript -setUniformBoolean :: forall eff typ. Uniform typ -> Boolean -> EffWebGL eff Unit +```purescript +setUniformBoolean :: forall typ. Uniform typ -> Boolean -> Effect Unit ``` #### `bindBufAndSetVertexAttr` -``` purescript -bindBufAndSetVertexAttr :: forall a eff typ. Buffer a -> Attribute typ -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindBufAndSetVertexAttr :: forall a typ. Buffer a -> Attribute typ -> Effect Unit ``` #### `bindBuf` -``` purescript -bindBuf :: forall a eff. Buffer a -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindBuf :: forall a. Buffer a -> Effect Unit ``` #### `blendColor` -``` purescript -blendColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +blendColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit ``` #### `blendFunc` -``` purescript -blendFunc :: forall eff. BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFunc :: BlendingFactor -> BlendingFactor -> (Effect Unit) ``` #### `blendFuncSeparate` -``` purescript -blendFuncSeparate :: forall eff. BlendingFactor -> BlendingFactor -> BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFuncSeparate :: BlendingFactor -> BlendingFactor -> BlendingFactor -> BlendingFactor -> (Effect Unit) ``` #### `blendEquation` -``` purescript -blendEquation :: forall eff. BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquation :: BlendEquation -> (Effect Unit) ``` #### `blendEquationSeparate` -``` purescript -blendEquationSeparate :: forall eff. BlendEquation -> BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquationSeparate :: BlendEquation -> BlendEquation -> (Effect Unit) ``` #### `clear` -``` purescript -clear :: forall eff. Array Mask -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clear :: Array Mask -> (Effect Unit) ``` #### `clearColor` -``` purescript -clearColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit ``` #### `clearDepth` -``` purescript -clearDepth :: forall eff. GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearDepth :: GLclampf -> Effect Unit ``` #### `clearStencil` -``` purescript -clearStencil :: forall eff. GLint -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearStencil :: GLint -> Effect Unit ``` #### `colorMask` -``` purescript -colorMask :: forall eff. GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGl | eff) Unit +```purescript +colorMask :: GLboolean -> GLboolean -> GLboolean -> GLboolean -> Effect Unit ``` #### `Func` -``` purescript +```purescript data Func = NEVER | ALWAYS @@ -271,85 +271,85 @@ data Func #### `depthFunc` -``` purescript -depthFunc :: forall eff. Func -> Eff (webgl :: WebGl | eff) Unit +```purescript +depthFunc :: Func -> Effect Unit ``` #### `disable` -``` purescript -disable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disable :: Capacity -> (Effect Unit) ``` #### `drawArr` -``` purescript -drawArr :: forall a eff typ. Mode -> Buffer a -> Attribute typ -> EffWebGL eff Unit +```purescript +drawArr :: forall a typ. Mode -> Buffer a -> Attribute typ -> Effect Unit ``` #### `drawElements` -``` purescript -drawElements :: forall eff. Mode -> Int -> EffWebGL eff Unit +```purescript +drawElements :: Mode -> Int -> Effect Unit ``` #### `enable` -``` purescript -enable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enable :: Capacity -> (Effect Unit) ``` #### `isContextLost` -``` purescript -isContextLost :: forall eff. Eff (webgl :: WebGl | eff) Boolean +```purescript +isContextLost :: Effect Boolean ``` #### `isEnabled` -``` purescript -isEnabled :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Boolean) +```purescript +isEnabled :: Capacity -> (Effect Boolean) ``` #### `vertexPointer` -``` purescript -vertexPointer :: forall eff typ. Attribute typ -> EffWebGL eff Unit +```purescript +vertexPointer :: forall typ. Attribute typ -> Effect Unit ``` #### `viewport` -``` purescript -viewport :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGl | eff) Unit +```purescript +viewport :: GLint -> GLint -> GLsizei -> GLsizei -> Effect Unit ``` #### `enableVertexAttribArray` -``` purescript -enableVertexAttribArray :: forall eff a. Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enableVertexAttribArray :: forall a. Attribute a -> (Effect Unit) ``` #### `disableVertexAttribArray` -``` purescript -disableVertexAttribArray :: forall eff a. Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disableVertexAttribArray :: forall a. Attribute a -> (Effect Unit) ``` #### `getCanvasWidth` -``` purescript -getCanvasWidth :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +```purescript +getCanvasWidth :: WebGLContext -> Effect Int ``` #### `getCanvasHeight` -``` purescript -getCanvasHeight :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +```purescript +getCanvasHeight :: WebGLContext -> Effect Int ``` #### `Capacity` -``` purescript +```purescript data Capacity = BLEND | DEPTH_TEST @@ -360,7 +360,7 @@ data Capacity #### `Mask` -``` purescript +```purescript data Mask = DEPTH_BUFFER_BIT | STENCIL_BUFFER_BIT @@ -369,7 +369,7 @@ data Mask #### `Mode` -``` purescript +```purescript data Mode = POINTS | LINES @@ -382,7 +382,7 @@ data Mode #### `BufferTarget` -``` purescript +```purescript data BufferTarget = ARRAY_BUFFER | ELEMENT_ARRAY_BUFFER @@ -390,7 +390,7 @@ data BufferTarget #### `BlendingFactor` -``` purescript +```purescript data BlendingFactor = ZERO | ONE @@ -416,7 +416,7 @@ data BlendingFactor #### `BlendEquation` -``` purescript +```purescript data BlendEquation = FUNC_ADD | BLEND_EQUATION @@ -425,5 +425,3 @@ data BlendEquation | FUNC_SUBTRACT | FUNC_REVERSE_SUBTRACT ``` - - diff --git a/docs/Graphics/WebGLAll.md b/docs/Graphics/WebGLAll.md index cde1722..cca774d 100644 --- a/docs/Graphics/WebGLAll.md +++ b/docs/Graphics/WebGLAll.md @@ -2,82 +2,75 @@ WebGL binding for purescript - -### Re-exported from Control.Monad.Eff.WebGL: +### Re-exported from Effect.WebGL: #### `WebGl` -``` purescript +```purescript data WebGl :: ! ``` -#### `EffWebGL` - -``` purescript -type EffWebGL eff a = Eff (webgl :: WebGl | eff) a -``` - #### `runWebGl_` -``` purescript -runWebGl_ :: forall a e. Eff (webgl :: WebGl | e) a -> Eff e a +```purescript +runWebGl_ :: forall a. Effect a -> Effect a ``` ### Re-exported from Graphics.WebGL: #### `WebGLProg` -``` purescript +```purescript newtype WebGLProg ``` #### `WebGLContext` -``` purescript +```purescript type WebGLContext = { canvasName :: String } ``` #### `Vec4` -``` purescript +```purescript data Vec4 ``` #### `Vec3` -``` purescript +```purescript data Vec3 ``` #### `Vec2` -``` purescript +```purescript data Vec2 ``` #### `Uniform` -``` purescript +```purescript newtype Uniform typ = Uniform { uLocation :: WebGLUniformLocation, uName :: String, uType :: Int } ``` #### `Shaders` -``` purescript +```purescript data Shaders bindings = Shaders String String ``` #### `Sampler2D` -``` purescript +```purescript data Sampler2D ``` #### `Mode` -``` purescript +```purescript data Mode = POINTS | LINES @@ -90,25 +83,25 @@ data Mode #### `Mat4` -``` purescript +```purescript data Mat4 ``` #### `Mat3` -``` purescript +```purescript data Mat3 ``` #### `Mat2` -``` purescript +```purescript data Mat2 ``` #### `Mask` -``` purescript +```purescript data Mask = DEPTH_BUFFER_BIT | STENCIL_BUFFER_BIT @@ -117,7 +110,7 @@ data Mask #### `Func` -``` purescript +```purescript data Func = NEVER | ALWAYS @@ -131,19 +124,19 @@ data Func #### `Float` -``` purescript +```purescript data Float ``` #### `ContextAttributes` -``` purescript +```purescript type ContextAttributes = { alpha :: Boolean, depth :: Boolean, stencil :: Boolean, antialias :: Boolean, premultipliedAlpha :: Boolean, preserveDrawingBuffer :: Boolean, preferLowPowerToHighPerformance :: Boolean, failIfMajorPerformanceCaveat :: Boolean } ``` #### `Capacity` -``` purescript +```purescript data Capacity = BLEND | DEPTH_TEST @@ -154,7 +147,7 @@ data Capacity #### `BufferTarget` -``` purescript +```purescript data BufferTarget = ARRAY_BUFFER | ELEMENT_ARRAY_BUFFER @@ -162,19 +155,19 @@ data BufferTarget #### `Buffer` -``` purescript +```purescript type Buffer a = { webGLBuffer :: WebGLBuffer, bufferType :: Int, bufferSize :: Int } ``` #### `Bool` -``` purescript +```purescript data Bool ``` #### `BlendingFactor` -``` purescript +```purescript data BlendingFactor = ZERO | ONE @@ -200,7 +193,7 @@ data BlendingFactor #### `BlendEquation` -``` purescript +```purescript data BlendEquation = FUNC_ADD | BLEND_EQUATION @@ -212,262 +205,262 @@ data BlendEquation #### `Attribute` -``` purescript +```purescript newtype Attribute typ = Attribute { aLocation :: GLint, aName :: String, aItemType :: Int, aItemSize :: Int } ``` #### `withShaders` -``` purescript -withShaders :: forall bindings eff a. Shaders ({ | bindings }) -> (String -> EffWebGL eff a) -> ({ webGLProgram :: WebGLProg | bindings } -> EffWebGL eff a) -> EffWebGL eff a +```purescript +withShaders :: forall bindings a. Shaders ({ | bindings }) -> (String -> Effect a) -> ({ webGLProgram :: WebGLProg | bindings } -> Effect a) -> Effect a ``` #### `viewport` -``` purescript -viewport :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGl | eff) Unit +```purescript +viewport :: GLint -> GLint -> GLsizei -> GLsizei -> Effect Unit ``` #### `vertexPointer` -``` purescript -vertexPointer :: forall eff typ. Attribute typ -> EffWebGL eff Unit +```purescript +vertexPointer :: forall typ. Attribute typ -> Effect Unit ``` #### `setUniformFloats` -``` purescript -setUniformFloats :: forall eff typ. Uniform typ -> Array Number -> EffWebGL eff Unit +```purescript +setUniformFloats :: forall typ. Uniform typ -> Array Number -> Effect Unit ``` #### `setUniformBoolean` -``` purescript -setUniformBoolean :: forall eff typ. Uniform typ -> Boolean -> EffWebGL eff Unit +```purescript +setUniformBoolean :: forall typ. Uniform typ -> Boolean -> Effect Unit ``` #### `runWebGLAttr` -``` purescript -runWebGLAttr :: forall a eff. String -> ContextAttributes -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +```purescript +runWebGLAttr :: forall a. String -> ContextAttributes -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a ``` pures either a continuation which takes a String in the error case, #### `runWebGL` -``` purescript -runWebGL :: forall a eff. String -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +```purescript +runWebGL :: forall a. String -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a ``` Same as runWebGLAttr but uses default attributes (defContextAttributes) #### `requestAnimationFrame` -``` purescript -requestAnimationFrame :: forall a eff. Eff (webgl :: WebGl | eff) a -> Eff (webgl :: WebGl | eff) Unit +```purescript +requestAnimationFrame :: forall a. Effect a -> Effect Unit ``` #### `makeBufferFloatDyn` -``` purescript -makeBufferFloatDyn :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32) +```purescript +makeBufferFloatDyn :: Array Number -> Effect (Buffer Float32) ``` #### `makeBufferFloat` -``` purescript -makeBufferFloat :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer Float32) +```purescript +makeBufferFloat :: Array Number -> Effect (Buffer Float32) ``` #### `makeBufferDyn` -``` purescript -makeBufferDyn :: forall a eff num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a) +```purescript +makeBufferDyn :: forall a num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Effect (Buffer a) ``` #### `makeBuffer` -``` purescript -makeBuffer :: forall a eff num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Eff (webgl :: WebGl | eff) (Buffer a) +```purescript +makeBuffer :: forall a num. EuclideanRing num => BufferTarget -> (Array num -> ArrayView a) -> Array num -> Effect (Buffer a) ``` #### `isEnabled` -``` purescript -isEnabled :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Boolean) +```purescript +isEnabled :: forall . Capacity -> (Effect Boolean) ``` #### `isContextLost` -``` purescript -isContextLost :: forall eff. Eff (webgl :: WebGl | eff) Boolean +```purescript +isContextLost :: Effect Boolean ``` #### `getCanvasWidth` -``` purescript -getCanvasWidth :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +```purescript +getCanvasWidth :: WebGLContext -> Effect Int ``` #### `getCanvasHeight` -``` purescript -getCanvasHeight :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +```purescript +getCanvasHeight :: WebGLContext -> Effect Int ``` #### `fillBuffer` -``` purescript -fillBuffer :: forall a eff. Buffer a -> Int -> Array Number -> Eff (webgl :: WebGl | eff) Unit +```purescript +fillBuffer :: forall a. Buffer a -> Int -> Array Number -> Effect Unit ``` #### `enableVertexAttribArray` -``` purescript -enableVertexAttribArray :: forall eff a. Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enableVertexAttribArray :: forall a. Attribute a -> (Effect Unit) ``` #### `enable` -``` purescript -enable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enable :: forall . Capacity -> (Effect Unit) ``` #### `drawElements` -``` purescript -drawElements :: forall eff. Mode -> Int -> EffWebGL eff Unit +```purescript +drawElements :: forall. Mode -> Int -> Effect Unit ``` #### `drawArr` -``` purescript -drawArr :: forall a eff typ. Mode -> Buffer a -> Attribute typ -> EffWebGL eff Unit +```purescript +drawArr :: forall a typ. Mode -> Buffer a -> Attribute typ -> Effect Unit ``` #### `disableVertexAttribArray` -``` purescript -disableVertexAttribArray :: forall eff a. Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disableVertexAttribArray :: forall a. Attribute a -> (Effect Unit) ``` #### `disable` -``` purescript -disable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disable :: Capacity -> (Effect Unit) ``` #### `depthFunc` -``` purescript -depthFunc :: forall eff. Func -> Eff (webgl :: WebGl | eff) Unit +```purescript +depthFunc :: Func -> Effect Unit ``` #### `defContextAttributes` -``` purescript +```purescript defContextAttributes :: ContextAttributes ``` #### `colorMask` -``` purescript -colorMask :: forall eff. GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGl | eff) Unit +```purescript +colorMask :: GLboolean -> GLboolean -> GLboolean -> GLboolean -> Effect Unit ``` #### `clearStencil` -``` purescript -clearStencil :: forall eff. GLint -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearStencil :: GLint -> Effect Unit ``` #### `clearDepth` -``` purescript -clearDepth :: forall eff. GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearDepth :: GLclampf -> Effect Unit ``` #### `clearColor` -``` purescript -clearColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +clearColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit ``` #### `clear` -``` purescript -clear :: forall eff. Array Mask -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clear :: Array Mask -> (Effect Unit) ``` #### `blendFuncSeparate` -``` purescript -blendFuncSeparate :: forall eff. BlendingFactor -> BlendingFactor -> BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFuncSeparate :: BlendingFactor -> BlendingFactor -> BlendingFactor -> BlendingFactor -> (Effect Unit) ``` #### `blendFunc` -``` purescript -blendFunc :: forall eff. BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFunc :: BlendingFactor -> BlendingFactor -> (Effect Unit) ``` #### `blendEquationSeparate` -``` purescript -blendEquationSeparate :: forall eff. BlendEquation -> BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquationSeparate :: BlendEquation -> BlendEquation -> (Effect Unit) ``` #### `blendEquation` -``` purescript -blendEquation :: forall eff. BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquation :: BlendEquation -> (Effect Unit) ``` #### `blendColor` -``` purescript -blendColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +```purescript +blendColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit ``` #### `bindBufAndSetVertexAttr` -``` purescript -bindBufAndSetVertexAttr :: forall a eff typ. Buffer a -> Attribute typ -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindBufAndSetVertexAttr :: forall a typ. Buffer a -> Attribute typ -> Effect Unit ``` #### `bindBuf` -``` purescript -bindBuf :: forall a eff. Buffer a -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindBuf :: forall a. Buffer a -> Effect Unit ``` #### `bindAttribLocation` -``` purescript -bindAttribLocation :: forall eff. WebGLProg -> Int -> String -> Eff (webgl :: WebGl | eff) Unit +```purescript +bindAttribLocation :: WebGLProg -> Int -> String -> Effect Unit ``` ### Re-exported from Graphics.WebGLFramebuffer: #### `WebGLRendBuf` -``` purescript +```purescript newtype WebGLRendBuf = WebGLRendBuf WebGLRenderbuffer ``` #### `WebGLBuf` -``` purescript +```purescript newtype WebGLBuf = WebGLBuf WebGLFramebuffer ``` #### `RenderbufferFormat` -``` purescript +```purescript data RenderbufferFormat = RGBA4 | RGB565 @@ -477,7 +470,7 @@ data RenderbufferFormat #### `FrameBufferCode` -``` purescript +```purescript data FrameBufferCode = FRAMEBUFFER_COMPLETE | FRAMEBUFFER_INCOMPLETE_ATTACHMENT @@ -488,7 +481,7 @@ data FrameBufferCode #### `AttachementPoint` -``` purescript +```purescript data AttachementPoint = COLOR_ATTACHMENT0 | DEPTH_ATTACHMENT @@ -498,88 +491,88 @@ data AttachementPoint #### `unbindRenderbuffer` -``` purescript -unbindRenderbuffer :: forall eff. EffWebGL eff Unit +```purescript +unbindRenderbuffer :: Effect Unit ``` #### `unbindFramebuffer` -``` purescript -unbindFramebuffer :: forall eff. EffWebGL eff Unit +```purescript +unbindFramebuffer :: Effect Unit ``` #### `renderbufferStorage` -``` purescript -renderbufferStorage :: forall eff. RenderbufferFormat -> Int -> Int -> EffWebGL eff Unit +```purescript +renderbufferStorage :: RenderbufferFormat -> Int -> Int -> Effect Unit ``` #### `readPixels` -``` purescript -readPixels :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Uint8Array -> Eff (webgl :: WebGl | eff) Uint8Array +```purescript +readPixels :: GLint -> GLint -> GLsizei -> GLsizei -> Uint8Array -> Effect Uint8Array ``` #### `framebufferTexture2D` -``` purescript -framebufferTexture2D :: forall eff. AttachementPoint -> TargetType -> WebGLTex -> EffWebGL eff Unit +```purescript +framebufferTexture2D :: AttachementPoint -> TargetType -> WebGLTex -> Effect Unit ``` #### `framebufferRenderbuffer` -``` purescript -framebufferRenderbuffer :: forall eff. AttachementPoint -> WebGLRendBuf -> EffWebGL eff Unit +```purescript +framebufferRenderbuffer :: AttachementPoint -> WebGLRendBuf -> Effect Unit ``` #### `frameBufferCodeToConst` -``` purescript +```purescript frameBufferCodeToConst :: FrameBufferCode -> GLenum ``` #### `createRenderbuffer` -``` purescript -createRenderbuffer :: forall eff. EffWebGL eff WebGLRendBuf +```purescript +createRenderbuffer :: Effect WebGLRendBuf ``` #### `createFramebuffer` -``` purescript -createFramebuffer :: forall eff. EffWebGL eff WebGLBuf +```purescript +createFramebuffer :: Effect WebGLBuf ``` #### `checkFramebufferStatus` -``` purescript -checkFramebufferStatus :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) GLenum +```purescript +checkFramebufferStatus :: GLenum -> Effect GLenum ``` #### `bindRenderbuffer` -``` purescript -bindRenderbuffer :: forall eff. WebGLRendBuf -> EffWebGL eff Unit +```purescript +bindRenderbuffer :: WebGLRendBuf -> Effect Unit ``` #### `bindFramebuffer` -``` purescript -bindFramebuffer :: forall eff. WebGLBuf -> EffWebGL eff Unit +```purescript +bindFramebuffer :: WebGLBuf -> Effect Unit ``` ### Re-exported from Graphics.WebGLTexture: #### `WebGLTex` -``` purescript +```purescript newtype WebGLTex = WebGLTex WebGLTexture ``` #### `TextureType` -``` purescript +```purescript data TextureType = UNSIGNED_BYTE | RGBA @@ -591,7 +584,7 @@ data TextureType #### `TexTarget` -``` purescript +```purescript data TexTarget = TTEXTURE_2D | TTEXTURE_CUBE_MAP @@ -599,7 +592,7 @@ data TexTarget #### `TexParName` -``` purescript +```purescript data TexParName = TEXTURE_MIN_FILTER | TEXTURE_MAG_FILTER @@ -609,7 +602,7 @@ data TexParName #### `TexFilterSpec` -``` purescript +```purescript data TexFilterSpec = NEAREST | LINEAR @@ -618,7 +611,7 @@ data TexFilterSpec #### `TargetType` -``` purescript +```purescript data TargetType = TEXTURE_2D | TEXTURE_CUBE_MAP_POSITIVE_X @@ -631,7 +624,7 @@ data TargetType #### `SymbolicParameter` -``` purescript +```purescript data SymbolicParameter = PACK_ALIGNMENT | UNPACK_ALIGNMENT @@ -642,7 +635,7 @@ data SymbolicParameter #### `InternalFormat` -``` purescript +```purescript data InternalFormat = IF_ALPHA | IF_LUMINANCE @@ -653,67 +646,66 @@ data InternalFormat #### `withTexture2D` -``` purescript -withTexture2D :: forall eff typ. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit -> EffWebGL eff Unit +```purescript +withTexture2D :: forall typ. WebGLTex -> Int -> Uniform typ -> Int -> Effect Unit -> Effect Unit ``` #### `unbindTexture` -``` purescript -unbindTexture :: forall eff. TargetType -> EffWebGL eff Unit +```purescript +unbindTexture :: TargetType -> Effect Unit ``` #### `texture2DFor` -``` purescript -texture2DFor :: forall a eff. String -> TexFilterSpec -> (WebGLTex -> EffWebGL eff a) -> EffWebGL eff Unit +```purescript +texture2DFor :: forall a. String -> TexFilterSpec -> (WebGLTex -> Effect a) -> Effect Unit ``` #### `targetTypeToConst` -``` purescript +```purescript targetTypeToConst :: TargetType -> GLenum ``` #### `newTextureInit` -``` purescript -newTextureInit :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +```purescript +newTextureInit :: Int -> Int -> TexFilterSpec -> Effect WebGLTex ``` #### `newTexture` -``` purescript -newTexture :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +```purescript +newTexture :: Int -> Int -> TexFilterSpec -> Effect WebGLTex ``` #### `handleSubLoad2D` -``` purescript -handleSubLoad2D :: forall eff a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> EffWebGL eff Unit +```purescript +handleSubLoad2D :: forall a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> Effect Unit ``` #### `handleLoad2D` -``` purescript -handleLoad2D :: forall eff a. WebGLTex -> TexFilterSpec -> a -> EffWebGL eff Unit +```purescript +handleLoad2D :: forall a. WebGLTex -> TexFilterSpec -> a -> Effect Unit ``` #### `createTexture` -``` purescript -createTexture :: forall eff. Eff (webgl :: WebGl | eff) WebGLTex +```purescript +createTexture :: Effect WebGLTex ``` #### `bindTexture` -``` purescript -bindTexture :: forall eff. TargetType -> WebGLTex -> EffWebGL eff Unit +```purescript +bindTexture :: TargetType -> WebGLTex -> Effect Unit ``` #### `activeTexture` -``` purescript -activeTexture :: forall eff. Int -> Eff (webgl :: WebGl | eff) Unit +```purescript +activeTexture :: Int -> Effect Unit ``` - diff --git a/docs/Graphics/WebGLFramebuffer.md b/docs/Graphics/WebGLFramebuffer.md index 281cb9d..e47044f 100644 --- a/docs/Graphics/WebGLFramebuffer.md +++ b/docs/Graphics/WebGLFramebuffer.md @@ -4,21 +4,21 @@ Framebuffers for the WebGL binding for purescript #### `WebGLBuf` -``` purescript +```purescript newtype WebGLBuf = WebGLBuf WebGLFramebuffer ``` #### `WebGLRendBuf` -``` purescript +```purescript newtype WebGLRendBuf = WebGLRendBuf WebGLRenderbuffer ``` #### `RenderbufferFormat` -``` purescript +```purescript data RenderbufferFormat = RGBA4 | RGB565 @@ -28,7 +28,7 @@ data RenderbufferFormat #### `AttachementPoint` -``` purescript +```purescript data AttachementPoint = COLOR_ATTACHMENT0 | DEPTH_ATTACHMENT @@ -38,7 +38,7 @@ data AttachementPoint #### `FrameBufferCode` -``` purescript +```purescript data FrameBufferCode = FRAMEBUFFER_COMPLETE | FRAMEBUFFER_INCOMPLETE_ATTACHMENT @@ -49,74 +49,72 @@ data FrameBufferCode #### `frameBufferCodeToConst` -``` purescript +```purescript frameBufferCodeToConst :: FrameBufferCode -> GLenum ``` #### `checkFramebufferStatus` -``` purescript -checkFramebufferStatus :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) GLenum +```purescript +checkFramebufferStatus :: GLenum -> Effect GLenum ``` #### `createFramebuffer` -``` purescript -createFramebuffer :: forall eff. EffWebGL eff WebGLBuf +```purescript +createFramebuffer :: Effect WebGLBuf ``` #### `bindFramebuffer` -``` purescript -bindFramebuffer :: forall eff. WebGLBuf -> EffWebGL eff Unit +```purescript +bindFramebuffer :: WebGLBuf -> Effect Unit ``` #### `unbindFramebuffer` -``` purescript -unbindFramebuffer :: forall eff. EffWebGL eff Unit +```purescript +unbindFramebuffer :: Effect Unit ``` #### `createRenderbuffer` -``` purescript -createRenderbuffer :: forall eff. EffWebGL eff WebGLRendBuf +```purescript +createRenderbuffer :: Effect WebGLRendBuf ``` #### `bindRenderbuffer` -``` purescript -bindRenderbuffer :: forall eff. WebGLRendBuf -> EffWebGL eff Unit +```purescript +bindRenderbuffer :: WebGLRendBuf -> Effect Unit ``` #### `unbindRenderbuffer` -``` purescript -unbindRenderbuffer :: forall eff. EffWebGL eff Unit +```purescript +unbindRenderbuffer :: Effect Unit ``` #### `renderbufferStorage` -``` purescript -renderbufferStorage :: forall eff. RenderbufferFormat -> Int -> Int -> EffWebGL eff Unit +```purescript +renderbufferStorage :: RenderbufferFormat -> Int -> Int -> Effect Unit ``` #### `framebufferRenderbuffer` -``` purescript -framebufferRenderbuffer :: forall eff. AttachementPoint -> WebGLRendBuf -> EffWebGL eff Unit +```purescript +framebufferRenderbuffer :: AttachementPoint -> WebGLRendBuf -> Effect Unit ``` #### `framebufferTexture2D` -``` purescript -framebufferTexture2D :: forall eff. AttachementPoint -> TargetType -> WebGLTex -> EffWebGL eff Unit +```purescript +framebufferTexture2D :: AttachementPoint -> TargetType -> WebGLTex -> Effect Unit ``` #### `readPixels` -``` purescript -readPixels :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Uint8Array -> Eff (webgl :: WebGl | eff) Uint8Array +```purescript +readPixels :: GLint -> GLint -> GLsizei -> GLsizei -> Uint8Array -> Effect Uint8Array ``` - - diff --git a/docs/Graphics/WebGLRaw.md b/docs/Graphics/WebGLRaw.md index afaea2c..e77b22f 100644 --- a/docs/Graphics/WebGLRaw.md +++ b/docs/Graphics/WebGLRaw.md @@ -2,2768 +2,2766 @@ #### `GLenum` -``` purescript +```purescript type GLenum = Int ``` #### `GLboolean` -``` purescript +```purescript type GLboolean = Boolean ``` #### `GLbitfield` -``` purescript +```purescript type GLbitfield = Int ``` #### `GLbyte` -``` purescript +```purescript type GLbyte = Int ``` #### `GLshort` -``` purescript +```purescript type GLshort = Int ``` #### `GLint` -``` purescript +```purescript type GLint = Int ``` #### `GLsizei` -``` purescript +```purescript type GLsizei = Int ``` #### `GLintptr` -``` purescript +```purescript type GLintptr = Int ``` #### `GLsizeiptr` -``` purescript +```purescript type GLsizeiptr = Int ``` #### `GLubyte` -``` purescript +```purescript type GLubyte = Int ``` #### `GLushort` -``` purescript +```purescript type GLushort = Int ``` #### `GLuint` -``` purescript +```purescript type GLuint = Int ``` #### `GLfloat` -``` purescript +```purescript type GLfloat = Number ``` #### `GLclampf` -``` purescript +```purescript type GLclampf = Number ``` #### `FloatArray` -``` purescript +```purescript type FloatArray = Float32Array ``` #### `WebGLContextAttributes` -``` purescript +```purescript data WebGLContextAttributes :: * ``` #### `WebGLProgram` -``` purescript +```purescript data WebGLProgram :: * ``` #### `WebGLShader` -``` purescript +```purescript data WebGLShader :: * ``` #### `WebGLBuffer` -``` purescript +```purescript data WebGLBuffer :: * ``` #### `WebGLFramebuffer` -``` purescript +```purescript data WebGLFramebuffer :: * ``` #### `WebGLRenderbuffer` -``` purescript +```purescript data WebGLRenderbuffer :: * ``` #### `WebGLTexture` -``` purescript +```purescript data WebGLTexture :: * ``` #### `WebGLActiveInfo` -``` purescript +```purescript data WebGLActiveInfo :: * ``` #### `WebGLUniformLocation` -``` purescript +```purescript data WebGLUniformLocation :: * ``` #### `ArrayBufferView` -``` purescript +```purescript data ArrayBufferView :: * ``` #### `ImageData` -``` purescript +```purescript data ImageData :: * ``` #### `HTMLImageElement` -``` purescript +```purescript data HTMLImageElement :: * ``` #### `HTMLVideoElement` -``` purescript +```purescript data HTMLVideoElement :: * ``` #### `_DEPTH_BUFFER_BIT` -``` purescript +```purescript _DEPTH_BUFFER_BIT :: Int ``` #### `_STENCIL_BUFFER_BIT` -``` purescript +```purescript _STENCIL_BUFFER_BIT :: Int ``` #### `_COLOR_BUFFER_BIT` -``` purescript +```purescript _COLOR_BUFFER_BIT :: Int ``` #### `_POINTS` -``` purescript +```purescript _POINTS :: Int ``` #### `_LINES` -``` purescript +```purescript _LINES :: Int ``` #### `_LINE_LOOP` -``` purescript +```purescript _LINE_LOOP :: Int ``` #### `_LINE_STRIP` -``` purescript +```purescript _LINE_STRIP :: Int ``` #### `_TRIANGLES` -``` purescript +```purescript _TRIANGLES :: Int ``` #### `_TRIANGLE_STRIP` -``` purescript +```purescript _TRIANGLE_STRIP :: Int ``` #### `_TRIANGLE_FAN` -``` purescript +```purescript _TRIANGLE_FAN :: Int ``` #### `_ZERO` -``` purescript +```purescript _ZERO :: Int ``` #### `_ONE` -``` purescript +```purescript _ONE :: Int ``` #### `_SRC_COLOR` -``` purescript +```purescript _SRC_COLOR :: Int ``` #### `_ONE_MINUS_SRC_COLOR` -``` purescript +```purescript _ONE_MINUS_SRC_COLOR :: Int ``` #### `_SRC_ALPHA` -``` purescript +```purescript _SRC_ALPHA :: Int ``` #### `_ONE_MINUS_SRC_ALPHA` -``` purescript +```purescript _ONE_MINUS_SRC_ALPHA :: Int ``` #### `_DST_ALPHA` -``` purescript +```purescript _DST_ALPHA :: Int ``` #### `_ONE_MINUS_DST_ALPHA` -``` purescript +```purescript _ONE_MINUS_DST_ALPHA :: Int ``` #### `_DST_COLOR` -``` purescript +```purescript _DST_COLOR :: Int ``` #### `_ONE_MINUS_DST_COLOR` -``` purescript +```purescript _ONE_MINUS_DST_COLOR :: Int ``` #### `_SRC_ALPHA_SATURATE` -``` purescript +```purescript _SRC_ALPHA_SATURATE :: Int ``` #### `_FUNC_ADD` -``` purescript +```purescript _FUNC_ADD :: Int ``` #### `_BLEND_EQUATION` -``` purescript +```purescript _BLEND_EQUATION :: Int ``` #### `_BLEND_EQUATION_RGB` -``` purescript +```purescript _BLEND_EQUATION_RGB :: Int ``` #### `_BLEND_EQUATION_ALPHA` -``` purescript +```purescript _BLEND_EQUATION_ALPHA :: Int ``` #### `_FUNC_SUBTRACT` -``` purescript +```purescript _FUNC_SUBTRACT :: Int ``` #### `_FUNC_REVERSE_SUBTRACT` -``` purescript +```purescript _FUNC_REVERSE_SUBTRACT :: Int ``` #### `_BLEND_DST_RGB` -``` purescript +```purescript _BLEND_DST_RGB :: Int ``` #### `_BLEND_SRC_RGB` -``` purescript +```purescript _BLEND_SRC_RGB :: Int ``` #### `_BLEND_DST_ALPHA` -``` purescript +```purescript _BLEND_DST_ALPHA :: Int ``` #### `_BLEND_SRC_ALPHA` -``` purescript +```purescript _BLEND_SRC_ALPHA :: Int ``` #### `_CONSTANT_COLOR` -``` purescript +```purescript _CONSTANT_COLOR :: Int ``` #### `_ONE_MINUS_CONSTANT_COLOR` -``` purescript +```purescript _ONE_MINUS_CONSTANT_COLOR :: Int ``` #### `_CONSTANT_ALPHA` -``` purescript +```purescript _CONSTANT_ALPHA :: Int ``` #### `_ONE_MINUS_CONSTANT_ALPHA` -``` purescript +```purescript _ONE_MINUS_CONSTANT_ALPHA :: Int ``` #### `_BLEND_COLOR` -``` purescript +```purescript _BLEND_COLOR :: Int ``` #### `_ARRAY_BUFFER` -``` purescript +```purescript _ARRAY_BUFFER :: Int ``` #### `_ELEMENT_ARRAY_BUFFER` -``` purescript +```purescript _ELEMENT_ARRAY_BUFFER :: Int ``` #### `_ARRAY_BUFFER_BINDING` -``` purescript +```purescript _ARRAY_BUFFER_BINDING :: Int ``` #### `_ELEMENT_ARRAY_BUFFER_BINDING` -``` purescript +```purescript _ELEMENT_ARRAY_BUFFER_BINDING :: Int ``` #### `_STREAM_DRAW` -``` purescript +```purescript _STREAM_DRAW :: Int ``` #### `_STATIC_DRAW` -``` purescript +```purescript _STATIC_DRAW :: Int ``` #### `_DYNAMIC_DRAW` -``` purescript +```purescript _DYNAMIC_DRAW :: Int ``` #### `_BUFFER_SIZE` -``` purescript +```purescript _BUFFER_SIZE :: Int ``` #### `_BUFFER_USAGE` -``` purescript +```purescript _BUFFER_USAGE :: Int ``` #### `_CURRENT_VERTEX_ATTRIB` -``` purescript +```purescript _CURRENT_VERTEX_ATTRIB :: Int ``` #### `_FRONT` -``` purescript +```purescript _FRONT :: Int ``` #### `_BACK` -``` purescript +```purescript _BACK :: Int ``` #### `_FRONT_AND_BACK` -``` purescript +```purescript _FRONT_AND_BACK :: Int ``` #### `_TEXTURE_2D` -``` purescript +```purescript _TEXTURE_2D :: Int ``` #### `_CULL_FACE` -``` purescript +```purescript _CULL_FACE :: Int ``` #### `_BLEND` -``` purescript +```purescript _BLEND :: Int ``` #### `_DITHER` -``` purescript +```purescript _DITHER :: Int ``` #### `_STENCIL_TEST` -``` purescript +```purescript _STENCIL_TEST :: Int ``` #### `_DEPTH_TEST` -``` purescript +```purescript _DEPTH_TEST :: Int ``` #### `_SCISSOR_TEST` -``` purescript +```purescript _SCISSOR_TEST :: Int ``` #### `_POLYGON_OFFSET_FILL` -``` purescript +```purescript _POLYGON_OFFSET_FILL :: Int ``` #### `_SAMPLE_ALPHA_TO_COVERAGE` -``` purescript +```purescript _SAMPLE_ALPHA_TO_COVERAGE :: Int ``` #### `_SAMPLE_COVERAGE` -``` purescript +```purescript _SAMPLE_COVERAGE :: Int ``` #### `_NO_ERROR` -``` purescript +```purescript _NO_ERROR :: Int ``` #### `_INVALID_ENUM` -``` purescript +```purescript _INVALID_ENUM :: Int ``` #### `_INVALID_VALUE` -``` purescript +```purescript _INVALID_VALUE :: Int ``` #### `_INVALID_OPERATION` -``` purescript +```purescript _INVALID_OPERATION :: Int ``` #### `_OUT_OF_MEMORY` -``` purescript +```purescript _OUT_OF_MEMORY :: Int ``` #### `_CW` -``` purescript +```purescript _CW :: Int ``` #### `_CCW` -``` purescript +```purescript _CCW :: Int ``` #### `_LINE_WIDTH` -``` purescript +```purescript _LINE_WIDTH :: Int ``` #### `_ALIASED_POINT_SIZE_RANGE` -``` purescript +```purescript _ALIASED_POINT_SIZE_RANGE :: Int ``` #### `_ALIASED_LINE_WIDTH_RANGE` -``` purescript +```purescript _ALIASED_LINE_WIDTH_RANGE :: Int ``` #### `_CULL_FACE_MODE` -``` purescript +```purescript _CULL_FACE_MODE :: Int ``` #### `_FRONT_FACE` -``` purescript +```purescript _FRONT_FACE :: Int ``` #### `_DEPTH_RANGE` -``` purescript +```purescript _DEPTH_RANGE :: Int ``` #### `_DEPTH_WRITEMASK` -``` purescript +```purescript _DEPTH_WRITEMASK :: Int ``` #### `_DEPTH_CLEAR_VALUE` -``` purescript +```purescript _DEPTH_CLEAR_VALUE :: Int ``` #### `_DEPTH_FUNC` -``` purescript +```purescript _DEPTH_FUNC :: Int ``` #### `_STENCIL_CLEAR_VALUE` -``` purescript +```purescript _STENCIL_CLEAR_VALUE :: Int ``` #### `_STENCIL_FUNC` -``` purescript +```purescript _STENCIL_FUNC :: Int ``` #### `_STENCIL_FAIL` -``` purescript +```purescript _STENCIL_FAIL :: Int ``` #### `_STENCIL_PASS_DEPTH_FAIL` -``` purescript +```purescript _STENCIL_PASS_DEPTH_FAIL :: Int ``` #### `_STENCIL_PASS_DEPTH_PASS` -``` purescript +```purescript _STENCIL_PASS_DEPTH_PASS :: Int ``` #### `_STENCIL_REF` -``` purescript +```purescript _STENCIL_REF :: Int ``` #### `_STENCIL_VALUE_MASK` -``` purescript +```purescript _STENCIL_VALUE_MASK :: Int ``` #### `_STENCIL_WRITEMASK` -``` purescript +```purescript _STENCIL_WRITEMASK :: Int ``` #### `_STENCIL_BACK_FUNC` -``` purescript +```purescript _STENCIL_BACK_FUNC :: Int ``` #### `_STENCIL_BACK_FAIL` -``` purescript +```purescript _STENCIL_BACK_FAIL :: Int ``` #### `_STENCIL_BACK_PASS_DEPTH_FAIL` -``` purescript +```purescript _STENCIL_BACK_PASS_DEPTH_FAIL :: Int ``` #### `_STENCIL_BACK_PASS_DEPTH_PASS` -``` purescript +```purescript _STENCIL_BACK_PASS_DEPTH_PASS :: Int ``` #### `_STENCIL_BACK_REF` -``` purescript +```purescript _STENCIL_BACK_REF :: Int ``` #### `_STENCIL_BACK_VALUE_MASK` -``` purescript +```purescript _STENCIL_BACK_VALUE_MASK :: Int ``` #### `_STENCIL_BACK_WRITEMASK` -``` purescript +```purescript _STENCIL_BACK_WRITEMASK :: Int ``` #### `_VIEWPORT` -``` purescript +```purescript _VIEWPORT :: Int ``` #### `_SCISSOR_BOX` -``` purescript +```purescript _SCISSOR_BOX :: Int ``` #### `_COLOR_CLEAR_VALUE` -``` purescript +```purescript _COLOR_CLEAR_VALUE :: Int ``` #### `_COLOR_WRITEMASK` -``` purescript +```purescript _COLOR_WRITEMASK :: Int ``` #### `_UNPACK_ALIGNMENT` -``` purescript +```purescript _UNPACK_ALIGNMENT :: Int ``` #### `_PACK_ALIGNMENT` -``` purescript +```purescript _PACK_ALIGNMENT :: Int ``` #### `_MAX_TEXTURE_SIZE` -``` purescript +```purescript _MAX_TEXTURE_SIZE :: Int ``` #### `_MAX_VIEWPORT_DIMS` -``` purescript +```purescript _MAX_VIEWPORT_DIMS :: Int ``` #### `_SUBPIXEL_BITS` -``` purescript +```purescript _SUBPIXEL_BITS :: Int ``` #### `_RED_BITS` -``` purescript +```purescript _RED_BITS :: Int ``` #### `_GREEN_BITS` -``` purescript +```purescript _GREEN_BITS :: Int ``` #### `_BLUE_BITS` -``` purescript +```purescript _BLUE_BITS :: Int ``` #### `_ALPHA_BITS` -``` purescript +```purescript _ALPHA_BITS :: Int ``` #### `_DEPTH_BITS` -``` purescript +```purescript _DEPTH_BITS :: Int ``` #### `_STENCIL_BITS` -``` purescript +```purescript _STENCIL_BITS :: Int ``` #### `_POLYGON_OFFSET_UNITS` -``` purescript +```purescript _POLYGON_OFFSET_UNITS :: Int ``` #### `_POLYGON_OFFSET_FACTOR` -``` purescript +```purescript _POLYGON_OFFSET_FACTOR :: Int ``` #### `_TEXTURE_BINDING_2D` -``` purescript +```purescript _TEXTURE_BINDING_2D :: Int ``` #### `_SAMPLE_BUFFERS` -``` purescript +```purescript _SAMPLE_BUFFERS :: Int ``` #### `_SAMPLES` -``` purescript +```purescript _SAMPLES :: Int ``` #### `_SAMPLE_COVERAGE_VALUE` -``` purescript +```purescript _SAMPLE_COVERAGE_VALUE :: Int ``` #### `_SAMPLE_COVERAGE_INVERT` -``` purescript +```purescript _SAMPLE_COVERAGE_INVERT :: Int ``` #### `_NUM_COMPRESSED_TEXTURE_FORMATS` -``` purescript +```purescript _NUM_COMPRESSED_TEXTURE_FORMATS :: Int ``` #### `_COMPRESSED_TEXTURE_FORMATS` -``` purescript +```purescript _COMPRESSED_TEXTURE_FORMATS :: Int ``` #### `_DONT_CARE` -``` purescript +```purescript _DONT_CARE :: Int ``` #### `_FASTEST` -``` purescript +```purescript _FASTEST :: Int ``` #### `_NICEST` -``` purescript +```purescript _NICEST :: Int ``` #### `_GENERATE_MIPMAP_HINT` -``` purescript +```purescript _GENERATE_MIPMAP_HINT :: Int ``` #### `_BYTE` -``` purescript +```purescript _BYTE :: Int ``` #### `_UNSIGNED_BYTE` -``` purescript +```purescript _UNSIGNED_BYTE :: Int ``` #### `_SHORT` -``` purescript +```purescript _SHORT :: Int ``` #### `_UNSIGNED_SHORT` -``` purescript +```purescript _UNSIGNED_SHORT :: Int ``` #### `_INT` -``` purescript +```purescript _INT :: Int ``` #### `_UNSIGNED_INT` -``` purescript +```purescript _UNSIGNED_INT :: Int ``` #### `_FLOAT` -``` purescript +```purescript _FLOAT :: Int ``` #### `_DEPTH_COMPONENT` -``` purescript +```purescript _DEPTH_COMPONENT :: Int ``` #### `_ALPHA` -``` purescript +```purescript _ALPHA :: Int ``` #### `_RGB` -``` purescript +```purescript _RGB :: Int ``` #### `_RGBA` -``` purescript +```purescript _RGBA :: Int ``` #### `_LUMINANCE` -``` purescript +```purescript _LUMINANCE :: Int ``` #### `_LUMINANCE_ALPHA` -``` purescript +```purescript _LUMINANCE_ALPHA :: Int ``` #### `_UNSIGNED_SHORT_4_4_4_4` -``` purescript +```purescript _UNSIGNED_SHORT_4_4_4_4 :: Int ``` #### `_UNSIGNED_SHORT_5_5_5_1` -``` purescript +```purescript _UNSIGNED_SHORT_5_5_5_1 :: Int ``` #### `_UNSIGNED_SHORT_5_6_5` -``` purescript +```purescript _UNSIGNED_SHORT_5_6_5 :: Int ``` #### `_FRAGMENT_SHADER` -``` purescript +```purescript _FRAGMENT_SHADER :: Int ``` #### `_VERTEX_SHADER` -``` purescript +```purescript _VERTEX_SHADER :: Int ``` #### `_MAX_VERTEX_ATTRIBS` -``` purescript +```purescript _MAX_VERTEX_ATTRIBS :: Int ``` #### `_MAX_VERTEX_UNIFORM_VECTORS` -``` purescript +```purescript _MAX_VERTEX_UNIFORM_VECTORS :: Int ``` #### `_MAX_VARYING_VECTORS` -``` purescript +```purescript _MAX_VARYING_VECTORS :: Int ``` #### `_MAX_COMBINED_TEXTURE_IMAGE_UNITS` -``` purescript +```purescript _MAX_COMBINED_TEXTURE_IMAGE_UNITS :: Int ``` #### `_MAX_VERTEX_TEXTURE_IMAGE_UNITS` -``` purescript +```purescript _MAX_VERTEX_TEXTURE_IMAGE_UNITS :: Int ``` #### `_MAX_TEXTURE_IMAGE_UNITS` -``` purescript +```purescript _MAX_TEXTURE_IMAGE_UNITS :: Int ``` #### `_MAX_FRAGMENT_UNIFORM_VECTORS` -``` purescript +```purescript _MAX_FRAGMENT_UNIFORM_VECTORS :: Int ``` #### `_SHADER_TYPE` -``` purescript +```purescript _SHADER_TYPE :: Int ``` #### `_DELETE_STATUS` -``` purescript +```purescript _DELETE_STATUS :: Int ``` #### `_LINK_STATUS` -``` purescript +```purescript _LINK_STATUS :: Int ``` #### `_VALIDATE_STATUS` -``` purescript +```purescript _VALIDATE_STATUS :: Int ``` #### `_ATTACHED_SHADERS` -``` purescript +```purescript _ATTACHED_SHADERS :: Int ``` #### `_ACTIVE_UNIFORMS` -``` purescript +```purescript _ACTIVE_UNIFORMS :: Int ``` #### `_ACTIVE_UNIFORM_MAX_LENGTH` -``` purescript +```purescript _ACTIVE_UNIFORM_MAX_LENGTH :: Int ``` #### `_ACTIVE_ATTRIBUTES` -``` purescript +```purescript _ACTIVE_ATTRIBUTES :: Int ``` #### `_ACTIVE_ATTRIBUTE_MAX_LENGTH` -``` purescript +```purescript _ACTIVE_ATTRIBUTE_MAX_LENGTH :: Int ``` #### `_SHADING_LANGUAGE_VERSION` -``` purescript +```purescript _SHADING_LANGUAGE_VERSION :: Int ``` #### `_CURRENT_PROGRAM` -``` purescript +```purescript _CURRENT_PROGRAM :: Int ``` #### `_NEVER` -``` purescript +```purescript _NEVER :: Int ``` #### `_LESS` -``` purescript +```purescript _LESS :: Int ``` #### `_EQUAL` -``` purescript +```purescript _EQUAL :: Int ``` #### `_LEQUAL` -``` purescript +```purescript _LEQUAL :: Int ``` #### `_GREATER` -``` purescript +```purescript _GREATER :: Int ``` #### `_NOTEQUAL` -``` purescript +```purescript _NOTEQUAL :: Int ``` #### `_GEQUAL` -``` purescript +```purescript _GEQUAL :: Int ``` #### `_ALWAYS` -``` purescript +```purescript _ALWAYS :: Int ``` #### `_KEEP` -``` purescript +```purescript _KEEP :: Int ``` #### `_REPLACE` -``` purescript +```purescript _REPLACE :: Int ``` #### `_INCR` -``` purescript +```purescript _INCR :: Int ``` #### `_DECR` -``` purescript +```purescript _DECR :: Int ``` #### `_INVERT` -``` purescript +```purescript _INVERT :: Int ``` #### `_INCR_WRAP` -``` purescript +```purescript _INCR_WRAP :: Int ``` #### `_DECR_WRAP` -``` purescript +```purescript _DECR_WRAP :: Int ``` #### `_VENDOR` -``` purescript +```purescript _VENDOR :: Int ``` #### `_RENDERER` -``` purescript +```purescript _RENDERER :: Int ``` #### `_VERSION` -``` purescript +```purescript _VERSION :: Int ``` #### `_NEAREST` -``` purescript +```purescript _NEAREST :: Int ``` #### `_LINEAR` -``` purescript +```purescript _LINEAR :: Int ``` #### `_NEAREST_MIPMAP_NEAREST` -``` purescript +```purescript _NEAREST_MIPMAP_NEAREST :: Int ``` #### `_LINEAR_MIPMAP_NEAREST` -``` purescript +```purescript _LINEAR_MIPMAP_NEAREST :: Int ``` #### `_NEAREST_MIPMAP_LINEAR` -``` purescript +```purescript _NEAREST_MIPMAP_LINEAR :: Int ``` #### `_LINEAR_MIPMAP_LINEAR` -``` purescript +```purescript _LINEAR_MIPMAP_LINEAR :: Int ``` #### `_TEXTURE_MAG_FILTER` -``` purescript +```purescript _TEXTURE_MAG_FILTER :: Int ``` #### `_TEXTURE_MIN_FILTER` -``` purescript +```purescript _TEXTURE_MIN_FILTER :: Int ``` #### `_TEXTURE_WRAP_S` -``` purescript +```purescript _TEXTURE_WRAP_S :: Int ``` #### `_TEXTURE_WRAP_T` -``` purescript +```purescript _TEXTURE_WRAP_T :: Int ``` #### `_TEXTURE` -``` purescript +```purescript _TEXTURE :: Int ``` #### `_TEXTURE_CUBE_MAP` -``` purescript +```purescript _TEXTURE_CUBE_MAP :: Int ``` #### `_TEXTURE_BINDING_CUBE_MAP` -``` purescript +```purescript _TEXTURE_BINDING_CUBE_MAP :: Int ``` #### `_TEXTURE_CUBE_MAP_POSITIVE_X` -``` purescript +```purescript _TEXTURE_CUBE_MAP_POSITIVE_X :: Int ``` #### `_TEXTURE_CUBE_MAP_NEGATIVE_X` -``` purescript +```purescript _TEXTURE_CUBE_MAP_NEGATIVE_X :: Int ``` #### `_TEXTURE_CUBE_MAP_POSITIVE_Y` -``` purescript +```purescript _TEXTURE_CUBE_MAP_POSITIVE_Y :: Int ``` #### `_TEXTURE_CUBE_MAP_NEGATIVE_Y` -``` purescript +```purescript _TEXTURE_CUBE_MAP_NEGATIVE_Y :: Int ``` #### `_TEXTURE_CUBE_MAP_POSITIVE_Z` -``` purescript +```purescript _TEXTURE_CUBE_MAP_POSITIVE_Z :: Int ``` #### `_TEXTURE_CUBE_MAP_NEGATIVE_Z` -``` purescript +```purescript _TEXTURE_CUBE_MAP_NEGATIVE_Z :: Int ``` #### `_MAX_CUBE_MAP_TEXTURE_SIZE` -``` purescript +```purescript _MAX_CUBE_MAP_TEXTURE_SIZE :: Int ``` #### `_TEXTURE0` -``` purescript +```purescript _TEXTURE0 :: Int ``` #### `_TEXTURE1` -``` purescript +```purescript _TEXTURE1 :: Int ``` #### `_TEXTURE2` -``` purescript +```purescript _TEXTURE2 :: Int ``` #### `_TEXTURE3` -``` purescript +```purescript _TEXTURE3 :: Int ``` #### `_TEXTURE4` -``` purescript +```purescript _TEXTURE4 :: Int ``` #### `_TEXTURE5` -``` purescript +```purescript _TEXTURE5 :: Int ``` #### `_TEXTURE6` -``` purescript +```purescript _TEXTURE6 :: Int ``` #### `_TEXTURE7` -``` purescript +```purescript _TEXTURE7 :: Int ``` #### `_TEXTURE8` -``` purescript +```purescript _TEXTURE8 :: Int ``` #### `_TEXTURE9` -``` purescript +```purescript _TEXTURE9 :: Int ``` #### `_TEXTURE10` -``` purescript +```purescript _TEXTURE10 :: Int ``` #### `_TEXTURE11` -``` purescript +```purescript _TEXTURE11 :: Int ``` #### `_TEXTURE12` -``` purescript +```purescript _TEXTURE12 :: Int ``` #### `_TEXTURE13` -``` purescript +```purescript _TEXTURE13 :: Int ``` #### `_TEXTURE14` -``` purescript +```purescript _TEXTURE14 :: Int ``` #### `_TEXTURE15` -``` purescript +```purescript _TEXTURE15 :: Int ``` #### `_TEXTURE16` -``` purescript +```purescript _TEXTURE16 :: Int ``` #### `_TEXTURE17` -``` purescript +```purescript _TEXTURE17 :: Int ``` #### `_TEXTURE18` -``` purescript +```purescript _TEXTURE18 :: Int ``` #### `_TEXTURE19` -``` purescript +```purescript _TEXTURE19 :: Int ``` #### `_TEXTURE20` -``` purescript +```purescript _TEXTURE20 :: Int ``` #### `_TEXTURE21` -``` purescript +```purescript _TEXTURE21 :: Int ``` #### `_TEXTURE22` -``` purescript +```purescript _TEXTURE22 :: Int ``` #### `_TEXTURE23` -``` purescript +```purescript _TEXTURE23 :: Int ``` #### `_TEXTURE24` -``` purescript +```purescript _TEXTURE24 :: Int ``` #### `_TEXTURE25` -``` purescript +```purescript _TEXTURE25 :: Int ``` #### `_TEXTURE26` -``` purescript +```purescript _TEXTURE26 :: Int ``` #### `_TEXTURE27` -``` purescript +```purescript _TEXTURE27 :: Int ``` #### `_TEXTURE28` -``` purescript +```purescript _TEXTURE28 :: Int ``` #### `_TEXTURE29` -``` purescript +```purescript _TEXTURE29 :: Int ``` #### `_TEXTURE30` -``` purescript +```purescript _TEXTURE30 :: Int ``` #### `_TEXTURE31` -``` purescript +```purescript _TEXTURE31 :: Int ``` #### `_ACTIVE_TEXTURE` -``` purescript +```purescript _ACTIVE_TEXTURE :: Int ``` #### `_REPEAT` -``` purescript +```purescript _REPEAT :: Int ``` #### `_CLAMP_TO_EDGE` -``` purescript +```purescript _CLAMP_TO_EDGE :: Int ``` #### `_MIRRORED_REPEAT` -``` purescript +```purescript _MIRRORED_REPEAT :: Int ``` #### `_FLOAT_VEC2` -``` purescript +```purescript _FLOAT_VEC2 :: Int ``` #### `_FLOAT_VEC3` -``` purescript +```purescript _FLOAT_VEC3 :: Int ``` #### `_FLOAT_VEC4` -``` purescript +```purescript _FLOAT_VEC4 :: Int ``` #### `_INT_VEC2` -``` purescript +```purescript _INT_VEC2 :: Int ``` #### `_INT_VEC3` -``` purescript +```purescript _INT_VEC3 :: Int ``` #### `_INT_VEC4` -``` purescript +```purescript _INT_VEC4 :: Int ``` #### `_BOOL` -``` purescript +```purescript _BOOL :: Int ``` #### `_BOOL_VEC2` -``` purescript +```purescript _BOOL_VEC2 :: Int ``` #### `_BOOL_VEC3` -``` purescript +```purescript _BOOL_VEC3 :: Int ``` #### `_BOOL_VEC4` -``` purescript +```purescript _BOOL_VEC4 :: Int ``` #### `_FLOAT_MAT2` -``` purescript +```purescript _FLOAT_MAT2 :: Int ``` #### `_FLOAT_MAT3` -``` purescript +```purescript _FLOAT_MAT3 :: Int ``` #### `_FLOAT_MAT4` -``` purescript +```purescript _FLOAT_MAT4 :: Int ``` #### `_SAMPLER_2D` -``` purescript +```purescript _SAMPLER_2D :: Int ``` #### `_SAMPLER_CUBE` -``` purescript +```purescript _SAMPLER_CUBE :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_ENABLED` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_ENABLED :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_SIZE` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_SIZE :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_STRIDE` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_STRIDE :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_TYPE` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_TYPE :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_NORMALIZED` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_NORMALIZED :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_POINTER` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_POINTER :: Int ``` #### `_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING` -``` purescript +```purescript _VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: Int ``` #### `_COMPILE_STATUS` -``` purescript +```purescript _COMPILE_STATUS :: Int ``` #### `_INFO_LOG_LENGTH` -``` purescript +```purescript _INFO_LOG_LENGTH :: Int ``` #### `_SHADER_SOURCE_LENGTH` -``` purescript +```purescript _SHADER_SOURCE_LENGTH :: Int ``` #### `_LOW_FLOAT` -``` purescript +```purescript _LOW_FLOAT :: Int ``` #### `_MEDIUM_FLOAT` -``` purescript +```purescript _MEDIUM_FLOAT :: Int ``` #### `_HIGH_FLOAT` -``` purescript +```purescript _HIGH_FLOAT :: Int ``` #### `_LOW_INT` -``` purescript +```purescript _LOW_INT :: Int ``` #### `_MEDIUM_INT` -``` purescript +```purescript _MEDIUM_INT :: Int ``` #### `_HIGH_INT` -``` purescript +```purescript _HIGH_INT :: Int ``` #### `_FRAMEBUFFER` -``` purescript +```purescript _FRAMEBUFFER :: Int ``` #### `_RENDERBUFFER` -``` purescript +```purescript _RENDERBUFFER :: Int ``` #### `_RGBA4` -``` purescript +```purescript _RGBA4 :: Int ``` #### `_RGB5_A1` -``` purescript +```purescript _RGB5_A1 :: Int ``` #### `_RGB565` -``` purescript +```purescript _RGB565 :: Int ``` #### `_DEPTH_COMPONENT16` -``` purescript +```purescript _DEPTH_COMPONENT16 :: Int ``` #### `_STENCIL_INDEX` -``` purescript +```purescript _STENCIL_INDEX :: Int ``` #### `_STENCIL_INDEX8` -``` purescript +```purescript _STENCIL_INDEX8 :: Int ``` #### `_DEPTH_STENCIL` -``` purescript +```purescript _DEPTH_STENCIL :: Int ``` #### `_RENDERBUFFER_WIDTH` -``` purescript +```purescript _RENDERBUFFER_WIDTH :: Int ``` #### `_RENDERBUFFER_HEIGHT` -``` purescript +```purescript _RENDERBUFFER_HEIGHT :: Int ``` #### `_RENDERBUFFER_INTERNAL_FORMAT` -``` purescript +```purescript _RENDERBUFFER_INTERNAL_FORMAT :: Int ``` #### `_RENDERBUFFER_RED_SIZE` -``` purescript +```purescript _RENDERBUFFER_RED_SIZE :: Int ``` #### `_RENDERBUFFER_GREEN_SIZE` -``` purescript +```purescript _RENDERBUFFER_GREEN_SIZE :: Int ``` #### `_RENDERBUFFER_BLUE_SIZE` -``` purescript +```purescript _RENDERBUFFER_BLUE_SIZE :: Int ``` #### `_RENDERBUFFER_ALPHA_SIZE` -``` purescript +```purescript _RENDERBUFFER_ALPHA_SIZE :: Int ``` #### `_RENDERBUFFER_DEPTH_SIZE` -``` purescript +```purescript _RENDERBUFFER_DEPTH_SIZE :: Int ``` #### `_RENDERBUFFER_STENCIL_SIZE` -``` purescript +```purescript _RENDERBUFFER_STENCIL_SIZE :: Int ``` #### `_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE` -``` purescript +```purescript _FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: Int ``` #### `_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME` -``` purescript +```purescript _FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: Int ``` #### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL` -``` purescript +```purescript _FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: Int ``` #### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE` -``` purescript +```purescript _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: Int ``` #### `_COLOR_ATTACHMENT0` -``` purescript +```purescript _COLOR_ATTACHMENT0 :: Int ``` #### `_DEPTH_ATTACHMENT` -``` purescript +```purescript _DEPTH_ATTACHMENT :: Int ``` #### `_STENCIL_ATTACHMENT` -``` purescript +```purescript _STENCIL_ATTACHMENT :: Int ``` #### `_DEPTH_STENCIL_ATTACHMENT` -``` purescript +```purescript _DEPTH_STENCIL_ATTACHMENT :: Int ``` #### `_NONE` -``` purescript +```purescript _NONE :: Int ``` #### `_FRAMEBUFFER_COMPLETE` -``` purescript +```purescript _FRAMEBUFFER_COMPLETE :: Int ``` #### `_FRAMEBUFFER_INCOMPLETE_ATTACHMENT` -``` purescript +```purescript _FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: Int ``` #### `_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT` -``` purescript +```purescript _FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: Int ``` #### `_FRAMEBUFFER_INCOMPLETE_DIMENSIONS` -``` purescript +```purescript _FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: Int ``` #### `_FRAMEBUFFER_UNSUPPORTED` -``` purescript +```purescript _FRAMEBUFFER_UNSUPPORTED :: Int ``` #### `_FRAMEBUFFER_BINDING` -``` purescript +```purescript _FRAMEBUFFER_BINDING :: Int ``` #### `_RENDERBUFFER_BINDING` -``` purescript +```purescript _RENDERBUFFER_BINDING :: Int ``` #### `_MAX_RENDERBUFFER_SIZE` -``` purescript +```purescript _MAX_RENDERBUFFER_SIZE :: Int ``` #### `_INVALID_FRAMEBUFFER_OPERATION` -``` purescript +```purescript _INVALID_FRAMEBUFFER_OPERATION :: Int ``` #### `_UNPACK_FLIP_Y_WEBGL` -``` purescript +```purescript _UNPACK_FLIP_Y_WEBGL :: Int ``` #### `_UNPACK_PREMULTIPLY_ALPHA_WEBGL` -``` purescript +```purescript _UNPACK_PREMULTIPLY_ALPHA_WEBGL :: Int ``` #### `_CONTEXT_LOST_WEBGL` -``` purescript +```purescript _CONTEXT_LOST_WEBGL :: Int ``` #### `_UNPACK_COLORSPACE_CONVERSION_WEBGL` -``` purescript +```purescript _UNPACK_COLORSPACE_CONVERSION_WEBGL :: Int ``` #### `_BROWSER_DEFAULT_WEBGL` -``` purescript +```purescript _BROWSER_DEFAULT_WEBGL :: Int ``` #### `getContextAttributes_` -``` purescript -getContextAttributes_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) +```purescript +getContextAttributes_ :: (Effect WebGLContextAttributes) ``` #### `isContextLost_` -``` purescript -isContextLost_ :: forall eff. (Eff (webgl :: WebGl | eff) Boolean) +```purescript +isContextLost_ :: (Effect Boolean) ``` #### `getSupportedExtensions_` -``` purescript -getSupportedExtensions_ :: forall eff. (Eff (webgl :: WebGl | eff) String) +```purescript +getSupportedExtensions_ :: (Effect String) ``` #### `getExtension_` -``` purescript -getExtension_ :: forall eff ret. String -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getExtension_ :: forall ret. String -> (Effect ret) ``` #### `activeTexture_` -``` purescript -activeTexture_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +activeTexture_ :: GLenum -> (Effect Unit) ``` #### `attachShader_` -``` purescript -attachShader_ :: forall eff. WebGLProgram -> WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +attachShader_ :: WebGLProgram -> WebGLShader -> (Effect Unit) ``` #### `bindAttribLocation_` -``` purescript -bindAttribLocation_ :: forall eff. WebGLProgram -> GLuint -> String -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bindAttribLocation_ :: WebGLProgram -> GLuint -> String -> (Effect Unit) ``` #### `bindBuffer_` -``` purescript -bindBuffer_ :: forall eff. GLenum -> WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bindBuffer_ :: GLenum -> WebGLBuffer -> (Effect Unit) ``` #### `bindFramebuffer_` -``` purescript -bindFramebuffer_ :: forall eff. GLenum -> WebGLFramebuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bindFramebuffer_ :: GLenum -> WebGLFramebuffer -> (Effect Unit) ``` #### `bindRenderbuffer_` -``` purescript -bindRenderbuffer_ :: forall eff. GLenum -> WebGLRenderbuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bindRenderbuffer_ :: GLenum -> WebGLRenderbuffer -> (Effect Unit) ``` #### `bindTexture_` -``` purescript -bindTexture_ :: forall eff. GLenum -> WebGLTexture -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bindTexture_ :: GLenum -> WebGLTexture -> (Effect Unit) ``` #### `blendColor_` -``` purescript -blendColor_ :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendColor_ :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> (Effect Unit) ``` #### `blendEquation_` -``` purescript -blendEquation_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquation_ :: GLenum -> (Effect Unit) ``` #### `blendEquationSeparate_` -``` purescript -blendEquationSeparate_ :: forall eff. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendEquationSeparate_ :: GLenum -> GLenum -> (Effect Unit) ``` #### `blendFunc_` -``` purescript -blendFunc_ :: forall eff. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFunc_ :: GLenum -> GLenum -> (Effect Unit) ``` #### `blendFuncSeparate_` -``` purescript -blendFuncSeparate_ :: forall eff. GLenum -> GLenum -> GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +blendFuncSeparate_ :: GLenum -> GLenum -> GLenum -> GLenum -> (Effect Unit) ``` #### `bufferData_` -``` purescript -bufferData_ :: forall eff. GLenum -> Float32Array -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bufferData_ :: GLenum -> Float32Array -> GLenum -> (Effect Unit) ``` #### `bufferSubData_` -``` purescript -bufferSubData_ :: forall eff. GLenum -> GLintptr -> Float32Array -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +bufferSubData_ :: GLenum -> GLintptr -> Float32Array -> (Effect Unit) ``` #### `checkFramebufferStatus_` -``` purescript -checkFramebufferStatus_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLenum) +```purescript +checkFramebufferStatus_ :: GLenum -> (Effect GLenum) ``` #### `clear_` -``` purescript -clear_ :: forall eff. GLbitfield -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clear_ :: GLbitfield -> (Effect Unit) ``` #### `clearColor_` -``` purescript -clearColor_ :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clearColor_ :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> (Effect Unit) ``` #### `clearDepth_` -``` purescript -clearDepth_ :: forall eff. GLclampf -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clearDepth_ :: GLclampf -> (Effect Unit) ``` #### `clearStencil_` -``` purescript -clearStencil_ :: forall eff. GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +clearStencil_ :: GLint -> (Effect Unit) ``` #### `colorMask_` -``` purescript -colorMask_ :: forall eff. GLboolean -> GLboolean -> GLboolean -> GLboolean -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +colorMask_ :: GLboolean -> GLboolean -> GLboolean -> GLboolean -> (Effect Unit) ``` #### `compileShader_` -``` purescript -compileShader_ :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +compileShader_ :: WebGLShader -> (Effect Unit) ``` #### `copyTexImage2D_` -``` purescript -copyTexImage2D_ :: forall eff. GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +copyTexImage2D_ :: GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> (Effect Unit) ``` #### `copyTexSubImage2D_` -``` purescript -copyTexSubImage2D_ :: forall eff. GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +copyTexSubImage2D_ :: GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> (Effect Unit) ``` #### `createBuffer_` -``` purescript -createBuffer_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer) +```purescript +createBuffer_ :: (Effect WebGLBuffer) ``` #### `createFramebuffer_` -``` purescript -createFramebuffer_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) +```purescript +createFramebuffer_ :: (Effect WebGLFramebuffer) ``` #### `createProgram_` -``` purescript -createProgram_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) +```purescript +createProgram_ :: (Effect WebGLProgram) ``` #### `createRenderbuffer_` -``` purescript -createRenderbuffer_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) +```purescript +createRenderbuffer_ :: (Effect WebGLRenderbuffer) ``` #### `createShader_` -``` purescript -createShader_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) WebGLShader) +```purescript +createShader_ :: GLenum -> (Effect WebGLShader) ``` #### `createTexture_` -``` purescript -createTexture_ :: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) +```purescript +createTexture_ :: (Effect WebGLTexture) ``` #### `cullFace_` -``` purescript -cullFace_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +cullFace_ :: GLenum -> (Effect Unit) ``` #### `deleteBuffer_` -``` purescript -deleteBuffer_ :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteBuffer_ :: WebGLBuffer -> (Effect Unit) ``` #### `deleteFramebuffer_` -``` purescript -deleteFramebuffer_ :: forall eff. WebGLFramebuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteFramebuffer_ :: WebGLFramebuffer -> (Effect Unit) ``` #### `deleteProgram_` -``` purescript -deleteProgram_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteProgram_ :: WebGLProgram -> (Effect Unit) ``` #### `deleteRenderbuffer_` -``` purescript -deleteRenderbuffer_ :: forall eff. WebGLRenderbuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteRenderbuffer_ :: WebGLRenderbuffer -> (Effect Unit) ``` #### `deleteShader_` -``` purescript -deleteShader_ :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteShader_ :: WebGLShader -> (Effect Unit) ``` #### `deleteTexture_` -``` purescript -deleteTexture_ :: forall eff. WebGLTexture -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +deleteTexture_ :: WebGLTexture -> (Effect Unit) ``` #### `depthFunc_` -``` purescript -depthFunc_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +depthFunc_ :: GLenum -> (Effect Unit) ``` #### `depthMask_` -``` purescript -depthMask_ :: forall eff. GLboolean -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +depthMask_ :: GLboolean -> (Effect Unit) ``` #### `depthRange_` -``` purescript -depthRange_ :: forall eff. GLclampf -> GLclampf -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +depthRange_ :: GLclampf -> GLclampf -> (Effect Unit) ``` #### `detachShader_` -``` purescript -detachShader_ :: forall eff. WebGLProgram -> WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +detachShader_ :: WebGLProgram -> WebGLShader -> (Effect Unit) ``` #### `disable_` -``` purescript -disable_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disable_ :: GLenum -> (Effect Unit) ``` #### `disableVertexAttribArray_` -``` purescript -disableVertexAttribArray_ :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +disableVertexAttribArray_ :: GLuint -> (Effect Unit) ``` #### `drawArrays_` -``` purescript -drawArrays_ :: forall eff. GLenum -> GLint -> GLsizei -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +drawArrays_ :: GLenum -> GLint -> GLsizei -> (Effect Unit) ``` #### `drawElements_` -``` purescript -drawElements_ :: forall eff. GLenum -> GLsizei -> GLenum -> GLintptr -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +drawElements_ :: GLenum -> GLsizei -> GLenum -> GLintptr -> (Effect Unit) ``` #### `enable_` -``` purescript -enable_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enable_ :: GLenum -> (Effect Unit) ``` #### `enableVertexAttribArray_` -``` purescript -enableVertexAttribArray_ :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +enableVertexAttribArray_ :: GLuint -> (Effect Unit) ``` #### `finish_` -``` purescript -finish_ :: forall eff. (Eff (webgl :: WebGl | eff) Unit) +```purescript +finish_ :: (Effect Unit) ``` #### `flush_` -``` purescript -flush_ :: forall eff. (Eff (webgl :: WebGl | eff) Unit) +```purescript +flush_ :: (Effect Unit) ``` #### `framebufferRenderbuffer_` -``` purescript -framebufferRenderbuffer_ :: forall eff. GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +framebufferRenderbuffer_ :: GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> (Effect Unit) ``` #### `framebufferTexture2D_` -``` purescript -framebufferTexture2D_ :: forall eff. GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +framebufferTexture2D_ :: GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> (Effect Unit) ``` #### `frontFace_` -``` purescript -frontFace_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +frontFace_ :: GLenum -> (Effect Unit) ``` #### `generateMipmap_` -``` purescript -generateMipmap_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +generateMipmap_ :: GLenum -> (Effect Unit) ``` #### `getActiveAttrib_` -``` purescript -getActiveAttrib_ :: forall eff. WebGLProgram -> GLuint -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) +```purescript +getActiveAttrib_ :: WebGLProgram -> GLuint -> (Effect WebGLActiveInfo) ``` #### `getActiveUniform_` -``` purescript -getActiveUniform_ :: forall eff. WebGLProgram -> GLuint -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) +```purescript +getActiveUniform_ :: WebGLProgram -> GLuint -> (Effect WebGLActiveInfo) ``` #### `getAttachedShaders_` -``` purescript -getAttachedShaders_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) WebGLShader) +```purescript +getAttachedShaders_ :: WebGLProgram -> (Effect WebGLShader) ``` #### `getAttribLocation_` -``` purescript -getAttribLocation_ :: forall eff. WebGLProgram -> String -> (Eff (webgl :: WebGl | eff) GLint) +```purescript +getAttribLocation_ :: WebGLProgram -> String -> (Effect GLint) ``` #### `getParameter_` -``` purescript -getParameter_ :: forall eff ret. GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getParameter_ :: forall ret. GLenum -> (Effect ret) ``` #### `getBufferParameter_` -``` purescript -getBufferParameter_ :: forall eff ret. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getBufferParameter_ :: forall ret. GLenum -> GLenum -> (Effect ret) ``` #### `getError_` -``` purescript -getError_ :: forall eff. (Eff (webgl :: WebGl | eff) GLenum) +```purescript +getError_ :: (Effect GLenum) ``` #### `getFramebufferAttachmentParameter_` -``` purescript -getFramebufferAttachmentParameter_ :: forall eff ret. GLenum -> GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getFramebufferAttachmentParameter_ :: forall ret. GLenum -> GLenum -> GLenum -> (Effect ret) ``` #### `getProgramParameter_` -``` purescript -getProgramParameter_ :: forall eff ret. WebGLProgram -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getProgramParameter_ :: forall ret. WebGLProgram -> GLenum -> (Effect ret) ``` #### `getProgramInfoLog_` -``` purescript -getProgramInfoLog_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) String) +```purescript +getProgramInfoLog_ :: WebGLProgram -> (Effect String) ``` #### `getRenderbufferParameter_` -``` purescript -getRenderbufferParameter_ :: forall eff ret. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getRenderbufferParameter_ :: forall ret. GLenum -> GLenum -> (Effect ret) ``` #### `getShaderParameter_` -``` purescript -getShaderParameter_ :: forall eff ret. WebGLShader -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getShaderParameter_ :: forall ret. WebGLShader -> GLenum -> (Effect ret) ``` #### `getShaderInfoLog_` -``` purescript -getShaderInfoLog_ :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) +```purescript +getShaderInfoLog_ :: WebGLShader -> (Effect String) ``` #### `getShaderSource_` -``` purescript -getShaderSource_ :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) +```purescript +getShaderSource_ :: WebGLShader -> (Effect String) ``` #### `getTexParameter_` -``` purescript -getTexParameter_ :: forall eff ret. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getTexParameter_ :: forall ret. GLenum -> GLenum -> (Effect ret) ``` #### `getUniform_` -``` purescript -getUniform_ :: forall eff ret. WebGLProgram -> WebGLUniformLocation -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getUniform_ :: forall ret. WebGLProgram -> WebGLUniformLocation -> (Effect ret) ``` #### `getUniformLocation_` -``` purescript -getUniformLocation_ :: forall eff. WebGLProgram -> String -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) +```purescript +getUniformLocation_ :: WebGLProgram -> String -> (Effect WebGLUniformLocation) ``` #### `getVertexAttrib_` -``` purescript -getVertexAttrib_ :: forall eff ret. GLuint -> GLenum -> (Eff (webgl :: WebGl | eff) ret) +```purescript +getVertexAttrib_ :: forall ret. GLuint -> GLenum -> (Effect ret) ``` #### `getVertexAttribOffset_` -``` purescript -getVertexAttribOffset_ :: forall eff. GLuint -> GLenum -> (Eff (webgl :: WebGl | eff) GLsizeiptr) +```purescript +getVertexAttribOffset_ :: GLuint -> GLenum -> (Effect GLsizeiptr) ``` #### `hint_` -``` purescript -hint_ :: forall eff. GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +hint_ :: GLenum -> GLenum -> (Effect Unit) ``` #### `isBuffer_` -``` purescript -isBuffer_ :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isBuffer_ :: WebGLBuffer -> (Effect GLboolean) ``` #### `isEnabled_` -``` purescript -isEnabled_ :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isEnabled_ :: GLenum -> (Effect GLboolean) ``` #### `isFramebuffer_` -``` purescript -isFramebuffer_ :: forall eff. WebGLFramebuffer -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isFramebuffer_ :: WebGLFramebuffer -> (Effect GLboolean) ``` #### `isProgram_` -``` purescript -isProgram_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isProgram_ :: WebGLProgram -> (Effect GLboolean) ``` #### `isRenderbuffer_` -``` purescript -isRenderbuffer_ :: forall eff. WebGLRenderbuffer -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isRenderbuffer_ :: WebGLRenderbuffer -> (Effect GLboolean) ``` #### `isShader_` -``` purescript -isShader_ :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isShader_ :: WebGLShader -> (Effect GLboolean) ``` #### `isTexture_` -``` purescript -isTexture_ :: forall eff. WebGLTexture -> (Eff (webgl :: WebGl | eff) GLboolean) +```purescript +isTexture_ :: WebGLTexture -> (Effect GLboolean) ``` #### `lineWidth_` -``` purescript -lineWidth_ :: forall eff. GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +lineWidth_ :: GLfloat -> (Effect Unit) ``` #### `linkProgram_` -``` purescript -linkProgram_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +linkProgram_ :: WebGLProgram -> (Effect Unit) ``` #### `pixelStorei_` -``` purescript -pixelStorei_ :: forall eff. GLenum -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +pixelStorei_ :: GLenum -> GLint -> (Effect Unit) ``` #### `polygonOffset_` -``` purescript -polygonOffset_ :: forall eff. GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +polygonOffset_ :: GLfloat -> GLfloat -> (Effect Unit) ``` #### `readPixels_` -``` purescript -readPixels_ :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +readPixels_ :: GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> (Effect Unit) ``` #### `renderbufferStorage_` -``` purescript -renderbufferStorage_ :: forall eff. GLenum -> GLenum -> GLsizei -> GLsizei -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +renderbufferStorage_ :: GLenum -> GLenum -> GLsizei -> GLsizei -> (Effect Unit) ``` #### `sampleCoverage_` -``` purescript -sampleCoverage_ :: forall eff. GLclampf -> GLboolean -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +sampleCoverage_ :: GLclampf -> GLboolean -> (Effect Unit) ``` #### `scissor_` -``` purescript -scissor_ :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +scissor_ :: GLint -> GLint -> GLsizei -> GLsizei -> (Effect Unit) ``` #### `shaderSource_` -``` purescript -shaderSource_ :: forall eff. WebGLShader -> String -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +shaderSource_ :: WebGLShader -> String -> (Effect Unit) ``` #### `stencilFunc_` -``` purescript -stencilFunc_ :: forall eff. GLenum -> GLint -> GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilFunc_ :: GLenum -> GLint -> GLuint -> (Effect Unit) ``` #### `stencilFuncSeparate_` -``` purescript -stencilFuncSeparate_ :: forall eff. GLenum -> GLenum -> GLint -> GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilFuncSeparate_ :: GLenum -> GLenum -> GLint -> GLuint -> (Effect Unit) ``` #### `stencilMask_` -``` purescript -stencilMask_ :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilMask_ :: GLuint -> (Effect Unit) ``` #### `stencilMaskSeparate_` -``` purescript -stencilMaskSeparate_ :: forall eff. GLenum -> GLuint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilMaskSeparate_ :: GLenum -> GLuint -> (Effect Unit) ``` #### `stencilOp_` -``` purescript -stencilOp_ :: forall eff. GLenum -> GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilOp_ :: GLenum -> GLenum -> GLenum -> (Effect Unit) ``` #### `stencilOpSeparate_` -``` purescript -stencilOpSeparate_ :: forall eff. GLenum -> GLenum -> GLenum -> GLenum -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +stencilOpSeparate_ :: GLenum -> GLenum -> GLenum -> GLenum -> (Effect Unit) ``` #### `texImage2D_` -``` purescript -texImage2D_ :: forall eff. GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +texImage2D_ :: GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> (Effect Unit) ``` #### `texParameterf_` -``` purescript -texParameterf_ :: forall eff. GLenum -> GLenum -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +texParameterf_ :: GLenum -> GLenum -> GLfloat -> (Effect Unit) ``` #### `texParameteri_` -``` purescript -texParameteri_ :: forall eff. GLenum -> GLenum -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +texParameteri_ :: GLenum -> GLenum -> GLint -> (Effect Unit) ``` #### `texSubImage2D_` -``` purescript -texSubImage2D_ :: forall eff. GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +texSubImage2D_ :: GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> (Effect Unit) ``` #### `uniform1f_` -``` purescript -uniform1f_ :: forall eff. WebGLUniformLocation -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform1f_ :: WebGLUniformLocation -> GLfloat -> (Effect Unit) ``` #### `uniform1fv_` -``` purescript -uniform1fv_ :: forall eff. WebGLUniformLocation -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform1fv_ :: WebGLUniformLocation -> FloatArray -> (Effect Unit) ``` #### `uniform1i_` -``` purescript -uniform1i_ :: forall eff. WebGLUniformLocation -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform1i_ :: WebGLUniformLocation -> GLint -> (Effect Unit) ``` #### `uniform1iv_` -``` purescript -uniform1iv_ :: forall eff. WebGLUniformLocation -> Int32Array -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform1iv_ :: WebGLUniformLocation -> Int32Array -> (Effect Unit) ``` #### `uniform2f_` -``` purescript -uniform2f_ :: forall eff. WebGLUniformLocation -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform2f_ :: WebGLUniformLocation -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `uniform2fv_` -``` purescript -uniform2fv_ :: forall eff. WebGLUniformLocation -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform2fv_ :: WebGLUniformLocation -> FloatArray -> (Effect Unit) ``` #### `uniform2i_` -``` purescript -uniform2i_ :: forall eff. WebGLUniformLocation -> GLint -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform2i_ :: WebGLUniformLocation -> GLint -> GLint -> (Effect Unit) ``` #### `uniform2iv_` -``` purescript -uniform2iv_ :: forall eff. WebGLUniformLocation -> Int32Array -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform2iv_ :: WebGLUniformLocation -> Int32Array -> (Effect Unit) ``` #### `uniform3f_` -``` purescript -uniform3f_ :: forall eff. WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform3f_ :: WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `uniform3fv_` -``` purescript -uniform3fv_ :: forall eff. WebGLUniformLocation -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform3fv_ :: WebGLUniformLocation -> FloatArray -> (Effect Unit) ``` #### `uniform3i_` -``` purescript -uniform3i_ :: forall eff. WebGLUniformLocation -> GLint -> GLint -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform3i_ :: WebGLUniformLocation -> GLint -> GLint -> GLint -> (Effect Unit) ``` #### `uniform3iv_` -``` purescript -uniform3iv_ :: forall eff. WebGLUniformLocation -> Int32Array -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform3iv_ :: WebGLUniformLocation -> Int32Array -> (Effect Unit) ``` #### `uniform4f_` -``` purescript -uniform4f_ :: forall eff. WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform4f_ :: WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `uniform4fv_` -``` purescript -uniform4fv_ :: forall eff. WebGLUniformLocation -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform4fv_ :: WebGLUniformLocation -> FloatArray -> (Effect Unit) ``` #### `uniform4i_` -``` purescript -uniform4i_ :: forall eff. WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform4i_ :: WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> (Effect Unit) ``` #### `uniform4iv_` -``` purescript -uniform4iv_ :: forall eff. WebGLUniformLocation -> Int32Array -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniform4iv_ :: WebGLUniformLocation -> Int32Array -> (Effect Unit) ``` #### `uniformMatrix2fv_` -``` purescript -uniformMatrix2fv_ :: forall eff. WebGLUniformLocation -> GLboolean -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniformMatrix2fv_ :: WebGLUniformLocation -> GLboolean -> FloatArray -> (Effect Unit) ``` #### `uniformMatrix3fv_` -``` purescript -uniformMatrix3fv_ :: forall eff. WebGLUniformLocation -> GLboolean -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniformMatrix3fv_ :: WebGLUniformLocation -> GLboolean -> FloatArray -> (Effect Unit) ``` #### `uniformMatrix4fv_` -``` purescript -uniformMatrix4fv_ :: forall eff. WebGLUniformLocation -> GLboolean -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +uniformMatrix4fv_ :: WebGLUniformLocation -> GLboolean -> FloatArray -> (Effect Unit) ``` #### `useProgram_` -``` purescript -useProgram_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +useProgram_ :: WebGLProgram -> (Effect Unit) ``` #### `validateProgram_` -``` purescript -validateProgram_ :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +validateProgram_ :: WebGLProgram -> (Effect Unit) ``` #### `vertexAttrib1f_` -``` purescript -vertexAttrib1f_ :: forall eff. GLuint -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib1f_ :: GLuint -> GLfloat -> (Effect Unit) ``` #### `vertexAttrib1fv_` -``` purescript -vertexAttrib1fv_ :: forall eff. GLuint -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib1fv_ :: GLuint -> FloatArray -> (Effect Unit) ``` #### `vertexAttrib2f_` -``` purescript -vertexAttrib2f_ :: forall eff. GLuint -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib2f_ :: GLuint -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `vertexAttrib2fv_` -``` purescript -vertexAttrib2fv_ :: forall eff. GLuint -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib2fv_ :: GLuint -> FloatArray -> (Effect Unit) ``` #### `vertexAttrib3f_` -``` purescript -vertexAttrib3f_ :: forall eff. GLuint -> GLfloat -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib3f_ :: GLuint -> GLfloat -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `vertexAttrib3fv_` -``` purescript -vertexAttrib3fv_ :: forall eff. GLuint -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib3fv_ :: GLuint -> FloatArray -> (Effect Unit) ``` #### `vertexAttrib4f_` -``` purescript -vertexAttrib4f_ :: forall eff. GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib4f_ :: GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> (Effect Unit) ``` #### `vertexAttrib4fv_` -``` purescript -vertexAttrib4fv_ :: forall eff. GLuint -> FloatArray -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttrib4fv_ :: GLuint -> FloatArray -> (Effect Unit) ``` #### `vertexAttribPointer_` -``` purescript -vertexAttribPointer_ :: forall eff. GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +vertexAttribPointer_ :: GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> (Effect Unit) ``` #### `viewport_` -``` purescript -viewport_ :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> (Eff (webgl :: WebGl | eff) Unit) +```purescript +viewport_ :: GLint -> GLint -> GLsizei -> GLsizei -> (Effect Unit) ``` - - diff --git a/docs/Graphics/WebGLTexture.md b/docs/Graphics/WebGLTexture.md index 7f38c68..992717c 100644 --- a/docs/Graphics/WebGLTexture.md +++ b/docs/Graphics/WebGLTexture.md @@ -4,14 +4,14 @@ Textures for the WebGL binding for purescript #### `WebGLTex` -``` purescript +```purescript newtype WebGLTex = WebGLTex WebGLTexture ``` #### `TargetType` -``` purescript +```purescript data TargetType = TEXTURE_2D | TEXTURE_CUBE_MAP_POSITIVE_X @@ -24,13 +24,13 @@ data TargetType #### `targetTypeToConst` -``` purescript +```purescript targetTypeToConst :: TargetType -> GLenum ``` #### `InternalFormat` -``` purescript +```purescript data InternalFormat = IF_ALPHA | IF_LUMINANCE @@ -41,7 +41,7 @@ data InternalFormat #### `TextureType` -``` purescript +```purescript data TextureType = UNSIGNED_BYTE | RGBA @@ -53,7 +53,7 @@ data TextureType #### `SymbolicParameter` -``` purescript +```purescript data SymbolicParameter = PACK_ALIGNMENT | UNPACK_ALIGNMENT @@ -64,7 +64,7 @@ data SymbolicParameter #### `TexTarget` -``` purescript +```purescript data TexTarget = TTEXTURE_2D | TTEXTURE_CUBE_MAP @@ -72,7 +72,7 @@ data TexTarget #### `TexParName` -``` purescript +```purescript data TexParName = TEXTURE_MIN_FILTER | TEXTURE_MAG_FILTER @@ -82,7 +82,7 @@ data TexParName #### `TexFilterSpec` -``` purescript +```purescript data TexFilterSpec = NEAREST | LINEAR @@ -91,62 +91,60 @@ data TexFilterSpec #### `texture2DFor` -``` purescript -texture2DFor :: forall a eff. String -> TexFilterSpec -> (WebGLTex -> EffWebGL eff a) -> EffWebGL eff Unit +```purescript +texture2DFor :: forall a. String -> TexFilterSpec -> (WebGLTex -> Effect a) -> Effect Unit ``` #### `handleLoad2D` -``` purescript -handleLoad2D :: forall eff a. WebGLTex -> TexFilterSpec -> a -> EffWebGL eff Unit +```purescript +handleLoad2D :: forall a. WebGLTex -> TexFilterSpec -> a -> Effect Unit ``` #### `handleSubLoad2D` -``` purescript -handleSubLoad2D :: forall eff a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> EffWebGL eff Unit +```purescript +handleSubLoad2D :: forall a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> Effect Unit ``` #### `newTexture` -``` purescript -newTexture :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +```purescript +newTexture :: Int -> Int -> TexFilterSpec -> Effect WebGLTex ``` #### `newTextureInit` -``` purescript -newTextureInit :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +```purescript +newTextureInit :: Int -> Int -> TexFilterSpec -> Effect WebGLTex ``` #### `withTexture2D` -``` purescript -withTexture2D :: forall eff typ. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit -> EffWebGL eff Unit +```purescript +withTexture2D :: forall typ. WebGLTex -> Int -> Uniform typ -> Int -> Effect Unit -> Effect Unit ``` #### `bindTexture` -``` purescript -bindTexture :: forall eff. TargetType -> WebGLTex -> EffWebGL eff Unit +```purescript +bindTexture :: TargetType -> WebGLTex -> Effect Unit ``` #### `unbindTexture` -``` purescript -unbindTexture :: forall eff. TargetType -> EffWebGL eff Unit +```purescript +unbindTexture :: TargetType -> Effect Unit ``` #### `activeTexture` -``` purescript -activeTexture :: forall eff. Int -> Eff (webgl :: WebGl | eff) Unit +```purescript +activeTexture :: Int -> Effect Unit ``` #### `createTexture` -``` purescript -createTexture :: forall eff. Eff (webgl :: WebGl | eff) WebGLTex +```purescript +createTexture :: Effect WebGLTex ``` - - diff --git a/package.json b/package.json index bfa5fc1..62cb3cf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "devDependencies": { - "pulp": "^9.0.1", + "pulp": "^12.2.0", "browserify": "*", "benchmark": "*", "microtime": "*" diff --git a/src/Control/Monad/Eff/WebGL.js b/src/Control/Monad/Eff/WebGL.js index ddf0073..92836c6 100644 --- a/src/Control/Monad/Eff/WebGL.js +++ b/src/Control/Monad/Eff/WebGL.js @@ -1,6 +1,6 @@ /* global exports */ -// module Control.Monad.Eff.WebGL +// module Effect.WebGL "use strict"; diff --git a/src/Control/Monad/Eff/WebGL.purs b/src/Control/Monad/Eff/WebGL.purs index dae1804..111af72 100644 --- a/src/Control/Monad/Eff/WebGL.purs +++ b/src/Control/Monad/Eff/WebGL.purs @@ -1,6 +1,6 @@ ----------------------------------------------------------------------------- -- --- Module : Control.Monad.Eff.WebGL +-- Module : Effect.WebGL -- Copyright : Jürgen Nicklisch-Franken -- License : Apache-2.0 -- @@ -12,12 +12,8 @@ -- ----------------------------------------------------------------------------- -module Control.Monad.Eff.WebGL where +module Effect.WebGL where -import Control.Monad.Eff (kind Effect, Eff) +import Effect (Effect) -foreign import data WebGl :: Effect - -type EffWebGL eff a = Eff (webgl :: WebGl | eff) a - -foreign import runWebGl_ :: forall a e. Eff (webgl :: WebGl | e) a -> Eff e a +foreign import runWebGl_ :: forall a. Effect a -> Effect a diff --git a/src/Graphics/WebGL.purs b/src/Graphics/WebGL.purs index 898eb67..cb3258b 100644 --- a/src/Graphics/WebGL.purs +++ b/src/Graphics/WebGL.purs @@ -94,7 +94,7 @@ module Graphics.WebGL ) where import Prelude -import Control.Monad.Eff (Eff) +import Effect (Effect) import Data.Foldable (foldl) import Data.Maybe (Maybe(Nothing, Just)) import Data.Array.Partial (head) @@ -102,9 +102,9 @@ import Data.Array (length) import Data.TypedArray (length) as AW import Data.Either (Either(Right, Left)) import Data.Int.Bits ((.|.)) -import Partial.Unsafe (unsafePartial) +import Partial.Unsafe (unsafePartial, unsafeCrashWith) -import Control.Monad.Eff.WebGL (WebGl, EffWebGL, runWebGl_) +import Effect.WebGL (runWebGl_) import Graphics.WebGLRaw (GLintptr, GLenum, WebGLProgram, WebGLShader, GLsizei, GLint, GLboolean, GLclampf, WebGLBuffer, WebGLUniformLocation, _FUNC_REVERSE_SUBTRACT, _FUNC_SUBTRACT, _BLEND_EQUATION_ALPHA, _BLEND_EQUATION_RGB, _BLEND_EQUATION, _FUNC_ADD, _BLEND_SRC_ALPHA, _BLEND_DST_ALPHA, _BLEND_SRC_RGB, _BLEND_DST_RGB, _BLEND_COLOR, _SRC_ALPHA_SATURATE, _ONE_MINUS_CONSTANT_ALPHA, _CONSTANT_ALPHA, _ONE_MINUS_CONSTANT_COLOR, _CONSTANT_COLOR, @@ -120,7 +120,6 @@ import Graphics.WebGLRaw (GLintptr, GLenum, WebGLProgram, WebGLShader, GLsizei, createBuffer_, _DYNAMIC_DRAW, _STATIC_DRAW, bindAttribLocation_) import Data.ArrayBuffer.Types (ArrayView, Float32Array, Float32) as T import Data.TypedArray (asFloat32Array) as T -import Extensions (fail) type WebGLContext = { canvasName :: String @@ -149,8 +148,8 @@ defContextAttributes = { alpha : true -- | pures either a continuation which takes a String in the error case, -- which happens when WebGL is not present, or a (Right) continuation with the WebGL --- effect. -runWebGLAttr :: forall a eff. String -> ContextAttributes -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +-- ect. +runWebGLAttr :: forall a. String -> ContextAttributes -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a runWebGLAttr canvasId attr failure success = do res <- initGL_ canvasId attr if res @@ -162,7 +161,7 @@ runWebGLAttr canvasId attr failure success = do } -- | Same as runWebGLAttr but uses default attributes (defContextAttributes) -runWebGL :: forall a eff. String -> (String -> Eff eff a) -> (WebGLContext -> EffWebGL eff a) -> Eff eff a +runWebGL :: forall a. String -> (String -> Effect a) -> (WebGLContext -> Effect a) -> Effect a runWebGL canvasId failure success = do res <- initGL_ canvasId defContextAttributes if res @@ -200,11 +199,11 @@ newtype WebGLProg = WebGLProg WebGLProgram data Shaders bindings = Shaders String String -requestAnimationFrame :: forall a eff. Eff (webgl :: WebGl | eff) a -> Eff (webgl :: WebGl | eff) Unit +requestAnimationFrame :: forall a. Effect a -> Effect Unit requestAnimationFrame = requestAnimationFrame_ -withShaders :: forall bindings eff a. Shaders (Record bindings) -> (String -> EffWebGL eff a) -> - ({webGLProgram :: WebGLProg | bindings} -> EffWebGL eff a) -> EffWebGL eff a +withShaders :: forall bindings a. Shaders (Record bindings) -> (String -> Effect a) -> + ({webGLProgram :: WebGLProg | bindings} -> Effect a) -> Effect a withShaders (Shaders fragmetShaderSource vertexShaderSource) failure success = do condFShader <- makeShader FragmentShader fragmetShaderSource case condFShader of @@ -223,7 +222,7 @@ withShaders (Shaders fragmetShaderSource vertexShaderSource) failure success = d -- bindings2 <- checkBindings bindings1 success (withBindings{webGLProgram = WebGLProg p}) -bindAttribLocation :: forall eff. WebGLProg -> Int -> String -> Eff (webgl :: WebGl | eff) Unit +bindAttribLocation :: WebGLProg -> Int -> String -> Effect Unit bindAttribLocation (WebGLProg p) i s = bindAttribLocation_ p i s type Buffer a = { @@ -232,13 +231,13 @@ type Buffer a = { bufferSize :: Int } -makeBufferFloat :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer T.Float32) +makeBufferFloat :: Array Number -> Effect (Buffer T.Float32) makeBufferFloat vertices = makeBufferFloat' vertices _STATIC_DRAW -makeBufferFloatDyn :: forall eff. Array Number -> Eff (webgl :: WebGl | eff) (Buffer T.Float32) +makeBufferFloatDyn :: Array Number -> Effect (Buffer T.Float32) makeBufferFloatDyn vertices = makeBufferFloat' vertices _DYNAMIC_DRAW -makeBufferFloat' :: forall eff. Array Number -> Int -> Eff (webgl :: WebGl | eff) (Buffer T.Float32) +makeBufferFloat' :: Array Number -> Int -> Effect (Buffer T.Float32) makeBufferFloat' vertices flag = do buffer <- createBuffer_ bindBuffer_ _ARRAY_BUFFER buffer @@ -250,15 +249,15 @@ makeBufferFloat' vertices flag = do bufferSize : length vertices } -makeBuffer :: forall a eff num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num - -> Eff (webgl :: WebGl | eff) (Buffer a) +makeBuffer :: forall a num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num + -> Effect (Buffer a) makeBuffer bufferTarget conversion vertices = makeBuffer' bufferTarget conversion vertices _STATIC_DRAW -makeBufferDyn :: forall a eff num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num - -> Eff (webgl :: WebGl | eff) (Buffer a) +makeBufferDyn :: forall a num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num + -> Effect (Buffer a) makeBufferDyn bufferTarget conversion vertices = makeBuffer' bufferTarget conversion vertices _DYNAMIC_DRAW -makeBufferPrim :: forall a eff.BufferTarget -> T.ArrayView a -> Eff (webgl :: WebGl | eff) (Buffer a) +makeBufferPrim :: forall a.BufferTarget -> T.ArrayView a -> Effect (Buffer a) makeBufferPrim bufferTarget typedArray = do let targetConst = bufferTargetToConst bufferTarget buffer <- createBuffer_ @@ -270,7 +269,7 @@ makeBufferPrim bufferTarget typedArray = do bufferSize : AW.length typedArray } -makeBufferPrimDyn :: forall a eff. BufferTarget -> T.ArrayView a -> Eff (webgl :: WebGl | eff) (Buffer a) +makeBufferPrimDyn :: forall a. BufferTarget -> T.ArrayView a -> Effect (Buffer a) makeBufferPrimDyn bufferTarget typedArray = do let targetConst = bufferTargetToConst bufferTarget buffer <- createBuffer_ @@ -282,8 +281,8 @@ makeBufferPrimDyn bufferTarget typedArray = do bufferSize : AW.length typedArray } -makeBuffer' :: forall a eff num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num - -> Int -> Eff (webgl :: WebGl | eff) (Buffer a) +makeBuffer' :: forall a num. (EuclideanRing num) => BufferTarget -> (Array num -> T.ArrayView a) -> Array num + -> Int -> Effect (Buffer a) makeBuffer' bufferTarget conversion vertices flag = do let targetConst = bufferTargetToConst bufferTarget buffer <- createBuffer_ @@ -296,7 +295,7 @@ makeBuffer' bufferTarget conversion vertices flag = do bufferSize : length vertices } -fillBuffer :: forall a eff. Buffer a -> Int -> Array Number -> Eff (webgl :: WebGl | eff) Unit +fillBuffer :: forall a. Buffer a -> Int -> Array Number -> Effect Unit fillBuffer buffer offset vertices = do bindBuffer_ buffer.bufferType buffer.webGLBuffer let typedArray = T.asFloat32Array vertices @@ -304,7 +303,7 @@ fillBuffer buffer offset vertices = do pure unit -setUniformFloats :: forall eff typ. Uniform typ -> Array Number -> EffWebGL eff Unit +setUniformFloats :: forall typ. Uniform typ -> Array Number -> Effect Unit setUniformFloats (Uniform uni) value | uni.uType == _FLOAT = uniform1f_ uni.uLocation (unsafePartial $ head value) | uni.uType == _FLOAT_MAT4 = uniformMatrix4fv_ uni.uLocation false (asArrayBuffer value) @@ -313,36 +312,36 @@ setUniformFloats (Uniform uni) value | uni.uType == _FLOAT_VEC4 = uniform4fv_ uni.uLocation (asArrayBuffer value) | uni.uType == _FLOAT_VEC3 = uniform3fv_ uni.uLocation (asArrayBuffer value) | uni.uType == _FLOAT_VEC2 = uniform2fv_ uni.uLocation (asArrayBuffer value) - | otherwise = fail "WebGL>>setUniformFloats: Called for non float uniform!" + | otherwise = unsafeCrashWith "WebGL>>setUniformFloats: Called for non float uniform!" -setUniformBoolean :: forall eff typ. Uniform typ -> Boolean -> EffWebGL eff Unit +setUniformBoolean :: forall typ. Uniform typ -> Boolean -> Effect Unit setUniformBoolean (Uniform uni) value | uni.uType == _BOOL = uniform1i_ uni.uLocation (toNumber value) where toNumber true = 1 toNumber false = 0 - | otherwise = fail "WebGL>>setUniformBoolean: Called for not boolean uniform!" + | otherwise = unsafeCrashWith "WebGL>>setUniformBoolean: Called for not boolean uniform!" -bindBufAndSetVertexAttr :: forall a eff typ. Buffer a -> Attribute typ -> Eff (webgl :: WebGl | eff) Unit +bindBufAndSetVertexAttr :: forall a typ. Buffer a -> Attribute typ -> Effect Unit bindBufAndSetVertexAttr buffer attr = do bindBuffer_ buffer.bufferType buffer.webGLBuffer vertexPointer attr -bindBuf :: forall a eff. Buffer a -> Eff (webgl :: WebGl | eff) Unit +bindBuf :: forall a. Buffer a -> Effect Unit bindBuf buffer = bindBuffer_ buffer.bufferType buffer.webGLBuffer -blendColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +blendColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit blendColor = blendColor_ -blendFunc :: forall eff. BlendingFactor -> BlendingFactor -> (Eff (webgl :: WebGl | eff) Unit) +blendFunc :: BlendingFactor -> BlendingFactor -> (Effect Unit) blendFunc a b = blendFunc_ (blendingFactorToConst a) (blendingFactorToConst b) -blendFuncSeparate :: forall eff. BlendingFactor +blendFuncSeparate :: BlendingFactor -> BlendingFactor -> BlendingFactor -> BlendingFactor - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) blendFuncSeparate a b c d = let a' = blendingFactorToConst a @@ -351,25 +350,25 @@ blendFuncSeparate a b c d = d' = blendingFactorToConst d in blendFuncSeparate_ a' b' c' d' -blendEquation :: forall eff. BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +blendEquation :: BlendEquation -> (Effect Unit) blendEquation = blendEquation_ <<< blendEquationToConst -blendEquationSeparate :: forall eff. BlendEquation -> BlendEquation -> (Eff (webgl :: WebGl | eff) Unit) +blendEquationSeparate :: BlendEquation -> BlendEquation -> (Effect Unit) blendEquationSeparate a b = blendEquationSeparate_ (blendEquationToConst a) (blendEquationToConst b) -clear :: forall eff. Array Mask -> (Eff (webgl :: WebGl | eff) Unit) +clear :: Array Mask -> (Effect Unit) clear masks = clear_ $ foldl (.|.) 0 (map maskToConst masks) -clearColor :: forall eff. GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGl | eff) Unit +clearColor :: GLclampf -> GLclampf -> GLclampf -> GLclampf -> Effect Unit clearColor = clearColor_ -clearDepth :: forall eff. GLclampf -> Eff (webgl :: WebGl | eff) Unit +clearDepth :: GLclampf -> Effect Unit clearDepth = clearDepth_ -clearStencil :: forall eff. GLint -> Eff (webgl :: WebGl | eff) Unit +clearStencil :: GLint -> Effect Unit clearStencil = clearStencil_ -colorMask :: forall eff. GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGl | eff) Unit +colorMask :: GLboolean -> GLboolean -> GLboolean -> GLboolean -> Effect Unit colorMask = colorMask_ data Func = NEVER | ALWAYS | LESS | EQUAL | LEQUAL | GREATER | GEQUAL | NOTEQUAL @@ -384,40 +383,40 @@ funcToConst GREATER = _GREATER funcToConst GEQUAL = _GEQUAL funcToConst NOTEQUAL = _NOTEQUAL -depthFunc :: forall eff. Func -> Eff (webgl :: WebGl | eff) Unit +depthFunc :: Func -> Effect Unit depthFunc = depthFunc_ <<< funcToConst -disable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +disable :: Capacity -> (Effect Unit) disable = disable_ <<< capacityToConst -drawArr :: forall a eff typ. Mode -> Buffer a -> Attribute typ -> EffWebGL eff Unit +drawArr :: forall a typ. Mode -> Buffer a -> Attribute typ -> Effect Unit drawArr mode buffer a@(Attribute attrLoc) = do bindBufAndSetVertexAttr buffer a drawArrays_ (modeToConst mode) 0 (buffer.bufferSize / attrLoc.aItemSize) -drawElements :: forall eff. Mode -> Int -> EffWebGL eff Unit +drawElements :: Mode -> Int -> Effect Unit drawElements mode count = drawElements_ (modeToConst mode) count _UNSIGNED_SHORT 0 -enable :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Unit) +enable :: Capacity -> (Effect Unit) enable = enable_ <<< capacityToConst -isContextLost :: forall eff. Eff (webgl :: WebGl | eff) Boolean +isContextLost :: Effect Boolean isContextLost = isContextLost_ -isEnabled :: forall eff. Capacity -> (Eff (webgl :: WebGl | eff) Boolean) +isEnabled :: Capacity -> (Effect Boolean) isEnabled = isEnabled_ <<< capacityToConst -vertexPointer :: forall eff typ. Attribute typ -> EffWebGL eff Unit +vertexPointer :: forall typ. Attribute typ -> Effect Unit vertexPointer (Attribute attrLoc) = vertexAttribPointer_ attrLoc.aLocation attrLoc.aItemSize _FLOAT false 0 0 -viewport :: forall eff. GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGl | eff) Unit +viewport :: GLint -> GLint -> GLsizei -> GLsizei -> Effect Unit viewport = viewport_ -enableVertexAttribArray :: forall eff a . Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +enableVertexAttribArray :: forall a . Attribute a -> (Effect Unit) enableVertexAttribArray (Attribute att) = enableVertexAttribArray_ att.aLocation -disableVertexAttribArray :: forall eff a . Attribute a -> (Eff (webgl :: WebGl | eff) Unit) +disableVertexAttribArray :: forall a . Attribute a -> (Effect Unit) disableVertexAttribArray (Attribute att) = disableVertexAttribArray_ att.aLocation @@ -430,13 +429,13 @@ data ShaderType = FragmentShader asArrayBuffer ::Array Number -> T.Float32Array asArrayBuffer = T.asFloat32Array -getCanvasWidth :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +getCanvasWidth :: WebGLContext -> Effect Int getCanvasWidth context = getCanvasWidth_ context.canvasName -getCanvasHeight :: forall eff. WebGLContext -> Eff (webgl :: WebGl | eff) Int +getCanvasHeight :: WebGLContext -> Effect Int getCanvasHeight context = getCanvasHeight_ context.canvasName -makeShader :: forall eff. ShaderType -> String -> Eff (webgl :: WebGl | eff) (Either WebGLShader String) +makeShader :: ShaderType -> String -> Effect (Either WebGLShader String) makeShader shaderType shaderSrc = do let shaderTypeConst = case shaderType of FragmentShader -> _FRAGMENT_SHADER @@ -451,7 +450,7 @@ makeShader shaderType shaderSrc = do str <- getShaderInfoLog_ shader pure (Right str) -initShaders :: forall eff. WebGLShader -> WebGLShader -> Eff (webgl :: WebGl | eff) (Maybe WebGLProgram) +initShaders :: WebGLShader -> WebGLShader -> Effect (Maybe WebGLProgram) initShaders fragmentShader vertexShader = do shaderProgram <- createProgram_ attachShader_ shaderProgram vertexShader @@ -599,22 +598,22 @@ blendEquationToConst FUNC_REVERSE_SUBTRACT = _FUNC_REVERSE_SUBTRACT -- * Some hand written foreign functions -foreign import shaderBindings_ :: forall eff bindings. WebGLProgram -> Eff eff bindings +foreign import shaderBindings_ :: forall bindings. WebGLProgram -> Effect bindings -foreign import initGL_ :: forall eff. String -> ContextAttributes -> Eff (eff) Boolean +foreign import initGL_ :: String -> ContextAttributes -> Effect Boolean -foreign import getCanvasWidth_ :: forall eff. String -> Eff (webgl :: WebGl | eff) Int +foreign import getCanvasWidth_ :: String -> Effect Int -foreign import getCanvasHeight_ :: forall eff. String -> Eff (webgl :: WebGl | eff) Int +foreign import getCanvasHeight_ :: String -> Effect Int -foreign import requestAnimationFrame_ :: forall a eff. Eff (webgl :: WebGl | eff) a -> Eff (webgl :: WebGl | eff) Unit +foreign import requestAnimationFrame_ :: forall a. Effect a -> Effect Unit -foreign import bufferData__ :: forall a eff. GLenum +foreign import bufferData__ :: forall a. GLenum -> T.ArrayView a -> GLenum - -> Eff (webgl :: WebGl | eff) Unit + -> Effect Unit -foreign import bufferSubData__ :: forall a eff. GLenum +foreign import bufferSubData__ :: forall a. GLenum -> GLintptr -> T.ArrayView a - -> Eff (webgl :: WebGl | eff) Unit + -> Effect Unit diff --git a/src/Graphics/WebGLAll.purs b/src/Graphics/WebGLAll.purs index fba6644..fafd537 100644 --- a/src/Graphics/WebGLAll.purs +++ b/src/Graphics/WebGLAll.purs @@ -22,4 +22,4 @@ module Graphics.WebGLAll ( import Graphics.WebGL as X1 import Graphics.WebGLFramebuffer as X2 import Graphics.WebGLTexture as X3 -import Control.Monad.Eff.WebGL as X4 +import Effect.WebGL as X4 diff --git a/src/Graphics/WebGLFramebuffer.purs b/src/Graphics/WebGLFramebuffer.purs index 8cd2070..5a81932 100644 --- a/src/Graphics/WebGLFramebuffer.purs +++ b/src/Graphics/WebGLFramebuffer.purs @@ -35,9 +35,8 @@ module Graphics.WebGLFramebuffer )where import Prelude -import Control.Monad.Eff (Eff) +import Effect (Effect) -import Control.Monad.Eff.WebGL (WebGl, EffWebGL) import Graphics.WebGLRaw (GLenum, GLsizei, GLint, WebGLRenderbuffer, WebGLFramebuffer, _UNSIGNED_BYTE, _RGBA, _FRAMEBUFFER, framebufferTexture2D_, _RENDERBUFFER, framebufferRenderbuffer_, renderbufferStorage_, bindRenderbuffer_, createRenderbuffer_, bindFramebuffer_, createFramebuffer_, checkFramebufferStatus_, _DEPTH_STENCIL_ATTACHMENT, _STENCIL_ATTACHMENT, _DEPTH_ATTACHMENT, _COLOR_ATTACHMENT0, _DEPTH_COMPONENT16, _RGB5_A1, _RGB565, _RGBA4) import Graphics.WebGLTexture (TargetType, WebGLTex(WebGLTex), targetTypeToConst) import Data.ArrayBuffer.Types (ArrayView, Uint8Array) @@ -88,63 +87,63 @@ _FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 _FRAMEBUFFER_UNSUPPORTED :: Int _FRAMEBUFFER_UNSUPPORTED = 36061 -checkFramebufferStatus :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) GLenum +checkFramebufferStatus :: GLenum -> Effect GLenum checkFramebufferStatus = checkFramebufferStatus_ -createFramebuffer :: forall eff. EffWebGL eff WebGLBuf +createFramebuffer :: Effect WebGLBuf createFramebuffer = do b <- createFramebuffer_ pure (WebGLBuf b) -bindFramebuffer :: forall eff. WebGLBuf -> EffWebGL eff Unit +bindFramebuffer :: WebGLBuf -> Effect Unit bindFramebuffer (WebGLBuf buf) = bindFramebuffer_ _FRAMEBUFFER buf -unbindFramebuffer :: forall eff. EffWebGL eff Unit +unbindFramebuffer :: Effect Unit unbindFramebuffer = unbindFramebuffer_ _FRAMEBUFFER -createRenderbuffer :: forall eff. EffWebGL eff WebGLRendBuf +createRenderbuffer :: Effect WebGLRendBuf createRenderbuffer = do b <- createRenderbuffer_ pure (WebGLRendBuf b) -bindRenderbuffer :: forall eff. WebGLRendBuf -> EffWebGL eff Unit +bindRenderbuffer :: WebGLRendBuf -> Effect Unit bindRenderbuffer (WebGLRendBuf buf) = bindRenderbuffer_ _RENDERBUFFER buf -unbindRenderbuffer :: forall eff. EffWebGL eff Unit +unbindRenderbuffer :: Effect Unit unbindRenderbuffer = unbindRenderbuffer_ _RENDERBUFFER -renderbufferStorage :: forall eff. RenderbufferFormat -> Int -> Int -> EffWebGL eff Unit +renderbufferStorage :: RenderbufferFormat -> Int -> Int -> Effect Unit renderbufferStorage renderbufferFormat width height = renderbufferStorage_ _RENDERBUFFER (renderbufferFormatToConst renderbufferFormat) width height -framebufferRenderbuffer :: forall eff. AttachementPoint -> WebGLRendBuf -> EffWebGL eff Unit +framebufferRenderbuffer :: AttachementPoint -> WebGLRendBuf -> Effect Unit framebufferRenderbuffer attachementPoint (WebGLRendBuf buf) = framebufferRenderbuffer_ _FRAMEBUFFER (attachementPointToConst attachementPoint) _RENDERBUFFER buf -framebufferTexture2D :: forall eff. AttachementPoint -> TargetType -> WebGLTex -> EffWebGL eff Unit +framebufferTexture2D :: AttachementPoint -> TargetType -> WebGLTex -> Effect Unit framebufferTexture2D attachementPoint targetType (WebGLTex texture) = framebufferTexture2D_ _FRAMEBUFFER (attachementPointToConst attachementPoint) (targetTypeToConst targetType) texture 0 -readPixels :: forall eff. GLint -> +readPixels :: GLint -> GLint -> GLsizei -> GLsizei -> - Uint8Array -> Eff (webgl :: WebGl | eff) Uint8Array + Uint8Array -> Effect Uint8Array readPixels x y width height uint8Array = let copiedArray = asUint8Array (asArray uint8Array) in do readPixels__ x y width height _RGBA _UNSIGNED_BYTE copiedArray pure copiedArray -foreign import unbindRenderbuffer_ :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) Unit +foreign import unbindRenderbuffer_ :: GLenum -> Effect Unit -foreign import unbindFramebuffer_ :: forall eff. GLenum -> Eff (webgl :: WebGl | eff) Unit +foreign import unbindFramebuffer_ :: GLenum -> Effect Unit -foreign import readPixels__ :: forall a eff. GLint +foreign import readPixels__ :: forall a. GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayView a - -> Eff (webgl :: WebGl | eff) Unit + -> Effect Unit diff --git a/src/Graphics/WebGLRaw.purs b/src/Graphics/WebGLRaw.purs index 3198600..57867c0 100644 --- a/src/Graphics/WebGLRaw.purs +++ b/src/Graphics/WebGLRaw.purs @@ -2,8 +2,7 @@ module Graphics.WebGLRaw where import Prelude -import Control.Monad.Eff (Eff) -import Control.Monad.Eff.WebGL (WebGl) +import Effect (Effect) import Data.ArrayBuffer.Types (Int32Array, Float32Array, kind ArrayViewType, ArrayView) @@ -941,104 +940,104 @@ _BROWSER_DEFAULT_WEBGL = 37444 -- *Methods -foreign import getContextAttributes_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) +foreign import getContextAttributes_:: (Effect WebGLContextAttributes) -foreign import isContextLost_:: forall eff. (Eff (webgl :: WebGl | eff) Boolean) +foreign import isContextLost_:: (Effect Boolean) -foreign import getSupportedExtensions_:: forall eff. (Eff (webgl :: WebGl | eff) String) +foreign import getSupportedExtensions_:: (Effect String) -foreign import getExtension_:: forall eff ret. String - -> (Eff (webgl :: WebGl | eff) ret) +foreign import getExtension_:: forall ret. String + -> (Effect ret) -foreign import activeTexture_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import activeTexture_:: GLenum + -> (Effect Unit) -foreign import attachShader_:: forall eff. WebGLProgram-> +foreign import attachShader_:: WebGLProgram-> WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bindAttribLocation_:: forall eff. WebGLProgram-> +foreign import bindAttribLocation_:: WebGLProgram-> GLuint-> String - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bindBuffer_:: forall a eff. GLenum-> +foreign import bindBuffer_:: forall a. GLenum-> WebGLBuffer a - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bindFramebuffer_:: forall eff. GLenum-> +foreign import bindFramebuffer_:: GLenum-> WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bindRenderbuffer_:: forall eff. GLenum-> +foreign import bindRenderbuffer_:: GLenum-> WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bindTexture_:: forall eff. GLenum-> +foreign import bindTexture_:: GLenum-> WebGLTexture - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import blendColor_:: forall eff. GLclampf-> +foreign import blendColor_:: GLclampf-> GLclampf-> GLclampf-> GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import blendEquation_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import blendEquation_:: GLenum + -> (Effect Unit) -foreign import blendEquationSeparate_:: forall eff. GLenum-> +foreign import blendEquationSeparate_:: GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import blendFunc_:: forall eff. GLenum-> +foreign import blendFunc_:: GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import blendFuncSeparate_:: forall eff. GLenum-> +foreign import blendFuncSeparate_:: GLenum-> GLenum-> GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bufferData_:: forall eff. GLenum-> +foreign import bufferData_:: GLenum-> Float32Array-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import bufferSubData_:: forall eff. GLenum-> +foreign import bufferSubData_:: GLenum-> GLintptr-> Float32Array - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import checkFramebufferStatus_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) GLenum) +foreign import checkFramebufferStatus_:: GLenum + -> (Effect GLenum) -foreign import clear_:: forall eff. GLbitfield - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import clear_:: GLbitfield + -> (Effect Unit) -foreign import clearColor_:: forall eff. GLclampf-> +foreign import clearColor_:: GLclampf-> GLclampf-> GLclampf-> GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import clearDepth_:: forall eff. GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import clearDepth_:: GLclampf + -> (Effect Unit) -foreign import clearStencil_:: forall eff. GLint - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import clearStencil_:: GLint + -> (Effect Unit) -foreign import colorMask_:: forall eff. GLboolean-> +foreign import colorMask_:: GLboolean-> GLboolean-> GLboolean-> GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import compileShader_:: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import compileShader_:: WebGLShader + -> (Effect Unit) -foreign import copyTexImage2D_:: forall eff. GLenum-> +foreign import copyTexImage2D_:: GLenum-> GLint-> GLenum-> GLint-> @@ -1046,9 +1045,9 @@ foreign import copyTexImage2D_:: forall eff. GLenum-> GLsizei-> GLsizei-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import copyTexSubImage2D_:: forall eff. GLenum-> +foreign import copyTexSubImage2D_:: GLenum-> GLint-> GLint-> GLint-> @@ -1056,270 +1055,270 @@ foreign import copyTexSubImage2D_:: forall eff. GLenum-> GLint-> GLsizei-> GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import createBuffer_:: forall a eff. Eff (webgl :: WebGl | eff) (WebGLBuffer a) +foreign import createBuffer_:: forall a. Effect (WebGLBuffer a) -foreign import createFramebuffer_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) +foreign import createFramebuffer_:: (Effect WebGLFramebuffer) -foreign import createProgram_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) +foreign import createProgram_:: (Effect WebGLProgram) -foreign import createRenderbuffer_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) +foreign import createRenderbuffer_:: (Effect WebGLRenderbuffer) -foreign import createShader_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) WebGLShader) +foreign import createShader_:: GLenum + -> (Effect WebGLShader) -foreign import createTexture_:: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) +foreign import createTexture_:: (Effect WebGLTexture) -foreign import cullFace_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import cullFace_:: GLenum + -> (Effect Unit) -foreign import deleteBuffer_:: forall a eff. WebGLBuffer a - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteBuffer_:: forall a. WebGLBuffer a + -> (Effect Unit) -foreign import deleteFramebuffer_:: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteFramebuffer_:: WebGLFramebuffer + -> (Effect Unit) -foreign import deleteProgram_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteProgram_:: WebGLProgram + -> (Effect Unit) -foreign import deleteRenderbuffer_:: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteRenderbuffer_:: WebGLRenderbuffer + -> (Effect Unit) -foreign import deleteShader_:: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteShader_:: WebGLShader + -> (Effect Unit) -foreign import deleteTexture_:: forall eff. WebGLTexture - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import deleteTexture_:: WebGLTexture + -> (Effect Unit) -foreign import depthFunc_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import depthFunc_:: GLenum + -> (Effect Unit) -foreign import depthMask_:: forall eff. GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import depthMask_:: GLboolean + -> (Effect Unit) -foreign import depthRange_:: forall eff. GLclampf-> +foreign import depthRange_:: GLclampf-> GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import detachShader_:: forall eff. WebGLProgram-> +foreign import detachShader_:: WebGLProgram-> WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import disable_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import disable_:: GLenum + -> (Effect Unit) -foreign import disableVertexAttribArray_:: forall eff. GLuint - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import disableVertexAttribArray_:: GLuint + -> (Effect Unit) -foreign import drawArrays_:: forall eff. GLenum-> +foreign import drawArrays_:: GLenum-> GLint-> GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import drawElements_:: forall eff. GLenum-> +foreign import drawElements_:: GLenum-> GLsizei-> GLenum-> GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import enable_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import enable_:: GLenum + -> (Effect Unit) -foreign import enableVertexAttribArray_:: forall eff. GLuint - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import enableVertexAttribArray_:: GLuint + -> (Effect Unit) -foreign import finish_:: forall eff. (Eff (webgl :: WebGl | eff) Unit) +foreign import finish_:: (Effect Unit) -foreign import flush_:: forall eff. (Eff (webgl :: WebGl | eff) Unit) +foreign import flush_:: (Effect Unit) -foreign import framebufferRenderbuffer_:: forall eff. GLenum-> +foreign import framebufferRenderbuffer_:: GLenum-> GLenum-> GLenum-> WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import framebufferTexture2D_:: forall eff. GLenum-> +foreign import framebufferTexture2D_:: GLenum-> GLenum-> GLenum-> WebGLTexture-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import frontFace_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import frontFace_:: GLenum + -> (Effect Unit) -foreign import generateMipmap_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import generateMipmap_:: GLenum + -> (Effect Unit) -foreign import getActiveAttrib_:: forall eff. WebGLProgram-> +foreign import getActiveAttrib_:: WebGLProgram-> GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + -> (Effect WebGLActiveInfo) -foreign import getActiveUniform_:: forall eff. WebGLProgram-> +foreign import getActiveUniform_:: WebGLProgram-> GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + -> (Effect WebGLActiveInfo) -foreign import getAttachedShaders_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) WebGLShader) +foreign import getAttachedShaders_:: WebGLProgram + -> (Effect WebGLShader) -foreign import getAttribLocation_:: forall eff. WebGLProgram-> +foreign import getAttribLocation_:: WebGLProgram-> String - -> (Eff (webgl :: WebGl | eff) GLint) + -> (Effect GLint) -foreign import getParameter_:: forall eff ret. GLenum - -> (Eff (webgl :: WebGl | eff) ret) +foreign import getParameter_:: forall ret. GLenum + -> (Effect ret) -foreign import getBufferParameter_:: forall eff ret. GLenum-> +foreign import getBufferParameter_:: forall ret. GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getError_:: forall eff. (Eff (webgl :: WebGl | eff) GLenum) +foreign import getError_:: (Effect GLenum) -foreign import getFramebufferAttachmentParameter_:: forall eff ret. GLenum-> +foreign import getFramebufferAttachmentParameter_:: forall ret. GLenum-> GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getProgramParameter_:: forall eff ret. WebGLProgram-> +foreign import getProgramParameter_:: forall ret. WebGLProgram-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getProgramInfoLog_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) String) +foreign import getProgramInfoLog_:: WebGLProgram + -> (Effect String) -foreign import getRenderbufferParameter_:: forall eff ret. GLenum-> +foreign import getRenderbufferParameter_:: forall ret. GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getShaderParameter_:: forall eff ret. WebGLShader-> +foreign import getShaderParameter_:: forall ret. WebGLShader-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getShaderInfoLog_:: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) String) +foreign import getShaderInfoLog_:: WebGLShader + -> (Effect String) -foreign import getShaderSource_:: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) String) +foreign import getShaderSource_:: WebGLShader + -> (Effect String) -foreign import getTexParameter_:: forall eff ret. GLenum-> +foreign import getTexParameter_:: forall ret. GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getUniform_:: forall eff ret. WebGLProgram-> +foreign import getUniform_:: forall ret. WebGLProgram-> WebGLUniformLocation - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getUniformLocation_:: forall eff. WebGLProgram-> +foreign import getUniformLocation_:: WebGLProgram-> String - -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) + -> (Effect WebGLUniformLocation) -foreign import getVertexAttrib_:: forall eff ret. GLuint-> +foreign import getVertexAttrib_:: forall ret. GLuint-> GLenum - -> (Eff (webgl :: WebGl | eff) ret) + -> (Effect ret) -foreign import getVertexAttribOffset_:: forall eff. GLuint-> +foreign import getVertexAttribOffset_:: GLuint-> GLenum - -> (Eff (webgl :: WebGl | eff) GLsizeiptr) + -> (Effect GLsizeiptr) -foreign import hint_:: forall eff. GLenum-> +foreign import hint_:: GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import isBuffer_:: forall a eff. WebGLBuffer a - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isBuffer_:: forall a. WebGLBuffer a + -> (Effect GLboolean) -foreign import isEnabled_:: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isEnabled_:: GLenum + -> (Effect GLboolean) -foreign import isFramebuffer_:: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isFramebuffer_:: WebGLFramebuffer + -> (Effect GLboolean) -foreign import isProgram_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isProgram_:: WebGLProgram + -> (Effect GLboolean) -foreign import isRenderbuffer_:: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isRenderbuffer_:: WebGLRenderbuffer + -> (Effect GLboolean) -foreign import isShader_:: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isShader_:: WebGLShader + -> (Effect GLboolean) -foreign import isTexture_:: forall eff. WebGLTexture - -> (Eff (webgl :: WebGl | eff) GLboolean) +foreign import isTexture_:: WebGLTexture + -> (Effect GLboolean) -foreign import lineWidth_:: forall eff. GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import lineWidth_:: GLfloat + -> (Effect Unit) -foreign import linkProgram_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import linkProgram_:: WebGLProgram + -> (Effect Unit) -foreign import pixelStorei_:: forall eff. GLenum-> +foreign import pixelStorei_:: GLenum-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import polygonOffset_:: forall eff. GLfloat-> +foreign import polygonOffset_:: GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import readPixels_:: forall eff. GLint-> +foreign import readPixels_:: GLint-> GLint-> GLsizei-> GLsizei-> GLenum-> GLenum-> ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import renderbufferStorage_:: forall eff. GLenum-> +foreign import renderbufferStorage_:: GLenum-> GLenum-> GLsizei-> GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import sampleCoverage_:: forall eff. GLclampf-> +foreign import sampleCoverage_:: GLclampf-> GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import scissor_:: forall eff. GLint-> +foreign import scissor_:: GLint-> GLint-> GLsizei-> GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import shaderSource_:: forall eff. WebGLShader-> +foreign import shaderSource_:: WebGLShader-> String - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import stencilFunc_:: forall eff. GLenum-> +foreign import stencilFunc_:: GLenum-> GLint-> GLuint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import stencilFuncSeparate_:: forall eff. GLenum-> +foreign import stencilFuncSeparate_:: GLenum-> GLenum-> GLint-> GLuint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import stencilMask_:: forall eff. GLuint - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import stencilMask_:: GLuint + -> (Effect Unit) -foreign import stencilMaskSeparate_:: forall eff. GLenum-> +foreign import stencilMaskSeparate_:: GLenum-> GLuint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import stencilOp_:: forall eff. GLenum-> +foreign import stencilOp_:: GLenum-> GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import stencilOpSeparate_:: forall eff. GLenum-> +foreign import stencilOpSeparate_:: GLenum-> GLenum-> GLenum-> GLenum - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import texImage2D_:: forall eff. GLenum-> +foreign import texImage2D_:: GLenum-> GLint-> GLenum-> GLsizei-> @@ -1328,19 +1327,19 @@ foreign import texImage2D_:: forall eff. GLenum-> GLenum-> GLenum-> ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import texParameterf_:: forall eff. GLenum-> +foreign import texParameterf_:: GLenum-> GLenum-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import texParameteri_:: forall eff. GLenum-> +foreign import texParameteri_:: GLenum-> GLenum-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import texSubImage2D_:: forall eff. GLenum-> +foreign import texSubImage2D_:: GLenum-> GLint-> GLint-> GLint-> @@ -1349,153 +1348,153 @@ foreign import texSubImage2D_:: forall eff. GLenum-> GLenum-> GLenum-> ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform1f_:: forall eff. WebGLUniformLocation-> +foreign import uniform1f_:: WebGLUniformLocation-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform1fv_:: forall eff. WebGLUniformLocation-> +foreign import uniform1fv_:: WebGLUniformLocation-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform1i_:: forall eff. WebGLUniformLocation-> +foreign import uniform1i_:: WebGLUniformLocation-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform1iv_:: forall eff. WebGLUniformLocation-> +foreign import uniform1iv_:: WebGLUniformLocation-> Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform2f_:: forall eff. WebGLUniformLocation-> +foreign import uniform2f_:: WebGLUniformLocation-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform2fv_:: forall eff. WebGLUniformLocation-> +foreign import uniform2fv_:: WebGLUniformLocation-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform2i_:: forall eff. WebGLUniformLocation-> +foreign import uniform2i_:: WebGLUniformLocation-> GLint-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform2iv_:: forall eff. WebGLUniformLocation-> +foreign import uniform2iv_:: WebGLUniformLocation-> Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform3f_:: forall eff. WebGLUniformLocation-> +foreign import uniform3f_:: WebGLUniformLocation-> GLfloat-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform3fv_:: forall eff. WebGLUniformLocation-> +foreign import uniform3fv_:: WebGLUniformLocation-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform3i_:: forall eff. WebGLUniformLocation-> +foreign import uniform3i_:: WebGLUniformLocation-> GLint-> GLint-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform3iv_:: forall eff. WebGLUniformLocation-> +foreign import uniform3iv_:: WebGLUniformLocation-> Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform4f_:: forall eff. WebGLUniformLocation-> +foreign import uniform4f_:: WebGLUniformLocation-> GLfloat-> GLfloat-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform4fv_:: forall eff. WebGLUniformLocation-> +foreign import uniform4fv_:: WebGLUniformLocation-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform4i_:: forall eff. WebGLUniformLocation-> +foreign import uniform4i_:: WebGLUniformLocation-> GLint-> GLint-> GLint-> GLint - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniform4iv_:: forall eff. WebGLUniformLocation-> +foreign import uniform4iv_:: WebGLUniformLocation-> Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniformMatrix2fv_:: forall eff. WebGLUniformLocation-> +foreign import uniformMatrix2fv_:: WebGLUniformLocation-> GLboolean-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniformMatrix3fv_:: forall eff. WebGLUniformLocation-> +foreign import uniformMatrix3fv_:: WebGLUniformLocation-> GLboolean-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import uniformMatrix4fv_:: forall eff. WebGLUniformLocation-> +foreign import uniformMatrix4fv_:: WebGLUniformLocation-> GLboolean-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import useProgram_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import useProgram_:: WebGLProgram + -> (Effect Unit) -foreign import validateProgram_:: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) +foreign import validateProgram_:: WebGLProgram + -> (Effect Unit) -foreign import vertexAttrib1f_:: forall eff. GLuint-> +foreign import vertexAttrib1f_:: GLuint-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib1fv_:: forall eff. GLuint-> +foreign import vertexAttrib1fv_:: GLuint-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib2f_:: forall eff. GLuint-> +foreign import vertexAttrib2f_:: GLuint-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib2fv_:: forall eff. GLuint-> +foreign import vertexAttrib2fv_:: GLuint-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib3f_:: forall eff. GLuint-> +foreign import vertexAttrib3f_:: GLuint-> GLfloat-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib3fv_:: forall eff. GLuint-> +foreign import vertexAttrib3fv_:: GLuint-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib4f_:: forall eff. GLuint-> +foreign import vertexAttrib4f_:: GLuint-> GLfloat-> GLfloat-> GLfloat-> GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttrib4fv_:: forall eff. GLuint-> +foreign import vertexAttrib4fv_:: GLuint-> FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import vertexAttribPointer_:: forall eff. GLuint-> +foreign import vertexAttribPointer_:: GLuint-> GLint-> GLenum-> GLboolean-> GLsizei-> GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) -foreign import viewport_:: forall eff. GLint-> +foreign import viewport_:: GLint-> GLint-> GLsizei-> GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) + -> (Effect Unit) diff --git a/src/Graphics/WebGLTexture.purs b/src/Graphics/WebGLTexture.purs index 299f767..a45aee3 100644 --- a/src/Graphics/WebGLTexture.purs +++ b/src/Graphics/WebGLTexture.purs @@ -39,11 +39,10 @@ module Graphics.WebGLTexture )where import Prelude -import Control.Monad.Eff (Eff) +import Effect (Effect) import Data.Int.Bits ((.&.),(.|.)) import Graphics.Canvas(CanvasImageSource()) -import Control.Monad.Eff.WebGL (WebGl, EffWebGL) import Graphics.WebGL (Uniform(Uniform)) import Graphics.WebGLRaw (texImage2D_, GLenum, GLint, GLsizei, WebGLUniformLocation, WebGLTexture, uniform1i_, createTexture_, _TEXTURE0, activeTexture_, _MAX_COMBINED_TEXTURE_IMAGE_UNITS, bindTexture_, pixelStorei_, texParameteri_, _TEXTURE_2D, generateMipmap_, @@ -52,7 +51,7 @@ import Graphics.WebGLRaw (texImage2D_, GLenum, GLint, GLsizei, WebGLUniformLocat _PACK_ALIGNMENT, _UNSIGNED_SHORT_5_5_5_1, _UNSIGNED_SHORT_4_4_4_4, _UNSIGNED_SHORT_5_6_5, _FLOAT, _RGBA, _UNSIGNED_BYTE, _RGB, _LUMINANCE_ALPHA, _LUMINANCE, _ALPHA, _TEXTURE_CUBE_MAP_NEGATIVE_Z, _TEXTURE_CUBE_MAP_POSITIVE_Z, _TEXTURE_CUBE_MAP_NEGATIVE_Y, _TEXTURE_CUBE_MAP_POSITIVE_Y, _TEXTURE_CUBE_MAP_NEGATIVE_X, _TEXTURE_CUBE_MAP_POSITIVE_X, ArrayBufferView) -import Extensions (fail) +import Partial.Unsafe (unsafeCrashWith) import Data.TypedArray (newUint8Array) import Data.ArrayBuffer.Types (ArrayView) @@ -156,14 +155,14 @@ texFilterSpecToMinConst NEAREST = _NEAREST texFilterSpecToMinConst LINEAR = _LINEAR texFilterSpecToMinConst MIPMAP = _LINEAR_MIPMAP_NEAREST -texture2DFor :: forall a eff. String -> TexFilterSpec -> (WebGLTex -> EffWebGL eff a) -> EffWebGL eff Unit +texture2DFor :: forall a. String -> TexFilterSpec -> (WebGLTex -> Effect a) -> Effect Unit texture2DFor name filterSpec continuation = do texture <- createTexture loadImage_ name \image -> do handleLoad2D texture filterSpec image continuation texture -handleLoad2D :: forall eff a. WebGLTex -> TexFilterSpec -> a -> EffWebGL eff Unit +handleLoad2D :: forall a. WebGLTex -> TexFilterSpec -> a -> Effect Unit handleLoad2D texture filterSpec whatever = do bindTexture TEXTURE_2D texture texParameteri TTEXTURE_2D TEXTURE_MAG_FILTER (texFilterSpecToMagConst filterSpec) @@ -176,7 +175,7 @@ handleLoad2D texture filterSpec whatever = do _ -> pure unit unbindTexture TEXTURE_2D -handleSubLoad2D :: forall eff a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> EffWebGL eff Unit +handleSubLoad2D :: forall a. WebGLTex -> Int -> Int -> Int -> Int -> TexFilterSpec -> a -> Effect Unit handleSubLoad2D texture x y w h filterSpec whatever = do bindTexture TEXTURE_2D texture texParameteri TTEXTURE_2D TEXTURE_MAG_FILTER (texFilterSpecToMagConst filterSpec) @@ -189,7 +188,7 @@ handleSubLoad2D texture x y w h filterSpec whatever = do _ -> pure unit unbindTexture TEXTURE_2D -newTexture :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +newTexture :: Int -> Int -> TexFilterSpec -> Effect WebGLTex newTexture width height filterSpec = do texture <- createTexture bindTexture TEXTURE_2D texture @@ -205,7 +204,7 @@ newTexture width height filterSpec = do unbindTexture TEXTURE_2D pure texture -newTextureInit :: forall eff. Int -> Int -> TexFilterSpec -> EffWebGL eff WebGLTex +newTextureInit :: Int -> Int -> TexFilterSpec -> Effect WebGLTex newTextureInit width height filterSpec = do texture <- createTexture let pixels = newUint8Array (width * height * 4) @@ -222,13 +221,13 @@ newTextureInit width height filterSpec = do unbindTexture TEXTURE_2D pure texture -texParameteri :: forall eff. TexTarget -> TexParName -> GLint -> EffWebGL eff Unit +texParameteri :: TexTarget -> TexParName -> GLint -> Effect Unit texParameteri target pname param = texParameteri_ (texTargetToConst target) (texParNameToConst pname) param -pixelStorei :: forall eff. SymbolicParameter -> Int -> EffWebGL eff Unit +pixelStorei :: SymbolicParameter -> Int -> Effect Unit pixelStorei symbolicParameter num = pixelStorei_ (symbolicParameterToConst symbolicParameter) num -withTexture2D :: forall eff typ. WebGLTex -> Int -> Uniform typ -> Int -> EffWebGL eff Unit -> EffWebGL eff Unit +withTexture2D :: forall typ. WebGLTex -> Int -> Uniform typ -> Int -> Effect Unit -> Effect Unit withTexture2D texture index (Uniform sampler) pos continuation = do activeTexture index bindTexture TEXTURE_2D texture @@ -236,71 +235,71 @@ withTexture2D texture index (Uniform sampler) pos continuation = do continuation unbindTexture TEXTURE_2D -bindTexture :: forall eff. TargetType -> WebGLTex -> EffWebGL eff Unit +bindTexture :: TargetType -> WebGLTex -> Effect Unit bindTexture tt (WebGLTex texture) = bindTexture_ (targetTypeToConst tt) texture -unbindTexture :: forall eff. TargetType -> EffWebGL eff Unit +unbindTexture :: TargetType -> Effect Unit unbindTexture tt = bindTexture__ (targetTypeToConst tt) -texImage2D :: forall eff a. TargetType -> GLint -> InternalFormat -> InternalFormat -> TextureType -> a - -> EffWebGL eff Unit +texImage2D :: forall a. TargetType -> GLint -> InternalFormat -> InternalFormat -> TextureType -> a + -> Effect Unit texImage2D target level internalFormat format typ pixels = texImage2D__ (targetTypeToConst target) level (internalFormatToConst internalFormat) (internalFormatToConst format) (textureTypeToConst typ) pixels -texImage2DNull :: forall eff. TargetType -> GLint -> InternalFormat -> GLsizei -> GLsizei -> InternalFormat -> TextureType - -> EffWebGL eff Unit +texImage2DNull :: TargetType -> GLint -> InternalFormat -> GLsizei -> GLsizei -> InternalFormat -> TextureType + -> Effect Unit texImage2DNull target level internalFormat width height format typ = texImage2DNull_ (targetTypeToConst target) level (internalFormatToConst internalFormat) width height 0 (internalFormatToConst format) (textureTypeToConst typ) -texImage2DPixels :: forall eff. TargetType -> GLint -> InternalFormat -> GLsizei -> GLsizei -> InternalFormat -> TextureType -> ArrayBufferView - -> EffWebGL eff Unit +texImage2DPixels :: TargetType -> GLint -> InternalFormat -> GLsizei -> GLsizei -> InternalFormat -> TextureType -> ArrayBufferView + -> Effect Unit texImage2DPixels target level internalFormat width height format typ pixels = texImage2D_ (targetTypeToConst target) level (internalFormatToConst internalFormat) width height 0 (internalFormatToConst format) (textureTypeToConst typ) pixels -texSubImage2D :: forall eff a. TargetType -> GLint -> GLint -> GLint -> InternalFormat -> TextureType -> a - -> EffWebGL eff Unit +texSubImage2D :: forall a. TargetType -> GLint -> GLint -> GLint -> InternalFormat -> TextureType -> a + -> Effect Unit texSubImage2D target level x y format typ pixels = texSubImage2D__ (targetTypeToConst target) level x y (internalFormatToConst format) (textureTypeToConst typ) pixels -activeTexture :: forall eff. Int -> Eff (webgl :: WebGl | eff) Unit +activeTexture :: Int -> Effect Unit activeTexture n | n < _MAX_COMBINED_TEXTURE_IMAGE_UNITS = activeTexture_ (_TEXTURE0 + n) - | otherwise = fail "WebGLTexture>>activeTexture: wrong argument!" + | otherwise = unsafeCrashWith "WebGLTexture>>activeTexture: wrong argument!" -createTexture :: forall eff. Eff (webgl :: WebGl | eff) WebGLTex +createTexture :: Effect WebGLTex createTexture = do texture <- createTexture_ pure (WebGLTex texture) -uniform1i :: forall eff. WebGLUniformLocation -> GLint -> Eff (webgl :: WebGl | eff) Unit +uniform1i :: WebGLUniformLocation -> GLint -> Effect Unit uniform1i = uniform1i_ foreign import asArrayBufferView_ :: forall a . ArrayView a -> ArrayBufferView -foreign import loadImage_ :: forall a eff. String - -> (CanvasImageSource -> EffWebGL eff a) - -> EffWebGL eff Unit +foreign import loadImage_ :: forall a. String + -> (CanvasImageSource -> Effect a) + -> Effect Unit -foreign import texImage2D__ :: forall a eff. GLenum +foreign import texImage2D__ :: forall a. GLenum -> GLint -> GLenum -> GLenum -> GLenum -> a - -> EffWebGL eff Unit + -> Effect Unit -foreign import texSubImage2D__:: forall eff a. GLenum +foreign import texSubImage2D__:: forall a. GLenum -> GLint -> GLint -> GLint -> GLenum -> GLenum -> a - -> Eff (webgl :: WebGl | eff) Unit + -> Effect Unit -foreign import texImage2DNull_ :: forall eff. GLenum +foreign import texImage2DNull_ :: GLenum -> GLint -> GLenum -> GLsizei @@ -308,8 +307,8 @@ foreign import texImage2DNull_ :: forall eff. GLenum -> GLint -> GLenum -> GLenum - -> Eff (webgl :: WebGl | eff) Unit + -> Effect Unit -foreign import bindTexture__ :: forall eff. GLenum - -> Eff (webgl :: WebGl | eff) Unit +foreign import bindTexture__ :: GLenum + -> Effect Unit