From ad2299ed7c62b90aa9067fe234059d6a04f28926 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 20 May 2015 16:15:58 -0500 Subject: [PATCH 01/51] cleanup .cabal and Main.hs files --- purescript-webgl-generator.cabal | 21 +++++++------ src/Main.hs | 54 ++++++++++++-------------------- 2 files changed, 31 insertions(+), 44 deletions(-) diff --git a/purescript-webgl-generator.cabal b/purescript-webgl-generator.cabal index 05ca294..a6c608e 100644 --- a/purescript-webgl-generator.cabal +++ b/purescript-webgl-generator.cabal @@ -8,14 +8,15 @@ maintainer: jnf@arcor.de category: Development author: Jürgen (Jutaro) Nicklisch-Franken data-dir: "" - + executable purescript-webgl-generator - build-depends: transformers >=0.4.2.0 && <0.5, - parsec >=3.1.7 && <3.2, base >=4.7 && <4.8, pretty >=1.1.1 - main-is: Main.hs - buildable: True - default-language: Haskell2010 - hs-source-dirs: src - other-modules: IDL.AST IDL.Parser IDL.Printer - - \ No newline at end of file + main-is: Main.hs + buildable: True + default-language: Haskell2010 + hs-source-dirs: src + other-modules: IDL.AST IDL.Parser IDL.Printer + + build-depends: base == 4.*, + parsec == 3.1.*, + pretty == 1.1.*, + transformers == 0.4.* diff --git a/src/Main.hs b/src/Main.hs index 39051a8..2fb05ed 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,43 +1,29 @@ ------------------------------------------------------------------------------ --- --- Module : Main --- Copyright : --- License : GPL-2 --- --- Maintainer : jnf@arcor.de --- Stability : --- Portability : --- --- | --- ------------------------------------------------------------------------------ - -module Main where - - -import IDL.AST -import IDL.Parser -import IDL.Printer +module Main (main) where import System.Console.GetOpt (usageInfo) import System.Environment (getArgs) import System.Exit (exitSuccess) -import qualified Text.Parsec as PP (runParser) -import qualified Text.Parsec.Error as PP - (errorMessages, messageString) import Debug.Trace (trace) import Text.PrettyPrint (render) +import qualified Text.Parsec as PP (runParser) +import qualified Text.Parsec.Error as PP + +import IDL.AST +import IDL.Parser +import IDL.Printer + main :: IO () -main = do - args <- getArgs - fp <- case args of - [] -> do - putStrLn $ "Generator requires input idl file" - exitSuccess - (hd:_) -> return (hd) - string <- readFile fp - case PP.runParser idlParser () "" string of - Left error -> mapM_ (putStrLn . PP.messageString) (PP.errorMessages error) - Right idl -> putStr (render (ppPureScriptFFI idl)) +main = getArgs >>= getFilepath >>= readFile >>= runParser + +getFilepath :: [String] -> IO String +getFilepath (fp:_) = return fp +getFilepath _ = do + putStrLn $ "Generator requires input IDL file" + exitSuccess +runParser :: String -> IO () +runParser body = + case PP.runParser idlParser () "" body of + Left err -> mapM_ (putStrLn . PP.messageString) (PP.errorMessages err) + Right idl -> putStr . render $ ppPureScriptFFI idl From 052d2b69ddea28590147e1d347db1b30afa7710b Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 20 May 2015 16:32:19 -0500 Subject: [PATCH 02/51] Git should ignore cabal sandboxes --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b7a34b6..011c4f3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ dist/ *~ *.tix *.project +.cabal-sandbox +cabal.sandbox.config From efe23f8e91ba5d991ff65f55ea121a7d43ed2990 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 20 May 2015 16:33:02 -0500 Subject: [PATCH 03/51] clean up AST --- src/IDL/AST.hs | 75 +++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 44 deletions(-) diff --git a/src/IDL/AST.hs b/src/IDL/AST.hs index aa79e04..ea05bf8 100644 --- a/src/IDL/AST.hs +++ b/src/IDL/AST.hs @@ -1,60 +1,47 @@ ------------------------------------------------------------------------------ --- --- Module : IDL.AST --- Copyright : --- License : GPL-2 --- --- Maintainer : jnf@arcor.de --- Stability : --- Portability : --- --- | --- ------------------------------------------------------------------------------ - module IDL.AST where type Idl = [Decl] isEnum :: Decl -> Bool -isEnum Enum{} = True -isEnum _ = False +isEnum Enum{} = True +isEnum _ = False isFunction :: Decl -> Bool -isFunction Function{} = True -isFunction _ = False +isFunction Function{} = True +isFunction _ = False -data Decl = - Enum - { enumName :: String - , enumValue :: Integer - } - | - Comment - { comment :: String +data Decl + = Enum + { enumName :: String + , enumValue :: Integer + } + | Comment + { comment :: String } | Function - { methodName :: String - , methodRetType :: Type - , methodArgs :: [Arg] - , methodRaises :: Maybe String - } + { methodName :: String + , methodRetType :: Type + , methodArgs :: [Arg] + , methodRaises :: Maybe String + } | Attribute - { attIsReadonly :: Bool - , attType :: Type - , attName :: String - } + { attIsReadonly :: Bool + , attType :: Type + , attName :: String + } deriving (Eq,Show) -data Type = - Type { typeName :: String - , typeIsArray :: Bool - , typeCondPara :: Maybe String} +data Type + = Type + { typeName :: String + , typeIsArray :: Bool + , typeCondPara :: Maybe String + } deriving (Eq,Show) -data Arg = - Arg {argType :: Type, - argName :: String} +data Arg + = Arg + { argType :: Type + , argName :: String + } deriving (Eq,Show) - - From 4d164c3e20a468213546cd3b5e317383709fe3f3 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Thu, 21 May 2015 09:51:52 -0500 Subject: [PATCH 04/51] cleanup IDL parser (needs testing) --- src/IDL/Parser.hs | 200 ++++++++++++++++++++++++---------------------- 1 file changed, 103 insertions(+), 97 deletions(-) diff --git a/src/IDL/Parser.hs b/src/IDL/Parser.hs index a6136c1..1f59c46 100644 --- a/src/IDL/Parser.hs +++ b/src/IDL/Parser.hs @@ -1,119 +1,125 @@ ------------------------------------------------------------------------------ --- --- Module : IDL.Parser --- Copyright : --- License : GPL-2 --- --- Maintainer : jnf@arcor.de --- Stability : --- Portability : --- --- | --- ------------------------------------------------------------------------------ - -module IDL.Parser ( - idlParser -) where - -import IDL.AST - -import qualified Text.Parsec.Token as PP -import qualified Text.Parsec as PP -import qualified Text.Parsec.Error as PP +module IDL.Parser (idlParser) where + +import Control.Monad (liftM) import Data.Functor.Identity (Identity(..)) + +import qualified Text.Parsec.Token as PP +import qualified Text.Parsec as PP +import qualified Text.Parsec.Error as PP import qualified Text.ParserCombinators.Parsec.Language as PP -import qualified Text.ParserCombinators.Parsec as PP (Parser) -import Control.Monad (liftM) -trace _ b = b +import qualified Text.ParserCombinators.Parsec as PP (Parser) + +import IDL.AST type Parse a = PP.Parsec String () a +trace _ b = b + +symbol' = PP.symbol lexer +whiteSpace' = PP.whiteSpace lexer +identifier' = PP.identifier lexer +integer' = PP.integer lexer +semi' = PP.semi lexer +parens' = PP.parens lexer +brackets' = PP.brackets lexer +angles' = PP.angles lexer + idlParser :: Parse Idl -idlParser = PP.manyTill - (do whiteSpace' - d <- declParser - trace ("decl: " ++ show d) $ return d) - PP.eof - PP. "expecting idl" +idlParser = + PP.manyTill decls PP.eof PP. "expecting idl" + where + decls = do + whiteSpace' + d <- declParser + trace ("decl: " ++ show d) (return d) lexer :: PP.GenTokenParser String u Identity lexer = PP.makeTokenParser PP.emptyDef -symbol' = PP.symbol lexer -whiteSpace' = PP.whiteSpace lexer -identifier' = PP.identifier lexer -integer' = PP.integer lexer -semi' = PP.semi lexer -parens' = PP.parens lexer -brackets' = PP.brackets lexer -angles' = PP.angles lexer +-- parsers declParser :: Parse Decl -declParser = PP.try (do - symbol' "const" - symbol' "GLenum" - name <- identifier' - symbol' "=" - value <- integer' - semi' - return Enum { - enumName = name, - enumValue = value}) - PP.<|> PP.try (do - symbol' "/*" - comment <- PP.manyTill PP.anyChar (symbol' "*/") - return (Comment {comment = comment})) - PP.<|> PP.try (do - returnType <- parseType - methodName <- identifier' - args <- parens' (PP.sepBy parseArg (symbol' ",")) - condRaises <- PP.option Nothing parseRaises - semi' - return (Function - { methodName = methodName, - methodRetType = returnType, - methodArgs = args, - methodRaises = condRaises})) - PP.<|> PP.try (do - isReadonly <- PP.option False (do - symbol' "readonly" - return True) - symbol' "attribute" - typ <- parseType - name <- identifier' - semi' - return (Attribute - { attIsReadonly = isReadonly, - attType = typ, - attName = name})) - PP. "expecting decl" +declParser = decl PP. "expecting decl" + where + decl = PP.try parseConst PP.<|> + PP.try parseComment PP.<|> + PP.try parseMethod PP.<|> + PP.try parseAttr + +parseConst :: Parse Decl +parseConst = do + symbol' "const" + symbol' "GLenum" + name <- identifier' + symbol' "=" + value <- integer' + semi' + return Enum + { enumName = name + , enumValue = value + } + +parseComment :: Parse Decl +parseComment = do + symbol' "/*" + comment <- PP.manyTill PP.anyChar $ symbol' "*/" + return Comment + { comment = comment + } + +parseMethod :: Parse Decl +parseMethod = do + returnType <- parseType + methodName <- identifier' + args <- parens' . PP.sepBy parseArg $ symbol' "," + condRaises <- PP.option Nothing parseRaises + semi' + return Function + { methodName = methodName + , methodRetType = returnType + , methodArgs = args + , methodRaises = condRaises + } + +parseAttr :: Parse Decl +parseAttr = do + isReadonly <- PP.option False $ symbol' "readonly" >> return True + symbol' "attribute" + typ <- parseType + name <- identifier' + semi' + return Attribute + { attIsReadonly = isReadonly + , attType = typ + , attName = name + } parseType :: Parse Type -parseType = do - id <- identifier' - isArray <- PP.option False (do - brackets' whiteSpace' - return True) - condPara <- if id == "sequence" - then (do - id <- angles' identifier' - return (Just id)) - else return Nothing - return (Type {typeName = id, - typeIsArray = isArray, - typeCondPara = condPara}) - PP. "expecting type" +parseType = typ PP. "expecting type" + where + typ = do + ident <- identifier' + isArray <- PP.option False $ brackets' whiteSpace' >> return True + condPara <- + if ident == "sequence" + then angles' identifier' >>= return . Just + else return Nothing + return Type + { typeName = ident + , typeIsArray = isArray + , typeCondPara = condPara + } parseArg :: Parse Arg parseArg = do typ <- parseType - id <- identifier' - return (Arg {argType = typ, - argName = id}) + name <- identifier' + return Arg + { argType = typ + , argName = name + } parseRaises :: Parse (Maybe String) parseRaises = do symbol' "raises" - liftM Just (parens' identifier') - + liftM Just $ parens' identifier' From cde544935872b36da19b33393609ed64ad66b550 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 22 May 2015 10:24:02 -0600 Subject: [PATCH 05/51] fix redundancy and src file --- WebGL.idl | 739 ------------------------------------ src/Main.hs | 1 - WebGL_enum.idl => webgl.idl | 3 +- 3 files changed, 2 insertions(+), 741 deletions(-) delete mode 100644 WebGL.idl rename WebGL_enum.idl => webgl.idl (99%) diff --git a/WebGL.idl b/WebGL.idl deleted file mode 100644 index ed12364..0000000 --- a/WebGL.idl +++ /dev/null @@ -1,739 +0,0 @@ -/* - * webgl.idl - * - * WebGL IDL definitions scraped from the Khronos specification. - * - * Original Khronos Working Draft: - * - * https://www.khronos.org/registry/webgl/specs/latest/ - */ - -// This module depends on the typedarrays module defined at: -// https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl - -module webgl { - -typedef events::Event Event; -typedef html::HTMLCanvasElement HTMLCanvasElement; -typedef html::HTMLImageElement HTMLImageElement; -typedef html::HTMLVideoElement HTMLVideoElement; -typedef html::ImageData ImageData; -typedef typedarrays::ArrayBuffer ArrayBuffer; -typedef typedarrays::ArrayBufferView ArrayBufferView; -typedef typedarrays::FloatArray FloatArray; -typedef typedarrays::Int32Array Int32Array; - -typedef unsigned long GLenum; -typedef boolean GLboolean; -typedef unsigned long GLbitfield; -typedef byte GLbyte; /* 'byte' should be a signed 8 bit type. */ -typedef short GLshort; -typedef long GLint; -typedef long GLsizei; -typedef long long GLintptr; -typedef long long GLsizeiptr; -typedef unsigned byte GLubyte; /* 'unsigned byte' should be an unsigned 8 bit type. */ -typedef unsigned short GLushort; -typedef unsigned long GLuint; -typedef float GLfloat; -typedef float GLclampf; - -interface WebGLContextAttributes { - attribute boolean alpha; - attribute boolean depth; - attribute boolean stencil; - attribute boolean antialias; - attribute boolean premultipliedAlpha; -}; - -interface WebGLObject { -}; - -interface WebGLBuffer : WebGLObject { -}; - -interface WebGLFramebuffer : WebGLObject { -}; - -interface WebGLProgram : WebGLObject { -}; - -interface WebGLRenderbuffer : WebGLObject { -}; - -interface WebGLShader : WebGLObject { -}; - -interface WebGLTexture : WebGLObject { -}; - -interface WebGLUniformLocation { -}; - -interface WebGLActiveInfo { - readonly attribute GLint size; - readonly attribute GLenum type; - readonly attribute DOMString name; -}; - -interface WebGLRenderingContext { - - /* ClearBufferMask */ - const GLenum DEPTH_BUFFER_BIT = 0x00000100; - const GLenum STENCIL_BUFFER_BIT = 0x00000400; - const GLenum COLOR_BUFFER_BIT = 0x00004000; - - /* BeginMode */ - const GLenum POINTS = 0x0000; - const GLenum LINES = 0x0001; - const GLenum LINE_LOOP = 0x0002; - const GLenum LINE_STRIP = 0x0003; - const GLenum TRIANGLES = 0x0004; - const GLenum TRIANGLE_STRIP = 0x0005; - const GLenum TRIANGLE_FAN = 0x0006; - - /* AlphaFunction (not supported in ES20) */ - /* NEVER */ - /* LESS */ - /* EQUAL */ - /* LEQUAL */ - /* GREATER */ - /* NOTEQUAL */ - /* GEQUAL */ - /* ALWAYS */ - - /* BlendingFactorDest */ - const GLenum ZERO = 0; - const GLenum ONE = 1; - const GLenum SRC_COLOR = 0x0300; - const GLenum ONE_MINUS_SRC_COLOR = 0x0301; - const GLenum SRC_ALPHA = 0x0302; - const GLenum ONE_MINUS_SRC_ALPHA = 0x0303; - const GLenum DST_ALPHA = 0x0304; - const GLenum ONE_MINUS_DST_ALPHA = 0x0305; - - /* BlendingFactorSrc */ - /* ZERO */ - /* ONE */ - const GLenum DST_COLOR = 0x0306; - const GLenum ONE_MINUS_DST_COLOR = 0x0307; - const GLenum SRC_ALPHA_SATURATE = 0x0308; - /* SRC_ALPHA */ - /* ONE_MINUS_SRC_ALPHA */ - /* DST_ALPHA */ - /* ONE_MINUS_DST_ALPHA */ - - /* BlendEquationSeparate */ - const GLenum FUNC_ADD = 0x8006; - const GLenum BLEND_EQUATION = 0x8009; - const GLenum BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */ - const GLenum BLEND_EQUATION_ALPHA = 0x883D; - - /* BlendSubtract */ - const GLenum FUNC_SUBTRACT = 0x800A; - const GLenum FUNC_REVERSE_SUBTRACT = 0x800B; - - /* Separate Blend Functions */ - const GLenum BLEND_DST_RGB = 0x80C8; - const GLenum BLEND_SRC_RGB = 0x80C9; - const GLenum BLEND_DST_ALPHA = 0x80CA; - const GLenum BLEND_SRC_ALPHA = 0x80CB; - const GLenum CONSTANT_COLOR = 0x8001; - const GLenum ONE_MINUS_CONSTANT_COLOR = 0x8002; - const GLenum CONSTANT_ALPHA = 0x8003; - const GLenum ONE_MINUS_CONSTANT_ALPHA = 0x8004; - const GLenum BLEND_COLOR = 0x8005; - - /* Buffer Objects */ - const GLenum ARRAY_BUFFER = 0x8892; - const GLenum ELEMENT_ARRAY_BUFFER = 0x8893; - const GLenum ARRAY_BUFFER_BINDING = 0x8894; - const GLenum ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; - - const GLenum STREAM_DRAW = 0x88E0; - const GLenum STATIC_DRAW = 0x88E4; - const GLenum DYNAMIC_DRAW = 0x88E8; - - const GLenum BUFFER_SIZE = 0x8764; - const GLenum BUFFER_USAGE = 0x8765; - - const GLenum CURRENT_VERTEX_ATTRIB = 0x8626; - - /* CullFaceMode */ - const GLenum FRONT = 0x0404; - const GLenum BACK = 0x0405; - const GLenum FRONT_AND_BACK = 0x0408; - - /* DepthFunction */ - /* NEVER */ - /* LESS */ - /* EQUAL */ - /* LEQUAL */ - /* GREATER */ - /* NOTEQUAL */ - /* GEQUAL */ - /* ALWAYS */ - - /* EnableCap */ - const GLenum TEXTURE_2D = 0x0DE1; - const GLenum CULL_FACE = 0x0B44; - const GLenum BLEND = 0x0BE2; - const GLenum DITHER = 0x0BD0; - const GLenum STENCIL_TEST = 0x0B90; - const GLenum DEPTH_TEST = 0x0B71; - const GLenum SCISSOR_TEST = 0x0C11; - const GLenum POLYGON_OFFSET_FILL = 0x8037; - const GLenum SAMPLE_ALPHA_TO_COVERAGE = 0x809E; - const GLenum SAMPLE_COVERAGE = 0x80A0; - - /* ErrorCode */ - const GLenum NO_ERROR = 0; - const GLenum INVALID_ENUM = 0x0500; - const GLenum INVALID_VALUE = 0x0501; - const GLenum INVALID_OPERATION = 0x0502; - const GLenum OUT_OF_MEMORY = 0x0505; - - /* FrontFaceDirection */ - const GLenum CW = 0x0900; - const GLenum CCW = 0x0901; - - /* GetPName */ - const GLenum LINE_WIDTH = 0x0B21; - const GLenum ALIASED_POINT_SIZE_RANGE = 0x846D; - const GLenum ALIASED_LINE_WIDTH_RANGE = 0x846E; - const GLenum CULL_FACE_MODE = 0x0B45; - const GLenum FRONT_FACE = 0x0B46; - const GLenum DEPTH_RANGE = 0x0B70; - const GLenum DEPTH_WRITEMASK = 0x0B72; - const GLenum DEPTH_CLEAR_VALUE = 0x0B73; - const GLenum DEPTH_FUNC = 0x0B74; - const GLenum STENCIL_CLEAR_VALUE = 0x0B91; - const GLenum STENCIL_FUNC = 0x0B92; - const GLenum STENCIL_FAIL = 0x0B94; - const GLenum STENCIL_PASS_DEPTH_FAIL = 0x0B95; - const GLenum STENCIL_PASS_DEPTH_PASS = 0x0B96; - const GLenum STENCIL_REF = 0x0B97; - const GLenum STENCIL_VALUE_MASK = 0x0B93; - const GLenum STENCIL_WRITEMASK = 0x0B98; - const GLenum STENCIL_BACK_FUNC = 0x8800; - const GLenum STENCIL_BACK_FAIL = 0x8801; - const GLenum STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; - const GLenum STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; - const GLenum STENCIL_BACK_REF = 0x8CA3; - const GLenum STENCIL_BACK_VALUE_MASK = 0x8CA4; - const GLenum STENCIL_BACK_WRITEMASK = 0x8CA5; - const GLenum VIEWPORT = 0x0BA2; - const GLenum SCISSOR_BOX = 0x0C10; - /* SCISSOR_TEST */ - const GLenum COLOR_CLEAR_VALUE = 0x0C22; - const GLenum COLOR_WRITEMASK = 0x0C23; - const GLenum UNPACK_ALIGNMENT = 0x0CF5; - const GLenum PACK_ALIGNMENT = 0x0D05; - const GLenum MAX_TEXTURE_SIZE = 0x0D33; - const GLenum MAX_VIEWPORT_DIMS = 0x0D3A; - const GLenum SUBPIXEL_BITS = 0x0D50; - const GLenum RED_BITS = 0x0D52; - const GLenum GREEN_BITS = 0x0D53; - const GLenum BLUE_BITS = 0x0D54; - const GLenum ALPHA_BITS = 0x0D55; - const GLenum DEPTH_BITS = 0x0D56; - const GLenum STENCIL_BITS = 0x0D57; - const GLenum POLYGON_OFFSET_UNITS = 0x2A00; - /* POLYGON_OFFSET_FILL */ - const GLenum POLYGON_OFFSET_FACTOR = 0x8038; - const GLenum TEXTURE_BINDING_2D = 0x8069; - const GLenum SAMPLE_BUFFERS = 0x80A8; - const GLenum SAMPLES = 0x80A9; - const GLenum SAMPLE_COVERAGE_VALUE = 0x80AA; - const GLenum SAMPLE_COVERAGE_INVERT = 0x80AB; - - /* GetTextureParameter */ - /* TEXTURE_MAG_FILTER */ - /* TEXTURE_MIN_FILTER */ - /* TEXTURE_WRAP_S */ - /* TEXTURE_WRAP_T */ - - const GLenum NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; - const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; - - /* HintMode */ - const GLenum DONT_CARE = 0x1100; - const GLenum FASTEST = 0x1101; - const GLenum NICEST = 0x1102; - - /* HintTarget */ - const GLenum GENERATE_MIPMAP_HINT = 0x8192; - - /* DataType */ - const GLenum BYTE = 0x1400; - const GLenum UNSIGNED_BYTE = 0x1401; - const GLenum SHORT = 0x1402; - const GLenum UNSIGNED_SHORT = 0x1403; - const GLenum INT = 0x1404; - const GLenum UNSIGNED_INT = 0x1405; - const GLenum FLOAT = 0x1406; - - /* PixelFormat */ - const GLenum DEPTH_COMPONENT = 0x1902; - const GLenum ALPHA = 0x1906; - const GLenum RGB = 0x1907; - const GLenum RGBA = 0x1908; - const GLenum LUMINANCE = 0x1909; - const GLenum LUMINANCE_ALPHA = 0x190A; - - /* PixelType */ - /* UNSIGNED_BYTE */ - const GLenum UNSIGNED_SHORT_4_4_4_4 = 0x8033; - const GLenum UNSIGNED_SHORT_5_5_5_1 = 0x8034; - const GLenum UNSIGNED_SHORT_5_6_5 = 0x8363; - - /* Shaders */ - const GLenum FRAGMENT_SHADER = 0x8B30; - const GLenum VERTEX_SHADER = 0x8B31; - const GLenum MAX_VERTEX_ATTRIBS = 0x8869; - const GLenum MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB; - const GLenum MAX_VARYING_VECTORS = 0x8DFC; - const GLenum MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; - const GLenum MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; - const GLenum MAX_TEXTURE_IMAGE_UNITS = 0x8872; - const GLenum MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD; - const GLenum SHADER_TYPE = 0x8B4F; - const GLenum DELETE_STATUS = 0x8B80; - const GLenum LINK_STATUS = 0x8B82; - const GLenum VALIDATE_STATUS = 0x8B83; - const GLenum ATTACHED_SHADERS = 0x8B85; - const GLenum ACTIVE_UNIFORMS = 0x8B86; - const GLenum ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87; - const GLenum ACTIVE_ATTRIBUTES = 0x8B89; - const GLenum ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A; - const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C; - const GLenum CURRENT_PROGRAM = 0x8B8D; - - /* StencilFunction */ - const GLenum NEVER = 0x0200; - const GLenum LESS = 0x0201; - const GLenum EQUAL = 0x0202; - const GLenum LEQUAL = 0x0203; - const GLenum GREATER = 0x0204; - const GLenum NOTEQUAL = 0x0205; - const GLenum GEQUAL = 0x0206; - const GLenum ALWAYS = 0x0207; - - /* StencilOp */ - /* ZERO */ - const GLenum KEEP = 0x1E00; - const GLenum REPLACE = 0x1E01; - const GLenum INCR = 0x1E02; - const GLenum DECR = 0x1E03; - const GLenum INVERT = 0x150A; - const GLenum INCR_WRAP = 0x8507; - const GLenum DECR_WRAP = 0x8508; - - /* StringName */ - const GLenum VENDOR = 0x1F00; - const GLenum RENDERER = 0x1F01; - const GLenum VERSION = 0x1F02; - - /* TextureMagFilter */ - const GLenum NEAREST = 0x2600; - const GLenum LINEAR = 0x2601; - - /* TextureMinFilter */ - /* NEAREST */ - /* LINEAR */ - const GLenum NEAREST_MIPMAP_NEAREST = 0x2700; - const GLenum LINEAR_MIPMAP_NEAREST = 0x2701; - const GLenum NEAREST_MIPMAP_LINEAR = 0x2702; - const GLenum LINEAR_MIPMAP_LINEAR = 0x2703; - - /* TextureParameterName */ - const GLenum TEXTURE_MAG_FILTER = 0x2800; - const GLenum TEXTURE_MIN_FILTER = 0x2801; - const GLenum TEXTURE_WRAP_S = 0x2802; - const GLenum TEXTURE_WRAP_T = 0x2803; - - /* TextureTarget */ - /* TEXTURE_2D */ - const GLenum TEXTURE = 0x1702; - - const GLenum TEXTURE_CUBE_MAP = 0x8513; - const GLenum TEXTURE_BINDING_CUBE_MAP = 0x8514; - const GLenum TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; - const GLenum TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; - const GLenum TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; - const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; - const GLenum TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; - const GLenum TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; - const GLenum MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; - - /* TextureUnit */ - const GLenum TEXTURE0 = 0x84C0; - const GLenum TEXTURE1 = 0x84C1; - const GLenum TEXTURE2 = 0x84C2; - const GLenum TEXTURE3 = 0x84C3; - const GLenum TEXTURE4 = 0x84C4; - const GLenum TEXTURE5 = 0x84C5; - const GLenum TEXTURE6 = 0x84C6; - const GLenum TEXTURE7 = 0x84C7; - const GLenum TEXTURE8 = 0x84C8; - const GLenum TEXTURE9 = 0x84C9; - const GLenum TEXTURE10 = 0x84CA; - const GLenum TEXTURE11 = 0x84CB; - const GLenum TEXTURE12 = 0x84CC; - const GLenum TEXTURE13 = 0x84CD; - const GLenum TEXTURE14 = 0x84CE; - const GLenum TEXTURE15 = 0x84CF; - const GLenum TEXTURE16 = 0x84D0; - const GLenum TEXTURE17 = 0x84D1; - const GLenum TEXTURE18 = 0x84D2; - const GLenum TEXTURE19 = 0x84D3; - const GLenum TEXTURE20 = 0x84D4; - const GLenum TEXTURE21 = 0x84D5; - const GLenum TEXTURE22 = 0x84D6; - const GLenum TEXTURE23 = 0x84D7; - const GLenum TEXTURE24 = 0x84D8; - const GLenum TEXTURE25 = 0x84D9; - const GLenum TEXTURE26 = 0x84DA; - const GLenum TEXTURE27 = 0x84DB; - const GLenum TEXTURE28 = 0x84DC; - const GLenum TEXTURE29 = 0x84DD; - const GLenum TEXTURE30 = 0x84DE; - const GLenum TEXTURE31 = 0x84DF; - const GLenum ACTIVE_TEXTURE = 0x84E0; - - /* TextureWrapMode */ - const GLenum REPEAT = 0x2901; - const GLenum CLAMP_TO_EDGE = 0x812F; - const GLenum MIRRORED_REPEAT = 0x8370; - - /* Uniform Types */ - const GLenum FLOAT_VEC2 = 0x8B50; - const GLenum FLOAT_VEC3 = 0x8B51; - const GLenum FLOAT_VEC4 = 0x8B52; - const GLenum INT_VEC2 = 0x8B53; - const GLenum INT_VEC3 = 0x8B54; - const GLenum INT_VEC4 = 0x8B55; - const GLenum BOOL = 0x8B56; - const GLenum BOOL_VEC2 = 0x8B57; - const GLenum BOOL_VEC3 = 0x8B58; - const GLenum BOOL_VEC4 = 0x8B59; - const GLenum FLOAT_MAT2 = 0x8B5A; - const GLenum FLOAT_MAT3 = 0x8B5B; - const GLenum FLOAT_MAT4 = 0x8B5C; - const GLenum SAMPLER_2D = 0x8B5E; - const GLenum SAMPLER_CUBE = 0x8B60; - - /* Vertex Arrays */ - const GLenum VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; - const GLenum VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; - const GLenum VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; - const GLenum VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; - const GLenum VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; - const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; - const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; - - /* Shader Source */ - const GLenum COMPILE_STATUS = 0x8B81; - const GLenum INFO_LOG_LENGTH = 0x8B84; - const GLenum SHADER_SOURCE_LENGTH = 0x8B88; - - /* Shader Precision-Specified Types */ - const GLenum LOW_FLOAT = 0x8DF0; - const GLenum MEDIUM_FLOAT = 0x8DF1; - const GLenum HIGH_FLOAT = 0x8DF2; - const GLenum LOW_INT = 0x8DF3; - const GLenum MEDIUM_INT = 0x8DF4; - const GLenum HIGH_INT = 0x8DF5; - - /* Framebuffer Object. */ - const GLenum FRAMEBUFFER = 0x8D40; - const GLenum RENDERBUFFER = 0x8D41; - - const GLenum RGBA4 = 0x8056; - const GLenum RGB5_A1 = 0x8057; - const GLenum RGB565 = 0x8D62; - const GLenum DEPTH_COMPONENT16 = 0x81A5; - const GLenum STENCIL_INDEX = 0x1901; - const GLenum STENCIL_INDEX8 = 0x8D48; - const GLenum DEPTH_STENCIL = 0x84F9; - - const GLenum RENDERBUFFER_WIDTH = 0x8D42; - const GLenum RENDERBUFFER_HEIGHT = 0x8D43; - const GLenum RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; - const GLenum RENDERBUFFER_RED_SIZE = 0x8D50; - const GLenum RENDERBUFFER_GREEN_SIZE = 0x8D51; - const GLenum RENDERBUFFER_BLUE_SIZE = 0x8D52; - const GLenum RENDERBUFFER_ALPHA_SIZE = 0x8D53; - const GLenum RENDERBUFFER_DEPTH_SIZE = 0x8D54; - const GLenum RENDERBUFFER_STENCIL_SIZE = 0x8D55; - - const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; - const GLenum FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; - const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; - const GLenum FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; - - const GLenum COLOR_ATTACHMENT0 = 0x8CE0; - const GLenum DEPTH_ATTACHMENT = 0x8D00; - const GLenum STENCIL_ATTACHMENT = 0x8D20; - const GLenum DEPTH_STENCIL_ATTACHMENT = 0x821A; - - const GLenum NONE = 0; - - const GLenum FRAMEBUFFER_COMPLETE = 0x8CD5; - const GLenum FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; - const GLenum FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; - const GLenum FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9; - const GLenum FRAMEBUFFER_UNSUPPORTED = 0x8CDD; - - const GLenum FRAMEBUFFER_BINDING = 0x8CA6; - const GLenum RENDERBUFFER_BINDING = 0x8CA7; - const GLenum MAX_RENDERBUFFER_SIZE = 0x84E8; - - const GLenum INVALID_FRAMEBUFFER_OPERATION = 0x0506; - - /* WebGL-specific enums */ - const GLenum UNPACK_FLIP_Y_WEBGL = 0x9240; - const GLenum UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241; - const GLenum CONTEXT_LOST_WEBGL = 0x9242; - const GLenum UNPACK_COLORSPACE_CONVERSION_WEBGL = 0x9243; - const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; - - readonly attribute HTMLCanvasElement canvas; - - WebGLContextAttributes getContextAttributes(); - - boolean isContextLost(); - - DOMString[ ] getSupportedExtensions(); - object getExtension(DOMString name); - - void activeTexture(GLenum texture); - void attachShader(WebGLProgram program, WebGLShader shader); - void bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); - void bindBuffer(GLenum target, WebGLBuffer buffer); - void bindFramebuffer(GLenum target, WebGLFramebuffer framebuffer); - void bindRenderbuffer(GLenum target, WebGLRenderbuffer renderbuffer); - void bindTexture(GLenum target, WebGLTexture texture); - void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void blendEquation(GLenum mode); - void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); - void blendFunc(GLenum sfactor, GLenum dfactor); - void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, - GLenum srcAlpha, GLenum dstAlpha); - -/* void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, ArrayBufferView data, GLenum usage);*/ - void bufferData(GLenum target, ArrayBuffer data, GLenum usage); - void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); - void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer data); - - GLenum checkFramebufferStatus(GLenum target); - void clear(GLbitfield mask); - void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void clearDepth(GLclampf depth); - void clearStencil(GLint s); - void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void compileShader(WebGLShader shader); - - void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height, - GLint border); - void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLint x, GLint y, GLsizei width, GLsizei height); - - WebGLBuffer createBuffer(); - WebGLFramebuffer createFramebuffer(); - WebGLProgram createProgram(); - WebGLRenderbuffer createRenderbuffer(); - WebGLShader createShader(GLenum type); - WebGLTexture createTexture(); - - void cullFace(GLenum mode); - - void deleteBuffer(WebGLBuffer buffer); - void deleteFramebuffer(WebGLFramebuffer framebuffer); - void deleteProgram(WebGLProgram program); - void deleteRenderbuffer(WebGLRenderbuffer renderbuffer); - void deleteShader(WebGLShader shader); - void deleteTexture(WebGLTexture texture); - - void depthFunc(GLenum func); - void depthMask(GLboolean flag); - void depthRange(GLclampf zNear, GLclampf zFar); - void detachShader(WebGLProgram program, WebGLShader shader); - void disable(GLenum cap); - void disableVertexAttribArray(GLuint index); - void drawArrays(GLenum mode, GLint first, GLsizei count); - void drawElements(GLenum mode, GLsizei count, GLenum type, GLintptr offset); - - void enable(GLenum cap); - void enableVertexAttribArray(GLuint index); - void finish(); - void flush(); - void framebufferRenderbuffer(GLenum target, GLenum attachment, - GLenum renderbuffertarget, - WebGLRenderbuffer renderbuffer); - void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, - WebGLTexture texture, GLint level); - void frontFace(GLenum mode); - - void generateMipmap(GLenum target); - - WebGLActiveInfo getActiveAttrib(WebGLProgram program, GLuint index); - WebGLActiveInfo getActiveUniform(WebGLProgram program, GLuint index); - WebGLShader[ ] getAttachedShaders(WebGLProgram program); - - GLint getAttribLocation(WebGLProgram program, DOMString name); - - any getParameter(GLenum pname); - any getBufferParameter(GLenum target, GLenum pname); - - GLenum getError(); - - any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, - GLenum pname); - any getProgramParameter(WebGLProgram program, GLenum pname); - DOMString getProgramInfoLog(WebGLProgram program); - any getRenderbufferParameter(GLenum target, GLenum pname); - any getShaderParameter(WebGLShader shader, GLenum pname); - DOMString getShaderInfoLog(WebGLShader shader); - - DOMString getShaderSource(WebGLShader shader); - - any getTexParameter(GLenum target, GLenum pname); - - any getUniform(WebGLProgram program, WebGLUniformLocation location); - - WebGLUniformLocation getUniformLocation(WebGLProgram program, DOMString name); - - any getVertexAttrib(GLuint index, GLenum pname); - - GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); - - void hint(GLenum target, GLenum mode); - GLboolean isBuffer(WebGLBuffer buffer); - GLboolean isEnabled(GLenum cap); - GLboolean isFramebuffer(WebGLFramebuffer framebuffer); - GLboolean isProgram(WebGLProgram program); - GLboolean isRenderbuffer(WebGLRenderbuffer renderbuffer); - GLboolean isShader(WebGLShader shader); - GLboolean isTexture(WebGLTexture texture); - void lineWidth(GLfloat width); - void linkProgram(WebGLProgram program); - void pixelStorei(GLenum pname, GLint param); - void polygonOffset(GLfloat factor, GLfloat units); - - void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, ArrayBufferView pixels); - - void renderbufferStorage(GLenum target, GLenum internalformat, - GLsizei width, GLsizei height); - void sampleCoverage(GLclampf value, GLboolean invert); - void scissor(GLint x, GLint y, GLsizei width, GLsizei height); - - void shaderSource(WebGLShader shader, DOMString source); - - void stencilFunc(GLenum func, GLint ref, GLuint mask); - void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); - void stencilMask(GLuint mask); - void stencilMaskSeparate(GLenum face, GLuint mask); - void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); - void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); - - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, ArrayBufferView pixels); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, ImageData pixels); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLImageElement image) raises (DOMException); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLCanvasElement canvas) raises (DOMException); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLVideoElement video) raises (DOMException); - - void texParameterf(GLenum target, GLenum pname, GLfloat param); - void texParameteri(GLenum target, GLenum pname, GLint param); - - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLsizei width, GLsizei height, - GLenum format, GLenum type, ArrayBufferView pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, ImageData pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLImageElement image) raises (DOMException); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLCanvasElement canvas) raises (DOMException); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLVideoElement video) raises (DOMException); - - void uniform1f(WebGLUniformLocation location, GLfloat x); - void uniform1fv(WebGLUniformLocation location, FloatArray v); - void uniform1fv(WebGLUniformLocation location, sequence v); - void uniform1i(WebGLUniformLocation location, GLint x); - void uniform1iv(WebGLUniformLocation location, Int32Array v); - void uniform1iv(WebGLUniformLocation location, sequence v); - void uniform2f(WebGLUniformLocation location, GLfloat x, GLfloat y); - void uniform2fv(WebGLUniformLocation location, FloatArray v); - void uniform2fv(WebGLUniformLocation location, sequence v); - void uniform2i(WebGLUniformLocation location, GLint x, GLint y); - void uniform2iv(WebGLUniformLocation location, Int32Array v); - void uniform2iv(WebGLUniformLocation location, sequence v); - void uniform3f(WebGLUniformLocation location, GLfloat x, GLfloat y, GLfloat z); - void uniform3fv(WebGLUniformLocation location, FloatArray v); - void uniform3fv(WebGLUniformLocation location, sequence v); - void uniform3i(WebGLUniformLocation location, GLint x, GLint y, GLint z); - void uniform3iv(WebGLUniformLocation location, Int32Array v); - void uniform3iv(WebGLUniformLocation location, sequence v); - void uniform4f(WebGLUniformLocation location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void uniform4fv(WebGLUniformLocation location, FloatArray v); - void uniform4fv(WebGLUniformLocation location, sequence v); - void uniform4i(WebGLUniformLocation location, GLint x, GLint y, GLint z, GLint w); - void uniform4iv(WebGLUniformLocation location, Int32Array v); - void uniform4iv(WebGLUniformLocation location, sequence v); - - void uniformMatrix2fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix2fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - void uniformMatrix3fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix3fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - void uniformMatrix4fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix4fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - - void useProgram(WebGLProgram program); - void validateProgram(WebGLProgram program); - - void vertexAttrib1f(GLuint indx, GLfloat x); - void vertexAttrib1fv(GLuint indx, FloatArray values); - void vertexAttrib1fv(GLuint indx, sequence values); - void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); - void vertexAttrib2fv(GLuint indx, FloatArray values); - void vertexAttrib2fv(GLuint indx, sequence values); - void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); - void vertexAttrib3fv(GLuint indx, FloatArray values); - void vertexAttrib3fv(GLuint indx, sequence values); - void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void vertexAttrib4fv(GLuint indx, FloatArray values); - void vertexAttrib4fv(GLuint indx, sequence values); - void vertexAttribPointer(GLuint indx, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, GLintptr offset); - - void viewport(GLint x, GLint y, GLsizei width, GLsizei height); -}; - -[Constructor(DOMString type, optional WebGLContextEventInit eventInit)] -interface WebGLContextEvent : Event { - readonly attribute DOMString statusMessage; -}; - -// EventInit is defined in the DOM4 specification. -dictionary WebGLContextEventInit : EventInit { - DOMString statusMessage; -}; - -}; diff --git a/src/Main.hs b/src/Main.hs index 2fb05ed..455a13d 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,6 +1,5 @@ module Main (main) where -import System.Console.GetOpt (usageInfo) import System.Environment (getArgs) import System.Exit (exitSuccess) import Debug.Trace (trace) diff --git a/WebGL_enum.idl b/webgl.idl similarity index 99% rename from WebGL_enum.idl rename to webgl.idl index a3211e0..d0ec96b 100644 --- a/WebGL_enum.idl +++ b/webgl.idl @@ -1,3 +1,4 @@ + /* ClearBufferMask */ const GLenum DEPTH_BUFFER_BIT = 0x00000100; const GLenum STENCIL_BUFFER_BIT = 0x00000400; @@ -444,7 +445,7 @@ /* void bufferData(GLenum target, GLsizeiptr size, GLenum usage); void bufferData(GLenum target, ArrayBufferView data, GLenum usage);*/ void bufferData(GLenum target, ArrayBuffer data, GLenum usage); -/* void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data);*/ + void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer data); GLenum checkFramebufferStatus(GLenum target); From 5e2b8436eeb115961674112dcca2c39eda83de6b Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 22 May 2015 08:16:39 -0600 Subject: [PATCH 06/51] WIP --- src/IDL/Printer.hs | 129 ++++++++++++++++++++++----------------------- src/Main.hs | 7 +-- 2 files changed, 67 insertions(+), 69 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index f3e0f02..c134a1f 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -1,53 +1,63 @@ ------------------------------------------------------------------------------ --- --- Module : IDL.Printer --- Copyright : --- License : GPL-2 --- --- Maintainer : jnf@arcor.de --- Stability : --- Portability : --- --- | --- ------------------------------------------------------------------------------ - -module IDL.Printer ( - ppPureScriptFFI -) where +module IDL.Printer (ppPureScriptFFI) where -import IDL.AST - -import Text.PrettyPrint - (sep, ($$), hcat, punctuate, semi, braces, empty, parens, nest, - (<>), integer, (<+>), text, vcat, ($+$), Doc) import Data.List (nubBy, nub) import Data.Maybe (isNothing) +import Text.PrettyPrint + (sep, ($$), hcat, punctuate, semi, braces, empty, parens, nest, + (<>), integer, (<+>), text, vcat, ($+$), Doc) -ppPureScriptFFI :: Idl -> Doc -ppPureScriptFFI idl = - header - $+$ text "-- *TypeDecls" $+$ typeDecls $+$ text "" - $+$ text "-- *Constants" $+$ constants $+$ text "" - $+$ text "-- *Methods" $+$ methods +import IDL.AST + +moduleHeader :: [String] +moduleHeader = + [ "-- This file is automatically generated! Don't edit this file, but + , "-- instead modify purescript-webgl-generator." + , "" + , "module Graphics.WebGLRaw where" + , "" + , "import Control.Monad.Eff" + , "import Control.Monad.Eff.WebGL" + , "import Data.ArrayBuffer.Types" + , "import Data.TypedArray" + ] +typedefs :: [String] +typedefs = + [ "type GLenum = Number" + , "type GLboolean = Boolean" + , "type GLbitfield = Number" + , "type GLbyte = Number" + , "type GLshort = Number" + , "type GLint = Number" + , "type GLsizei = Number" + , "type GLintptr = Number" + , "type GLsizeiptr = Number" + , "type GLubyte = Number" + , "type GLushort = Number" + , "type GLuint = Number" + , "type GLfloat = Number" + , "type GLclampf = Number" + , "type FloatArray = Float32Array" + ] + +blankLine :: Doc +blankLine = text "" + +ppPureScriptFFI :: Idl -> Doc +ppPureScriptFFI idl = header $+$ blankLine + $+$ text "-- *TypeDecls" $+$ typeDecls $+$ blankLine + $+$ text "-- *Constants" $+$ constants $+$ blankLine + $+$ text "-- *Methods" $+$ methods where - header = vcat (map text - (["-- Auto generated: don't change manually, use purescript-webgl-generator to modify!!", - "module Graphics.WebGLRaw where", - "", - "import Control.Monad.Eff", - "import Control.Monad.Eff.WebGL", - "import Data.ArrayBuffer.Types", - "import Data.TypedArray", - "", - ""] ++ typedefs)) + header = vcat . map text $ moduleHeader ++ [""] ++ typedefs typeDecls = vcat $ map printTypeDecl $ nubBy (\t1 t2-> typeName t1 == typeName t2) [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` standardTypes)] + printTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" constants = vcat [printConstant c | c <- idl , isEnum c] + printConstant Enum{enumName = n,enumValue = v} = (text (makeConstantName n) <+> text "::" <+> text "Number") $+$ (text (makeConstantName n) <+> text "=" <+> integer v) @@ -55,23 +65,27 @@ ppPureScriptFFI idl = methods = vcat $ map printMethod $ nubBy (\t1 t2-> methodName t1 == methodName t2) [c | c <- idl , isUsableFunction c] + printMethod f = text "foreign import" <+> text (methodName f) <> text "_" $$ nest 2 (javascriptQuotes (printJavascript f (methodArgs f)) $$ nest 2 (printPurescriptTypes f)) $$ text "" + printJavascript f args = nest 2 (text "function" <+> text (methodName f) <> text "_" <> (parens (if null (methodArgs f) then empty else text (argName (head (methodArgs f)))))) $$ braces (nest 2 (printJavascriptRest f (methodArgs f))) <> semi + printJavascriptRest f (hd:tl) = text "return" <+> text "function" <> parens (if null tl then empty else text (argName (head tl))) $$ braces (nest 2 (printJavascriptRest f tl)) <> semi + printJavascriptRest f [] | typeName (methodRetType f) == "void" = text "gl." <> text (methodName f) <> parens (hcat (punctuate (text ",") (map (text . argName) (methodArgs f)))) <> semi @@ -81,6 +95,7 @@ ppPureScriptFFI idl = $$ text "if (res === undefined){" $$ text " throw \"Undefined in " <+> text (methodName f) <> text "\"}" <> semi $$ text "return res" <> semi + printPurescriptTypes f | typeName (methodRetType f) == "any" || typeName (methodRetType f) == "object" = text ":: forall eff ret." <+> @@ -89,6 +104,7 @@ ppPureScriptFFI idl = then empty else text "->") <+> parens ( text "Eff (webgl :: WebGl | eff) ret")]) + printPurescriptTypes f = text ":: forall eff." <+> sep ((punctuate (text "->") (map (pureScriptType . argType) (methodArgs f))) ++ [(if null (methodArgs f) @@ -96,25 +112,24 @@ ppPureScriptFFI idl = else text "->") <+> parens ( text "Eff (webgl :: WebGl | eff)" <+> pureScriptType (methodRetType f))]) - pureScriptType Type{typeName = t} | t == "void" = text "Unit" - pureScriptType Type{typeName = t} | t == "boolean" = text "Boolean" - pureScriptType Type{typeName = t} | t == "DOMString" = text "String" - pureScriptType Type{typeName = t} | t == "ArrayBuffer" = text "Float32Array" - pureScriptType Type{typeName = t} = text t + + pureScriptType Type{typeName = t} + | t == "void" = text "Unit" + | t == "boolean" = text "Boolean" + | t == "DOMString" = text "String" + | t == "ArrayBuffer" = text "Float32Array" + | otherwise = text t makeConstantName n = '_' : n javascriptQuotes :: Doc -> Doc -javascriptQuotes p = text "\"\"\"" <> p <> text "\"\"\"" +javascriptQuotes p = text "\"\"\"" <> p <> text "\"\"\"" extractTypes :: Decl -> [Type] -extractTypes Function{methodRetType = t1, methodArgs = args} = t1 : map extractArgType args +extractTypes Function{methodRetType = t1, methodArgs = args} = t1 : map argType args extractTypes Attribute{attType = t1} = [t1] extractTypes _ = [] -extractArgType :: Arg -> Type -extractArgType Arg{argType = t} = t - isUsableFunction i = isFunction i && and (map (isNothing . typeCondPara . argType) (methodArgs i)) @@ -122,21 +137,3 @@ standardTypes = ["GLenum", "GLboolean", "GLbitfield", "GLbyte","GLshort","GLint" "GLsizei","GLintptr","GLsizeiptr","GLubyte","GLushort","GLuint","GLfloat","GLclampf", "sequence", "void","boolean","any","object","DOMString","HTMLCanvasElement", "Float32Array","Int32Array","FloatArray","ArrayBuffer"] - -typedefs = [ - "type GLenum = Number", - "type GLboolean = Boolean", - "type GLbitfield = Number", - "type GLbyte = Number", - "type GLshort = Number", - "type GLint = Number", - "type GLsizei = Number", - "type GLintptr = Number", - "type GLsizeiptr = Number", - "type GLubyte = Number", - "type GLushort = Number", - "type GLuint = Number", - "type GLfloat = Number", - "type GLclampf = Number", - "type FloatArray = Float32Array", - ""] diff --git a/src/Main.hs b/src/Main.hs index 455a13d..fbd684f 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -15,11 +15,12 @@ import IDL.Printer main :: IO () main = getArgs >>= getFilepath >>= readFile >>= runParser +noIdlError :: String +noIdlError = "WebGL generator requires input IDL file" + getFilepath :: [String] -> IO String getFilepath (fp:_) = return fp -getFilepath _ = do - putStrLn $ "Generator requires input IDL file" - exitSuccess +getFilepath _ = putStrLn noIdlError >> exitSuccess runParser :: String -> IO () runParser body = From b37b1ddf61ca5f9c8e5806a757405562857bcb4e Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 22 May 2015 19:19:54 -0600 Subject: [PATCH 07/51] first pass at cleaning PrettyPrinter works --- src/IDL/Printer.hs | 174 +++++++++++++++++++++++++++------------------ 1 file changed, 104 insertions(+), 70 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index c134a1f..fa699c0 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -10,7 +10,7 @@ import IDL.AST moduleHeader :: [String] moduleHeader = - [ "-- This file is automatically generated! Don't edit this file, but + [ "-- This file is automatically generated! Don't edit this file, but" , "-- instead modify purescript-webgl-generator." , "" , "module Graphics.WebGLRaw where" @@ -40,87 +40,125 @@ typedefs = , "type FloatArray = Float32Array" ] +webglTypes :: [String] +webglTypes = + [ "ArrayBuffer" + , "DOMString" + , "Float32Array" + , "FloatArray" + , "GLbitfield" + , "GLboolean" + , "GLbyte" + , "GLclampf" + , "GLenum" + , "GLfloat" + , "GLint" + , "GLintptr" + , "GLshort" + , "GLsizei" + , "GLsizeiptr" + , "GLubyte" + , "GLuint" + , "GLushort" + , "HTMLCanvasElement" + , "Int32Array" + , "any" + , "boolean" + , "object" + , "sequence" + , "void" + ] + blankLine :: Doc blankLine = text "" -ppPureScriptFFI :: Idl -> Doc -ppPureScriptFFI idl = header $+$ blankLine - $+$ text "-- *TypeDecls" $+$ typeDecls $+$ blankLine - $+$ text "-- *Constants" $+$ constants $+$ blankLine - $+$ text "-- *Methods" $+$ methods +toPurescriptType :: Type -> Doc +toPurescriptType Type { typeName = t } + | t == "void" = text "Unit" + | t == "boolean" = text "Boolean" + | t == "DOMString" = text "String" + | t == "ArrayBuffer" = text "Float32Array" + | otherwise = text t + +ppConstant :: Decl -> Doc +ppConstant Enum { enumName = n, enumValue = v } = + typeDef $+$ valuDef $+$ blankLine where - header = vcat . map text $ moduleHeader ++ [""] ++ typedefs - - typeDecls = vcat $ map printTypeDecl $ nubBy (\t1 t2-> typeName t1 == typeName t2) - [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` standardTypes)] - - printTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" - - constants = vcat [printConstant c | c <- idl , isEnum c] + typeDef = text constName <+> text ":: Number" + valuDef = text constName <+> text "=" <+> integer v + constName = '_' : n - printConstant Enum{enumName = n,enumValue = v} = - (text (makeConstantName n) <+> text "::" <+> text "Number") - $+$ (text (makeConstantName n) <+> text "=" <+> integer v) - $+$ text "" - - methods = vcat $ map printMethod $ nubBy (\t1 t2-> methodName t1 == methodName t2) - [c | c <- idl , isUsableFunction c] - - printMethod f = - text "foreign import" <+> text (methodName f) <> text "_" $$ - nest 2 (javascriptQuotes (printJavascript f (methodArgs f)) $$ - nest 2 (printPurescriptTypes f)) - $$ text "" - - printJavascript f args = - nest 2 (text "function" <+> text (methodName f) <> text "_" <> - (parens (if null (methodArgs f) +ppTypeSig :: Decl -> Doc +ppTypeSig f + | hasGenericReturnType = + text ":: forall eff ret." <+> + sep ((punctuate (text "->") (map (toPurescriptType . argType) (methodArgs f))) + ++ [(if null (methodArgs f) then empty - else text (argName (head (methodArgs f)))))) - $$ braces (nest 2 (printJavascriptRest f (methodArgs f))) <> semi - - printJavascriptRest f (hd:tl) = - text "return" <+> text "function" - <> parens (if null tl + else text "->") <+> parens ( + text "Eff (webgl :: WebGl | eff) ret")]) + | otherwise = text ":: forall eff." <+> + sep ((punctuate (text "->") (map (toPurescriptType . argType) (methodArgs f))) + ++ [(if null (methodArgs f) then empty - else text (argName (head tl))) - $$ braces (nest 2 (printJavascriptRest f tl)) <> semi - - printJavascriptRest f [] | typeName (methodRetType f) == "void" = + else text "->") <+> parens ( + text "Eff (webgl :: WebGl | eff)" <+> + toPurescriptType (methodRetType f))]) + where + hasGenericReturnType = typeName (methodRetType f) `elem` ["any", "object"] + +ppFuncBodyInner :: Decl -> [Arg] -> Doc +ppFuncBodyInner f (_:tl) = + text "return" <+> text "function" + <> parens (if null tl + then empty + else text (argName (head tl))) + $$ braces (nest 2 (ppFuncBodyInner f tl)) <> semi +ppFuncBodyInner f [] + | hasNoReturnVal = text "gl." <> text (methodName f) <> parens (hcat (punctuate (text ",") (map (text . argName) (methodArgs f)))) <> semi - | otherwise = + | otherwise = text "var res = gl." <> text (methodName f) <> parens (hcat (punctuate (text ",") (map (text . argName) (methodArgs f)))) <> semi $$ text "if (res === undefined){" $$ text " throw \"Undefined in " <+> text (methodName f) <> text "\"}" <> semi $$ text "return res" <> semi + where hasNoReturnVal = typeName (methodRetType f) == "void" + +ppFuncBodyOuter :: Decl -> [Arg] -> Doc +ppFuncBodyOuter f args = + nest 2 (text "function" <+> text (methodName f) <> text "_" <> + (parens (if null (methodArgs f) + then empty + else text (argName (head (methodArgs f)))))) + $$ braces (nest 2 (ppFuncBodyInner f (methodArgs f))) <> semi + +ppFunc :: Decl -> Doc +ppFunc f = + text "foreign import" <+> text (methodName f) <> text "_" $$ + nest 2 (javascriptQuotes (ppFuncBodyOuter f (methodArgs f)) $$ + nest 2 (ppTypeSig f)) + $$ blankLine + +ppTypeDecl :: Type -> Doc +ppTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" - printPurescriptTypes f | typeName (methodRetType f) == "any" || - typeName (methodRetType f) == "object" = - text ":: forall eff ret." <+> - sep ((punctuate (text "->") (map (pureScriptType . argType) (methodArgs f))) - ++ [(if null (methodArgs f) - then empty - else text "->") <+> parens ( - text "Eff (webgl :: WebGl | eff) ret")]) +ppPureScriptFFI :: Idl -> Doc +ppPureScriptFFI idl = header $+$ blankLine + $+$ text "-- *TypeDecls" $+$ typeDecls $+$ blankLine + $+$ text "-- *Constants" $+$ constants $+$ blankLine + $+$ text "-- *Methods" $+$ methods + where + header = vcat . map text $ moduleHeader ++ [""] ++ typedefs - printPurescriptTypes f = text ":: forall eff." <+> - sep ((punctuate (text "->") (map (pureScriptType . argType) (methodArgs f))) - ++ [(if null (methodArgs f) - then empty - else text "->") <+> parens ( - text "Eff (webgl :: WebGl | eff)" <+> - pureScriptType (methodRetType f))]) + typeDecls = vcat $ map ppTypeDecl $ nubBy (\t1 t2-> typeName t1 == typeName t2) + [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] - pureScriptType Type{typeName = t} - | t == "void" = text "Unit" - | t == "boolean" = text "Boolean" - | t == "DOMString" = text "String" - | t == "ArrayBuffer" = text "Float32Array" - | otherwise = text t + constants = vcat [ppConstant c | c <- idl , isEnum c] -makeConstantName n = '_' : n + methods = vcat $ map ppFunc $ nubBy (\t1 t2-> methodName t1 == methodName t2) + [c | c <- idl , isUsableFunc c] javascriptQuotes :: Doc -> Doc javascriptQuotes p = text "\"\"\"" <> p <> text "\"\"\"" @@ -130,10 +168,6 @@ extractTypes Function{methodRetType = t1, methodArgs = args} = t1 : map argType extractTypes Attribute{attType = t1} = [t1] extractTypes _ = [] -isUsableFunction i = +isUsableFunc :: Decl -> Bool +isUsableFunc i = isFunction i && and (map (isNothing . typeCondPara . argType) (methodArgs i)) - -standardTypes = ["GLenum", "GLboolean", "GLbitfield", "GLbyte","GLshort","GLint", - "GLsizei","GLintptr","GLsizeiptr","GLubyte","GLushort","GLuint","GLfloat","GLclampf", - "sequence", "void","boolean","any","object","DOMString","HTMLCanvasElement", - "Float32Array","Int32Array","FloatArray","ArrayBuffer"] From f6046fe00fb1a46aa651fed149e2f3de03df5d98 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sat, 23 May 2015 16:32:49 -0600 Subject: [PATCH 08/51] ugly printer but good output --- purescript-webgl-raw.purs | 2262 ++++++++++++++++++++++++++++++++++++ src/IDL/Printer.hs | 79 +- test.purs | 2283 +++++++++++++++++++++++++++++++++++++ 3 files changed, 4585 insertions(+), 39 deletions(-) create mode 100644 purescript-webgl-raw.purs create mode 100644 test.purs diff --git a/purescript-webgl-raw.purs b/purescript-webgl-raw.purs new file mode 100644 index 0000000..ed56d4c --- /dev/null +++ b/purescript-webgl-raw.purs @@ -0,0 +1,2262 @@ +-- Auto generated: don't change manually, use purescript-webgl-generator to modify!! +module Graphics.WebGLRaw where + +import Control.Monad.Eff +import Control.Monad.Eff.WebGL +import Data.ArrayBuffer.Types +import Data.TypedArray + + +type GLenum = Number +type GLboolean = Boolean +type GLbitfield = Number +type GLbyte = Number +type GLshort = Number +type GLint = Number +type GLsizei = Number +type GLintptr = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLushort = Number +type GLuint = Number +type GLfloat = Number +type GLclampf = Number +type FloatArray = Float32Array + +-- *TypeDecls +foreign import data WebGLContextAttributes :: * +foreign import data WebGLProgram :: * +foreign import data WebGLShader :: * +foreign import data WebGLBuffer :: * +foreign import data WebGLFramebuffer :: * +foreign import data WebGLRenderbuffer :: * +foreign import data WebGLTexture :: * +foreign import data WebGLActiveInfo :: * +foreign import data WebGLUniformLocation :: * +foreign import data ArrayBufferView :: * +foreign import data ImageData :: * +foreign import data HTMLImageElement :: * +foreign import data HTMLVideoElement :: * + +-- *Constants +_DEPTH_BUFFER_BIT :: Number +_DEPTH_BUFFER_BIT = 256 + +_STENCIL_BUFFER_BIT :: Number +_STENCIL_BUFFER_BIT = 1024 + +_COLOR_BUFFER_BIT :: Number +_COLOR_BUFFER_BIT = 16384 + +_POINTS :: Number +_POINTS = 0 + +_LINES :: Number +_LINES = 1 + +_LINE_LOOP :: Number +_LINE_LOOP = 2 + +_LINE_STRIP :: Number +_LINE_STRIP = 3 + +_TRIANGLES :: Number +_TRIANGLES = 4 + +_TRIANGLE_STRIP :: Number +_TRIANGLE_STRIP = 5 + +_TRIANGLE_FAN :: Number +_TRIANGLE_FAN = 6 + +_ZERO :: Number +_ZERO = 0 + +_ONE :: Number +_ONE = 1 + +_SRC_COLOR :: Number +_SRC_COLOR = 768 + +_ONE_MINUS_SRC_COLOR :: Number +_ONE_MINUS_SRC_COLOR = 769 + +_SRC_ALPHA :: Number +_SRC_ALPHA = 770 + +_ONE_MINUS_SRC_ALPHA :: Number +_ONE_MINUS_SRC_ALPHA = 771 + +_DST_ALPHA :: Number +_DST_ALPHA = 772 + +_ONE_MINUS_DST_ALPHA :: Number +_ONE_MINUS_DST_ALPHA = 773 + +_DST_COLOR :: Number +_DST_COLOR = 774 + +_ONE_MINUS_DST_COLOR :: Number +_ONE_MINUS_DST_COLOR = 775 + +_SRC_ALPHA_SATURATE :: Number +_SRC_ALPHA_SATURATE = 776 + +_FUNC_ADD :: Number +_FUNC_ADD = 32774 + +_BLEND_EQUATION :: Number +_BLEND_EQUATION = 32777 + +_BLEND_EQUATION_RGB :: Number +_BLEND_EQUATION_RGB = 32777 + +_BLEND_EQUATION_ALPHA :: Number +_BLEND_EQUATION_ALPHA = 34877 + +_FUNC_SUBTRACT :: Number +_FUNC_SUBTRACT = 32778 + +_FUNC_REVERSE_SUBTRACT :: Number +_FUNC_REVERSE_SUBTRACT = 32779 + +_BLEND_DST_RGB :: Number +_BLEND_DST_RGB = 32968 + +_BLEND_SRC_RGB :: Number +_BLEND_SRC_RGB = 32969 + +_BLEND_DST_ALPHA :: Number +_BLEND_DST_ALPHA = 32970 + +_BLEND_SRC_ALPHA :: Number +_BLEND_SRC_ALPHA = 32971 + +_CONSTANT_COLOR :: Number +_CONSTANT_COLOR = 32769 + +_ONE_MINUS_CONSTANT_COLOR :: Number +_ONE_MINUS_CONSTANT_COLOR = 32770 + +_CONSTANT_ALPHA :: Number +_CONSTANT_ALPHA = 32771 + +_ONE_MINUS_CONSTANT_ALPHA :: Number +_ONE_MINUS_CONSTANT_ALPHA = 32772 + +_BLEND_COLOR :: Number +_BLEND_COLOR = 32773 + +_ARRAY_BUFFER :: Number +_ARRAY_BUFFER = 34962 + +_ELEMENT_ARRAY_BUFFER :: Number +_ELEMENT_ARRAY_BUFFER = 34963 + +_ARRAY_BUFFER_BINDING :: Number +_ARRAY_BUFFER_BINDING = 34964 + +_ELEMENT_ARRAY_BUFFER_BINDING :: Number +_ELEMENT_ARRAY_BUFFER_BINDING = 34965 + +_STREAM_DRAW :: Number +_STREAM_DRAW = 35040 + +_STATIC_DRAW :: Number +_STATIC_DRAW = 35044 + +_DYNAMIC_DRAW :: Number +_DYNAMIC_DRAW = 35048 + +_BUFFER_SIZE :: Number +_BUFFER_SIZE = 34660 + +_BUFFER_USAGE :: Number +_BUFFER_USAGE = 34661 + +_CURRENT_VERTEX_ATTRIB :: Number +_CURRENT_VERTEX_ATTRIB = 34342 + +_FRONT :: Number +_FRONT = 1028 + +_BACK :: Number +_BACK = 1029 + +_FRONT_AND_BACK :: Number +_FRONT_AND_BACK = 1032 + +_TEXTURE_2D :: Number +_TEXTURE_2D = 3553 + +_CULL_FACE :: Number +_CULL_FACE = 2884 + +_BLEND :: Number +_BLEND = 3042 + +_DITHER :: Number +_DITHER = 3024 + +_STENCIL_TEST :: Number +_STENCIL_TEST = 2960 + +_DEPTH_TEST :: Number +_DEPTH_TEST = 2929 + +_SCISSOR_TEST :: Number +_SCISSOR_TEST = 3089 + +_POLYGON_OFFSET_FILL :: Number +_POLYGON_OFFSET_FILL = 32823 + +_SAMPLE_ALPHA_TO_COVERAGE :: Number +_SAMPLE_ALPHA_TO_COVERAGE = 32926 + +_SAMPLE_COVERAGE :: Number +_SAMPLE_COVERAGE = 32928 + +_NO_ERROR :: Number +_NO_ERROR = 0 + +_INVALID_ENUM :: Number +_INVALID_ENUM = 1280 + +_INVALID_VALUE :: Number +_INVALID_VALUE = 1281 + +_INVALID_OPERATION :: Number +_INVALID_OPERATION = 1282 + +_OUT_OF_MEMORY :: Number +_OUT_OF_MEMORY = 1285 + +_CW :: Number +_CW = 2304 + +_CCW :: Number +_CCW = 2305 + +_LINE_WIDTH :: Number +_LINE_WIDTH = 2849 + +_ALIASED_POINT_SIZE_RANGE :: Number +_ALIASED_POINT_SIZE_RANGE = 33901 + +_ALIASED_LINE_WIDTH_RANGE :: Number +_ALIASED_LINE_WIDTH_RANGE = 33902 + +_CULL_FACE_MODE :: Number +_CULL_FACE_MODE = 2885 + +_FRONT_FACE :: Number +_FRONT_FACE = 2886 + +_DEPTH_RANGE :: Number +_DEPTH_RANGE = 2928 + +_DEPTH_WRITEMASK :: Number +_DEPTH_WRITEMASK = 2930 + +_DEPTH_CLEAR_VALUE :: Number +_DEPTH_CLEAR_VALUE = 2931 + +_DEPTH_FUNC :: Number +_DEPTH_FUNC = 2932 + +_STENCIL_CLEAR_VALUE :: Number +_STENCIL_CLEAR_VALUE = 2961 + +_STENCIL_FUNC :: Number +_STENCIL_FUNC = 2962 + +_STENCIL_FAIL :: Number +_STENCIL_FAIL = 2964 + +_STENCIL_PASS_DEPTH_FAIL :: Number +_STENCIL_PASS_DEPTH_FAIL = 2965 + +_STENCIL_PASS_DEPTH_PASS :: Number +_STENCIL_PASS_DEPTH_PASS = 2966 + +_STENCIL_REF :: Number +_STENCIL_REF = 2967 + +_STENCIL_VALUE_MASK :: Number +_STENCIL_VALUE_MASK = 2963 + +_STENCIL_WRITEMASK :: Number +_STENCIL_WRITEMASK = 2968 + +_STENCIL_BACK_FUNC :: Number +_STENCIL_BACK_FUNC = 34816 + +_STENCIL_BACK_FAIL :: Number +_STENCIL_BACK_FAIL = 34817 + +_STENCIL_BACK_PASS_DEPTH_FAIL :: Number +_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 + +_STENCIL_BACK_PASS_DEPTH_PASS :: Number +_STENCIL_BACK_PASS_DEPTH_PASS = 34819 + +_STENCIL_BACK_REF :: Number +_STENCIL_BACK_REF = 36003 + +_STENCIL_BACK_VALUE_MASK :: Number +_STENCIL_BACK_VALUE_MASK = 36004 + +_STENCIL_BACK_WRITEMASK :: Number +_STENCIL_BACK_WRITEMASK = 36005 + +_VIEWPORT :: Number +_VIEWPORT = 2978 + +_SCISSOR_BOX :: Number +_SCISSOR_BOX = 3088 + +_COLOR_CLEAR_VALUE :: Number +_COLOR_CLEAR_VALUE = 3106 + +_COLOR_WRITEMASK :: Number +_COLOR_WRITEMASK = 3107 + +_UNPACK_ALIGNMENT :: Number +_UNPACK_ALIGNMENT = 3317 + +_PACK_ALIGNMENT :: Number +_PACK_ALIGNMENT = 3333 + +_MAX_TEXTURE_SIZE :: Number +_MAX_TEXTURE_SIZE = 3379 + +_MAX_VIEWPORT_DIMS :: Number +_MAX_VIEWPORT_DIMS = 3386 + +_SUBPIXEL_BITS :: Number +_SUBPIXEL_BITS = 3408 + +_RED_BITS :: Number +_RED_BITS = 3410 + +_GREEN_BITS :: Number +_GREEN_BITS = 3411 + +_BLUE_BITS :: Number +_BLUE_BITS = 3412 + +_ALPHA_BITS :: Number +_ALPHA_BITS = 3413 + +_DEPTH_BITS :: Number +_DEPTH_BITS = 3414 + +_STENCIL_BITS :: Number +_STENCIL_BITS = 3415 + +_POLYGON_OFFSET_UNITS :: Number +_POLYGON_OFFSET_UNITS = 10752 + +_POLYGON_OFFSET_FACTOR :: Number +_POLYGON_OFFSET_FACTOR = 32824 + +_TEXTURE_BINDING_2D :: Number +_TEXTURE_BINDING_2D = 32873 + +_SAMPLE_BUFFERS :: Number +_SAMPLE_BUFFERS = 32936 + +_SAMPLES :: Number +_SAMPLES = 32937 + +_SAMPLE_COVERAGE_VALUE :: Number +_SAMPLE_COVERAGE_VALUE = 32938 + +_SAMPLE_COVERAGE_INVERT :: Number +_SAMPLE_COVERAGE_INVERT = 32939 + +_NUM_COMPRESSED_TEXTURE_FORMATS :: Number +_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 + +_COMPRESSED_TEXTURE_FORMATS :: Number +_COMPRESSED_TEXTURE_FORMATS = 34467 + +_DONT_CARE :: Number +_DONT_CARE = 4352 + +_FASTEST :: Number +_FASTEST = 4353 + +_NICEST :: Number +_NICEST = 4354 + +_GENERATE_MIPMAP_HINT :: Number +_GENERATE_MIPMAP_HINT = 33170 + +_BYTE :: Number +_BYTE = 5120 + +_UNSIGNED_BYTE :: Number +_UNSIGNED_BYTE = 5121 + +_SHORT :: Number +_SHORT = 5122 + +_UNSIGNED_SHORT :: Number +_UNSIGNED_SHORT = 5123 + +_INT :: Number +_INT = 5124 + +_UNSIGNED_INT :: Number +_UNSIGNED_INT = 5125 + +_FLOAT :: Number +_FLOAT = 5126 + +_DEPTH_COMPONENT :: Number +_DEPTH_COMPONENT = 6402 + +_ALPHA :: Number +_ALPHA = 6406 + +_RGB :: Number +_RGB = 6407 + +_RGBA :: Number +_RGBA = 6408 + +_LUMINANCE :: Number +_LUMINANCE = 6409 + +_LUMINANCE_ALPHA :: Number +_LUMINANCE_ALPHA = 6410 + +_UNSIGNED_SHORT_4_4_4_4 :: Number +_UNSIGNED_SHORT_4_4_4_4 = 32819 + +_UNSIGNED_SHORT_5_5_5_1 :: Number +_UNSIGNED_SHORT_5_5_5_1 = 32820 + +_UNSIGNED_SHORT_5_6_5 :: Number +_UNSIGNED_SHORT_5_6_5 = 33635 + +_FRAGMENT_SHADER :: Number +_FRAGMENT_SHADER = 35632 + +_VERTEX_SHADER :: Number +_VERTEX_SHADER = 35633 + +_MAX_VERTEX_ATTRIBS :: Number +_MAX_VERTEX_ATTRIBS = 34921 + +_MAX_VERTEX_UNIFORM_VECTORS :: Number +_MAX_VERTEX_UNIFORM_VECTORS = 36347 + +_MAX_VARYING_VECTORS :: Number +_MAX_VARYING_VECTORS = 36348 + +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: Number +_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 + +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: Number +_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 + +_MAX_TEXTURE_IMAGE_UNITS :: Number +_MAX_TEXTURE_IMAGE_UNITS = 34930 + +_MAX_FRAGMENT_UNIFORM_VECTORS :: Number +_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 + +_SHADER_TYPE :: Number +_SHADER_TYPE = 35663 + +_DELETE_STATUS :: Number +_DELETE_STATUS = 35712 + +_LINK_STATUS :: Number +_LINK_STATUS = 35714 + +_VALIDATE_STATUS :: Number +_VALIDATE_STATUS = 35715 + +_ATTACHED_SHADERS :: Number +_ATTACHED_SHADERS = 35717 + +_ACTIVE_UNIFORMS :: Number +_ACTIVE_UNIFORMS = 35718 + +_ACTIVE_UNIFORM_MAX_LENGTH :: Number +_ACTIVE_UNIFORM_MAX_LENGTH = 35719 + +_ACTIVE_ATTRIBUTES :: Number +_ACTIVE_ATTRIBUTES = 35721 + +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: Number +_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 + +_SHADING_LANGUAGE_VERSION :: Number +_SHADING_LANGUAGE_VERSION = 35724 + +_CURRENT_PROGRAM :: Number +_CURRENT_PROGRAM = 35725 + +_NEVER :: Number +_NEVER = 512 + +_LESS :: Number +_LESS = 513 + +_EQUAL :: Number +_EQUAL = 514 + +_LEQUAL :: Number +_LEQUAL = 515 + +_GREATER :: Number +_GREATER = 516 + +_NOTEQUAL :: Number +_NOTEQUAL = 517 + +_GEQUAL :: Number +_GEQUAL = 518 + +_ALWAYS :: Number +_ALWAYS = 519 + +_KEEP :: Number +_KEEP = 7680 + +_REPLACE :: Number +_REPLACE = 7681 + +_INCR :: Number +_INCR = 7682 + +_DECR :: Number +_DECR = 7683 + +_INVERT :: Number +_INVERT = 5386 + +_INCR_WRAP :: Number +_INCR_WRAP = 34055 + +_DECR_WRAP :: Number +_DECR_WRAP = 34056 + +_VENDOR :: Number +_VENDOR = 7936 + +_RENDERER :: Number +_RENDERER = 7937 + +_VERSION :: Number +_VERSION = 7938 + +_NEAREST :: Number +_NEAREST = 9728 + +_LINEAR :: Number +_LINEAR = 9729 + +_NEAREST_MIPMAP_NEAREST :: Number +_NEAREST_MIPMAP_NEAREST = 9984 + +_LINEAR_MIPMAP_NEAREST :: Number +_LINEAR_MIPMAP_NEAREST = 9985 + +_NEAREST_MIPMAP_LINEAR :: Number +_NEAREST_MIPMAP_LINEAR = 9986 + +_LINEAR_MIPMAP_LINEAR :: Number +_LINEAR_MIPMAP_LINEAR = 9987 + +_TEXTURE_MAG_FILTER :: Number +_TEXTURE_MAG_FILTER = 10240 + +_TEXTURE_MIN_FILTER :: Number +_TEXTURE_MIN_FILTER = 10241 + +_TEXTURE_WRAP_S :: Number +_TEXTURE_WRAP_S = 10242 + +_TEXTURE_WRAP_T :: Number +_TEXTURE_WRAP_T = 10243 + +_TEXTURE :: Number +_TEXTURE = 5890 + +_TEXTURE_CUBE_MAP :: Number +_TEXTURE_CUBE_MAP = 34067 + +_TEXTURE_BINDING_CUBE_MAP :: Number +_TEXTURE_BINDING_CUBE_MAP = 34068 + +_TEXTURE_CUBE_MAP_POSITIVE_X :: Number +_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 + +_TEXTURE_CUBE_MAP_NEGATIVE_X :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 + +_TEXTURE_CUBE_MAP_POSITIVE_Y :: Number +_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 + +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 + +_TEXTURE_CUBE_MAP_POSITIVE_Z :: Number +_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 + +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 + +_MAX_CUBE_MAP_TEXTURE_SIZE :: Number +_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 + +_TEXTURE0 :: Number +_TEXTURE0 = 33984 + +_TEXTURE1 :: Number +_TEXTURE1 = 33985 + +_TEXTURE2 :: Number +_TEXTURE2 = 33986 + +_TEXTURE3 :: Number +_TEXTURE3 = 33987 + +_TEXTURE4 :: Number +_TEXTURE4 = 33988 + +_TEXTURE5 :: Number +_TEXTURE5 = 33989 + +_TEXTURE6 :: Number +_TEXTURE6 = 33990 + +_TEXTURE7 :: Number +_TEXTURE7 = 33991 + +_TEXTURE8 :: Number +_TEXTURE8 = 33992 + +_TEXTURE9 :: Number +_TEXTURE9 = 33993 + +_TEXTURE10 :: Number +_TEXTURE10 = 33994 + +_TEXTURE11 :: Number +_TEXTURE11 = 33995 + +_TEXTURE12 :: Number +_TEXTURE12 = 33996 + +_TEXTURE13 :: Number +_TEXTURE13 = 33997 + +_TEXTURE14 :: Number +_TEXTURE14 = 33998 + +_TEXTURE15 :: Number +_TEXTURE15 = 33999 + +_TEXTURE16 :: Number +_TEXTURE16 = 34000 + +_TEXTURE17 :: Number +_TEXTURE17 = 34001 + +_TEXTURE18 :: Number +_TEXTURE18 = 34002 + +_TEXTURE19 :: Number +_TEXTURE19 = 34003 + +_TEXTURE20 :: Number +_TEXTURE20 = 34004 + +_TEXTURE21 :: Number +_TEXTURE21 = 34005 + +_TEXTURE22 :: Number +_TEXTURE22 = 34006 + +_TEXTURE23 :: Number +_TEXTURE23 = 34007 + +_TEXTURE24 :: Number +_TEXTURE24 = 34008 + +_TEXTURE25 :: Number +_TEXTURE25 = 34009 + +_TEXTURE26 :: Number +_TEXTURE26 = 34010 + +_TEXTURE27 :: Number +_TEXTURE27 = 34011 + +_TEXTURE28 :: Number +_TEXTURE28 = 34012 + +_TEXTURE29 :: Number +_TEXTURE29 = 34013 + +_TEXTURE30 :: Number +_TEXTURE30 = 34014 + +_TEXTURE31 :: Number +_TEXTURE31 = 34015 + +_ACTIVE_TEXTURE :: Number +_ACTIVE_TEXTURE = 34016 + +_REPEAT :: Number +_REPEAT = 10497 + +_CLAMP_TO_EDGE :: Number +_CLAMP_TO_EDGE = 33071 + +_MIRRORED_REPEAT :: Number +_MIRRORED_REPEAT = 33648 + +_FLOAT_VEC2 :: Number +_FLOAT_VEC2 = 35664 + +_FLOAT_VEC3 :: Number +_FLOAT_VEC3 = 35665 + +_FLOAT_VEC4 :: Number +_FLOAT_VEC4 = 35666 + +_INT_VEC2 :: Number +_INT_VEC2 = 35667 + +_INT_VEC3 :: Number +_INT_VEC3 = 35668 + +_INT_VEC4 :: Number +_INT_VEC4 = 35669 + +_BOOL :: Number +_BOOL = 35670 + +_BOOL_VEC2 :: Number +_BOOL_VEC2 = 35671 + +_BOOL_VEC3 :: Number +_BOOL_VEC3 = 35672 + +_BOOL_VEC4 :: Number +_BOOL_VEC4 = 35673 + +_FLOAT_MAT2 :: Number +_FLOAT_MAT2 = 35674 + +_FLOAT_MAT3 :: Number +_FLOAT_MAT3 = 35675 + +_FLOAT_MAT4 :: Number +_FLOAT_MAT4 = 35676 + +_SAMPLER_2D :: Number +_SAMPLER_2D = 35678 + +_SAMPLER_CUBE :: Number +_SAMPLER_CUBE = 35680 + +_VERTEX_ATTRIB_ARRAY_ENABLED :: Number +_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 + +_VERTEX_ATTRIB_ARRAY_SIZE :: Number +_VERTEX_ATTRIB_ARRAY_SIZE = 34339 + +_VERTEX_ATTRIB_ARRAY_STRIDE :: Number +_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 + +_VERTEX_ATTRIB_ARRAY_TYPE :: Number +_VERTEX_ATTRIB_ARRAY_TYPE = 34341 + +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: Number +_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 + +_VERTEX_ATTRIB_ARRAY_POINTER :: Number +_VERTEX_ATTRIB_ARRAY_POINTER = 34373 + +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: Number +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 + +_COMPILE_STATUS :: Number +_COMPILE_STATUS = 35713 + +_INFO_LOG_LENGTH :: Number +_INFO_LOG_LENGTH = 35716 + +_SHADER_SOURCE_LENGTH :: Number +_SHADER_SOURCE_LENGTH = 35720 + +_LOW_FLOAT :: Number +_LOW_FLOAT = 36336 + +_MEDIUM_FLOAT :: Number +_MEDIUM_FLOAT = 36337 + +_HIGH_FLOAT :: Number +_HIGH_FLOAT = 36338 + +_LOW_INT :: Number +_LOW_INT = 36339 + +_MEDIUM_INT :: Number +_MEDIUM_INT = 36340 + +_HIGH_INT :: Number +_HIGH_INT = 36341 + +_FRAMEBUFFER :: Number +_FRAMEBUFFER = 36160 + +_RENDERBUFFER :: Number +_RENDERBUFFER = 36161 + +_RGBA4 :: Number +_RGBA4 = 32854 + +_RGB5_A1 :: Number +_RGB5_A1 = 32855 + +_RGB565 :: Number +_RGB565 = 36194 + +_DEPTH_COMPONENT16 :: Number +_DEPTH_COMPONENT16 = 33189 + +_STENCIL_INDEX :: Number +_STENCIL_INDEX = 6401 + +_STENCIL_INDEX8 :: Number +_STENCIL_INDEX8 = 36168 + +_DEPTH_STENCIL :: Number +_DEPTH_STENCIL = 34041 + +_RENDERBUFFER_WIDTH :: Number +_RENDERBUFFER_WIDTH = 36162 + +_RENDERBUFFER_HEIGHT :: Number +_RENDERBUFFER_HEIGHT = 36163 + +_RENDERBUFFER_INTERNAL_FORMAT :: Number +_RENDERBUFFER_INTERNAL_FORMAT = 36164 + +_RENDERBUFFER_RED_SIZE :: Number +_RENDERBUFFER_RED_SIZE = 36176 + +_RENDERBUFFER_GREEN_SIZE :: Number +_RENDERBUFFER_GREEN_SIZE = 36177 + +_RENDERBUFFER_BLUE_SIZE :: Number +_RENDERBUFFER_BLUE_SIZE = 36178 + +_RENDERBUFFER_ALPHA_SIZE :: Number +_RENDERBUFFER_ALPHA_SIZE = 36179 + +_RENDERBUFFER_DEPTH_SIZE :: Number +_RENDERBUFFER_DEPTH_SIZE = 36180 + +_RENDERBUFFER_STENCIL_SIZE :: Number +_RENDERBUFFER_STENCIL_SIZE = 36181 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: Number +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: Number +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: Number +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: Number +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 + +_COLOR_ATTACHMENT0 :: Number +_COLOR_ATTACHMENT0 = 36064 + +_DEPTH_ATTACHMENT :: Number +_DEPTH_ATTACHMENT = 36096 + +_STENCIL_ATTACHMENT :: Number +_STENCIL_ATTACHMENT = 36128 + +_DEPTH_STENCIL_ATTACHMENT :: Number +_DEPTH_STENCIL_ATTACHMENT = 33306 + +_NONE :: Number +_NONE = 0 + +_FRAMEBUFFER_COMPLETE :: Number +_FRAMEBUFFER_COMPLETE = 36053 + +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: Number +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 + +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: Number +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 + +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: Number +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 + +_FRAMEBUFFER_UNSUPPORTED :: Number +_FRAMEBUFFER_UNSUPPORTED = 36061 + +_FRAMEBUFFER_BINDING :: Number +_FRAMEBUFFER_BINDING = 36006 + +_RENDERBUFFER_BINDING :: Number +_RENDERBUFFER_BINDING = 36007 + +_MAX_RENDERBUFFER_SIZE :: Number +_MAX_RENDERBUFFER_SIZE = 34024 + +_INVALID_FRAMEBUFFER_OPERATION :: Number +_INVALID_FRAMEBUFFER_OPERATION = 1286 + +_UNPACK_FLIP_Y_WEBGL :: Number +_UNPACK_FLIP_Y_WEBGL = 37440 + +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: Number +_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 + +_CONTEXT_LOST_WEBGL :: Number +_CONTEXT_LOST_WEBGL = 37442 + +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: Number +_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 + +_BROWSER_DEFAULT_WEBGL :: Number +_BROWSER_DEFAULT_WEBGL = 37444 + + +-- *Methods +foreign import getContextAttributes_ + """function getContextAttributes_() + {var res = gl.getContextAttributes(); + if (res === undefined){ + throw "Undefined in getContextAttributes"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) + +foreign import isContextLost_ + """function isContextLost_() + {var res = gl.isContextLost(); + if (res === undefined){ + throw "Undefined in isContextLost"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) Boolean) + +foreign import getSupportedExtensions_ + """function getSupportedExtensions_() + {var res = gl.getSupportedExtensions(); + if (res === undefined){ + throw "Undefined in getSupportedExtensions"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) String) + +foreign import getExtension_ + """function getExtension_(name) + {return function() + {var res = gl.getExtension(name); + if (res === undefined){ + throw "Undefined in getExtension"}; + return res;};};""" + :: forall eff ret. String -> (Eff (webgl :: WebGl | eff) ret) + +foreign import activeTexture_ + """function activeTexture_(texture) + {return function() + {gl.activeTexture(texture);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import attachShader_ + """function attachShader_(program) + {return function(shader) + {return function() + {gl.attachShader(program,shader);};};};""" + :: forall eff. WebGLProgram-> + WebGLShader + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindAttribLocation_ + """function bindAttribLocation_(program) + {return function(index) + {return function(name) + {return function() + {gl.bindAttribLocation(program,index,name);};};};};""" + :: forall eff. WebGLProgram-> + GLuint-> + String + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindBuffer_ + """function bindBuffer_(target) + {return function(buffer) + {return function() + {gl.bindBuffer(target,buffer);};};};""" + :: forall eff. GLenum-> + WebGLBuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindFramebuffer_ + """function bindFramebuffer_(target) + {return function(framebuffer) + {return function() + {gl.bindFramebuffer(target,framebuffer);};};};""" + :: forall eff. GLenum-> + WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindRenderbuffer_ + """function bindRenderbuffer_(target) + {return function(renderbuffer) + {return function() + {gl.bindRenderbuffer(target,renderbuffer);};};};""" + :: forall eff. GLenum-> + WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindTexture_ + """function bindTexture_(target) + {return function(texture) + {return function() + {gl.bindTexture(target,texture);};};};""" + :: forall eff. GLenum-> + WebGLTexture + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendColor_ + """function blendColor_(red) + {return function(green) + {return function(blue) + {return function(alpha) + {return function() + {gl.blendColor(red,green,blue,alpha);};};};};};""" + :: forall eff. GLclampf-> + GLclampf-> + GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendEquation_ + """function blendEquation_(mode) + {return function() + {gl.blendEquation(mode);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendEquationSeparate_ + """function blendEquationSeparate_(modeRGB) + {return function(modeAlpha) + {return function() + {gl.blendEquationSeparate(modeRGB,modeAlpha);};};};""" + :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendFunc_ + """function blendFunc_(sfactor) + {return function(dfactor) + {return function() + {gl.blendFunc(sfactor,dfactor);};};};""" + :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendFuncSeparate_ + """function blendFuncSeparate_(srcRGB) + {return function(dstRGB) + {return function(srcAlpha) + {return function(dstAlpha) + {return function() + {gl.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bufferData_ + """function bufferData_(target) + {return function(data) + {return function(usage) + {return function() + {gl.bufferData(target,data,usage);};};};};""" + :: forall eff. GLenum-> + Float32Array-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bufferSubData_ + """function bufferSubData_(target) + {return function(offset) + {return function(data) + {return function() + {gl.bufferSubData(target,offset,data);};};};};""" + :: forall eff. GLenum-> + GLintptr-> + Float32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import checkFramebufferStatus_ + """function checkFramebufferStatus_(target) + {return function() + {var res = gl.checkFramebufferStatus(target); + if (res === undefined){ + throw "Undefined in checkFramebufferStatus"}; + return res;};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLenum) + +foreign import clear_ + """function clear_(mask) + {return function() + {gl.clear(mask);};};""" + :: forall eff. GLbitfield -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearColor_ + """function clearColor_(red) + {return function(green) + {return function(blue) + {return function(alpha) + {return function() + {gl.clearColor(red,green,blue,alpha);};};};};};""" + :: forall eff. GLclampf-> + GLclampf-> + GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearDepth_ + """function clearDepth_(depth) + {return function() + {gl.clearDepth(depth);};};""" + :: forall eff. GLclampf -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearStencil_ + """function clearStencil_(s) + {return function() + {gl.clearStencil(s);};};""" + :: forall eff. GLint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import colorMask_ + """function colorMask_(red) + {return function(green) + {return function(blue) + {return function(alpha) + {return function() + {gl.colorMask(red,green,blue,alpha);};};};};};""" + :: forall eff. GLboolean-> + GLboolean-> + GLboolean-> + GLboolean + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import compileShader_ + """function compileShader_(shader) + {return function() + {gl.compileShader(shader);};};""" + :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import copyTexImage2D_ + """function copyTexImage2D_(target) + {return function(level) + {return function(internalformat) + {return function(x) + {return function(y) + {return function(width) + {return function(height) + {return function(border) + {return function() + {gl.copyTexImage2D(target,level,internalformat,x,y,width,height,border);};};};};};};};};};""" + :: forall eff. GLenum-> + GLint-> + GLenum-> + GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import copyTexSubImage2D_ + """function copyTexSubImage2D_(target) + {return function(level) + {return function(xoffset) + {return function(yoffset) + {return function(x) + {return function(y) + {return function(width) + {return function(height) + {return function() + {gl.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);};};};};};};};};};""" + :: forall eff. GLenum-> + GLint-> + GLint-> + GLint-> + GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import createBuffer_ + """function createBuffer_() + {var res = gl.createBuffer(); + if (res === undefined){ + throw "Undefined in createBuffer"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer) + +foreign import createFramebuffer_ + """function createFramebuffer_() + {var res = gl.createFramebuffer(); + if (res === undefined){ + throw "Undefined in createFramebuffer"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) + +foreign import createProgram_ + """function createProgram_() + {var res = gl.createProgram(); + if (res === undefined){ + throw "Undefined in createProgram"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) + +foreign import createRenderbuffer_ + """function createRenderbuffer_() + {var res = gl.createRenderbuffer(); + if (res === undefined){ + throw "Undefined in createRenderbuffer"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) + +foreign import createShader_ + """function createShader_(type) + {return function() + {var res = gl.createShader(type); + if (res === undefined){ + throw "Undefined in createShader"}; + return res;};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) WebGLShader) + +foreign import createTexture_ + """function createTexture_() + {var res = gl.createTexture(); + if (res === undefined){ + throw "Undefined in createTexture"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) + +foreign import cullFace_ + """function cullFace_(mode) + {return function() + {gl.cullFace(mode);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteBuffer_ + """function deleteBuffer_(buffer) + {return function() + {gl.deleteBuffer(buffer);};};""" + :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteFramebuffer_ + """function deleteFramebuffer_(framebuffer) + {return function() + {gl.deleteFramebuffer(framebuffer);};};""" + :: forall eff. WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteProgram_ + """function deleteProgram_(program) + {return function() + {gl.deleteProgram(program);};};""" + :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteRenderbuffer_ + """function deleteRenderbuffer_(renderbuffer) + {return function() + {gl.deleteRenderbuffer(renderbuffer);};};""" + :: forall eff. WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteShader_ + """function deleteShader_(shader) + {return function() + {gl.deleteShader(shader);};};""" + :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteTexture_ + """function deleteTexture_(texture) + {return function() + {gl.deleteTexture(texture);};};""" + :: forall eff. WebGLTexture -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthFunc_ + """function depthFunc_(func) + {return function() + {gl.depthFunc(func);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthMask_ + """function depthMask_(flag) + {return function() + {gl.depthMask(flag);};};""" + :: forall eff. GLboolean -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthRange_ + """function depthRange_(zNear) + {return function(zFar) + {return function() + {gl.depthRange(zNear,zFar);};};};""" + :: forall eff. GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import detachShader_ + """function detachShader_(program) + {return function(shader) + {return function() + {gl.detachShader(program,shader);};};};""" + :: forall eff. WebGLProgram-> + WebGLShader + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import disable_ + """function disable_(cap) + {return function() + {gl.disable(cap);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import disableVertexAttribArray_ + """function disableVertexAttribArray_(index) + {return function() + {gl.disableVertexAttribArray(index);};};""" + :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import drawArrays_ + """function drawArrays_(mode) + {return function(first) + {return function(count) + {return function() + {gl.drawArrays(mode,first,count);};};};};""" + :: forall eff. GLenum-> + GLint-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import drawElements_ + """function drawElements_(mode) + {return function(count) + {return function(type) + {return function(offset) + {return function() + {gl.drawElements(mode,count,type,offset);};};};};};""" + :: forall eff. GLenum-> + GLsizei-> + GLenum-> + GLintptr + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import enable_ + """function enable_(cap) + {return function() + {gl.enable(cap);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import enableVertexAttribArray_ + """function enableVertexAttribArray_(index) + {return function() + {gl.enableVertexAttribArray(index);};};""" + :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import finish_ + """function finish_() + {gl.finish();};""" + :: forall eff. (Eff (webgl :: WebGl | eff) Unit) + +foreign import flush_ + """function flush_() + {gl.flush();};""" + :: forall eff. (Eff (webgl :: WebGl | eff) Unit) + +foreign import framebufferRenderbuffer_ + """function framebufferRenderbuffer_(target) + {return function(attachment) + {return function(renderbuffertarget) + {return function(renderbuffer) + {return function() + {gl.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLenum-> + WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import framebufferTexture2D_ + """function framebufferTexture2D_(target) + {return function(attachment) + {return function(textarget) + {return function(texture) + {return function(level) + {return function() + {gl.framebufferTexture2D(target,attachment,textarget,texture,level);};};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLenum-> + WebGLTexture-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import frontFace_ + """function frontFace_(mode) + {return function() + {gl.frontFace(mode);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import generateMipmap_ + """function generateMipmap_(target) + {return function() + {gl.generateMipmap(target);};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import getActiveAttrib_ + """function getActiveAttrib_(program) + {return function(index) + {return function() + {var res = gl.getActiveAttrib(program,index); + if (res === undefined){ + throw "Undefined in getActiveAttrib"}; + return res;};};};""" + :: forall eff. WebGLProgram-> + GLuint + -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + +foreign import getActiveUniform_ + """function getActiveUniform_(program) + {return function(index) + {return function() + {var res = gl.getActiveUniform(program,index); + if (res === undefined){ + throw "Undefined in getActiveUniform"}; + return res;};};};""" + :: forall eff. WebGLProgram-> + GLuint + -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + +foreign import getAttachedShaders_ + """function getAttachedShaders_(program) + {return function() + {var res = gl.getAttachedShaders(program); + if (res === undefined){ + throw "Undefined in getAttachedShaders"}; + return res;};};""" + :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) WebGLShader) + +foreign import getAttribLocation_ + """function getAttribLocation_(program) + {return function(name) + {return function() + {var res = gl.getAttribLocation(program,name); + if (res === undefined){ + throw "Undefined in getAttribLocation"}; + return res;};};};""" + :: forall eff. WebGLProgram-> + String + -> (Eff (webgl :: WebGl | eff) GLint) + +foreign import getParameter_ + """function getParameter_(pname) + {return function() + {var res = gl.getParameter(pname); + if (res === undefined){ + throw "Undefined in getParameter"}; + return res;};};""" + :: forall eff ret. GLenum -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getBufferParameter_ + """function getBufferParameter_(target) + {return function(pname) + {return function() + {var res = gl.getBufferParameter(target,pname); + if (res === undefined){ + throw "Undefined in getBufferParameter"}; + return res;};};};""" + :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getError_ + """function getError_() + {var res = gl.getError(); + if (res === undefined){ + throw "Undefined in getError"}; + return res;};""" + :: forall eff. (Eff (webgl :: WebGl | eff) GLenum) + +foreign import getFramebufferAttachmentParameter_ + """function getFramebufferAttachmentParameter_(target) + {return function(attachment) + {return function(pname) + {return function() + {var res = gl.getFramebufferAttachmentParameter(target,attachment,pname); + if (res === undefined){ + throw "Undefined in getFramebufferAttachmentParameter"}; + return res;};};};};""" + :: forall eff ret. GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getProgramParameter_ + """function getProgramParameter_(program) + {return function(pname) + {return function() + {var res = gl.getProgramParameter(program,pname); + if (res === undefined){ + throw "Undefined in getProgramParameter"}; + return res;};};};""" + :: forall eff ret. WebGLProgram-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getProgramInfoLog_ + """function getProgramInfoLog_(program) + {return function() + {var res = gl.getProgramInfoLog(program); + if (res === undefined){ + throw "Undefined in getProgramInfoLog"}; + return res;};};""" + :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) String) + +foreign import getRenderbufferParameter_ + """function getRenderbufferParameter_(target) + {return function(pname) + {return function() + {var res = gl.getRenderbufferParameter(target,pname); + if (res === undefined){ + throw "Undefined in getRenderbufferParameter"}; + return res;};};};""" + :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getShaderParameter_ + """function getShaderParameter_(shader) + {return function(pname) + {return function() + {var res = gl.getShaderParameter(shader,pname); + if (res === undefined){ + throw "Undefined in getShaderParameter"}; + return res;};};};""" + :: forall eff ret. WebGLShader-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getShaderInfoLog_ + """function getShaderInfoLog_(shader) + {return function() + {var res = gl.getShaderInfoLog(shader); + if (res === undefined){ + throw "Undefined in getShaderInfoLog"}; + return res;};};""" + :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) + +foreign import getShaderSource_ + """function getShaderSource_(shader) + {return function() + {var res = gl.getShaderSource(shader); + if (res === undefined){ + throw "Undefined in getShaderSource"}; + return res;};};""" + :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) + +foreign import getTexParameter_ + """function getTexParameter_(target) + {return function(pname) + {return function() + {var res = gl.getTexParameter(target,pname); + if (res === undefined){ + throw "Undefined in getTexParameter"}; + return res;};};};""" + :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getUniform_ + """function getUniform_(program) + {return function(location) + {return function() + {var res = gl.getUniform(program,location); + if (res === undefined){ + throw "Undefined in getUniform"}; + return res;};};};""" + :: forall eff ret. WebGLProgram-> + WebGLUniformLocation + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getUniformLocation_ + """function getUniformLocation_(program) + {return function(name) + {return function() + {var res = gl.getUniformLocation(program,name); + if (res === undefined){ + throw "Undefined in getUniformLocation"}; + return res;};};};""" + :: forall eff. WebGLProgram-> + String + -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) + +foreign import getVertexAttrib_ + """function getVertexAttrib_(index) + {return function(pname) + {return function() + {var res = gl.getVertexAttrib(index,pname); + if (res === undefined){ + throw "Undefined in getVertexAttrib"}; + return res;};};};""" + :: forall eff ret. GLuint-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getVertexAttribOffset_ + """function getVertexAttribOffset_(index) + {return function(pname) + {return function() + {var res = gl.getVertexAttribOffset(index,pname); + if (res === undefined){ + throw "Undefined in getVertexAttribOffset"}; + return res;};};};""" + :: forall eff. GLuint-> + GLenum + -> (Eff (webgl :: WebGl | eff) GLsizeiptr) + +foreign import hint_ + """function hint_(target) + {return function(mode) + {return function() + {gl.hint(target,mode);};};};""" + :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import isBuffer_ + """function isBuffer_(buffer) + {return function() + {var res = gl.isBuffer(buffer); + if (res === undefined){ + throw "Undefined in isBuffer"}; + return res;};};""" + :: forall eff. WebGLBuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isEnabled_ + """function isEnabled_(cap) + {return function() + {var res = gl.isEnabled(cap); + if (res === undefined){ + throw "Undefined in isEnabled"}; + return res;};};""" + :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isFramebuffer_ + """function isFramebuffer_(framebuffer) + {return function() + {var res = gl.isFramebuffer(framebuffer); + if (res === undefined){ + throw "Undefined in isFramebuffer"}; + return res;};};""" + :: forall eff. WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isProgram_ + """function isProgram_(program) + {return function() + {var res = gl.isProgram(program); + if (res === undefined){ + throw "Undefined in isProgram"}; + return res;};};""" + :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isRenderbuffer_ + """function isRenderbuffer_(renderbuffer) + {return function() + {var res = gl.isRenderbuffer(renderbuffer); + if (res === undefined){ + throw "Undefined in isRenderbuffer"}; + return res;};};""" + :: forall eff. WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isShader_ + """function isShader_(shader) + {return function() + {var res = gl.isShader(shader); + if (res === undefined){ + throw "Undefined in isShader"}; + return res;};};""" + :: forall eff. WebGLShader + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isTexture_ + """function isTexture_(texture) + {return function() + {var res = gl.isTexture(texture); + if (res === undefined){ + throw "Undefined in isTexture"}; + return res;};};""" + :: forall eff. WebGLTexture + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import lineWidth_ + """function lineWidth_(width) + {return function() + {gl.lineWidth(width);};};""" + :: forall eff. GLfloat -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import linkProgram_ + """function linkProgram_(program) + {return function() + {gl.linkProgram(program);};};""" + :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import pixelStorei_ + """function pixelStorei_(pname) + {return function(param) + {return function() + {gl.pixelStorei(pname,param);};};};""" + :: forall eff. GLenum-> GLint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import polygonOffset_ + """function polygonOffset_(factor) + {return function(units) + {return function() + {gl.polygonOffset(factor,units);};};};""" + :: forall eff. GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import readPixels_ + """function readPixels_(x) + {return function(y) + {return function(width) + {return function(height) + {return function(format) + {return function(type) + {return function(pixels) + {return function() + {gl.readPixels(x,y,width,height,format,type,pixels);};};};};};};};};""" + :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import renderbufferStorage_ + """function renderbufferStorage_(target) + {return function(internalformat) + {return function(width) + {return function(height) + {return function() + {gl.renderbufferStorage(target,internalformat,width,height);};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import sampleCoverage_ + """function sampleCoverage_(value) + {return function(invert) + {return function() + {gl.sampleCoverage(value,invert);};};};""" + :: forall eff. GLclampf-> + GLboolean + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import scissor_ + """function scissor_(x) + {return function(y) + {return function(width) + {return function(height) + {return function() + {gl.scissor(x,y,width,height);};};};};};""" + :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import shaderSource_ + """function shaderSource_(shader) + {return function(source) + {return function() + {gl.shaderSource(shader,source);};};};""" + :: forall eff. WebGLShader-> + String + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilFunc_ + """function stencilFunc_(func) + {return function(ref) + {return function(mask) + {return function() + {gl.stencilFunc(func,ref,mask);};};};};""" + :: forall eff. GLenum-> + GLint-> + GLuint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilFuncSeparate_ + """function stencilFuncSeparate_(face) + {return function(func) + {return function(ref) + {return function(mask) + {return function() + {gl.stencilFuncSeparate(face,func,ref,mask);};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLint-> + GLuint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilMask_ + """function stencilMask_(mask) + {return function() + {gl.stencilMask(mask);};};""" + :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilMaskSeparate_ + """function stencilMaskSeparate_(face) + {return function(mask) + {return function() + {gl.stencilMaskSeparate(face,mask);};};};""" + :: forall eff. GLenum-> GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilOp_ + """function stencilOp_(fail) + {return function(zfail) + {return function(zpass) + {return function() + {gl.stencilOp(fail,zfail,zpass);};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilOpSeparate_ + """function stencilOpSeparate_(face) + {return function(fail) + {return function(zfail) + {return function(zpass) + {return function() + {gl.stencilOpSeparate(face,fail,zfail,zpass);};};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texImage2D_ + """function texImage2D_(target) + {return function(level) + {return function(internalformat) + {return function(width) + {return function(height) + {return function(border) + {return function(format) + {return function(type) + {return function(pixels) + {return function() + {gl.texImage2D(target,level,internalformat,width,height,border,format,type,pixels);};};};};};};};};};};""" + :: forall eff. GLenum-> + GLint-> + GLenum-> + GLsizei-> + GLsizei-> + GLint-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texParameterf_ + """function texParameterf_(target) + {return function(pname) + {return function(param) + {return function() + {gl.texParameterf(target,pname,param);};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texParameteri_ + """function texParameteri_(target) + {return function(pname) + {return function(param) + {return function() + {gl.texParameteri(target,pname,param);};};};};""" + :: forall eff. GLenum-> + GLenum-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texSubImage2D_ + """function texSubImage2D_(target) + {return function(level) + {return function(xoffset) + {return function(yoffset) + {return function(width) + {return function(height) + {return function(format) + {return function(type) + {return function(pixels) + {return function() + {gl.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);};};};};};};};};};};""" + :: forall eff. GLenum-> + GLint-> + GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1f_ + """function uniform1f_(location) + {return function(x) + {return function() + {gl.uniform1f(location,x);};};};""" + :: forall eff. WebGLUniformLocation-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1fv_ + """function uniform1fv_(location) + {return function(v) + {return function() + {gl.uniform1fv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1i_ + """function uniform1i_(location) + {return function(x) + {return function() + {gl.uniform1i(location,x);};};};""" + :: forall eff. WebGLUniformLocation-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1iv_ + """function uniform1iv_(location) + {return function(v) + {return function() + {gl.uniform1iv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2f_ + """function uniform2f_(location) + {return function(x) + {return function(y) + {return function() + {gl.uniform2f(location,x,y);};};};};""" + :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2fv_ + """function uniform2fv_(location) + {return function(v) + {return function() + {gl.uniform2fv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2i_ + """function uniform2i_(location) + {return function(x) + {return function(y) + {return function() + {gl.uniform2i(location,x,y);};};};};""" + :: forall eff. WebGLUniformLocation-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2iv_ + """function uniform2iv_(location) + {return function(v) + {return function() + {gl.uniform2iv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3f_ + """function uniform3f_(location) + {return function(x) + {return function(y) + {return function(z) + {return function() + {gl.uniform3f(location,x,y,z);};};};};};""" + :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3fv_ + """function uniform3fv_(location) + {return function(v) + {return function() + {gl.uniform3fv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3i_ + """function uniform3i_(location) + {return function(x) + {return function(y) + {return function(z) + {return function() + {gl.uniform3i(location,x,y,z);};};};};};""" + :: forall eff. WebGLUniformLocation-> + GLint-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3iv_ + """function uniform3iv_(location) + {return function(v) + {return function() + {gl.uniform3iv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4f_ + """function uniform4f_(location) + {return function(x) + {return function(y) + {return function(z) + {return function(w) + {return function() + {gl.uniform4f(location,x,y,z,w);};};};};};};""" + :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4fv_ + """function uniform4fv_(location) + {return function(v) + {return function() + {gl.uniform4fv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4i_ + """function uniform4i_(location) + {return function(x) + {return function(y) + {return function(z) + {return function(w) + {return function() + {gl.uniform4i(location,x,y,z,w);};};};};};};""" + :: forall eff. WebGLUniformLocation-> + GLint-> + GLint-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4iv_ + """function uniform4iv_(location) + {return function(v) + {return function() + {gl.uniform4iv(location,v);};};};""" + :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix2fv_ + """function uniformMatrix2fv_(location) + {return function(transpose) + {return function(value) + {return function() + {gl.uniformMatrix2fv(location,transpose,value);};};};};""" + :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix3fv_ + """function uniformMatrix3fv_(location) + {return function(transpose) + {return function(value) + {return function() + {gl.uniformMatrix3fv(location,transpose,value);};};};};""" + :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix4fv_ + """function uniformMatrix4fv_(location) + {return function(transpose) + {return function(value) + {return function() + {gl.uniformMatrix4fv(location,transpose,value);};};};};""" + :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import useProgram_ + """function useProgram_(program) + {return function() + {gl.useProgram(program);};};""" + :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import validateProgram_ + """function validateProgram_(program) + {return function() + {gl.validateProgram(program);};};""" + :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib1f_ + """function vertexAttrib1f_(indx) + {return function(x) + {return function() + {gl.vertexAttrib1f(indx,x);};};};""" + :: forall eff. GLuint-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib1fv_ + """function vertexAttrib1fv_(indx) + {return function(values) + {return function() + {gl.vertexAttrib1fv(indx,values);};};};""" + :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib2f_ + """function vertexAttrib2f_(indx) + {return function(x) + {return function(y) + {return function() + {gl.vertexAttrib2f(indx,x,y);};};};};""" + :: forall eff. GLuint-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib2fv_ + """function vertexAttrib2fv_(indx) + {return function(values) + {return function() + {gl.vertexAttrib2fv(indx,values);};};};""" + :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib3f_ + """function vertexAttrib3f_(indx) + {return function(x) + {return function(y) + {return function(z) + {return function() + {gl.vertexAttrib3f(indx,x,y,z);};};};};};""" + :: forall eff. GLuint-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib3fv_ + """function vertexAttrib3fv_(indx) + {return function(values) + {return function() + {gl.vertexAttrib3fv(indx,values);};};};""" + :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib4f_ + """function vertexAttrib4f_(indx) + {return function(x) + {return function(y) + {return function(z) + {return function(w) + {return function() + {gl.vertexAttrib4f(indx,x,y,z,w);};};};};};};""" + :: forall eff. GLuint-> + GLfloat-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib4fv_ + """function vertexAttrib4fv_(indx) + {return function(values) + {return function() + {gl.vertexAttrib4fv(indx,values);};};};""" + :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttribPointer_ + """function vertexAttribPointer_(indx) + {return function(size) + {return function(type) + {return function(normalized) + {return function(stride) + {return function(offset) + {return function() + {gl.vertexAttribPointer(indx,size,type,normalized,stride,offset);};};};};};};};""" + :: forall eff. GLuint-> + GLint-> + GLenum-> + GLboolean-> + GLsizei-> + GLintptr + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import viewport_ + """function viewport_(x) + {return function(y) + {return function(width) + {return function(height) + {return function() + {gl.viewport(x,y,width,height);};};};};};""" + :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) \ No newline at end of file diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index fa699c0..6580a42 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -3,7 +3,7 @@ module IDL.Printer (ppPureScriptFFI) where import Data.List (nubBy, nub) import Data.Maybe (isNothing) import Text.PrettyPrint - (sep, ($$), hcat, punctuate, semi, braces, empty, parens, nest, + (sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, (<>), integer, (<+>), text, vcat, ($+$), Doc) import IDL.AST @@ -107,39 +107,31 @@ ppTypeSig f where hasGenericReturnType = typeName (methodRetType f) `elem` ["any", "object"] -ppFuncBodyInner :: Decl -> [Arg] -> Doc -ppFuncBodyInner f (_:tl) = - text "return" <+> text "function" - <> parens (if null tl - then empty - else text (argName (head tl))) - $$ braces (nest 2 (ppFuncBodyInner f tl)) <> semi -ppFuncBodyInner f [] - | hasNoReturnVal = - text "gl." <> text (methodName f) <> parens - (hcat (punctuate (text ",") (map (text . argName) (methodArgs f)))) <> semi - | otherwise = - text "var res = gl." <> text (methodName f) <> parens - (hcat (punctuate (text ",") (map (text . argName) (methodArgs f)))) <> semi - $$ text "if (res === undefined){" - $$ text " throw \"Undefined in " <+> text (methodName f) <> text "\"}" <> semi - $$ text "return res" <> semi - where hasNoReturnVal = typeName (methodRetType f) == "void" - -ppFuncBodyOuter :: Decl -> [Arg] -> Doc -ppFuncBodyOuter f args = - nest 2 (text "function" <+> text (methodName f) <> text "_" <> - (parens (if null (methodArgs f) - then empty - else text (argName (head (methodArgs f)))))) - $$ braces (nest 2 (ppFuncBodyInner f (methodArgs f))) <> semi - -ppFunc :: Decl -> Doc -ppFunc f = - text "foreign import" <+> text (methodName f) <> text "_" $$ - nest 2 (javascriptQuotes (ppFuncBodyOuter f (methodArgs f)) $$ - nest 2 (ppTypeSig f)) - $$ blankLine +ppMethod :: Decl -> Doc +ppMethod f = + prefixWebgl <> text (methodName f) <> parens (ppArgs methodArgs f) <> semi + +ppImplBody :: Decl -> Doc +ppImplBody f = + func <+> text (implName f) <> parens (ppArgs funcArgs f) <+> lbrace $+$ + nest 2 (ret <+> func <+> parens empty <+> lbrace) $+$ + nest 4 (ret <+> ppMethod f) $+$ + nest 2 rbrace <> semi $+$ + rbrace + where + func = text "function" + ret = text "return" + +ppArgs :: (Decl -> [Arg]) -> Decl -> Doc +ppArgs f = hcat . punctuate (text ", ") . map (text . argName) . f + +ppImpl :: Decl -> Doc +ppImpl f = + text "foreign import" <+> text (implName f) <+> + jsBlock $+$ nest 2 (ppImplBody f) $+$ jsBlock <+> + ppTypeSig f $+$ blankLine + where + jsBlock = text "\"\"\"" ppTypeDecl :: Type -> Doc ppTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" @@ -157,17 +149,26 @@ ppPureScriptFFI idl = header $+$ blankLine constants = vcat [ppConstant c | c <- idl , isEnum c] - methods = vcat $ map ppFunc $ nubBy (\t1 t2-> methodName t1 == methodName t2) + methods = vcat $ map ppImpl $ nubBy (\t1 t2-> methodName t1 == methodName t2) [c | c <- idl , isUsableFunc c] -javascriptQuotes :: Doc -> Doc -javascriptQuotes p = text "\"\"\"" <> p <> text "\"\"\"" - extractTypes :: Decl -> [Type] -extractTypes Function{methodRetType = t1, methodArgs = args} = t1 : map argType args +extractTypes f@Function{methodRetType = t1} = t1 : map argType (funcArgs f) extractTypes Attribute{attType = t1} = [t1] extractTypes _ = [] isUsableFunc :: Decl -> Bool isUsableFunc i = isFunction i && and (map (isNothing . typeCondPara . argType) (methodArgs i)) + +implName :: Decl -> String +implName f = methodName f ++ "Impl" + +funcArgs :: Decl -> [Arg] +funcArgs f = webglContext : methodArgs f + +webglContext :: Arg +webglContext = Arg (Type "WebglContext" False Nothing) "webgl" + +prefixWebgl :: Doc +prefixWebgl = text (argName webglContext) <> text "." diff --git a/test.purs b/test.purs new file mode 100644 index 0000000..50ee253 --- /dev/null +++ b/test.purs @@ -0,0 +1,2283 @@ +Preprocessing executable 'purescript-webgl-generator' for +purescript-webgl-generator-0.1.0.0... +[3 of 4] Compiling IDL.Printer ( src/IDL/Printer.hs, dist/build/purescript-webgl-generator/purescript-webgl-generator-tmp/IDL/Printer.o ) +Linking dist/build/purescript-webgl-generator/purescript-webgl-generator ... +Running purescript-webgl-generator... +-- This file is automatically generated! Don't edit this file, but +-- instead modify purescript-webgl-generator. + +module Graphics.WebGLRaw where + +import Control.Monad.Eff +import Control.Monad.Eff.WebGL +import Data.ArrayBuffer.Types +import Data.TypedArray + +type GLenum = Number +type GLboolean = Boolean +type GLbitfield = Number +type GLbyte = Number +type GLshort = Number +type GLint = Number +type GLsizei = Number +type GLintptr = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLushort = Number +type GLuint = Number +type GLfloat = Number +type GLclampf = Number +type FloatArray = Float32Array + +-- *TypeDecls +foreign import data WebGLContextAttributes :: * +foreign import data WebglContext :: * +foreign import data WebGLProgram :: * +foreign import data WebGLShader :: * +foreign import data WebGLBuffer :: * +foreign import data WebGLFramebuffer :: * +foreign import data WebGLRenderbuffer :: * +foreign import data WebGLTexture :: * +foreign import data ArrayBufferView :: * +foreign import data WebGLActiveInfo :: * +foreign import data WebGLUniformLocation :: * +foreign import data ImageData :: * +foreign import data HTMLImageElement :: * +foreign import data HTMLVideoElement :: * + +-- *Constants +_DEPTH_BUFFER_BIT :: Number +_DEPTH_BUFFER_BIT = 256 + +_STENCIL_BUFFER_BIT :: Number +_STENCIL_BUFFER_BIT = 1024 + +_COLOR_BUFFER_BIT :: Number +_COLOR_BUFFER_BIT = 16384 + +_POINTS :: Number +_POINTS = 0 + +_LINES :: Number +_LINES = 1 + +_LINE_LOOP :: Number +_LINE_LOOP = 2 + +_LINE_STRIP :: Number +_LINE_STRIP = 3 + +_TRIANGLES :: Number +_TRIANGLES = 4 + +_TRIANGLE_STRIP :: Number +_TRIANGLE_STRIP = 5 + +_TRIANGLE_FAN :: Number +_TRIANGLE_FAN = 6 + +_ZERO :: Number +_ZERO = 0 + +_ONE :: Number +_ONE = 1 + +_SRC_COLOR :: Number +_SRC_COLOR = 768 + +_ONE_MINUS_SRC_COLOR :: Number +_ONE_MINUS_SRC_COLOR = 769 + +_SRC_ALPHA :: Number +_SRC_ALPHA = 770 + +_ONE_MINUS_SRC_ALPHA :: Number +_ONE_MINUS_SRC_ALPHA = 771 + +_DST_ALPHA :: Number +_DST_ALPHA = 772 + +_ONE_MINUS_DST_ALPHA :: Number +_ONE_MINUS_DST_ALPHA = 773 + +_DST_COLOR :: Number +_DST_COLOR = 774 + +_ONE_MINUS_DST_COLOR :: Number +_ONE_MINUS_DST_COLOR = 775 + +_SRC_ALPHA_SATURATE :: Number +_SRC_ALPHA_SATURATE = 776 + +_FUNC_ADD :: Number +_FUNC_ADD = 32774 + +_BLEND_EQUATION :: Number +_BLEND_EQUATION = 32777 + +_BLEND_EQUATION_RGB :: Number +_BLEND_EQUATION_RGB = 32777 + +_BLEND_EQUATION_ALPHA :: Number +_BLEND_EQUATION_ALPHA = 34877 + +_FUNC_SUBTRACT :: Number +_FUNC_SUBTRACT = 32778 + +_FUNC_REVERSE_SUBTRACT :: Number +_FUNC_REVERSE_SUBTRACT = 32779 + +_BLEND_DST_RGB :: Number +_BLEND_DST_RGB = 32968 + +_BLEND_SRC_RGB :: Number +_BLEND_SRC_RGB = 32969 + +_BLEND_DST_ALPHA :: Number +_BLEND_DST_ALPHA = 32970 + +_BLEND_SRC_ALPHA :: Number +_BLEND_SRC_ALPHA = 32971 + +_CONSTANT_COLOR :: Number +_CONSTANT_COLOR = 32769 + +_ONE_MINUS_CONSTANT_COLOR :: Number +_ONE_MINUS_CONSTANT_COLOR = 32770 + +_CONSTANT_ALPHA :: Number +_CONSTANT_ALPHA = 32771 + +_ONE_MINUS_CONSTANT_ALPHA :: Number +_ONE_MINUS_CONSTANT_ALPHA = 32772 + +_BLEND_COLOR :: Number +_BLEND_COLOR = 32773 + +_ARRAY_BUFFER :: Number +_ARRAY_BUFFER = 34962 + +_ELEMENT_ARRAY_BUFFER :: Number +_ELEMENT_ARRAY_BUFFER = 34963 + +_ARRAY_BUFFER_BINDING :: Number +_ARRAY_BUFFER_BINDING = 34964 + +_ELEMENT_ARRAY_BUFFER_BINDING :: Number +_ELEMENT_ARRAY_BUFFER_BINDING = 34965 + +_STREAM_DRAW :: Number +_STREAM_DRAW = 35040 + +_STATIC_DRAW :: Number +_STATIC_DRAW = 35044 + +_DYNAMIC_DRAW :: Number +_DYNAMIC_DRAW = 35048 + +_BUFFER_SIZE :: Number +_BUFFER_SIZE = 34660 + +_BUFFER_USAGE :: Number +_BUFFER_USAGE = 34661 + +_CURRENT_VERTEX_ATTRIB :: Number +_CURRENT_VERTEX_ATTRIB = 34342 + +_FRONT :: Number +_FRONT = 1028 + +_BACK :: Number +_BACK = 1029 + +_FRONT_AND_BACK :: Number +_FRONT_AND_BACK = 1032 + +_TEXTURE_2D :: Number +_TEXTURE_2D = 3553 + +_CULL_FACE :: Number +_CULL_FACE = 2884 + +_BLEND :: Number +_BLEND = 3042 + +_DITHER :: Number +_DITHER = 3024 + +_STENCIL_TEST :: Number +_STENCIL_TEST = 2960 + +_DEPTH_TEST :: Number +_DEPTH_TEST = 2929 + +_SCISSOR_TEST :: Number +_SCISSOR_TEST = 3089 + +_POLYGON_OFFSET_FILL :: Number +_POLYGON_OFFSET_FILL = 32823 + +_SAMPLE_ALPHA_TO_COVERAGE :: Number +_SAMPLE_ALPHA_TO_COVERAGE = 32926 + +_SAMPLE_COVERAGE :: Number +_SAMPLE_COVERAGE = 32928 + +_NO_ERROR :: Number +_NO_ERROR = 0 + +_INVALID_ENUM :: Number +_INVALID_ENUM = 1280 + +_INVALID_VALUE :: Number +_INVALID_VALUE = 1281 + +_INVALID_OPERATION :: Number +_INVALID_OPERATION = 1282 + +_OUT_OF_MEMORY :: Number +_OUT_OF_MEMORY = 1285 + +_CW :: Number +_CW = 2304 + +_CCW :: Number +_CCW = 2305 + +_LINE_WIDTH :: Number +_LINE_WIDTH = 2849 + +_ALIASED_POINT_SIZE_RANGE :: Number +_ALIASED_POINT_SIZE_RANGE = 33901 + +_ALIASED_LINE_WIDTH_RANGE :: Number +_ALIASED_LINE_WIDTH_RANGE = 33902 + +_CULL_FACE_MODE :: Number +_CULL_FACE_MODE = 2885 + +_FRONT_FACE :: Number +_FRONT_FACE = 2886 + +_DEPTH_RANGE :: Number +_DEPTH_RANGE = 2928 + +_DEPTH_WRITEMASK :: Number +_DEPTH_WRITEMASK = 2930 + +_DEPTH_CLEAR_VALUE :: Number +_DEPTH_CLEAR_VALUE = 2931 + +_DEPTH_FUNC :: Number +_DEPTH_FUNC = 2932 + +_STENCIL_CLEAR_VALUE :: Number +_STENCIL_CLEAR_VALUE = 2961 + +_STENCIL_FUNC :: Number +_STENCIL_FUNC = 2962 + +_STENCIL_FAIL :: Number +_STENCIL_FAIL = 2964 + +_STENCIL_PASS_DEPTH_FAIL :: Number +_STENCIL_PASS_DEPTH_FAIL = 2965 + +_STENCIL_PASS_DEPTH_PASS :: Number +_STENCIL_PASS_DEPTH_PASS = 2966 + +_STENCIL_REF :: Number +_STENCIL_REF = 2967 + +_STENCIL_VALUE_MASK :: Number +_STENCIL_VALUE_MASK = 2963 + +_STENCIL_WRITEMASK :: Number +_STENCIL_WRITEMASK = 2968 + +_STENCIL_BACK_FUNC :: Number +_STENCIL_BACK_FUNC = 34816 + +_STENCIL_BACK_FAIL :: Number +_STENCIL_BACK_FAIL = 34817 + +_STENCIL_BACK_PASS_DEPTH_FAIL :: Number +_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 + +_STENCIL_BACK_PASS_DEPTH_PASS :: Number +_STENCIL_BACK_PASS_DEPTH_PASS = 34819 + +_STENCIL_BACK_REF :: Number +_STENCIL_BACK_REF = 36003 + +_STENCIL_BACK_VALUE_MASK :: Number +_STENCIL_BACK_VALUE_MASK = 36004 + +_STENCIL_BACK_WRITEMASK :: Number +_STENCIL_BACK_WRITEMASK = 36005 + +_VIEWPORT :: Number +_VIEWPORT = 2978 + +_SCISSOR_BOX :: Number +_SCISSOR_BOX = 3088 + +_COLOR_CLEAR_VALUE :: Number +_COLOR_CLEAR_VALUE = 3106 + +_COLOR_WRITEMASK :: Number +_COLOR_WRITEMASK = 3107 + +_UNPACK_ALIGNMENT :: Number +_UNPACK_ALIGNMENT = 3317 + +_PACK_ALIGNMENT :: Number +_PACK_ALIGNMENT = 3333 + +_MAX_TEXTURE_SIZE :: Number +_MAX_TEXTURE_SIZE = 3379 + +_MAX_VIEWPORT_DIMS :: Number +_MAX_VIEWPORT_DIMS = 3386 + +_SUBPIXEL_BITS :: Number +_SUBPIXEL_BITS = 3408 + +_RED_BITS :: Number +_RED_BITS = 3410 + +_GREEN_BITS :: Number +_GREEN_BITS = 3411 + +_BLUE_BITS :: Number +_BLUE_BITS = 3412 + +_ALPHA_BITS :: Number +_ALPHA_BITS = 3413 + +_DEPTH_BITS :: Number +_DEPTH_BITS = 3414 + +_STENCIL_BITS :: Number +_STENCIL_BITS = 3415 + +_POLYGON_OFFSET_UNITS :: Number +_POLYGON_OFFSET_UNITS = 10752 + +_POLYGON_OFFSET_FACTOR :: Number +_POLYGON_OFFSET_FACTOR = 32824 + +_TEXTURE_BINDING_2D :: Number +_TEXTURE_BINDING_2D = 32873 + +_SAMPLE_BUFFERS :: Number +_SAMPLE_BUFFERS = 32936 + +_SAMPLES :: Number +_SAMPLES = 32937 + +_SAMPLE_COVERAGE_VALUE :: Number +_SAMPLE_COVERAGE_VALUE = 32938 + +_SAMPLE_COVERAGE_INVERT :: Number +_SAMPLE_COVERAGE_INVERT = 32939 + +_NUM_COMPRESSED_TEXTURE_FORMATS :: Number +_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 + +_COMPRESSED_TEXTURE_FORMATS :: Number +_COMPRESSED_TEXTURE_FORMATS = 34467 + +_DONT_CARE :: Number +_DONT_CARE = 4352 + +_FASTEST :: Number +_FASTEST = 4353 + +_NICEST :: Number +_NICEST = 4354 + +_GENERATE_MIPMAP_HINT :: Number +_GENERATE_MIPMAP_HINT = 33170 + +_BYTE :: Number +_BYTE = 5120 + +_UNSIGNED_BYTE :: Number +_UNSIGNED_BYTE = 5121 + +_SHORT :: Number +_SHORT = 5122 + +_UNSIGNED_SHORT :: Number +_UNSIGNED_SHORT = 5123 + +_INT :: Number +_INT = 5124 + +_UNSIGNED_INT :: Number +_UNSIGNED_INT = 5125 + +_FLOAT :: Number +_FLOAT = 5126 + +_DEPTH_COMPONENT :: Number +_DEPTH_COMPONENT = 6402 + +_ALPHA :: Number +_ALPHA = 6406 + +_RGB :: Number +_RGB = 6407 + +_RGBA :: Number +_RGBA = 6408 + +_LUMINANCE :: Number +_LUMINANCE = 6409 + +_LUMINANCE_ALPHA :: Number +_LUMINANCE_ALPHA = 6410 + +_UNSIGNED_SHORT_4_4_4_4 :: Number +_UNSIGNED_SHORT_4_4_4_4 = 32819 + +_UNSIGNED_SHORT_5_5_5_1 :: Number +_UNSIGNED_SHORT_5_5_5_1 = 32820 + +_UNSIGNED_SHORT_5_6_5 :: Number +_UNSIGNED_SHORT_5_6_5 = 33635 + +_FRAGMENT_SHADER :: Number +_FRAGMENT_SHADER = 35632 + +_VERTEX_SHADER :: Number +_VERTEX_SHADER = 35633 + +_MAX_VERTEX_ATTRIBS :: Number +_MAX_VERTEX_ATTRIBS = 34921 + +_MAX_VERTEX_UNIFORM_VECTORS :: Number +_MAX_VERTEX_UNIFORM_VECTORS = 36347 + +_MAX_VARYING_VECTORS :: Number +_MAX_VARYING_VECTORS = 36348 + +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: Number +_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 + +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: Number +_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 + +_MAX_TEXTURE_IMAGE_UNITS :: Number +_MAX_TEXTURE_IMAGE_UNITS = 34930 + +_MAX_FRAGMENT_UNIFORM_VECTORS :: Number +_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 + +_SHADER_TYPE :: Number +_SHADER_TYPE = 35663 + +_DELETE_STATUS :: Number +_DELETE_STATUS = 35712 + +_LINK_STATUS :: Number +_LINK_STATUS = 35714 + +_VALIDATE_STATUS :: Number +_VALIDATE_STATUS = 35715 + +_ATTACHED_SHADERS :: Number +_ATTACHED_SHADERS = 35717 + +_ACTIVE_UNIFORMS :: Number +_ACTIVE_UNIFORMS = 35718 + +_ACTIVE_UNIFORM_MAX_LENGTH :: Number +_ACTIVE_UNIFORM_MAX_LENGTH = 35719 + +_ACTIVE_ATTRIBUTES :: Number +_ACTIVE_ATTRIBUTES = 35721 + +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: Number +_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 + +_SHADING_LANGUAGE_VERSION :: Number +_SHADING_LANGUAGE_VERSION = 35724 + +_CURRENT_PROGRAM :: Number +_CURRENT_PROGRAM = 35725 + +_NEVER :: Number +_NEVER = 512 + +_LESS :: Number +_LESS = 513 + +_EQUAL :: Number +_EQUAL = 514 + +_LEQUAL :: Number +_LEQUAL = 515 + +_GREATER :: Number +_GREATER = 516 + +_NOTEQUAL :: Number +_NOTEQUAL = 517 + +_GEQUAL :: Number +_GEQUAL = 518 + +_ALWAYS :: Number +_ALWAYS = 519 + +_KEEP :: Number +_KEEP = 7680 + +_REPLACE :: Number +_REPLACE = 7681 + +_INCR :: Number +_INCR = 7682 + +_DECR :: Number +_DECR = 7683 + +_INVERT :: Number +_INVERT = 5386 + +_INCR_WRAP :: Number +_INCR_WRAP = 34055 + +_DECR_WRAP :: Number +_DECR_WRAP = 34056 + +_VENDOR :: Number +_VENDOR = 7936 + +_RENDERER :: Number +_RENDERER = 7937 + +_VERSION :: Number +_VERSION = 7938 + +_NEAREST :: Number +_NEAREST = 9728 + +_LINEAR :: Number +_LINEAR = 9729 + +_NEAREST_MIPMAP_NEAREST :: Number +_NEAREST_MIPMAP_NEAREST = 9984 + +_LINEAR_MIPMAP_NEAREST :: Number +_LINEAR_MIPMAP_NEAREST = 9985 + +_NEAREST_MIPMAP_LINEAR :: Number +_NEAREST_MIPMAP_LINEAR = 9986 + +_LINEAR_MIPMAP_LINEAR :: Number +_LINEAR_MIPMAP_LINEAR = 9987 + +_TEXTURE_MAG_FILTER :: Number +_TEXTURE_MAG_FILTER = 10240 + +_TEXTURE_MIN_FILTER :: Number +_TEXTURE_MIN_FILTER = 10241 + +_TEXTURE_WRAP_S :: Number +_TEXTURE_WRAP_S = 10242 + +_TEXTURE_WRAP_T :: Number +_TEXTURE_WRAP_T = 10243 + +_TEXTURE :: Number +_TEXTURE = 5890 + +_TEXTURE_CUBE_MAP :: Number +_TEXTURE_CUBE_MAP = 34067 + +_TEXTURE_BINDING_CUBE_MAP :: Number +_TEXTURE_BINDING_CUBE_MAP = 34068 + +_TEXTURE_CUBE_MAP_POSITIVE_X :: Number +_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 + +_TEXTURE_CUBE_MAP_NEGATIVE_X :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 + +_TEXTURE_CUBE_MAP_POSITIVE_Y :: Number +_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 + +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 + +_TEXTURE_CUBE_MAP_POSITIVE_Z :: Number +_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 + +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: Number +_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 + +_MAX_CUBE_MAP_TEXTURE_SIZE :: Number +_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 + +_TEXTURE0 :: Number +_TEXTURE0 = 33984 + +_TEXTURE1 :: Number +_TEXTURE1 = 33985 + +_TEXTURE2 :: Number +_TEXTURE2 = 33986 + +_TEXTURE3 :: Number +_TEXTURE3 = 33987 + +_TEXTURE4 :: Number +_TEXTURE4 = 33988 + +_TEXTURE5 :: Number +_TEXTURE5 = 33989 + +_TEXTURE6 :: Number +_TEXTURE6 = 33990 + +_TEXTURE7 :: Number +_TEXTURE7 = 33991 + +_TEXTURE8 :: Number +_TEXTURE8 = 33992 + +_TEXTURE9 :: Number +_TEXTURE9 = 33993 + +_TEXTURE10 :: Number +_TEXTURE10 = 33994 + +_TEXTURE11 :: Number +_TEXTURE11 = 33995 + +_TEXTURE12 :: Number +_TEXTURE12 = 33996 + +_TEXTURE13 :: Number +_TEXTURE13 = 33997 + +_TEXTURE14 :: Number +_TEXTURE14 = 33998 + +_TEXTURE15 :: Number +_TEXTURE15 = 33999 + +_TEXTURE16 :: Number +_TEXTURE16 = 34000 + +_TEXTURE17 :: Number +_TEXTURE17 = 34001 + +_TEXTURE18 :: Number +_TEXTURE18 = 34002 + +_TEXTURE19 :: Number +_TEXTURE19 = 34003 + +_TEXTURE20 :: Number +_TEXTURE20 = 34004 + +_TEXTURE21 :: Number +_TEXTURE21 = 34005 + +_TEXTURE22 :: Number +_TEXTURE22 = 34006 + +_TEXTURE23 :: Number +_TEXTURE23 = 34007 + +_TEXTURE24 :: Number +_TEXTURE24 = 34008 + +_TEXTURE25 :: Number +_TEXTURE25 = 34009 + +_TEXTURE26 :: Number +_TEXTURE26 = 34010 + +_TEXTURE27 :: Number +_TEXTURE27 = 34011 + +_TEXTURE28 :: Number +_TEXTURE28 = 34012 + +_TEXTURE29 :: Number +_TEXTURE29 = 34013 + +_TEXTURE30 :: Number +_TEXTURE30 = 34014 + +_TEXTURE31 :: Number +_TEXTURE31 = 34015 + +_ACTIVE_TEXTURE :: Number +_ACTIVE_TEXTURE = 34016 + +_REPEAT :: Number +_REPEAT = 10497 + +_CLAMP_TO_EDGE :: Number +_CLAMP_TO_EDGE = 33071 + +_MIRRORED_REPEAT :: Number +_MIRRORED_REPEAT = 33648 + +_FLOAT_VEC2 :: Number +_FLOAT_VEC2 = 35664 + +_FLOAT_VEC3 :: Number +_FLOAT_VEC3 = 35665 + +_FLOAT_VEC4 :: Number +_FLOAT_VEC4 = 35666 + +_INT_VEC2 :: Number +_INT_VEC2 = 35667 + +_INT_VEC3 :: Number +_INT_VEC3 = 35668 + +_INT_VEC4 :: Number +_INT_VEC4 = 35669 + +_BOOL :: Number +_BOOL = 35670 + +_BOOL_VEC2 :: Number +_BOOL_VEC2 = 35671 + +_BOOL_VEC3 :: Number +_BOOL_VEC3 = 35672 + +_BOOL_VEC4 :: Number +_BOOL_VEC4 = 35673 + +_FLOAT_MAT2 :: Number +_FLOAT_MAT2 = 35674 + +_FLOAT_MAT3 :: Number +_FLOAT_MAT3 = 35675 + +_FLOAT_MAT4 :: Number +_FLOAT_MAT4 = 35676 + +_SAMPLER_2D :: Number +_SAMPLER_2D = 35678 + +_SAMPLER_CUBE :: Number +_SAMPLER_CUBE = 35680 + +_VERTEX_ATTRIB_ARRAY_ENABLED :: Number +_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 + +_VERTEX_ATTRIB_ARRAY_SIZE :: Number +_VERTEX_ATTRIB_ARRAY_SIZE = 34339 + +_VERTEX_ATTRIB_ARRAY_STRIDE :: Number +_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 + +_VERTEX_ATTRIB_ARRAY_TYPE :: Number +_VERTEX_ATTRIB_ARRAY_TYPE = 34341 + +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: Number +_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 + +_VERTEX_ATTRIB_ARRAY_POINTER :: Number +_VERTEX_ATTRIB_ARRAY_POINTER = 34373 + +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: Number +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 + +_COMPILE_STATUS :: Number +_COMPILE_STATUS = 35713 + +_INFO_LOG_LENGTH :: Number +_INFO_LOG_LENGTH = 35716 + +_SHADER_SOURCE_LENGTH :: Number +_SHADER_SOURCE_LENGTH = 35720 + +_LOW_FLOAT :: Number +_LOW_FLOAT = 36336 + +_MEDIUM_FLOAT :: Number +_MEDIUM_FLOAT = 36337 + +_HIGH_FLOAT :: Number +_HIGH_FLOAT = 36338 + +_LOW_INT :: Number +_LOW_INT = 36339 + +_MEDIUM_INT :: Number +_MEDIUM_INT = 36340 + +_HIGH_INT :: Number +_HIGH_INT = 36341 + +_FRAMEBUFFER :: Number +_FRAMEBUFFER = 36160 + +_RENDERBUFFER :: Number +_RENDERBUFFER = 36161 + +_RGBA4 :: Number +_RGBA4 = 32854 + +_RGB5_A1 :: Number +_RGB5_A1 = 32855 + +_RGB565 :: Number +_RGB565 = 36194 + +_DEPTH_COMPONENT16 :: Number +_DEPTH_COMPONENT16 = 33189 + +_STENCIL_INDEX :: Number +_STENCIL_INDEX = 6401 + +_STENCIL_INDEX8 :: Number +_STENCIL_INDEX8 = 36168 + +_DEPTH_STENCIL :: Number +_DEPTH_STENCIL = 34041 + +_RENDERBUFFER_WIDTH :: Number +_RENDERBUFFER_WIDTH = 36162 + +_RENDERBUFFER_HEIGHT :: Number +_RENDERBUFFER_HEIGHT = 36163 + +_RENDERBUFFER_INTERNAL_FORMAT :: Number +_RENDERBUFFER_INTERNAL_FORMAT = 36164 + +_RENDERBUFFER_RED_SIZE :: Number +_RENDERBUFFER_RED_SIZE = 36176 + +_RENDERBUFFER_GREEN_SIZE :: Number +_RENDERBUFFER_GREEN_SIZE = 36177 + +_RENDERBUFFER_BLUE_SIZE :: Number +_RENDERBUFFER_BLUE_SIZE = 36178 + +_RENDERBUFFER_ALPHA_SIZE :: Number +_RENDERBUFFER_ALPHA_SIZE = 36179 + +_RENDERBUFFER_DEPTH_SIZE :: Number +_RENDERBUFFER_DEPTH_SIZE = 36180 + +_RENDERBUFFER_STENCIL_SIZE :: Number +_RENDERBUFFER_STENCIL_SIZE = 36181 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: Number +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: Number +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: Number +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: Number +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 + +_COLOR_ATTACHMENT0 :: Number +_COLOR_ATTACHMENT0 = 36064 + +_DEPTH_ATTACHMENT :: Number +_DEPTH_ATTACHMENT = 36096 + +_STENCIL_ATTACHMENT :: Number +_STENCIL_ATTACHMENT = 36128 + +_DEPTH_STENCIL_ATTACHMENT :: Number +_DEPTH_STENCIL_ATTACHMENT = 33306 + +_NONE :: Number +_NONE = 0 + +_FRAMEBUFFER_COMPLETE :: Number +_FRAMEBUFFER_COMPLETE = 36053 + +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: Number +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 + +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: Number +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 + +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: Number +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 + +_FRAMEBUFFER_UNSUPPORTED :: Number +_FRAMEBUFFER_UNSUPPORTED = 36061 + +_FRAMEBUFFER_BINDING :: Number +_FRAMEBUFFER_BINDING = 36006 + +_RENDERBUFFER_BINDING :: Number +_RENDERBUFFER_BINDING = 36007 + +_MAX_RENDERBUFFER_SIZE :: Number +_MAX_RENDERBUFFER_SIZE = 34024 + +_INVALID_FRAMEBUFFER_OPERATION :: Number +_INVALID_FRAMEBUFFER_OPERATION = 1286 + +_UNPACK_FLIP_Y_WEBGL :: Number +_UNPACK_FLIP_Y_WEBGL = 37440 + +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: Number +_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 + +_CONTEXT_LOST_WEBGL :: Number +_CONTEXT_LOST_WEBGL = 37442 + +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: Number +_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 + +_BROWSER_DEFAULT_WEBGL :: Number +_BROWSER_DEFAULT_WEBGL = 37444 + + +-- *Methods +foreign import getContextAttributesImpl """ + function getContextAttributesImpl(webgl) { + return function () { + return webgl.getContextAttributes(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) + +foreign import isContextLostImpl """ + function isContextLostImpl(webgl) { + return function () { + return webgl.isContextLost(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) Boolean) + +foreign import getSupportedExtensionsImpl """ + function getSupportedExtensionsImpl(webgl) { + return function () { + return webgl.getSupportedExtensions(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) String) + +foreign import getExtensionImpl """ + function getExtensionImpl(webgl, name) { + return function () { + return webgl.getExtension(name); + }; + } +""" :: forall eff ret. String -> (Eff (webgl :: WebGl | eff) ret) + +foreign import activeTextureImpl """ + function activeTextureImpl(webgl, texture) { + return function () { + return webgl.activeTexture(texture); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import attachShaderImpl """ + function attachShaderImpl(webgl, program, shader) { + return function () { + return webgl.attachShader(program, shader); + }; + } +""" :: forall eff. WebGLProgram-> + WebGLShader + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindAttribLocationImpl """ + function bindAttribLocationImpl(webgl, program, index, name) { + return function () { + return webgl.bindAttribLocation(program, index, name); + }; + } +""" :: forall eff. WebGLProgram-> + GLuint-> + String + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindBufferImpl """ + function bindBufferImpl(webgl, target, buffer) { + return function () { + return webgl.bindBuffer(target, buffer); + }; + } +""" :: forall eff. GLenum-> + WebGLBuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindFramebufferImpl """ + function bindFramebufferImpl(webgl, target, framebuffer) { + return function () { + return webgl.bindFramebuffer(target, framebuffer); + }; + } +""" :: forall eff. GLenum-> + WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindRenderbufferImpl """ + function bindRenderbufferImpl(webgl, target, renderbuffer) { + return function () { + return webgl.bindRenderbuffer(target, renderbuffer); + }; + } +""" :: forall eff. GLenum-> + WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bindTextureImpl """ + function bindTextureImpl(webgl, target, texture) { + return function () { + return webgl.bindTexture(target, texture); + }; + } +""" :: forall eff. GLenum-> + WebGLTexture + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendColorImpl """ + function blendColorImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.blendColor(red, green, blue, alpha); + }; + } +""" :: forall eff. GLclampf-> + GLclampf-> + GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendEquationImpl """ + function blendEquationImpl(webgl, mode) { + return function () { + return webgl.blendEquation(mode); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendEquationSeparateImpl """ + function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { + return function () { + return webgl.blendEquationSeparate(modeRGB, modeAlpha); + }; + } +""" :: forall eff. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendFuncImpl """ + function blendFuncImpl(webgl, sfactor, dfactor) { + return function () { + return webgl.blendFunc(sfactor, dfactor); + }; + } +""" :: forall eff. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import blendFuncSeparateImpl """ + function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { + return function () { + return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bufferDataImpl """ + function bufferDataImpl(webgl, target, data, usage) { + return function () { + return webgl.bufferData(target, data, usage); + }; + } +""" :: forall eff. GLenum-> + Float32Array-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import bufferSubDataImpl """ + function bufferSubDataImpl(webgl, target, offset, data) { + return function () { + return webgl.bufferSubData(target, offset, data); + }; + } +""" :: forall eff. GLenum-> + GLintptr-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import checkFramebufferStatusImpl """ + function checkFramebufferStatusImpl(webgl, target) { + return function () { + return webgl.checkFramebufferStatus(target); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLenum) + +foreign import clearImpl """ + function clearImpl(webgl, mask) { + return function () { + return webgl.clear(mask); + }; + } +""" :: forall eff. GLbitfield -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearColorImpl """ + function clearColorImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.clearColor(red, green, blue, alpha); + }; + } +""" :: forall eff. GLclampf-> + GLclampf-> + GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearDepthImpl """ + function clearDepthImpl(webgl, depth) { + return function () { + return webgl.clearDepth(depth); + }; + } +""" :: forall eff. GLclampf -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import clearStencilImpl """ + function clearStencilImpl(webgl, s) { + return function () { + return webgl.clearStencil(s); + }; + } +""" :: forall eff. GLint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import colorMaskImpl """ + function colorMaskImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.colorMask(red, green, blue, alpha); + }; + } +""" :: forall eff. GLboolean-> + GLboolean-> + GLboolean-> + GLboolean + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import compileShaderImpl """ + function compileShaderImpl(webgl, shader) { + return function () { + return webgl.compileShader(shader); + }; + } +""" :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import copyTexImage2DImpl """ + function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { + return function () { + return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLenum-> + GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import copyTexSubImage2DImpl """ + function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { + return function () { + return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLint-> + GLint-> + GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import createBufferImpl """ + function createBufferImpl(webgl) { + return function () { + return webgl.createBuffer(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer) + +foreign import createFramebufferImpl """ + function createFramebufferImpl(webgl) { + return function () { + return webgl.createFramebuffer(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) + +foreign import createProgramImpl """ + function createProgramImpl(webgl) { + return function () { + return webgl.createProgram(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) + +foreign import createRenderbufferImpl """ + function createRenderbufferImpl(webgl) { + return function () { + return webgl.createRenderbuffer(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) + +foreign import createShaderImpl """ + function createShaderImpl(webgl, type) { + return function () { + return webgl.createShader(type); + }; + } +""" :: forall eff. GLenum + -> (Eff (webgl :: WebGl | eff) WebGLShader) + +foreign import createTextureImpl """ + function createTextureImpl(webgl) { + return function () { + return webgl.createTexture(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) + +foreign import cullFaceImpl """ + function cullFaceImpl(webgl, mode) { + return function () { + return webgl.cullFace(mode); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteBufferImpl """ + function deleteBufferImpl(webgl, buffer) { + return function () { + return webgl.deleteBuffer(buffer); + }; + } +""" :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteFramebufferImpl """ + function deleteFramebufferImpl(webgl, framebuffer) { + return function () { + return webgl.deleteFramebuffer(framebuffer); + }; + } +""" :: forall eff. WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteProgramImpl """ + function deleteProgramImpl(webgl, program) { + return function () { + return webgl.deleteProgram(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteRenderbufferImpl """ + function deleteRenderbufferImpl(webgl, renderbuffer) { + return function () { + return webgl.deleteRenderbuffer(renderbuffer); + }; + } +""" :: forall eff. WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteShaderImpl """ + function deleteShaderImpl(webgl, shader) { + return function () { + return webgl.deleteShader(shader); + }; + } +""" :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import deleteTextureImpl """ + function deleteTextureImpl(webgl, texture) { + return function () { + return webgl.deleteTexture(texture); + }; + } +""" :: forall eff. WebGLTexture + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthFuncImpl """ + function depthFuncImpl(webgl, func) { + return function () { + return webgl.depthFunc(func); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthMaskImpl """ + function depthMaskImpl(webgl, flag) { + return function () { + return webgl.depthMask(flag); + }; + } +""" :: forall eff. GLboolean -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import depthRangeImpl """ + function depthRangeImpl(webgl, zNear, zFar) { + return function () { + return webgl.depthRange(zNear, zFar); + }; + } +""" :: forall eff. GLclampf-> + GLclampf + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import detachShaderImpl """ + function detachShaderImpl(webgl, program, shader) { + return function () { + return webgl.detachShader(program, shader); + }; + } +""" :: forall eff. WebGLProgram-> + WebGLShader + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import disableImpl """ + function disableImpl(webgl, cap) { + return function () { + return webgl.disable(cap); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import disableVertexAttribArrayImpl """ + function disableVertexAttribArrayImpl(webgl, index) { + return function () { + return webgl.disableVertexAttribArray(index); + }; + } +""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import drawArraysImpl """ + function drawArraysImpl(webgl, mode, first, count) { + return function () { + return webgl.drawArrays(mode, first, count); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import drawElementsImpl """ + function drawElementsImpl(webgl, mode, count, type, offset) { + return function () { + return webgl.drawElements(mode, count, type, offset); + }; + } +""" :: forall eff. GLenum-> + GLsizei-> + GLenum-> + GLintptr + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import enableImpl """ + function enableImpl(webgl, cap) { + return function () { + return webgl.enable(cap); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import enableVertexAttribArrayImpl """ + function enableVertexAttribArrayImpl(webgl, index) { + return function () { + return webgl.enableVertexAttribArray(index); + }; + } +""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import finishImpl """ + function finishImpl(webgl) { + return function () { + return webgl.finish(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) Unit) + +foreign import flushImpl """ + function flushImpl(webgl) { + return function () { + return webgl.flush(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) Unit) + +foreign import framebufferRenderbufferImpl """ + function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { + return function () { + return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLenum-> + WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import framebufferTexture2DImpl """ + function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { + return function () { + return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLenum-> + WebGLTexture-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import frontFaceImpl """ + function frontFaceImpl(webgl, mode) { + return function () { + return webgl.frontFace(mode); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import generateMipmapImpl """ + function generateMipmapImpl(webgl, target) { + return function () { + return webgl.generateMipmap(target); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import getActiveAttribImpl """ + function getActiveAttribImpl(webgl, program, index) { + return function () { + return webgl.getActiveAttrib(program, index); + }; + } +""" :: forall eff. WebGLProgram-> + GLuint + -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + +foreign import getActiveUniformImpl """ + function getActiveUniformImpl(webgl, program, index) { + return function () { + return webgl.getActiveUniform(program, index); + }; + } +""" :: forall eff. WebGLProgram-> + GLuint + -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) + +foreign import getAttachedShadersImpl """ + function getAttachedShadersImpl(webgl, program) { + return function () { + return webgl.getAttachedShaders(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) WebGLShader) + +foreign import getAttribLocationImpl """ + function getAttribLocationImpl(webgl, program, name) { + return function () { + return webgl.getAttribLocation(program, name); + }; + } +""" :: forall eff. WebGLProgram-> + String + -> (Eff (webgl :: WebGl | eff) GLint) + +foreign import getParameterImpl """ + function getParameterImpl(webgl, pname) { + return function () { + return webgl.getParameter(pname); + }; + } +""" :: forall eff ret. GLenum -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getBufferParameterImpl """ + function getBufferParameterImpl(webgl, target, pname) { + return function () { + return webgl.getBufferParameter(target, pname); + }; + } +""" :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getErrorImpl """ + function getErrorImpl(webgl) { + return function () { + return webgl.getError(); + }; + } +""" :: forall eff. (Eff (webgl :: WebGl | eff) GLenum) + +foreign import getFramebufferAttachmentParameterImpl """ + function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { + return function () { + return webgl.getFramebufferAttachmentParameter(target, attachment, pname); + }; + } +""" :: forall eff ret. GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getProgramParameterImpl """ + function getProgramParameterImpl(webgl, program, pname) { + return function () { + return webgl.getProgramParameter(program, pname); + }; + } +""" :: forall eff ret. WebGLProgram-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getProgramInfoLogImpl """ + function getProgramInfoLogImpl(webgl, program) { + return function () { + return webgl.getProgramInfoLog(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) String) + +foreign import getRenderbufferParameterImpl """ + function getRenderbufferParameterImpl(webgl, target, pname) { + return function () { + return webgl.getRenderbufferParameter(target, pname); + }; + } +""" :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getShaderParameterImpl """ + function getShaderParameterImpl(webgl, shader, pname) { + return function () { + return webgl.getShaderParameter(shader, pname); + }; + } +""" :: forall eff ret. WebGLShader-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getShaderInfoLogImpl """ + function getShaderInfoLogImpl(webgl, shader) { + return function () { + return webgl.getShaderInfoLog(shader); + }; + } +""" :: forall eff. WebGLShader + -> (Eff (webgl :: WebGl | eff) String) + +foreign import getShaderSourceImpl """ + function getShaderSourceImpl(webgl, shader) { + return function () { + return webgl.getShaderSource(shader); + }; + } +""" :: forall eff. WebGLShader + -> (Eff (webgl :: WebGl | eff) String) + +foreign import getTexParameterImpl """ + function getTexParameterImpl(webgl, target, pname) { + return function () { + return webgl.getTexParameter(target, pname); + }; + } +""" :: forall eff ret. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getUniformImpl """ + function getUniformImpl(webgl, program, location) { + return function () { + return webgl.getUniform(program, location); + }; + } +""" :: forall eff ret. WebGLProgram-> + WebGLUniformLocation + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getUniformLocationImpl """ + function getUniformLocationImpl(webgl, program, name) { + return function () { + return webgl.getUniformLocation(program, name); + }; + } +""" :: forall eff. WebGLProgram-> + String + -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) + +foreign import getVertexAttribImpl """ + function getVertexAttribImpl(webgl, index, pname) { + return function () { + return webgl.getVertexAttrib(index, pname); + }; + } +""" :: forall eff ret. GLuint-> + GLenum + -> (Eff (webgl :: WebGl | eff) ret) + +foreign import getVertexAttribOffsetImpl """ + function getVertexAttribOffsetImpl(webgl, index, pname) { + return function () { + return webgl.getVertexAttribOffset(index, pname); + }; + } +""" :: forall eff. GLuint-> + GLenum + -> (Eff (webgl :: WebGl | eff) GLsizeiptr) + +foreign import hintImpl """ + function hintImpl(webgl, target, mode) { + return function () { + return webgl.hint(target, mode); + }; + } +""" :: forall eff. GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import isBufferImpl """ + function isBufferImpl(webgl, buffer) { + return function () { + return webgl.isBuffer(buffer); + }; + } +""" :: forall eff. WebGLBuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isEnabledImpl """ + function isEnabledImpl(webgl, cap) { + return function () { + return webgl.isEnabled(cap); + }; + } +""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isFramebufferImpl """ + function isFramebufferImpl(webgl, framebuffer) { + return function () { + return webgl.isFramebuffer(framebuffer); + }; + } +""" :: forall eff. WebGLFramebuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isProgramImpl """ + function isProgramImpl(webgl, program) { + return function () { + return webgl.isProgram(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isRenderbufferImpl """ + function isRenderbufferImpl(webgl, renderbuffer) { + return function () { + return webgl.isRenderbuffer(renderbuffer); + }; + } +""" :: forall eff. WebGLRenderbuffer + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isShaderImpl """ + function isShaderImpl(webgl, shader) { + return function () { + return webgl.isShader(shader); + }; + } +""" :: forall eff. WebGLShader + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import isTextureImpl """ + function isTextureImpl(webgl, texture) { + return function () { + return webgl.isTexture(texture); + }; + } +""" :: forall eff. WebGLTexture + -> (Eff (webgl :: WebGl | eff) GLboolean) + +foreign import lineWidthImpl """ + function lineWidthImpl(webgl, width) { + return function () { + return webgl.lineWidth(width); + }; + } +""" :: forall eff. GLfloat -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import linkProgramImpl """ + function linkProgramImpl(webgl, program) { + return function () { + return webgl.linkProgram(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import pixelStoreiImpl """ + function pixelStoreiImpl(webgl, pname, param) { + return function () { + return webgl.pixelStorei(pname, param); + }; + } +""" :: forall eff. GLenum-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import polygonOffsetImpl """ + function polygonOffsetImpl(webgl, factor, units) { + return function () { + return webgl.polygonOffset(factor, units); + }; + } +""" :: forall eff. GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import readPixelsImpl """ + function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { + return function () { + return webgl.readPixels(x, y, width, height, format, type, pixels); + }; + } +""" :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import renderbufferStorageImpl """ + function renderbufferStorageImpl(webgl, target, internalformat, width, height) { + return function () { + return webgl.renderbufferStorage(target, internalformat, width, height); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import sampleCoverageImpl """ + function sampleCoverageImpl(webgl, value, invert) { + return function () { + return webgl.sampleCoverage(value, invert); + }; + } +""" :: forall eff. GLclampf-> + GLboolean + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import scissorImpl """ + function scissorImpl(webgl, x, y, width, height) { + return function () { + return webgl.scissor(x, y, width, height); + }; + } +""" :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import shaderSourceImpl """ + function shaderSourceImpl(webgl, shader, source) { + return function () { + return webgl.shaderSource(shader, source); + }; + } +""" :: forall eff. WebGLShader-> + String + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilFuncImpl """ + function stencilFuncImpl(webgl, func, ref, mask) { + return function () { + return webgl.stencilFunc(func, ref, mask); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLuint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilFuncSeparateImpl """ + function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { + return function () { + return webgl.stencilFuncSeparate(face, func, ref, mask); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLint-> + GLuint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilMaskImpl """ + function stencilMaskImpl(webgl, mask) { + return function () { + return webgl.stencilMask(mask); + }; + } +""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilMaskSeparateImpl """ + function stencilMaskSeparateImpl(webgl, face, mask) { + return function () { + return webgl.stencilMaskSeparate(face, mask); + }; + } +""" :: forall eff. GLenum-> + GLuint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilOpImpl """ + function stencilOpImpl(webgl, fail, zfail, zpass) { + return function () { + return webgl.stencilOp(fail, zfail, zpass); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import stencilOpSeparateImpl """ + function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { + return function () { + return webgl.stencilOpSeparate(face, fail, zfail, zpass); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLenum-> + GLenum + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texImage2DImpl """ + function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { + return function () { + return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLenum-> + GLsizei-> + GLsizei-> + GLint-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texParameterfImpl """ + function texParameterfImpl(webgl, target, pname, param) { + return function () { + return webgl.texParameterf(target, pname, param); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texParameteriImpl """ + function texParameteriImpl(webgl, target, pname, param) { + return function () { + return webgl.texParameteri(target, pname, param); + }; + } +""" :: forall eff. GLenum-> + GLenum-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import texSubImage2DImpl """ + function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { + return function () { + return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + }; + } +""" :: forall eff. GLenum-> + GLint-> + GLint-> + GLint-> + GLsizei-> + GLsizei-> + GLenum-> + GLenum-> + ArrayBufferView + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1fImpl """ + function uniform1fImpl(webgl, location, x) { + return function () { + return webgl.uniform1f(location, x); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1fvImpl """ + function uniform1fvImpl(webgl, location, v) { + return function () { + return webgl.uniform1fv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1iImpl """ + function uniform1iImpl(webgl, location, x) { + return function () { + return webgl.uniform1i(location, x); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform1ivImpl """ + function uniform1ivImpl(webgl, location, v) { + return function () { + return webgl.uniform1iv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2fImpl """ + function uniform2fImpl(webgl, location, x, y) { + return function () { + return webgl.uniform2f(location, x, y); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2fvImpl """ + function uniform2fvImpl(webgl, location, v) { + return function () { + return webgl.uniform2fv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2iImpl """ + function uniform2iImpl(webgl, location, x, y) { + return function () { + return webgl.uniform2i(location, x, y); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform2ivImpl """ + function uniform2ivImpl(webgl, location, v) { + return function () { + return webgl.uniform2iv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3fImpl """ + function uniform3fImpl(webgl, location, x, y, z) { + return function () { + return webgl.uniform3f(location, x, y, z); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3fvImpl """ + function uniform3fvImpl(webgl, location, v) { + return function () { + return webgl.uniform3fv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3iImpl """ + function uniform3iImpl(webgl, location, x, y, z) { + return function () { + return webgl.uniform3i(location, x, y, z); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLint-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform3ivImpl """ + function uniform3ivImpl(webgl, location, v) { + return function () { + return webgl.uniform3iv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4fImpl """ + function uniform4fImpl(webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4f(location, x, y, z, w); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLfloat-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4fvImpl """ + function uniform4fvImpl(webgl, location, v) { + return function () { + return webgl.uniform4fv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4iImpl """ + function uniform4iImpl(webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4i(location, x, y, z, w); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLint-> + GLint-> + GLint-> + GLint + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniform4ivImpl """ + function uniform4ivImpl(webgl, location, v) { + return function () { + return webgl.uniform4iv(location, v); + }; + } +""" :: forall eff. WebGLUniformLocation-> + Int32Array + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix2fvImpl """ + function uniformMatrix2fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix2fv(location, transpose, value); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix3fvImpl """ + function uniformMatrix3fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix3fv(location, transpose, value); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import uniformMatrix4fvImpl """ + function uniformMatrix4fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix4fv(location, transpose, value); + }; + } +""" :: forall eff. WebGLUniformLocation-> + GLboolean-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import useProgramImpl """ + function useProgramImpl(webgl, program) { + return function () { + return webgl.useProgram(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import validateProgramImpl """ + function validateProgramImpl(webgl, program) { + return function () { + return webgl.validateProgram(program); + }; + } +""" :: forall eff. WebGLProgram + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib1fImpl """ + function vertexAttrib1fImpl(webgl, indx, x) { + return function () { + return webgl.vertexAttrib1f(indx, x); + }; + } +""" :: forall eff. GLuint-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib1fvImpl """ + function vertexAttrib1fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib1fv(indx, values); + }; + } +""" :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib2fImpl """ + function vertexAttrib2fImpl(webgl, indx, x, y) { + return function () { + return webgl.vertexAttrib2f(indx, x, y); + }; + } +""" :: forall eff. GLuint-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib2fvImpl """ + function vertexAttrib2fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib2fv(indx, values); + }; + } +""" :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib3fImpl """ + function vertexAttrib3fImpl(webgl, indx, x, y, z) { + return function () { + return webgl.vertexAttrib3f(indx, x, y, z); + }; + } +""" :: forall eff. GLuint-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib3fvImpl """ + function vertexAttrib3fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib3fv(indx, values); + }; + } +""" :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib4fImpl """ + function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { + return function () { + return webgl.vertexAttrib4f(indx, x, y, z, w); + }; + } +""" :: forall eff. GLuint-> + GLfloat-> + GLfloat-> + GLfloat-> + GLfloat + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttrib4fvImpl """ + function vertexAttrib4fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib4fv(indx, values); + }; + } +""" :: forall eff. GLuint-> + FloatArray + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import vertexAttribPointerImpl """ + function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { + return function () { + return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); + }; + } +""" :: forall eff. GLuint-> + GLint-> + GLenum-> + GLboolean-> + GLsizei-> + GLintptr + -> (Eff (webgl :: WebGl | eff) Unit) + +foreign import viewportImpl """ + function viewportImpl(webgl, x, y, width, height) { + return function () { + return webgl.viewport(x, y, width, height); + }; + } +""" :: forall eff. GLint-> + GLint-> + GLsizei-> + GLsizei + -> (Eff (webgl :: WebGl | eff) Unit) From 3aabb93ceca1523b4e9dd6a37ba97f2c9cc61b53 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 07:01:52 -0600 Subject: [PATCH 09/51] now printing impl functions rather than nested --- src/IDL/AST.hs | 3 +++ src/IDL/Printer.hs | 44 +++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/IDL/AST.hs b/src/IDL/AST.hs index ea05bf8..b8d424f 100644 --- a/src/IDL/AST.hs +++ b/src/IDL/AST.hs @@ -39,6 +39,9 @@ data Type } deriving (Eq,Show) +instance Ord Type where + compare x y = compare (typeName x) (typeName y) + data Arg = Arg { argType :: Type diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index 6580a42..20b88cc 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -1,9 +1,9 @@ module IDL.Printer (ppPureScriptFFI) where -import Data.List (nubBy, nub) +import Data.List (nubBy, nub, sort) import Data.Maybe (isNothing) import Text.PrettyPrint - (sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, + (char, space, sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, (<>), integer, (<+>), text, vcat, ($+$), Doc) import IDL.AST @@ -91,21 +91,18 @@ ppConstant Enum { enumName = n, enumValue = v } = ppTypeSig :: Decl -> Doc ppTypeSig f | hasGenericReturnType = - text ":: forall eff ret." <+> - sep ((punctuate (text "->") (map (toPurescriptType . argType) (methodArgs f))) - ++ [(if null (methodArgs f) - then empty - else text "->") <+> parens ( - text "Eff (webgl :: WebGl | eff) ret")]) - | otherwise = text ":: forall eff." <+> - sep ((punctuate (text "->") (map (toPurescriptType . argType) (methodArgs f))) - ++ [(if null (methodArgs f) - then empty - else text "->") <+> parens ( - text "Eff (webgl :: WebGl | eff)" <+> - toPurescriptType (methodRetType f))]) + text ":: forall eff a." <+> argList <+> effMonad (char 'a') + | otherwise = + text ":: forall eff." <+> argList <+> effMonad (toPurescriptType $ methodRetType f) where - hasGenericReturnType = typeName (methodRetType f) `elem` ["any", "object"] + hasGenericReturnType = + typeName (methodRetType f) `elem` ["any", "object"] + effMonad doc = + parens $ text "Eff (canvas :: Canvas | eff)" <+> doc + argList = + text "Fn" <> + text (show . length $ funcArgs f) <+> + hcat (punctuate space (map (toPurescriptType . argType) (funcArgs f))) ppMethod :: Decl -> Doc ppMethod f = @@ -120,7 +117,7 @@ ppImplBody f = rbrace where func = text "function" - ret = text "return" + ret = text "return" ppArgs :: (Decl -> [Arg]) -> Decl -> Doc ppArgs f = hcat . punctuate (text ", ") . map (text . argName) . f @@ -137,14 +134,15 @@ ppTypeDecl :: Type -> Doc ppTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" ppPureScriptFFI :: Idl -> Doc -ppPureScriptFFI idl = header $+$ blankLine - $+$ text "-- *TypeDecls" $+$ typeDecls $+$ blankLine - $+$ text "-- *Constants" $+$ constants $+$ blankLine - $+$ text "-- *Methods" $+$ methods +ppPureScriptFFI idl = + header $+$ blankLine + $+$ typeDecls $+$ blankLine + $+$ constants $+$ blankLine + $+$ methods $+$ blankLine where header = vcat . map text $ moduleHeader ++ [""] ++ typedefs - typeDecls = vcat $ map ppTypeDecl $ nubBy (\t1 t2-> typeName t1 == typeName t2) + typeDecls = vcat $ map ppTypeDecl $ sort $ nubBy (\t1 t2-> typeName t1 == typeName t2) [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] constants = vcat [ppConstant c | c <- idl , isEnum c] @@ -168,7 +166,7 @@ funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f webglContext :: Arg -webglContext = Arg (Type "WebglContext" False Nothing) "webgl" +webglContext = Arg (Type "WebGLContext" False Nothing) "webgl" prefixWebgl :: Doc prefixWebgl = text (argName webglContext) <> text "." From b5048fde01fee2d2fe87a2064c33d70c712c3ac9 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 15:01:48 -0600 Subject: [PATCH 10/51] correctly print array types --- src/IDL/Printer.hs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index 20b88cc..abc00b0 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -3,7 +3,7 @@ module IDL.Printer (ppPureScriptFFI) where import Data.List (nubBy, nub, sort) import Data.Maybe (isNothing) import Text.PrettyPrint - (char, space, sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, + (brackets, char, space, sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, (<>), integer, (<+>), text, vcat, ($+$), Doc) import IDL.AST @@ -73,12 +73,14 @@ blankLine :: Doc blankLine = text "" toPurescriptType :: Type -> Doc -toPurescriptType Type { typeName = t } - | t == "void" = text "Unit" - | t == "boolean" = text "Boolean" - | t == "DOMString" = text "String" - | t == "ArrayBuffer" = text "Float32Array" - | otherwise = text t +toPurescriptType Type { typeName = name, typeIsArray = isArray } + | name == "void" = toType "Unit" + | name == "boolean" = toType "Boolean" + | name == "DOMString" = toType "String" + | name == "ArrayBuffer" = toType "Float32Array" + | otherwise = toType name + where + toType = if isArray then brackets . text else text ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = From 60c9fbd8351a859c6c01af80a55a4fa510fa3001 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 15:38:35 -0600 Subject: [PATCH 11/51] remove typedef from constants --- src/IDL/Printer.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index abc00b0..60ada68 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -84,10 +84,8 @@ toPurescriptType Type { typeName = name, typeIsArray = isArray } ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = - typeDef $+$ valuDef $+$ blankLine + text constName <+> text "=" $$ nest 48 (integer v) where - typeDef = text constName <+> text ":: Number" - valuDef = text constName <+> text "=" <+> integer v constName = '_' : n ppTypeSig :: Decl -> Doc From 34040ba30ffea7826f1d9abf1b19330169583405 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 15:43:24 -0600 Subject: [PATCH 12/51] arbitrary cleanup --- src/IDL/Printer.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index 60ada68..5962fd0 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -13,7 +13,7 @@ moduleHeader = [ "-- This file is automatically generated! Don't edit this file, but" , "-- instead modify purescript-webgl-generator." , "" - , "module Graphics.WebGLRaw where" + , "module Graphics.WebGL.Raw where" , "" , "import Control.Monad.Eff" , "import Control.Monad.Eff.WebGL" @@ -157,7 +157,8 @@ extractTypes _ = [] isUsableFunc :: Decl -> Bool isUsableFunc i = - isFunction i && and (map (isNothing . typeCondPara . argType) (methodArgs i)) + isFunction i && + and (map (isNothing . typeCondPara . argType) $ methodArgs i) implName :: Decl -> String implName f = methodName f ++ "Impl" From 80e122f2ddd8442a1f4fd0d5b2b52d5f13459b95 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 17:37:49 -0600 Subject: [PATCH 13/51] additional cleanup --- src/IDL/Printer.hs | 76 ++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 36 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index 5962fd0..215bc4c 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -1,13 +1,30 @@ module IDL.Printer (ppPureScriptFFI) where -import Data.List (nubBy, nub, sort) +import Data.List (nubBy, sort) import Data.Maybe (isNothing) -import Text.PrettyPrint - (brackets, char, space, sep, ($$), hcat, punctuate, semi, comma, lbrace, rbrace, empty, parens, nest, - (<>), integer, (<+>), text, vcat, ($+$), Doc) +import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, space, + hcat, punctuate, semi, lbrace, rbrace, empty, parens, nest, integer, text, + vcat) import IDL.AST +ppPureScriptFFI :: Idl -> Doc +ppPureScriptFFI idl = + header $+$ blankLine + $+$ typeDecls $+$ blankLine + $+$ constants $+$ blankLine + $+$ methods $+$ blankLine + where + -- TODO: these need some heavy cleanup + header = vcat . map text $ moduleHeader ++ [""] ++ typedefs + typeDecls = vcat $ map ppTypeDecl $ sort $ nubBy (\t1 t2-> typeName t1 == typeName t2) + [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] + constants = vcat [ppConstant c | c <- idl , isEnum c] + methods = vcat $ map ppFuncImpl $ nubBy (\t1 t2-> methodName t1 == methodName t2) + [c | c <- idl , isUsableFunc c] + +-- predefined strings + moduleHeader :: [String] moduleHeader = [ "-- This file is automatically generated! Don't edit this file, but" @@ -69,18 +86,7 @@ webglTypes = , "void" ] -blankLine :: Doc -blankLine = text "" - -toPurescriptType :: Type -> Doc -toPurescriptType Type { typeName = name, typeIsArray = isArray } - | name == "void" = toType "Unit" - | name == "boolean" = toType "Boolean" - | name == "DOMString" = toType "String" - | name == "ArrayBuffer" = toType "Float32Array" - | otherwise = toType name - where - toType = if isArray then brackets . text else text +-- component pretty-printers ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = @@ -93,7 +99,7 @@ ppTypeSig f | hasGenericReturnType = text ":: forall eff a." <+> argList <+> effMonad (char 'a') | otherwise = - text ":: forall eff." <+> argList <+> effMonad (toPurescriptType $ methodRetType f) + text ":: forall eff." <+> argList <+> effMonad (ppType $ methodRetType f) where hasGenericReturnType = typeName (methodRetType f) `elem` ["any", "object"] @@ -102,14 +108,14 @@ ppTypeSig f argList = text "Fn" <> text (show . length $ funcArgs f) <+> - hcat (punctuate space (map (toPurescriptType . argType) (funcArgs f))) + hcat (punctuate space (map (ppType . argType) (funcArgs f))) ppMethod :: Decl -> Doc ppMethod f = prefixWebgl <> text (methodName f) <> parens (ppArgs methodArgs f) <> semi -ppImplBody :: Decl -> Doc -ppImplBody f = +ppFuncImplBody :: Decl -> Doc +ppFuncImplBody f = func <+> text (implName f) <> parens (ppArgs funcArgs f) <+> lbrace $+$ nest 2 (ret <+> func <+> parens empty <+> lbrace) $+$ nest 4 (ret <+> ppMethod f) $+$ @@ -122,10 +128,10 @@ ppImplBody f = ppArgs :: (Decl -> [Arg]) -> Decl -> Doc ppArgs f = hcat . punctuate (text ", ") . map (text . argName) . f -ppImpl :: Decl -> Doc -ppImpl f = +ppFuncImpl :: Decl -> Doc +ppFuncImpl f = text "foreign import" <+> text (implName f) <+> - jsBlock $+$ nest 2 (ppImplBody f) $+$ jsBlock <+> + jsBlock $+$ nest 2 (ppFuncImplBody f) $+$ jsBlock <+> ppTypeSig f $+$ blankLine where jsBlock = text "\"\"\"" @@ -133,22 +139,20 @@ ppImpl f = ppTypeDecl :: Type -> Doc ppTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" -ppPureScriptFFI :: Idl -> Doc -ppPureScriptFFI idl = - header $+$ blankLine - $+$ typeDecls $+$ blankLine - $+$ constants $+$ blankLine - $+$ methods $+$ blankLine +ppType :: Type -> Doc +ppType Type { typeName = name, typeIsArray = isArray } + | name == "void" = toType "Unit" + | name == "boolean" = toType "Boolean" + | name == "DOMString" = toType "String" + | name == "ArrayBuffer" = toType "Float32Array" + | otherwise = toType name where - header = vcat . map text $ moduleHeader ++ [""] ++ typedefs - - typeDecls = vcat $ map ppTypeDecl $ sort $ nubBy (\t1 t2-> typeName t1 == typeName t2) - [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] + toType = if isArray then brackets . text else text - constants = vcat [ppConstant c | c <- idl , isEnum c] +-- helpers - methods = vcat $ map ppImpl $ nubBy (\t1 t2-> methodName t1 == methodName t2) - [c | c <- idl , isUsableFunc c] +blankLine :: Doc +blankLine = text "" extractTypes :: Decl -> [Type] extractTypes f@Function{methodRetType = t1} = t1 : map argType (funcArgs f) From 310261d317deb49f235d60d60b75eb7244d54e5c Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 22:00:51 -0500 Subject: [PATCH 14/51] rm accidentally-committed test file --- test.purs | 2283 ----------------------------------------------------- 1 file changed, 2283 deletions(-) delete mode 100644 test.purs diff --git a/test.purs b/test.purs deleted file mode 100644 index 50ee253..0000000 --- a/test.purs +++ /dev/null @@ -1,2283 +0,0 @@ -Preprocessing executable 'purescript-webgl-generator' for -purescript-webgl-generator-0.1.0.0... -[3 of 4] Compiling IDL.Printer ( src/IDL/Printer.hs, dist/build/purescript-webgl-generator/purescript-webgl-generator-tmp/IDL/Printer.o ) -Linking dist/build/purescript-webgl-generator/purescript-webgl-generator ... -Running purescript-webgl-generator... --- This file is automatically generated! Don't edit this file, but --- instead modify purescript-webgl-generator. - -module Graphics.WebGLRaw where - -import Control.Monad.Eff -import Control.Monad.Eff.WebGL -import Data.ArrayBuffer.Types -import Data.TypedArray - -type GLenum = Number -type GLboolean = Boolean -type GLbitfield = Number -type GLbyte = Number -type GLshort = Number -type GLint = Number -type GLsizei = Number -type GLintptr = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLushort = Number -type GLuint = Number -type GLfloat = Number -type GLclampf = Number -type FloatArray = Float32Array - --- *TypeDecls -foreign import data WebGLContextAttributes :: * -foreign import data WebglContext :: * -foreign import data WebGLProgram :: * -foreign import data WebGLShader :: * -foreign import data WebGLBuffer :: * -foreign import data WebGLFramebuffer :: * -foreign import data WebGLRenderbuffer :: * -foreign import data WebGLTexture :: * -foreign import data ArrayBufferView :: * -foreign import data WebGLActiveInfo :: * -foreign import data WebGLUniformLocation :: * -foreign import data ImageData :: * -foreign import data HTMLImageElement :: * -foreign import data HTMLVideoElement :: * - --- *Constants -_DEPTH_BUFFER_BIT :: Number -_DEPTH_BUFFER_BIT = 256 - -_STENCIL_BUFFER_BIT :: Number -_STENCIL_BUFFER_BIT = 1024 - -_COLOR_BUFFER_BIT :: Number -_COLOR_BUFFER_BIT = 16384 - -_POINTS :: Number -_POINTS = 0 - -_LINES :: Number -_LINES = 1 - -_LINE_LOOP :: Number -_LINE_LOOP = 2 - -_LINE_STRIP :: Number -_LINE_STRIP = 3 - -_TRIANGLES :: Number -_TRIANGLES = 4 - -_TRIANGLE_STRIP :: Number -_TRIANGLE_STRIP = 5 - -_TRIANGLE_FAN :: Number -_TRIANGLE_FAN = 6 - -_ZERO :: Number -_ZERO = 0 - -_ONE :: Number -_ONE = 1 - -_SRC_COLOR :: Number -_SRC_COLOR = 768 - -_ONE_MINUS_SRC_COLOR :: Number -_ONE_MINUS_SRC_COLOR = 769 - -_SRC_ALPHA :: Number -_SRC_ALPHA = 770 - -_ONE_MINUS_SRC_ALPHA :: Number -_ONE_MINUS_SRC_ALPHA = 771 - -_DST_ALPHA :: Number -_DST_ALPHA = 772 - -_ONE_MINUS_DST_ALPHA :: Number -_ONE_MINUS_DST_ALPHA = 773 - -_DST_COLOR :: Number -_DST_COLOR = 774 - -_ONE_MINUS_DST_COLOR :: Number -_ONE_MINUS_DST_COLOR = 775 - -_SRC_ALPHA_SATURATE :: Number -_SRC_ALPHA_SATURATE = 776 - -_FUNC_ADD :: Number -_FUNC_ADD = 32774 - -_BLEND_EQUATION :: Number -_BLEND_EQUATION = 32777 - -_BLEND_EQUATION_RGB :: Number -_BLEND_EQUATION_RGB = 32777 - -_BLEND_EQUATION_ALPHA :: Number -_BLEND_EQUATION_ALPHA = 34877 - -_FUNC_SUBTRACT :: Number -_FUNC_SUBTRACT = 32778 - -_FUNC_REVERSE_SUBTRACT :: Number -_FUNC_REVERSE_SUBTRACT = 32779 - -_BLEND_DST_RGB :: Number -_BLEND_DST_RGB = 32968 - -_BLEND_SRC_RGB :: Number -_BLEND_SRC_RGB = 32969 - -_BLEND_DST_ALPHA :: Number -_BLEND_DST_ALPHA = 32970 - -_BLEND_SRC_ALPHA :: Number -_BLEND_SRC_ALPHA = 32971 - -_CONSTANT_COLOR :: Number -_CONSTANT_COLOR = 32769 - -_ONE_MINUS_CONSTANT_COLOR :: Number -_ONE_MINUS_CONSTANT_COLOR = 32770 - -_CONSTANT_ALPHA :: Number -_CONSTANT_ALPHA = 32771 - -_ONE_MINUS_CONSTANT_ALPHA :: Number -_ONE_MINUS_CONSTANT_ALPHA = 32772 - -_BLEND_COLOR :: Number -_BLEND_COLOR = 32773 - -_ARRAY_BUFFER :: Number -_ARRAY_BUFFER = 34962 - -_ELEMENT_ARRAY_BUFFER :: Number -_ELEMENT_ARRAY_BUFFER = 34963 - -_ARRAY_BUFFER_BINDING :: Number -_ARRAY_BUFFER_BINDING = 34964 - -_ELEMENT_ARRAY_BUFFER_BINDING :: Number -_ELEMENT_ARRAY_BUFFER_BINDING = 34965 - -_STREAM_DRAW :: Number -_STREAM_DRAW = 35040 - -_STATIC_DRAW :: Number -_STATIC_DRAW = 35044 - -_DYNAMIC_DRAW :: Number -_DYNAMIC_DRAW = 35048 - -_BUFFER_SIZE :: Number -_BUFFER_SIZE = 34660 - -_BUFFER_USAGE :: Number -_BUFFER_USAGE = 34661 - -_CURRENT_VERTEX_ATTRIB :: Number -_CURRENT_VERTEX_ATTRIB = 34342 - -_FRONT :: Number -_FRONT = 1028 - -_BACK :: Number -_BACK = 1029 - -_FRONT_AND_BACK :: Number -_FRONT_AND_BACK = 1032 - -_TEXTURE_2D :: Number -_TEXTURE_2D = 3553 - -_CULL_FACE :: Number -_CULL_FACE = 2884 - -_BLEND :: Number -_BLEND = 3042 - -_DITHER :: Number -_DITHER = 3024 - -_STENCIL_TEST :: Number -_STENCIL_TEST = 2960 - -_DEPTH_TEST :: Number -_DEPTH_TEST = 2929 - -_SCISSOR_TEST :: Number -_SCISSOR_TEST = 3089 - -_POLYGON_OFFSET_FILL :: Number -_POLYGON_OFFSET_FILL = 32823 - -_SAMPLE_ALPHA_TO_COVERAGE :: Number -_SAMPLE_ALPHA_TO_COVERAGE = 32926 - -_SAMPLE_COVERAGE :: Number -_SAMPLE_COVERAGE = 32928 - -_NO_ERROR :: Number -_NO_ERROR = 0 - -_INVALID_ENUM :: Number -_INVALID_ENUM = 1280 - -_INVALID_VALUE :: Number -_INVALID_VALUE = 1281 - -_INVALID_OPERATION :: Number -_INVALID_OPERATION = 1282 - -_OUT_OF_MEMORY :: Number -_OUT_OF_MEMORY = 1285 - -_CW :: Number -_CW = 2304 - -_CCW :: Number -_CCW = 2305 - -_LINE_WIDTH :: Number -_LINE_WIDTH = 2849 - -_ALIASED_POINT_SIZE_RANGE :: Number -_ALIASED_POINT_SIZE_RANGE = 33901 - -_ALIASED_LINE_WIDTH_RANGE :: Number -_ALIASED_LINE_WIDTH_RANGE = 33902 - -_CULL_FACE_MODE :: Number -_CULL_FACE_MODE = 2885 - -_FRONT_FACE :: Number -_FRONT_FACE = 2886 - -_DEPTH_RANGE :: Number -_DEPTH_RANGE = 2928 - -_DEPTH_WRITEMASK :: Number -_DEPTH_WRITEMASK = 2930 - -_DEPTH_CLEAR_VALUE :: Number -_DEPTH_CLEAR_VALUE = 2931 - -_DEPTH_FUNC :: Number -_DEPTH_FUNC = 2932 - -_STENCIL_CLEAR_VALUE :: Number -_STENCIL_CLEAR_VALUE = 2961 - -_STENCIL_FUNC :: Number -_STENCIL_FUNC = 2962 - -_STENCIL_FAIL :: Number -_STENCIL_FAIL = 2964 - -_STENCIL_PASS_DEPTH_FAIL :: Number -_STENCIL_PASS_DEPTH_FAIL = 2965 - -_STENCIL_PASS_DEPTH_PASS :: Number -_STENCIL_PASS_DEPTH_PASS = 2966 - -_STENCIL_REF :: Number -_STENCIL_REF = 2967 - -_STENCIL_VALUE_MASK :: Number -_STENCIL_VALUE_MASK = 2963 - -_STENCIL_WRITEMASK :: Number -_STENCIL_WRITEMASK = 2968 - -_STENCIL_BACK_FUNC :: Number -_STENCIL_BACK_FUNC = 34816 - -_STENCIL_BACK_FAIL :: Number -_STENCIL_BACK_FAIL = 34817 - -_STENCIL_BACK_PASS_DEPTH_FAIL :: Number -_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 - -_STENCIL_BACK_PASS_DEPTH_PASS :: Number -_STENCIL_BACK_PASS_DEPTH_PASS = 34819 - -_STENCIL_BACK_REF :: Number -_STENCIL_BACK_REF = 36003 - -_STENCIL_BACK_VALUE_MASK :: Number -_STENCIL_BACK_VALUE_MASK = 36004 - -_STENCIL_BACK_WRITEMASK :: Number -_STENCIL_BACK_WRITEMASK = 36005 - -_VIEWPORT :: Number -_VIEWPORT = 2978 - -_SCISSOR_BOX :: Number -_SCISSOR_BOX = 3088 - -_COLOR_CLEAR_VALUE :: Number -_COLOR_CLEAR_VALUE = 3106 - -_COLOR_WRITEMASK :: Number -_COLOR_WRITEMASK = 3107 - -_UNPACK_ALIGNMENT :: Number -_UNPACK_ALIGNMENT = 3317 - -_PACK_ALIGNMENT :: Number -_PACK_ALIGNMENT = 3333 - -_MAX_TEXTURE_SIZE :: Number -_MAX_TEXTURE_SIZE = 3379 - -_MAX_VIEWPORT_DIMS :: Number -_MAX_VIEWPORT_DIMS = 3386 - -_SUBPIXEL_BITS :: Number -_SUBPIXEL_BITS = 3408 - -_RED_BITS :: Number -_RED_BITS = 3410 - -_GREEN_BITS :: Number -_GREEN_BITS = 3411 - -_BLUE_BITS :: Number -_BLUE_BITS = 3412 - -_ALPHA_BITS :: Number -_ALPHA_BITS = 3413 - -_DEPTH_BITS :: Number -_DEPTH_BITS = 3414 - -_STENCIL_BITS :: Number -_STENCIL_BITS = 3415 - -_POLYGON_OFFSET_UNITS :: Number -_POLYGON_OFFSET_UNITS = 10752 - -_POLYGON_OFFSET_FACTOR :: Number -_POLYGON_OFFSET_FACTOR = 32824 - -_TEXTURE_BINDING_2D :: Number -_TEXTURE_BINDING_2D = 32873 - -_SAMPLE_BUFFERS :: Number -_SAMPLE_BUFFERS = 32936 - -_SAMPLES :: Number -_SAMPLES = 32937 - -_SAMPLE_COVERAGE_VALUE :: Number -_SAMPLE_COVERAGE_VALUE = 32938 - -_SAMPLE_COVERAGE_INVERT :: Number -_SAMPLE_COVERAGE_INVERT = 32939 - -_NUM_COMPRESSED_TEXTURE_FORMATS :: Number -_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 - -_COMPRESSED_TEXTURE_FORMATS :: Number -_COMPRESSED_TEXTURE_FORMATS = 34467 - -_DONT_CARE :: Number -_DONT_CARE = 4352 - -_FASTEST :: Number -_FASTEST = 4353 - -_NICEST :: Number -_NICEST = 4354 - -_GENERATE_MIPMAP_HINT :: Number -_GENERATE_MIPMAP_HINT = 33170 - -_BYTE :: Number -_BYTE = 5120 - -_UNSIGNED_BYTE :: Number -_UNSIGNED_BYTE = 5121 - -_SHORT :: Number -_SHORT = 5122 - -_UNSIGNED_SHORT :: Number -_UNSIGNED_SHORT = 5123 - -_INT :: Number -_INT = 5124 - -_UNSIGNED_INT :: Number -_UNSIGNED_INT = 5125 - -_FLOAT :: Number -_FLOAT = 5126 - -_DEPTH_COMPONENT :: Number -_DEPTH_COMPONENT = 6402 - -_ALPHA :: Number -_ALPHA = 6406 - -_RGB :: Number -_RGB = 6407 - -_RGBA :: Number -_RGBA = 6408 - -_LUMINANCE :: Number -_LUMINANCE = 6409 - -_LUMINANCE_ALPHA :: Number -_LUMINANCE_ALPHA = 6410 - -_UNSIGNED_SHORT_4_4_4_4 :: Number -_UNSIGNED_SHORT_4_4_4_4 = 32819 - -_UNSIGNED_SHORT_5_5_5_1 :: Number -_UNSIGNED_SHORT_5_5_5_1 = 32820 - -_UNSIGNED_SHORT_5_6_5 :: Number -_UNSIGNED_SHORT_5_6_5 = 33635 - -_FRAGMENT_SHADER :: Number -_FRAGMENT_SHADER = 35632 - -_VERTEX_SHADER :: Number -_VERTEX_SHADER = 35633 - -_MAX_VERTEX_ATTRIBS :: Number -_MAX_VERTEX_ATTRIBS = 34921 - -_MAX_VERTEX_UNIFORM_VECTORS :: Number -_MAX_VERTEX_UNIFORM_VECTORS = 36347 - -_MAX_VARYING_VECTORS :: Number -_MAX_VARYING_VECTORS = 36348 - -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: Number -_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 - -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: Number -_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 - -_MAX_TEXTURE_IMAGE_UNITS :: Number -_MAX_TEXTURE_IMAGE_UNITS = 34930 - -_MAX_FRAGMENT_UNIFORM_VECTORS :: Number -_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 - -_SHADER_TYPE :: Number -_SHADER_TYPE = 35663 - -_DELETE_STATUS :: Number -_DELETE_STATUS = 35712 - -_LINK_STATUS :: Number -_LINK_STATUS = 35714 - -_VALIDATE_STATUS :: Number -_VALIDATE_STATUS = 35715 - -_ATTACHED_SHADERS :: Number -_ATTACHED_SHADERS = 35717 - -_ACTIVE_UNIFORMS :: Number -_ACTIVE_UNIFORMS = 35718 - -_ACTIVE_UNIFORM_MAX_LENGTH :: Number -_ACTIVE_UNIFORM_MAX_LENGTH = 35719 - -_ACTIVE_ATTRIBUTES :: Number -_ACTIVE_ATTRIBUTES = 35721 - -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: Number -_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 - -_SHADING_LANGUAGE_VERSION :: Number -_SHADING_LANGUAGE_VERSION = 35724 - -_CURRENT_PROGRAM :: Number -_CURRENT_PROGRAM = 35725 - -_NEVER :: Number -_NEVER = 512 - -_LESS :: Number -_LESS = 513 - -_EQUAL :: Number -_EQUAL = 514 - -_LEQUAL :: Number -_LEQUAL = 515 - -_GREATER :: Number -_GREATER = 516 - -_NOTEQUAL :: Number -_NOTEQUAL = 517 - -_GEQUAL :: Number -_GEQUAL = 518 - -_ALWAYS :: Number -_ALWAYS = 519 - -_KEEP :: Number -_KEEP = 7680 - -_REPLACE :: Number -_REPLACE = 7681 - -_INCR :: Number -_INCR = 7682 - -_DECR :: Number -_DECR = 7683 - -_INVERT :: Number -_INVERT = 5386 - -_INCR_WRAP :: Number -_INCR_WRAP = 34055 - -_DECR_WRAP :: Number -_DECR_WRAP = 34056 - -_VENDOR :: Number -_VENDOR = 7936 - -_RENDERER :: Number -_RENDERER = 7937 - -_VERSION :: Number -_VERSION = 7938 - -_NEAREST :: Number -_NEAREST = 9728 - -_LINEAR :: Number -_LINEAR = 9729 - -_NEAREST_MIPMAP_NEAREST :: Number -_NEAREST_MIPMAP_NEAREST = 9984 - -_LINEAR_MIPMAP_NEAREST :: Number -_LINEAR_MIPMAP_NEAREST = 9985 - -_NEAREST_MIPMAP_LINEAR :: Number -_NEAREST_MIPMAP_LINEAR = 9986 - -_LINEAR_MIPMAP_LINEAR :: Number -_LINEAR_MIPMAP_LINEAR = 9987 - -_TEXTURE_MAG_FILTER :: Number -_TEXTURE_MAG_FILTER = 10240 - -_TEXTURE_MIN_FILTER :: Number -_TEXTURE_MIN_FILTER = 10241 - -_TEXTURE_WRAP_S :: Number -_TEXTURE_WRAP_S = 10242 - -_TEXTURE_WRAP_T :: Number -_TEXTURE_WRAP_T = 10243 - -_TEXTURE :: Number -_TEXTURE = 5890 - -_TEXTURE_CUBE_MAP :: Number -_TEXTURE_CUBE_MAP = 34067 - -_TEXTURE_BINDING_CUBE_MAP :: Number -_TEXTURE_BINDING_CUBE_MAP = 34068 - -_TEXTURE_CUBE_MAP_POSITIVE_X :: Number -_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 - -_TEXTURE_CUBE_MAP_NEGATIVE_X :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 - -_TEXTURE_CUBE_MAP_POSITIVE_Y :: Number -_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 - -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 - -_TEXTURE_CUBE_MAP_POSITIVE_Z :: Number -_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 - -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 - -_MAX_CUBE_MAP_TEXTURE_SIZE :: Number -_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 - -_TEXTURE0 :: Number -_TEXTURE0 = 33984 - -_TEXTURE1 :: Number -_TEXTURE1 = 33985 - -_TEXTURE2 :: Number -_TEXTURE2 = 33986 - -_TEXTURE3 :: Number -_TEXTURE3 = 33987 - -_TEXTURE4 :: Number -_TEXTURE4 = 33988 - -_TEXTURE5 :: Number -_TEXTURE5 = 33989 - -_TEXTURE6 :: Number -_TEXTURE6 = 33990 - -_TEXTURE7 :: Number -_TEXTURE7 = 33991 - -_TEXTURE8 :: Number -_TEXTURE8 = 33992 - -_TEXTURE9 :: Number -_TEXTURE9 = 33993 - -_TEXTURE10 :: Number -_TEXTURE10 = 33994 - -_TEXTURE11 :: Number -_TEXTURE11 = 33995 - -_TEXTURE12 :: Number -_TEXTURE12 = 33996 - -_TEXTURE13 :: Number -_TEXTURE13 = 33997 - -_TEXTURE14 :: Number -_TEXTURE14 = 33998 - -_TEXTURE15 :: Number -_TEXTURE15 = 33999 - -_TEXTURE16 :: Number -_TEXTURE16 = 34000 - -_TEXTURE17 :: Number -_TEXTURE17 = 34001 - -_TEXTURE18 :: Number -_TEXTURE18 = 34002 - -_TEXTURE19 :: Number -_TEXTURE19 = 34003 - -_TEXTURE20 :: Number -_TEXTURE20 = 34004 - -_TEXTURE21 :: Number -_TEXTURE21 = 34005 - -_TEXTURE22 :: Number -_TEXTURE22 = 34006 - -_TEXTURE23 :: Number -_TEXTURE23 = 34007 - -_TEXTURE24 :: Number -_TEXTURE24 = 34008 - -_TEXTURE25 :: Number -_TEXTURE25 = 34009 - -_TEXTURE26 :: Number -_TEXTURE26 = 34010 - -_TEXTURE27 :: Number -_TEXTURE27 = 34011 - -_TEXTURE28 :: Number -_TEXTURE28 = 34012 - -_TEXTURE29 :: Number -_TEXTURE29 = 34013 - -_TEXTURE30 :: Number -_TEXTURE30 = 34014 - -_TEXTURE31 :: Number -_TEXTURE31 = 34015 - -_ACTIVE_TEXTURE :: Number -_ACTIVE_TEXTURE = 34016 - -_REPEAT :: Number -_REPEAT = 10497 - -_CLAMP_TO_EDGE :: Number -_CLAMP_TO_EDGE = 33071 - -_MIRRORED_REPEAT :: Number -_MIRRORED_REPEAT = 33648 - -_FLOAT_VEC2 :: Number -_FLOAT_VEC2 = 35664 - -_FLOAT_VEC3 :: Number -_FLOAT_VEC3 = 35665 - -_FLOAT_VEC4 :: Number -_FLOAT_VEC4 = 35666 - -_INT_VEC2 :: Number -_INT_VEC2 = 35667 - -_INT_VEC3 :: Number -_INT_VEC3 = 35668 - -_INT_VEC4 :: Number -_INT_VEC4 = 35669 - -_BOOL :: Number -_BOOL = 35670 - -_BOOL_VEC2 :: Number -_BOOL_VEC2 = 35671 - -_BOOL_VEC3 :: Number -_BOOL_VEC3 = 35672 - -_BOOL_VEC4 :: Number -_BOOL_VEC4 = 35673 - -_FLOAT_MAT2 :: Number -_FLOAT_MAT2 = 35674 - -_FLOAT_MAT3 :: Number -_FLOAT_MAT3 = 35675 - -_FLOAT_MAT4 :: Number -_FLOAT_MAT4 = 35676 - -_SAMPLER_2D :: Number -_SAMPLER_2D = 35678 - -_SAMPLER_CUBE :: Number -_SAMPLER_CUBE = 35680 - -_VERTEX_ATTRIB_ARRAY_ENABLED :: Number -_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 - -_VERTEX_ATTRIB_ARRAY_SIZE :: Number -_VERTEX_ATTRIB_ARRAY_SIZE = 34339 - -_VERTEX_ATTRIB_ARRAY_STRIDE :: Number -_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 - -_VERTEX_ATTRIB_ARRAY_TYPE :: Number -_VERTEX_ATTRIB_ARRAY_TYPE = 34341 - -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: Number -_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 - -_VERTEX_ATTRIB_ARRAY_POINTER :: Number -_VERTEX_ATTRIB_ARRAY_POINTER = 34373 - -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: Number -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 - -_COMPILE_STATUS :: Number -_COMPILE_STATUS = 35713 - -_INFO_LOG_LENGTH :: Number -_INFO_LOG_LENGTH = 35716 - -_SHADER_SOURCE_LENGTH :: Number -_SHADER_SOURCE_LENGTH = 35720 - -_LOW_FLOAT :: Number -_LOW_FLOAT = 36336 - -_MEDIUM_FLOAT :: Number -_MEDIUM_FLOAT = 36337 - -_HIGH_FLOAT :: Number -_HIGH_FLOAT = 36338 - -_LOW_INT :: Number -_LOW_INT = 36339 - -_MEDIUM_INT :: Number -_MEDIUM_INT = 36340 - -_HIGH_INT :: Number -_HIGH_INT = 36341 - -_FRAMEBUFFER :: Number -_FRAMEBUFFER = 36160 - -_RENDERBUFFER :: Number -_RENDERBUFFER = 36161 - -_RGBA4 :: Number -_RGBA4 = 32854 - -_RGB5_A1 :: Number -_RGB5_A1 = 32855 - -_RGB565 :: Number -_RGB565 = 36194 - -_DEPTH_COMPONENT16 :: Number -_DEPTH_COMPONENT16 = 33189 - -_STENCIL_INDEX :: Number -_STENCIL_INDEX = 6401 - -_STENCIL_INDEX8 :: Number -_STENCIL_INDEX8 = 36168 - -_DEPTH_STENCIL :: Number -_DEPTH_STENCIL = 34041 - -_RENDERBUFFER_WIDTH :: Number -_RENDERBUFFER_WIDTH = 36162 - -_RENDERBUFFER_HEIGHT :: Number -_RENDERBUFFER_HEIGHT = 36163 - -_RENDERBUFFER_INTERNAL_FORMAT :: Number -_RENDERBUFFER_INTERNAL_FORMAT = 36164 - -_RENDERBUFFER_RED_SIZE :: Number -_RENDERBUFFER_RED_SIZE = 36176 - -_RENDERBUFFER_GREEN_SIZE :: Number -_RENDERBUFFER_GREEN_SIZE = 36177 - -_RENDERBUFFER_BLUE_SIZE :: Number -_RENDERBUFFER_BLUE_SIZE = 36178 - -_RENDERBUFFER_ALPHA_SIZE :: Number -_RENDERBUFFER_ALPHA_SIZE = 36179 - -_RENDERBUFFER_DEPTH_SIZE :: Number -_RENDERBUFFER_DEPTH_SIZE = 36180 - -_RENDERBUFFER_STENCIL_SIZE :: Number -_RENDERBUFFER_STENCIL_SIZE = 36181 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: Number -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: Number -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: Number -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: Number -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 - -_COLOR_ATTACHMENT0 :: Number -_COLOR_ATTACHMENT0 = 36064 - -_DEPTH_ATTACHMENT :: Number -_DEPTH_ATTACHMENT = 36096 - -_STENCIL_ATTACHMENT :: Number -_STENCIL_ATTACHMENT = 36128 - -_DEPTH_STENCIL_ATTACHMENT :: Number -_DEPTH_STENCIL_ATTACHMENT = 33306 - -_NONE :: Number -_NONE = 0 - -_FRAMEBUFFER_COMPLETE :: Number -_FRAMEBUFFER_COMPLETE = 36053 - -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: Number -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 - -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: Number -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 - -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: Number -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 - -_FRAMEBUFFER_UNSUPPORTED :: Number -_FRAMEBUFFER_UNSUPPORTED = 36061 - -_FRAMEBUFFER_BINDING :: Number -_FRAMEBUFFER_BINDING = 36006 - -_RENDERBUFFER_BINDING :: Number -_RENDERBUFFER_BINDING = 36007 - -_MAX_RENDERBUFFER_SIZE :: Number -_MAX_RENDERBUFFER_SIZE = 34024 - -_INVALID_FRAMEBUFFER_OPERATION :: Number -_INVALID_FRAMEBUFFER_OPERATION = 1286 - -_UNPACK_FLIP_Y_WEBGL :: Number -_UNPACK_FLIP_Y_WEBGL = 37440 - -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: Number -_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 - -_CONTEXT_LOST_WEBGL :: Number -_CONTEXT_LOST_WEBGL = 37442 - -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: Number -_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 - -_BROWSER_DEFAULT_WEBGL :: Number -_BROWSER_DEFAULT_WEBGL = 37444 - - --- *Methods -foreign import getContextAttributesImpl """ - function getContextAttributesImpl(webgl) { - return function () { - return webgl.getContextAttributes(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) - -foreign import isContextLostImpl """ - function isContextLostImpl(webgl) { - return function () { - return webgl.isContextLost(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) Boolean) - -foreign import getSupportedExtensionsImpl """ - function getSupportedExtensionsImpl(webgl) { - return function () { - return webgl.getSupportedExtensions(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) String) - -foreign import getExtensionImpl """ - function getExtensionImpl(webgl, name) { - return function () { - return webgl.getExtension(name); - }; - } -""" :: forall eff ret. String -> (Eff (webgl :: WebGl | eff) ret) - -foreign import activeTextureImpl """ - function activeTextureImpl(webgl, texture) { - return function () { - return webgl.activeTexture(texture); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import attachShaderImpl """ - function attachShaderImpl(webgl, program, shader) { - return function () { - return webgl.attachShader(program, shader); - }; - } -""" :: forall eff. WebGLProgram-> - WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindAttribLocationImpl """ - function bindAttribLocationImpl(webgl, program, index, name) { - return function () { - return webgl.bindAttribLocation(program, index, name); - }; - } -""" :: forall eff. WebGLProgram-> - GLuint-> - String - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindBufferImpl """ - function bindBufferImpl(webgl, target, buffer) { - return function () { - return webgl.bindBuffer(target, buffer); - }; - } -""" :: forall eff. GLenum-> - WebGLBuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindFramebufferImpl """ - function bindFramebufferImpl(webgl, target, framebuffer) { - return function () { - return webgl.bindFramebuffer(target, framebuffer); - }; - } -""" :: forall eff. GLenum-> - WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindRenderbufferImpl """ - function bindRenderbufferImpl(webgl, target, renderbuffer) { - return function () { - return webgl.bindRenderbuffer(target, renderbuffer); - }; - } -""" :: forall eff. GLenum-> - WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindTextureImpl """ - function bindTextureImpl(webgl, target, texture) { - return function () { - return webgl.bindTexture(target, texture); - }; - } -""" :: forall eff. GLenum-> - WebGLTexture - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendColorImpl """ - function blendColorImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.blendColor(red, green, blue, alpha); - }; - } -""" :: forall eff. GLclampf-> - GLclampf-> - GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendEquationImpl """ - function blendEquationImpl(webgl, mode) { - return function () { - return webgl.blendEquation(mode); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendEquationSeparateImpl """ - function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { - return function () { - return webgl.blendEquationSeparate(modeRGB, modeAlpha); - }; - } -""" :: forall eff. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendFuncImpl """ - function blendFuncImpl(webgl, sfactor, dfactor) { - return function () { - return webgl.blendFunc(sfactor, dfactor); - }; - } -""" :: forall eff. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendFuncSeparateImpl """ - function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { - return function () { - return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bufferDataImpl """ - function bufferDataImpl(webgl, target, data, usage) { - return function () { - return webgl.bufferData(target, data, usage); - }; - } -""" :: forall eff. GLenum-> - Float32Array-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bufferSubDataImpl """ - function bufferSubDataImpl(webgl, target, offset, data) { - return function () { - return webgl.bufferSubData(target, offset, data); - }; - } -""" :: forall eff. GLenum-> - GLintptr-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import checkFramebufferStatusImpl """ - function checkFramebufferStatusImpl(webgl, target) { - return function () { - return webgl.checkFramebufferStatus(target); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLenum) - -foreign import clearImpl """ - function clearImpl(webgl, mask) { - return function () { - return webgl.clear(mask); - }; - } -""" :: forall eff. GLbitfield -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearColorImpl """ - function clearColorImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.clearColor(red, green, blue, alpha); - }; - } -""" :: forall eff. GLclampf-> - GLclampf-> - GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearDepthImpl """ - function clearDepthImpl(webgl, depth) { - return function () { - return webgl.clearDepth(depth); - }; - } -""" :: forall eff. GLclampf -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearStencilImpl """ - function clearStencilImpl(webgl, s) { - return function () { - return webgl.clearStencil(s); - }; - } -""" :: forall eff. GLint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import colorMaskImpl """ - function colorMaskImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.colorMask(red, green, blue, alpha); - }; - } -""" :: forall eff. GLboolean-> - GLboolean-> - GLboolean-> - GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import compileShaderImpl """ - function compileShaderImpl(webgl, shader) { - return function () { - return webgl.compileShader(shader); - }; - } -""" :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import copyTexImage2DImpl """ - function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { - return function () { - return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLenum-> - GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import copyTexSubImage2DImpl """ - function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { - return function () { - return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLint-> - GLint-> - GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import createBufferImpl """ - function createBufferImpl(webgl) { - return function () { - return webgl.createBuffer(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer) - -foreign import createFramebufferImpl """ - function createFramebufferImpl(webgl) { - return function () { - return webgl.createFramebuffer(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) - -foreign import createProgramImpl """ - function createProgramImpl(webgl) { - return function () { - return webgl.createProgram(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) - -foreign import createRenderbufferImpl """ - function createRenderbufferImpl(webgl) { - return function () { - return webgl.createRenderbuffer(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) - -foreign import createShaderImpl """ - function createShaderImpl(webgl, type) { - return function () { - return webgl.createShader(type); - }; - } -""" :: forall eff. GLenum - -> (Eff (webgl :: WebGl | eff) WebGLShader) - -foreign import createTextureImpl """ - function createTextureImpl(webgl) { - return function () { - return webgl.createTexture(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) - -foreign import cullFaceImpl """ - function cullFaceImpl(webgl, mode) { - return function () { - return webgl.cullFace(mode); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteBufferImpl """ - function deleteBufferImpl(webgl, buffer) { - return function () { - return webgl.deleteBuffer(buffer); - }; - } -""" :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteFramebufferImpl """ - function deleteFramebufferImpl(webgl, framebuffer) { - return function () { - return webgl.deleteFramebuffer(framebuffer); - }; - } -""" :: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteProgramImpl """ - function deleteProgramImpl(webgl, program) { - return function () { - return webgl.deleteProgram(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteRenderbufferImpl """ - function deleteRenderbufferImpl(webgl, renderbuffer) { - return function () { - return webgl.deleteRenderbuffer(renderbuffer); - }; - } -""" :: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteShaderImpl """ - function deleteShaderImpl(webgl, shader) { - return function () { - return webgl.deleteShader(shader); - }; - } -""" :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteTextureImpl """ - function deleteTextureImpl(webgl, texture) { - return function () { - return webgl.deleteTexture(texture); - }; - } -""" :: forall eff. WebGLTexture - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthFuncImpl """ - function depthFuncImpl(webgl, func) { - return function () { - return webgl.depthFunc(func); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthMaskImpl """ - function depthMaskImpl(webgl, flag) { - return function () { - return webgl.depthMask(flag); - }; - } -""" :: forall eff. GLboolean -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthRangeImpl """ - function depthRangeImpl(webgl, zNear, zFar) { - return function () { - return webgl.depthRange(zNear, zFar); - }; - } -""" :: forall eff. GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import detachShaderImpl """ - function detachShaderImpl(webgl, program, shader) { - return function () { - return webgl.detachShader(program, shader); - }; - } -""" :: forall eff. WebGLProgram-> - WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import disableImpl """ - function disableImpl(webgl, cap) { - return function () { - return webgl.disable(cap); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import disableVertexAttribArrayImpl """ - function disableVertexAttribArrayImpl(webgl, index) { - return function () { - return webgl.disableVertexAttribArray(index); - }; - } -""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import drawArraysImpl """ - function drawArraysImpl(webgl, mode, first, count) { - return function () { - return webgl.drawArrays(mode, first, count); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import drawElementsImpl """ - function drawElementsImpl(webgl, mode, count, type, offset) { - return function () { - return webgl.drawElements(mode, count, type, offset); - }; - } -""" :: forall eff. GLenum-> - GLsizei-> - GLenum-> - GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import enableImpl """ - function enableImpl(webgl, cap) { - return function () { - return webgl.enable(cap); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import enableVertexAttribArrayImpl """ - function enableVertexAttribArrayImpl(webgl, index) { - return function () { - return webgl.enableVertexAttribArray(index); - }; - } -""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import finishImpl """ - function finishImpl(webgl) { - return function () { - return webgl.finish(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) Unit) - -foreign import flushImpl """ - function flushImpl(webgl) { - return function () { - return webgl.flush(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) Unit) - -foreign import framebufferRenderbufferImpl """ - function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { - return function () { - return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLenum-> - WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import framebufferTexture2DImpl """ - function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { - return function () { - return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLenum-> - WebGLTexture-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import frontFaceImpl """ - function frontFaceImpl(webgl, mode) { - return function () { - return webgl.frontFace(mode); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import generateMipmapImpl """ - function generateMipmapImpl(webgl, target) { - return function () { - return webgl.generateMipmap(target); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import getActiveAttribImpl """ - function getActiveAttribImpl(webgl, program, index) { - return function () { - return webgl.getActiveAttrib(program, index); - }; - } -""" :: forall eff. WebGLProgram-> - GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) - -foreign import getActiveUniformImpl """ - function getActiveUniformImpl(webgl, program, index) { - return function () { - return webgl.getActiveUniform(program, index); - }; - } -""" :: forall eff. WebGLProgram-> - GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) - -foreign import getAttachedShadersImpl """ - function getAttachedShadersImpl(webgl, program) { - return function () { - return webgl.getAttachedShaders(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) WebGLShader) - -foreign import getAttribLocationImpl """ - function getAttribLocationImpl(webgl, program, name) { - return function () { - return webgl.getAttribLocation(program, name); - }; - } -""" :: forall eff. WebGLProgram-> - String - -> (Eff (webgl :: WebGl | eff) GLint) - -foreign import getParameterImpl """ - function getParameterImpl(webgl, pname) { - return function () { - return webgl.getParameter(pname); - }; - } -""" :: forall eff ret. GLenum -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getBufferParameterImpl """ - function getBufferParameterImpl(webgl, target, pname) { - return function () { - return webgl.getBufferParameter(target, pname); - }; - } -""" :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getErrorImpl """ - function getErrorImpl(webgl) { - return function () { - return webgl.getError(); - }; - } -""" :: forall eff. (Eff (webgl :: WebGl | eff) GLenum) - -foreign import getFramebufferAttachmentParameterImpl """ - function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { - return function () { - return webgl.getFramebufferAttachmentParameter(target, attachment, pname); - }; - } -""" :: forall eff ret. GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getProgramParameterImpl """ - function getProgramParameterImpl(webgl, program, pname) { - return function () { - return webgl.getProgramParameter(program, pname); - }; - } -""" :: forall eff ret. WebGLProgram-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getProgramInfoLogImpl """ - function getProgramInfoLogImpl(webgl, program) { - return function () { - return webgl.getProgramInfoLog(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) String) - -foreign import getRenderbufferParameterImpl """ - function getRenderbufferParameterImpl(webgl, target, pname) { - return function () { - return webgl.getRenderbufferParameter(target, pname); - }; - } -""" :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getShaderParameterImpl """ - function getShaderParameterImpl(webgl, shader, pname) { - return function () { - return webgl.getShaderParameter(shader, pname); - }; - } -""" :: forall eff ret. WebGLShader-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getShaderInfoLogImpl """ - function getShaderInfoLogImpl(webgl, shader) { - return function () { - return webgl.getShaderInfoLog(shader); - }; - } -""" :: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) String) - -foreign import getShaderSourceImpl """ - function getShaderSourceImpl(webgl, shader) { - return function () { - return webgl.getShaderSource(shader); - }; - } -""" :: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) String) - -foreign import getTexParameterImpl """ - function getTexParameterImpl(webgl, target, pname) { - return function () { - return webgl.getTexParameter(target, pname); - }; - } -""" :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getUniformImpl """ - function getUniformImpl(webgl, program, location) { - return function () { - return webgl.getUniform(program, location); - }; - } -""" :: forall eff ret. WebGLProgram-> - WebGLUniformLocation - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getUniformLocationImpl """ - function getUniformLocationImpl(webgl, program, name) { - return function () { - return webgl.getUniformLocation(program, name); - }; - } -""" :: forall eff. WebGLProgram-> - String - -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) - -foreign import getVertexAttribImpl """ - function getVertexAttribImpl(webgl, index, pname) { - return function () { - return webgl.getVertexAttrib(index, pname); - }; - } -""" :: forall eff ret. GLuint-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getVertexAttribOffsetImpl """ - function getVertexAttribOffsetImpl(webgl, index, pname) { - return function () { - return webgl.getVertexAttribOffset(index, pname); - }; - } -""" :: forall eff. GLuint-> - GLenum - -> (Eff (webgl :: WebGl | eff) GLsizeiptr) - -foreign import hintImpl """ - function hintImpl(webgl, target, mode) { - return function () { - return webgl.hint(target, mode); - }; - } -""" :: forall eff. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import isBufferImpl """ - function isBufferImpl(webgl, buffer) { - return function () { - return webgl.isBuffer(buffer); - }; - } -""" :: forall eff. WebGLBuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isEnabledImpl """ - function isEnabledImpl(webgl, cap) { - return function () { - return webgl.isEnabled(cap); - }; - } -""" :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isFramebufferImpl """ - function isFramebufferImpl(webgl, framebuffer) { - return function () { - return webgl.isFramebuffer(framebuffer); - }; - } -""" :: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isProgramImpl """ - function isProgramImpl(webgl, program) { - return function () { - return webgl.isProgram(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isRenderbufferImpl """ - function isRenderbufferImpl(webgl, renderbuffer) { - return function () { - return webgl.isRenderbuffer(renderbuffer); - }; - } -""" :: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isShaderImpl """ - function isShaderImpl(webgl, shader) { - return function () { - return webgl.isShader(shader); - }; - } -""" :: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isTextureImpl """ - function isTextureImpl(webgl, texture) { - return function () { - return webgl.isTexture(texture); - }; - } -""" :: forall eff. WebGLTexture - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import lineWidthImpl """ - function lineWidthImpl(webgl, width) { - return function () { - return webgl.lineWidth(width); - }; - } -""" :: forall eff. GLfloat -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import linkProgramImpl """ - function linkProgramImpl(webgl, program) { - return function () { - return webgl.linkProgram(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import pixelStoreiImpl """ - function pixelStoreiImpl(webgl, pname, param) { - return function () { - return webgl.pixelStorei(pname, param); - }; - } -""" :: forall eff. GLenum-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import polygonOffsetImpl """ - function polygonOffsetImpl(webgl, factor, units) { - return function () { - return webgl.polygonOffset(factor, units); - }; - } -""" :: forall eff. GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import readPixelsImpl """ - function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { - return function () { - return webgl.readPixels(x, y, width, height, format, type, pixels); - }; - } -""" :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import renderbufferStorageImpl """ - function renderbufferStorageImpl(webgl, target, internalformat, width, height) { - return function () { - return webgl.renderbufferStorage(target, internalformat, width, height); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import sampleCoverageImpl """ - function sampleCoverageImpl(webgl, value, invert) { - return function () { - return webgl.sampleCoverage(value, invert); - }; - } -""" :: forall eff. GLclampf-> - GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import scissorImpl """ - function scissorImpl(webgl, x, y, width, height) { - return function () { - return webgl.scissor(x, y, width, height); - }; - } -""" :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import shaderSourceImpl """ - function shaderSourceImpl(webgl, shader, source) { - return function () { - return webgl.shaderSource(shader, source); - }; - } -""" :: forall eff. WebGLShader-> - String - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilFuncImpl """ - function stencilFuncImpl(webgl, func, ref, mask) { - return function () { - return webgl.stencilFunc(func, ref, mask); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLuint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilFuncSeparateImpl """ - function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { - return function () { - return webgl.stencilFuncSeparate(face, func, ref, mask); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLint-> - GLuint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilMaskImpl """ - function stencilMaskImpl(webgl, mask) { - return function () { - return webgl.stencilMask(mask); - }; - } -""" :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilMaskSeparateImpl """ - function stencilMaskSeparateImpl(webgl, face, mask) { - return function () { - return webgl.stencilMaskSeparate(face, mask); - }; - } -""" :: forall eff. GLenum-> - GLuint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilOpImpl """ - function stencilOpImpl(webgl, fail, zfail, zpass) { - return function () { - return webgl.stencilOp(fail, zfail, zpass); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilOpSeparateImpl """ - function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { - return function () { - return webgl.stencilOpSeparate(face, fail, zfail, zpass); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texImage2DImpl """ - function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { - return function () { - return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLenum-> - GLsizei-> - GLsizei-> - GLint-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texParameterfImpl """ - function texParameterfImpl(webgl, target, pname, param) { - return function () { - return webgl.texParameterf(target, pname, param); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texParameteriImpl """ - function texParameteriImpl(webgl, target, pname, param) { - return function () { - return webgl.texParameteri(target, pname, param); - }; - } -""" :: forall eff. GLenum-> - GLenum-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texSubImage2DImpl """ - function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { - return function () { - return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - }; - } -""" :: forall eff. GLenum-> - GLint-> - GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1fImpl """ - function uniform1fImpl(webgl, location, x) { - return function () { - return webgl.uniform1f(location, x); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1fvImpl """ - function uniform1fvImpl(webgl, location, v) { - return function () { - return webgl.uniform1fv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1iImpl """ - function uniform1iImpl(webgl, location, x) { - return function () { - return webgl.uniform1i(location, x); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1ivImpl """ - function uniform1ivImpl(webgl, location, v) { - return function () { - return webgl.uniform1iv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2fImpl """ - function uniform2fImpl(webgl, location, x, y) { - return function () { - return webgl.uniform2f(location, x, y); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2fvImpl """ - function uniform2fvImpl(webgl, location, v) { - return function () { - return webgl.uniform2fv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2iImpl """ - function uniform2iImpl(webgl, location, x, y) { - return function () { - return webgl.uniform2i(location, x, y); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2ivImpl """ - function uniform2ivImpl(webgl, location, v) { - return function () { - return webgl.uniform2iv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3fImpl """ - function uniform3fImpl(webgl, location, x, y, z) { - return function () { - return webgl.uniform3f(location, x, y, z); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3fvImpl """ - function uniform3fvImpl(webgl, location, v) { - return function () { - return webgl.uniform3fv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3iImpl """ - function uniform3iImpl(webgl, location, x, y, z) { - return function () { - return webgl.uniform3i(location, x, y, z); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLint-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3ivImpl """ - function uniform3ivImpl(webgl, location, v) { - return function () { - return webgl.uniform3iv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4fImpl """ - function uniform4fImpl(webgl, location, x, y, z, w) { - return function () { - return webgl.uniform4f(location, x, y, z, w); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4fvImpl """ - function uniform4fvImpl(webgl, location, v) { - return function () { - return webgl.uniform4fv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4iImpl """ - function uniform4iImpl(webgl, location, x, y, z, w) { - return function () { - return webgl.uniform4i(location, x, y, z, w); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLint-> - GLint-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4ivImpl """ - function uniform4ivImpl(webgl, location, v) { - return function () { - return webgl.uniform4iv(location, v); - }; - } -""" :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix2fvImpl """ - function uniformMatrix2fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix2fv(location, transpose, value); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix3fvImpl """ - function uniformMatrix3fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix3fv(location, transpose, value); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix4fvImpl """ - function uniformMatrix4fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix4fv(location, transpose, value); - }; - } -""" :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import useProgramImpl """ - function useProgramImpl(webgl, program) { - return function () { - return webgl.useProgram(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import validateProgramImpl """ - function validateProgramImpl(webgl, program) { - return function () { - return webgl.validateProgram(program); - }; - } -""" :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib1fImpl """ - function vertexAttrib1fImpl(webgl, indx, x) { - return function () { - return webgl.vertexAttrib1f(indx, x); - }; - } -""" :: forall eff. GLuint-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib1fvImpl """ - function vertexAttrib1fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib1fv(indx, values); - }; - } -""" :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib2fImpl """ - function vertexAttrib2fImpl(webgl, indx, x, y) { - return function () { - return webgl.vertexAttrib2f(indx, x, y); - }; - } -""" :: forall eff. GLuint-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib2fvImpl """ - function vertexAttrib2fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib2fv(indx, values); - }; - } -""" :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib3fImpl """ - function vertexAttrib3fImpl(webgl, indx, x, y, z) { - return function () { - return webgl.vertexAttrib3f(indx, x, y, z); - }; - } -""" :: forall eff. GLuint-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib3fvImpl """ - function vertexAttrib3fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib3fv(indx, values); - }; - } -""" :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib4fImpl """ - function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { - return function () { - return webgl.vertexAttrib4f(indx, x, y, z, w); - }; - } -""" :: forall eff. GLuint-> - GLfloat-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib4fvImpl """ - function vertexAttrib4fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib4fv(indx, values); - }; - } -""" :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttribPointerImpl """ - function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { - return function () { - return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); - }; - } -""" :: forall eff. GLuint-> - GLint-> - GLenum-> - GLboolean-> - GLsizei-> - GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import viewportImpl """ - function viewportImpl(webgl, x, y, width, height) { - return function () { - return webgl.viewport(x, y, width, height); - }; - } -""" :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) From 5865d463a95f717a014c173b863883746455c763 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sun, 24 May 2015 22:05:17 -0500 Subject: [PATCH 15/51] remove unused isUsableFunction --- src/IDL/Printer.hs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/IDL/Printer.hs b/src/IDL/Printer.hs index 215bc4c..715d120 100644 --- a/src/IDL/Printer.hs +++ b/src/IDL/Printer.hs @@ -21,7 +21,7 @@ ppPureScriptFFI idl = [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] constants = vcat [ppConstant c | c <- idl , isEnum c] methods = vcat $ map ppFuncImpl $ nubBy (\t1 t2-> methodName t1 == methodName t2) - [c | c <- idl , isUsableFunc c] + [c | c <- idl , isFunction c] -- predefined strings @@ -159,11 +159,6 @@ extractTypes f@Function{methodRetType = t1} = t1 : map argType (funcArgs f) extractTypes Attribute{attType = t1} = [t1] extractTypes _ = [] -isUsableFunc :: Decl -> Bool -isUsableFunc i = - isFunction i && - and (map (isNothing . typeCondPara . argType) $ methodArgs i) - implName :: Decl -> String implName f = methodName f ++ "Impl" From 88a1f850b5438f114f4550a65f45ac6d76cd921b Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Mon, 25 May 2015 13:07:46 -0500 Subject: [PATCH 16/51] rearrange as both cabal and bower packages --- bower.json | 19 + webgl.idl => docs/WebGL-1.0.3.idl | 0 {src => generator}/IDL/AST.hs | 0 {src => generator}/IDL/Parser.hs | 0 {src => generator}/IDL/Printer.hs | 0 {src => generator}/Main.hs | 0 ...erator.cabal => purescript-webgl-raw.cabal | 16 +- purescript-webgl-raw.purs | 2262 ----------------- src/Graphics/WebGL/Raw.purs | 1406 ++++++++++ 9 files changed, 1433 insertions(+), 2270 deletions(-) create mode 100644 bower.json rename webgl.idl => docs/WebGL-1.0.3.idl (100%) rename {src => generator}/IDL/AST.hs (100%) rename {src => generator}/IDL/Parser.hs (100%) rename {src => generator}/IDL/Printer.hs (100%) rename {src => generator}/Main.hs (100%) rename purescript-webgl-generator.cabal => purescript-webgl-raw.cabal (52%) delete mode 100644 purescript-webgl-raw.purs create mode 100644 src/Graphics/WebGL/Raw.purs diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..82535ef --- /dev/null +++ b/bower.json @@ -0,0 +1,19 @@ +{ + "name": "purescript-webgl-raw", + "description": "a generated low-level PureScript wrapper of WebGL methods", + "version": "0.0.1", + "license": "GPL-2", + + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "dist", + "generator" + ], + + "dependencies": { + "purescript-typedarray": "0.3.*", + "purescript-arraybuffer-types": "0.1.*" + } +} diff --git a/webgl.idl b/docs/WebGL-1.0.3.idl similarity index 100% rename from webgl.idl rename to docs/WebGL-1.0.3.idl diff --git a/src/IDL/AST.hs b/generator/IDL/AST.hs similarity index 100% rename from src/IDL/AST.hs rename to generator/IDL/AST.hs diff --git a/src/IDL/Parser.hs b/generator/IDL/Parser.hs similarity index 100% rename from src/IDL/Parser.hs rename to generator/IDL/Parser.hs diff --git a/src/IDL/Printer.hs b/generator/IDL/Printer.hs similarity index 100% rename from src/IDL/Printer.hs rename to generator/IDL/Printer.hs diff --git a/src/Main.hs b/generator/Main.hs similarity index 100% rename from src/Main.hs rename to generator/Main.hs diff --git a/purescript-webgl-generator.cabal b/purescript-webgl-raw.cabal similarity index 52% rename from purescript-webgl-generator.cabal rename to purescript-webgl-raw.cabal index a6c608e..3f3ea9c 100644 --- a/purescript-webgl-generator.cabal +++ b/purescript-webgl-raw.cabal @@ -1,19 +1,19 @@ -name: purescript-webgl-generator -version: 0.1.0.0 -cabal-version: >=1.10 +name: purescript-webgl-raw +version: 0.0.1.0 +cabal-version: >= 1.10 build-type: Simple license: GPL-2 license-file: LICENSE -maintainer: jnf@arcor.de +maintainer: jon@childr.es (originally jnf@arcor.de) category: Development -author: Jürgen (Jutaro) Nicklisch-Franken -data-dir: "" +author: Jon Childress (branched from Jürgen (Jutaro) Nicklisch-Franken) +synopsis: generates PureScript by parsing the Khronos WebGL specification -executable purescript-webgl-generator +executable purescript-webgl-raw main-is: Main.hs buildable: True default-language: Haskell2010 - hs-source-dirs: src + hs-source-dirs: generator other-modules: IDL.AST IDL.Parser IDL.Printer build-depends: base == 4.*, diff --git a/purescript-webgl-raw.purs b/purescript-webgl-raw.purs deleted file mode 100644 index ed56d4c..0000000 --- a/purescript-webgl-raw.purs +++ /dev/null @@ -1,2262 +0,0 @@ --- Auto generated: don't change manually, use purescript-webgl-generator to modify!! -module Graphics.WebGLRaw where - -import Control.Monad.Eff -import Control.Monad.Eff.WebGL -import Data.ArrayBuffer.Types -import Data.TypedArray - - -type GLenum = Number -type GLboolean = Boolean -type GLbitfield = Number -type GLbyte = Number -type GLshort = Number -type GLint = Number -type GLsizei = Number -type GLintptr = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLushort = Number -type GLuint = Number -type GLfloat = Number -type GLclampf = Number -type FloatArray = Float32Array - --- *TypeDecls -foreign import data WebGLContextAttributes :: * -foreign import data WebGLProgram :: * -foreign import data WebGLShader :: * -foreign import data WebGLBuffer :: * -foreign import data WebGLFramebuffer :: * -foreign import data WebGLRenderbuffer :: * -foreign import data WebGLTexture :: * -foreign import data WebGLActiveInfo :: * -foreign import data WebGLUniformLocation :: * -foreign import data ArrayBufferView :: * -foreign import data ImageData :: * -foreign import data HTMLImageElement :: * -foreign import data HTMLVideoElement :: * - --- *Constants -_DEPTH_BUFFER_BIT :: Number -_DEPTH_BUFFER_BIT = 256 - -_STENCIL_BUFFER_BIT :: Number -_STENCIL_BUFFER_BIT = 1024 - -_COLOR_BUFFER_BIT :: Number -_COLOR_BUFFER_BIT = 16384 - -_POINTS :: Number -_POINTS = 0 - -_LINES :: Number -_LINES = 1 - -_LINE_LOOP :: Number -_LINE_LOOP = 2 - -_LINE_STRIP :: Number -_LINE_STRIP = 3 - -_TRIANGLES :: Number -_TRIANGLES = 4 - -_TRIANGLE_STRIP :: Number -_TRIANGLE_STRIP = 5 - -_TRIANGLE_FAN :: Number -_TRIANGLE_FAN = 6 - -_ZERO :: Number -_ZERO = 0 - -_ONE :: Number -_ONE = 1 - -_SRC_COLOR :: Number -_SRC_COLOR = 768 - -_ONE_MINUS_SRC_COLOR :: Number -_ONE_MINUS_SRC_COLOR = 769 - -_SRC_ALPHA :: Number -_SRC_ALPHA = 770 - -_ONE_MINUS_SRC_ALPHA :: Number -_ONE_MINUS_SRC_ALPHA = 771 - -_DST_ALPHA :: Number -_DST_ALPHA = 772 - -_ONE_MINUS_DST_ALPHA :: Number -_ONE_MINUS_DST_ALPHA = 773 - -_DST_COLOR :: Number -_DST_COLOR = 774 - -_ONE_MINUS_DST_COLOR :: Number -_ONE_MINUS_DST_COLOR = 775 - -_SRC_ALPHA_SATURATE :: Number -_SRC_ALPHA_SATURATE = 776 - -_FUNC_ADD :: Number -_FUNC_ADD = 32774 - -_BLEND_EQUATION :: Number -_BLEND_EQUATION = 32777 - -_BLEND_EQUATION_RGB :: Number -_BLEND_EQUATION_RGB = 32777 - -_BLEND_EQUATION_ALPHA :: Number -_BLEND_EQUATION_ALPHA = 34877 - -_FUNC_SUBTRACT :: Number -_FUNC_SUBTRACT = 32778 - -_FUNC_REVERSE_SUBTRACT :: Number -_FUNC_REVERSE_SUBTRACT = 32779 - -_BLEND_DST_RGB :: Number -_BLEND_DST_RGB = 32968 - -_BLEND_SRC_RGB :: Number -_BLEND_SRC_RGB = 32969 - -_BLEND_DST_ALPHA :: Number -_BLEND_DST_ALPHA = 32970 - -_BLEND_SRC_ALPHA :: Number -_BLEND_SRC_ALPHA = 32971 - -_CONSTANT_COLOR :: Number -_CONSTANT_COLOR = 32769 - -_ONE_MINUS_CONSTANT_COLOR :: Number -_ONE_MINUS_CONSTANT_COLOR = 32770 - -_CONSTANT_ALPHA :: Number -_CONSTANT_ALPHA = 32771 - -_ONE_MINUS_CONSTANT_ALPHA :: Number -_ONE_MINUS_CONSTANT_ALPHA = 32772 - -_BLEND_COLOR :: Number -_BLEND_COLOR = 32773 - -_ARRAY_BUFFER :: Number -_ARRAY_BUFFER = 34962 - -_ELEMENT_ARRAY_BUFFER :: Number -_ELEMENT_ARRAY_BUFFER = 34963 - -_ARRAY_BUFFER_BINDING :: Number -_ARRAY_BUFFER_BINDING = 34964 - -_ELEMENT_ARRAY_BUFFER_BINDING :: Number -_ELEMENT_ARRAY_BUFFER_BINDING = 34965 - -_STREAM_DRAW :: Number -_STREAM_DRAW = 35040 - -_STATIC_DRAW :: Number -_STATIC_DRAW = 35044 - -_DYNAMIC_DRAW :: Number -_DYNAMIC_DRAW = 35048 - -_BUFFER_SIZE :: Number -_BUFFER_SIZE = 34660 - -_BUFFER_USAGE :: Number -_BUFFER_USAGE = 34661 - -_CURRENT_VERTEX_ATTRIB :: Number -_CURRENT_VERTEX_ATTRIB = 34342 - -_FRONT :: Number -_FRONT = 1028 - -_BACK :: Number -_BACK = 1029 - -_FRONT_AND_BACK :: Number -_FRONT_AND_BACK = 1032 - -_TEXTURE_2D :: Number -_TEXTURE_2D = 3553 - -_CULL_FACE :: Number -_CULL_FACE = 2884 - -_BLEND :: Number -_BLEND = 3042 - -_DITHER :: Number -_DITHER = 3024 - -_STENCIL_TEST :: Number -_STENCIL_TEST = 2960 - -_DEPTH_TEST :: Number -_DEPTH_TEST = 2929 - -_SCISSOR_TEST :: Number -_SCISSOR_TEST = 3089 - -_POLYGON_OFFSET_FILL :: Number -_POLYGON_OFFSET_FILL = 32823 - -_SAMPLE_ALPHA_TO_COVERAGE :: Number -_SAMPLE_ALPHA_TO_COVERAGE = 32926 - -_SAMPLE_COVERAGE :: Number -_SAMPLE_COVERAGE = 32928 - -_NO_ERROR :: Number -_NO_ERROR = 0 - -_INVALID_ENUM :: Number -_INVALID_ENUM = 1280 - -_INVALID_VALUE :: Number -_INVALID_VALUE = 1281 - -_INVALID_OPERATION :: Number -_INVALID_OPERATION = 1282 - -_OUT_OF_MEMORY :: Number -_OUT_OF_MEMORY = 1285 - -_CW :: Number -_CW = 2304 - -_CCW :: Number -_CCW = 2305 - -_LINE_WIDTH :: Number -_LINE_WIDTH = 2849 - -_ALIASED_POINT_SIZE_RANGE :: Number -_ALIASED_POINT_SIZE_RANGE = 33901 - -_ALIASED_LINE_WIDTH_RANGE :: Number -_ALIASED_LINE_WIDTH_RANGE = 33902 - -_CULL_FACE_MODE :: Number -_CULL_FACE_MODE = 2885 - -_FRONT_FACE :: Number -_FRONT_FACE = 2886 - -_DEPTH_RANGE :: Number -_DEPTH_RANGE = 2928 - -_DEPTH_WRITEMASK :: Number -_DEPTH_WRITEMASK = 2930 - -_DEPTH_CLEAR_VALUE :: Number -_DEPTH_CLEAR_VALUE = 2931 - -_DEPTH_FUNC :: Number -_DEPTH_FUNC = 2932 - -_STENCIL_CLEAR_VALUE :: Number -_STENCIL_CLEAR_VALUE = 2961 - -_STENCIL_FUNC :: Number -_STENCIL_FUNC = 2962 - -_STENCIL_FAIL :: Number -_STENCIL_FAIL = 2964 - -_STENCIL_PASS_DEPTH_FAIL :: Number -_STENCIL_PASS_DEPTH_FAIL = 2965 - -_STENCIL_PASS_DEPTH_PASS :: Number -_STENCIL_PASS_DEPTH_PASS = 2966 - -_STENCIL_REF :: Number -_STENCIL_REF = 2967 - -_STENCIL_VALUE_MASK :: Number -_STENCIL_VALUE_MASK = 2963 - -_STENCIL_WRITEMASK :: Number -_STENCIL_WRITEMASK = 2968 - -_STENCIL_BACK_FUNC :: Number -_STENCIL_BACK_FUNC = 34816 - -_STENCIL_BACK_FAIL :: Number -_STENCIL_BACK_FAIL = 34817 - -_STENCIL_BACK_PASS_DEPTH_FAIL :: Number -_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 - -_STENCIL_BACK_PASS_DEPTH_PASS :: Number -_STENCIL_BACK_PASS_DEPTH_PASS = 34819 - -_STENCIL_BACK_REF :: Number -_STENCIL_BACK_REF = 36003 - -_STENCIL_BACK_VALUE_MASK :: Number -_STENCIL_BACK_VALUE_MASK = 36004 - -_STENCIL_BACK_WRITEMASK :: Number -_STENCIL_BACK_WRITEMASK = 36005 - -_VIEWPORT :: Number -_VIEWPORT = 2978 - -_SCISSOR_BOX :: Number -_SCISSOR_BOX = 3088 - -_COLOR_CLEAR_VALUE :: Number -_COLOR_CLEAR_VALUE = 3106 - -_COLOR_WRITEMASK :: Number -_COLOR_WRITEMASK = 3107 - -_UNPACK_ALIGNMENT :: Number -_UNPACK_ALIGNMENT = 3317 - -_PACK_ALIGNMENT :: Number -_PACK_ALIGNMENT = 3333 - -_MAX_TEXTURE_SIZE :: Number -_MAX_TEXTURE_SIZE = 3379 - -_MAX_VIEWPORT_DIMS :: Number -_MAX_VIEWPORT_DIMS = 3386 - -_SUBPIXEL_BITS :: Number -_SUBPIXEL_BITS = 3408 - -_RED_BITS :: Number -_RED_BITS = 3410 - -_GREEN_BITS :: Number -_GREEN_BITS = 3411 - -_BLUE_BITS :: Number -_BLUE_BITS = 3412 - -_ALPHA_BITS :: Number -_ALPHA_BITS = 3413 - -_DEPTH_BITS :: Number -_DEPTH_BITS = 3414 - -_STENCIL_BITS :: Number -_STENCIL_BITS = 3415 - -_POLYGON_OFFSET_UNITS :: Number -_POLYGON_OFFSET_UNITS = 10752 - -_POLYGON_OFFSET_FACTOR :: Number -_POLYGON_OFFSET_FACTOR = 32824 - -_TEXTURE_BINDING_2D :: Number -_TEXTURE_BINDING_2D = 32873 - -_SAMPLE_BUFFERS :: Number -_SAMPLE_BUFFERS = 32936 - -_SAMPLES :: Number -_SAMPLES = 32937 - -_SAMPLE_COVERAGE_VALUE :: Number -_SAMPLE_COVERAGE_VALUE = 32938 - -_SAMPLE_COVERAGE_INVERT :: Number -_SAMPLE_COVERAGE_INVERT = 32939 - -_NUM_COMPRESSED_TEXTURE_FORMATS :: Number -_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 - -_COMPRESSED_TEXTURE_FORMATS :: Number -_COMPRESSED_TEXTURE_FORMATS = 34467 - -_DONT_CARE :: Number -_DONT_CARE = 4352 - -_FASTEST :: Number -_FASTEST = 4353 - -_NICEST :: Number -_NICEST = 4354 - -_GENERATE_MIPMAP_HINT :: Number -_GENERATE_MIPMAP_HINT = 33170 - -_BYTE :: Number -_BYTE = 5120 - -_UNSIGNED_BYTE :: Number -_UNSIGNED_BYTE = 5121 - -_SHORT :: Number -_SHORT = 5122 - -_UNSIGNED_SHORT :: Number -_UNSIGNED_SHORT = 5123 - -_INT :: Number -_INT = 5124 - -_UNSIGNED_INT :: Number -_UNSIGNED_INT = 5125 - -_FLOAT :: Number -_FLOAT = 5126 - -_DEPTH_COMPONENT :: Number -_DEPTH_COMPONENT = 6402 - -_ALPHA :: Number -_ALPHA = 6406 - -_RGB :: Number -_RGB = 6407 - -_RGBA :: Number -_RGBA = 6408 - -_LUMINANCE :: Number -_LUMINANCE = 6409 - -_LUMINANCE_ALPHA :: Number -_LUMINANCE_ALPHA = 6410 - -_UNSIGNED_SHORT_4_4_4_4 :: Number -_UNSIGNED_SHORT_4_4_4_4 = 32819 - -_UNSIGNED_SHORT_5_5_5_1 :: Number -_UNSIGNED_SHORT_5_5_5_1 = 32820 - -_UNSIGNED_SHORT_5_6_5 :: Number -_UNSIGNED_SHORT_5_6_5 = 33635 - -_FRAGMENT_SHADER :: Number -_FRAGMENT_SHADER = 35632 - -_VERTEX_SHADER :: Number -_VERTEX_SHADER = 35633 - -_MAX_VERTEX_ATTRIBS :: Number -_MAX_VERTEX_ATTRIBS = 34921 - -_MAX_VERTEX_UNIFORM_VECTORS :: Number -_MAX_VERTEX_UNIFORM_VECTORS = 36347 - -_MAX_VARYING_VECTORS :: Number -_MAX_VARYING_VECTORS = 36348 - -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: Number -_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 - -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: Number -_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 - -_MAX_TEXTURE_IMAGE_UNITS :: Number -_MAX_TEXTURE_IMAGE_UNITS = 34930 - -_MAX_FRAGMENT_UNIFORM_VECTORS :: Number -_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 - -_SHADER_TYPE :: Number -_SHADER_TYPE = 35663 - -_DELETE_STATUS :: Number -_DELETE_STATUS = 35712 - -_LINK_STATUS :: Number -_LINK_STATUS = 35714 - -_VALIDATE_STATUS :: Number -_VALIDATE_STATUS = 35715 - -_ATTACHED_SHADERS :: Number -_ATTACHED_SHADERS = 35717 - -_ACTIVE_UNIFORMS :: Number -_ACTIVE_UNIFORMS = 35718 - -_ACTIVE_UNIFORM_MAX_LENGTH :: Number -_ACTIVE_UNIFORM_MAX_LENGTH = 35719 - -_ACTIVE_ATTRIBUTES :: Number -_ACTIVE_ATTRIBUTES = 35721 - -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: Number -_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 - -_SHADING_LANGUAGE_VERSION :: Number -_SHADING_LANGUAGE_VERSION = 35724 - -_CURRENT_PROGRAM :: Number -_CURRENT_PROGRAM = 35725 - -_NEVER :: Number -_NEVER = 512 - -_LESS :: Number -_LESS = 513 - -_EQUAL :: Number -_EQUAL = 514 - -_LEQUAL :: Number -_LEQUAL = 515 - -_GREATER :: Number -_GREATER = 516 - -_NOTEQUAL :: Number -_NOTEQUAL = 517 - -_GEQUAL :: Number -_GEQUAL = 518 - -_ALWAYS :: Number -_ALWAYS = 519 - -_KEEP :: Number -_KEEP = 7680 - -_REPLACE :: Number -_REPLACE = 7681 - -_INCR :: Number -_INCR = 7682 - -_DECR :: Number -_DECR = 7683 - -_INVERT :: Number -_INVERT = 5386 - -_INCR_WRAP :: Number -_INCR_WRAP = 34055 - -_DECR_WRAP :: Number -_DECR_WRAP = 34056 - -_VENDOR :: Number -_VENDOR = 7936 - -_RENDERER :: Number -_RENDERER = 7937 - -_VERSION :: Number -_VERSION = 7938 - -_NEAREST :: Number -_NEAREST = 9728 - -_LINEAR :: Number -_LINEAR = 9729 - -_NEAREST_MIPMAP_NEAREST :: Number -_NEAREST_MIPMAP_NEAREST = 9984 - -_LINEAR_MIPMAP_NEAREST :: Number -_LINEAR_MIPMAP_NEAREST = 9985 - -_NEAREST_MIPMAP_LINEAR :: Number -_NEAREST_MIPMAP_LINEAR = 9986 - -_LINEAR_MIPMAP_LINEAR :: Number -_LINEAR_MIPMAP_LINEAR = 9987 - -_TEXTURE_MAG_FILTER :: Number -_TEXTURE_MAG_FILTER = 10240 - -_TEXTURE_MIN_FILTER :: Number -_TEXTURE_MIN_FILTER = 10241 - -_TEXTURE_WRAP_S :: Number -_TEXTURE_WRAP_S = 10242 - -_TEXTURE_WRAP_T :: Number -_TEXTURE_WRAP_T = 10243 - -_TEXTURE :: Number -_TEXTURE = 5890 - -_TEXTURE_CUBE_MAP :: Number -_TEXTURE_CUBE_MAP = 34067 - -_TEXTURE_BINDING_CUBE_MAP :: Number -_TEXTURE_BINDING_CUBE_MAP = 34068 - -_TEXTURE_CUBE_MAP_POSITIVE_X :: Number -_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 - -_TEXTURE_CUBE_MAP_NEGATIVE_X :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 - -_TEXTURE_CUBE_MAP_POSITIVE_Y :: Number -_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 - -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 - -_TEXTURE_CUBE_MAP_POSITIVE_Z :: Number -_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 - -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: Number -_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 - -_MAX_CUBE_MAP_TEXTURE_SIZE :: Number -_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 - -_TEXTURE0 :: Number -_TEXTURE0 = 33984 - -_TEXTURE1 :: Number -_TEXTURE1 = 33985 - -_TEXTURE2 :: Number -_TEXTURE2 = 33986 - -_TEXTURE3 :: Number -_TEXTURE3 = 33987 - -_TEXTURE4 :: Number -_TEXTURE4 = 33988 - -_TEXTURE5 :: Number -_TEXTURE5 = 33989 - -_TEXTURE6 :: Number -_TEXTURE6 = 33990 - -_TEXTURE7 :: Number -_TEXTURE7 = 33991 - -_TEXTURE8 :: Number -_TEXTURE8 = 33992 - -_TEXTURE9 :: Number -_TEXTURE9 = 33993 - -_TEXTURE10 :: Number -_TEXTURE10 = 33994 - -_TEXTURE11 :: Number -_TEXTURE11 = 33995 - -_TEXTURE12 :: Number -_TEXTURE12 = 33996 - -_TEXTURE13 :: Number -_TEXTURE13 = 33997 - -_TEXTURE14 :: Number -_TEXTURE14 = 33998 - -_TEXTURE15 :: Number -_TEXTURE15 = 33999 - -_TEXTURE16 :: Number -_TEXTURE16 = 34000 - -_TEXTURE17 :: Number -_TEXTURE17 = 34001 - -_TEXTURE18 :: Number -_TEXTURE18 = 34002 - -_TEXTURE19 :: Number -_TEXTURE19 = 34003 - -_TEXTURE20 :: Number -_TEXTURE20 = 34004 - -_TEXTURE21 :: Number -_TEXTURE21 = 34005 - -_TEXTURE22 :: Number -_TEXTURE22 = 34006 - -_TEXTURE23 :: Number -_TEXTURE23 = 34007 - -_TEXTURE24 :: Number -_TEXTURE24 = 34008 - -_TEXTURE25 :: Number -_TEXTURE25 = 34009 - -_TEXTURE26 :: Number -_TEXTURE26 = 34010 - -_TEXTURE27 :: Number -_TEXTURE27 = 34011 - -_TEXTURE28 :: Number -_TEXTURE28 = 34012 - -_TEXTURE29 :: Number -_TEXTURE29 = 34013 - -_TEXTURE30 :: Number -_TEXTURE30 = 34014 - -_TEXTURE31 :: Number -_TEXTURE31 = 34015 - -_ACTIVE_TEXTURE :: Number -_ACTIVE_TEXTURE = 34016 - -_REPEAT :: Number -_REPEAT = 10497 - -_CLAMP_TO_EDGE :: Number -_CLAMP_TO_EDGE = 33071 - -_MIRRORED_REPEAT :: Number -_MIRRORED_REPEAT = 33648 - -_FLOAT_VEC2 :: Number -_FLOAT_VEC2 = 35664 - -_FLOAT_VEC3 :: Number -_FLOAT_VEC3 = 35665 - -_FLOAT_VEC4 :: Number -_FLOAT_VEC4 = 35666 - -_INT_VEC2 :: Number -_INT_VEC2 = 35667 - -_INT_VEC3 :: Number -_INT_VEC3 = 35668 - -_INT_VEC4 :: Number -_INT_VEC4 = 35669 - -_BOOL :: Number -_BOOL = 35670 - -_BOOL_VEC2 :: Number -_BOOL_VEC2 = 35671 - -_BOOL_VEC3 :: Number -_BOOL_VEC3 = 35672 - -_BOOL_VEC4 :: Number -_BOOL_VEC4 = 35673 - -_FLOAT_MAT2 :: Number -_FLOAT_MAT2 = 35674 - -_FLOAT_MAT3 :: Number -_FLOAT_MAT3 = 35675 - -_FLOAT_MAT4 :: Number -_FLOAT_MAT4 = 35676 - -_SAMPLER_2D :: Number -_SAMPLER_2D = 35678 - -_SAMPLER_CUBE :: Number -_SAMPLER_CUBE = 35680 - -_VERTEX_ATTRIB_ARRAY_ENABLED :: Number -_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 - -_VERTEX_ATTRIB_ARRAY_SIZE :: Number -_VERTEX_ATTRIB_ARRAY_SIZE = 34339 - -_VERTEX_ATTRIB_ARRAY_STRIDE :: Number -_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 - -_VERTEX_ATTRIB_ARRAY_TYPE :: Number -_VERTEX_ATTRIB_ARRAY_TYPE = 34341 - -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: Number -_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 - -_VERTEX_ATTRIB_ARRAY_POINTER :: Number -_VERTEX_ATTRIB_ARRAY_POINTER = 34373 - -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: Number -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 - -_COMPILE_STATUS :: Number -_COMPILE_STATUS = 35713 - -_INFO_LOG_LENGTH :: Number -_INFO_LOG_LENGTH = 35716 - -_SHADER_SOURCE_LENGTH :: Number -_SHADER_SOURCE_LENGTH = 35720 - -_LOW_FLOAT :: Number -_LOW_FLOAT = 36336 - -_MEDIUM_FLOAT :: Number -_MEDIUM_FLOAT = 36337 - -_HIGH_FLOAT :: Number -_HIGH_FLOAT = 36338 - -_LOW_INT :: Number -_LOW_INT = 36339 - -_MEDIUM_INT :: Number -_MEDIUM_INT = 36340 - -_HIGH_INT :: Number -_HIGH_INT = 36341 - -_FRAMEBUFFER :: Number -_FRAMEBUFFER = 36160 - -_RENDERBUFFER :: Number -_RENDERBUFFER = 36161 - -_RGBA4 :: Number -_RGBA4 = 32854 - -_RGB5_A1 :: Number -_RGB5_A1 = 32855 - -_RGB565 :: Number -_RGB565 = 36194 - -_DEPTH_COMPONENT16 :: Number -_DEPTH_COMPONENT16 = 33189 - -_STENCIL_INDEX :: Number -_STENCIL_INDEX = 6401 - -_STENCIL_INDEX8 :: Number -_STENCIL_INDEX8 = 36168 - -_DEPTH_STENCIL :: Number -_DEPTH_STENCIL = 34041 - -_RENDERBUFFER_WIDTH :: Number -_RENDERBUFFER_WIDTH = 36162 - -_RENDERBUFFER_HEIGHT :: Number -_RENDERBUFFER_HEIGHT = 36163 - -_RENDERBUFFER_INTERNAL_FORMAT :: Number -_RENDERBUFFER_INTERNAL_FORMAT = 36164 - -_RENDERBUFFER_RED_SIZE :: Number -_RENDERBUFFER_RED_SIZE = 36176 - -_RENDERBUFFER_GREEN_SIZE :: Number -_RENDERBUFFER_GREEN_SIZE = 36177 - -_RENDERBUFFER_BLUE_SIZE :: Number -_RENDERBUFFER_BLUE_SIZE = 36178 - -_RENDERBUFFER_ALPHA_SIZE :: Number -_RENDERBUFFER_ALPHA_SIZE = 36179 - -_RENDERBUFFER_DEPTH_SIZE :: Number -_RENDERBUFFER_DEPTH_SIZE = 36180 - -_RENDERBUFFER_STENCIL_SIZE :: Number -_RENDERBUFFER_STENCIL_SIZE = 36181 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: Number -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: Number -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: Number -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: Number -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 - -_COLOR_ATTACHMENT0 :: Number -_COLOR_ATTACHMENT0 = 36064 - -_DEPTH_ATTACHMENT :: Number -_DEPTH_ATTACHMENT = 36096 - -_STENCIL_ATTACHMENT :: Number -_STENCIL_ATTACHMENT = 36128 - -_DEPTH_STENCIL_ATTACHMENT :: Number -_DEPTH_STENCIL_ATTACHMENT = 33306 - -_NONE :: Number -_NONE = 0 - -_FRAMEBUFFER_COMPLETE :: Number -_FRAMEBUFFER_COMPLETE = 36053 - -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: Number -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 - -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: Number -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 - -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: Number -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 - -_FRAMEBUFFER_UNSUPPORTED :: Number -_FRAMEBUFFER_UNSUPPORTED = 36061 - -_FRAMEBUFFER_BINDING :: Number -_FRAMEBUFFER_BINDING = 36006 - -_RENDERBUFFER_BINDING :: Number -_RENDERBUFFER_BINDING = 36007 - -_MAX_RENDERBUFFER_SIZE :: Number -_MAX_RENDERBUFFER_SIZE = 34024 - -_INVALID_FRAMEBUFFER_OPERATION :: Number -_INVALID_FRAMEBUFFER_OPERATION = 1286 - -_UNPACK_FLIP_Y_WEBGL :: Number -_UNPACK_FLIP_Y_WEBGL = 37440 - -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: Number -_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 - -_CONTEXT_LOST_WEBGL :: Number -_CONTEXT_LOST_WEBGL = 37442 - -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: Number -_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 - -_BROWSER_DEFAULT_WEBGL :: Number -_BROWSER_DEFAULT_WEBGL = 37444 - - --- *Methods -foreign import getContextAttributes_ - """function getContextAttributes_() - {var res = gl.getContextAttributes(); - if (res === undefined){ - throw "Undefined in getContextAttributes"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLContextAttributes) - -foreign import isContextLost_ - """function isContextLost_() - {var res = gl.isContextLost(); - if (res === undefined){ - throw "Undefined in isContextLost"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) Boolean) - -foreign import getSupportedExtensions_ - """function getSupportedExtensions_() - {var res = gl.getSupportedExtensions(); - if (res === undefined){ - throw "Undefined in getSupportedExtensions"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) String) - -foreign import getExtension_ - """function getExtension_(name) - {return function() - {var res = gl.getExtension(name); - if (res === undefined){ - throw "Undefined in getExtension"}; - return res;};};""" - :: forall eff ret. String -> (Eff (webgl :: WebGl | eff) ret) - -foreign import activeTexture_ - """function activeTexture_(texture) - {return function() - {gl.activeTexture(texture);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import attachShader_ - """function attachShader_(program) - {return function(shader) - {return function() - {gl.attachShader(program,shader);};};};""" - :: forall eff. WebGLProgram-> - WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindAttribLocation_ - """function bindAttribLocation_(program) - {return function(index) - {return function(name) - {return function() - {gl.bindAttribLocation(program,index,name);};};};};""" - :: forall eff. WebGLProgram-> - GLuint-> - String - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindBuffer_ - """function bindBuffer_(target) - {return function(buffer) - {return function() - {gl.bindBuffer(target,buffer);};};};""" - :: forall eff. GLenum-> - WebGLBuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindFramebuffer_ - """function bindFramebuffer_(target) - {return function(framebuffer) - {return function() - {gl.bindFramebuffer(target,framebuffer);};};};""" - :: forall eff. GLenum-> - WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindRenderbuffer_ - """function bindRenderbuffer_(target) - {return function(renderbuffer) - {return function() - {gl.bindRenderbuffer(target,renderbuffer);};};};""" - :: forall eff. GLenum-> - WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bindTexture_ - """function bindTexture_(target) - {return function(texture) - {return function() - {gl.bindTexture(target,texture);};};};""" - :: forall eff. GLenum-> - WebGLTexture - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendColor_ - """function blendColor_(red) - {return function(green) - {return function(blue) - {return function(alpha) - {return function() - {gl.blendColor(red,green,blue,alpha);};};};};};""" - :: forall eff. GLclampf-> - GLclampf-> - GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendEquation_ - """function blendEquation_(mode) - {return function() - {gl.blendEquation(mode);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendEquationSeparate_ - """function blendEquationSeparate_(modeRGB) - {return function(modeAlpha) - {return function() - {gl.blendEquationSeparate(modeRGB,modeAlpha);};};};""" - :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendFunc_ - """function blendFunc_(sfactor) - {return function(dfactor) - {return function() - {gl.blendFunc(sfactor,dfactor);};};};""" - :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import blendFuncSeparate_ - """function blendFuncSeparate_(srcRGB) - {return function(dstRGB) - {return function(srcAlpha) - {return function(dstAlpha) - {return function() - {gl.blendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bufferData_ - """function bufferData_(target) - {return function(data) - {return function(usage) - {return function() - {gl.bufferData(target,data,usage);};};};};""" - :: forall eff. GLenum-> - Float32Array-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import bufferSubData_ - """function bufferSubData_(target) - {return function(offset) - {return function(data) - {return function() - {gl.bufferSubData(target,offset,data);};};};};""" - :: forall eff. GLenum-> - GLintptr-> - Float32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import checkFramebufferStatus_ - """function checkFramebufferStatus_(target) - {return function() - {var res = gl.checkFramebufferStatus(target); - if (res === undefined){ - throw "Undefined in checkFramebufferStatus"}; - return res;};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLenum) - -foreign import clear_ - """function clear_(mask) - {return function() - {gl.clear(mask);};};""" - :: forall eff. GLbitfield -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearColor_ - """function clearColor_(red) - {return function(green) - {return function(blue) - {return function(alpha) - {return function() - {gl.clearColor(red,green,blue,alpha);};};};};};""" - :: forall eff. GLclampf-> - GLclampf-> - GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearDepth_ - """function clearDepth_(depth) - {return function() - {gl.clearDepth(depth);};};""" - :: forall eff. GLclampf -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import clearStencil_ - """function clearStencil_(s) - {return function() - {gl.clearStencil(s);};};""" - :: forall eff. GLint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import colorMask_ - """function colorMask_(red) - {return function(green) - {return function(blue) - {return function(alpha) - {return function() - {gl.colorMask(red,green,blue,alpha);};};};};};""" - :: forall eff. GLboolean-> - GLboolean-> - GLboolean-> - GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import compileShader_ - """function compileShader_(shader) - {return function() - {gl.compileShader(shader);};};""" - :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import copyTexImage2D_ - """function copyTexImage2D_(target) - {return function(level) - {return function(internalformat) - {return function(x) - {return function(y) - {return function(width) - {return function(height) - {return function(border) - {return function() - {gl.copyTexImage2D(target,level,internalformat,x,y,width,height,border);};};};};};};};};};""" - :: forall eff. GLenum-> - GLint-> - GLenum-> - GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import copyTexSubImage2D_ - """function copyTexSubImage2D_(target) - {return function(level) - {return function(xoffset) - {return function(yoffset) - {return function(x) - {return function(y) - {return function(width) - {return function(height) - {return function() - {gl.copyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);};};};};};};};};};""" - :: forall eff. GLenum-> - GLint-> - GLint-> - GLint-> - GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import createBuffer_ - """function createBuffer_() - {var res = gl.createBuffer(); - if (res === undefined){ - throw "Undefined in createBuffer"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLBuffer) - -foreign import createFramebuffer_ - """function createFramebuffer_() - {var res = gl.createFramebuffer(); - if (res === undefined){ - throw "Undefined in createFramebuffer"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLFramebuffer) - -foreign import createProgram_ - """function createProgram_() - {var res = gl.createProgram(); - if (res === undefined){ - throw "Undefined in createProgram"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLProgram) - -foreign import createRenderbuffer_ - """function createRenderbuffer_() - {var res = gl.createRenderbuffer(); - if (res === undefined){ - throw "Undefined in createRenderbuffer"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLRenderbuffer) - -foreign import createShader_ - """function createShader_(type) - {return function() - {var res = gl.createShader(type); - if (res === undefined){ - throw "Undefined in createShader"}; - return res;};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) WebGLShader) - -foreign import createTexture_ - """function createTexture_() - {var res = gl.createTexture(); - if (res === undefined){ - throw "Undefined in createTexture"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) WebGLTexture) - -foreign import cullFace_ - """function cullFace_(mode) - {return function() - {gl.cullFace(mode);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteBuffer_ - """function deleteBuffer_(buffer) - {return function() - {gl.deleteBuffer(buffer);};};""" - :: forall eff. WebGLBuffer -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteFramebuffer_ - """function deleteFramebuffer_(framebuffer) - {return function() - {gl.deleteFramebuffer(framebuffer);};};""" - :: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteProgram_ - """function deleteProgram_(program) - {return function() - {gl.deleteProgram(program);};};""" - :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteRenderbuffer_ - """function deleteRenderbuffer_(renderbuffer) - {return function() - {gl.deleteRenderbuffer(renderbuffer);};};""" - :: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteShader_ - """function deleteShader_(shader) - {return function() - {gl.deleteShader(shader);};};""" - :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import deleteTexture_ - """function deleteTexture_(texture) - {return function() - {gl.deleteTexture(texture);};};""" - :: forall eff. WebGLTexture -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthFunc_ - """function depthFunc_(func) - {return function() - {gl.depthFunc(func);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthMask_ - """function depthMask_(flag) - {return function() - {gl.depthMask(flag);};};""" - :: forall eff. GLboolean -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import depthRange_ - """function depthRange_(zNear) - {return function(zFar) - {return function() - {gl.depthRange(zNear,zFar);};};};""" - :: forall eff. GLclampf-> - GLclampf - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import detachShader_ - """function detachShader_(program) - {return function(shader) - {return function() - {gl.detachShader(program,shader);};};};""" - :: forall eff. WebGLProgram-> - WebGLShader - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import disable_ - """function disable_(cap) - {return function() - {gl.disable(cap);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import disableVertexAttribArray_ - """function disableVertexAttribArray_(index) - {return function() - {gl.disableVertexAttribArray(index);};};""" - :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import drawArrays_ - """function drawArrays_(mode) - {return function(first) - {return function(count) - {return function() - {gl.drawArrays(mode,first,count);};};};};""" - :: forall eff. GLenum-> - GLint-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import drawElements_ - """function drawElements_(mode) - {return function(count) - {return function(type) - {return function(offset) - {return function() - {gl.drawElements(mode,count,type,offset);};};};};};""" - :: forall eff. GLenum-> - GLsizei-> - GLenum-> - GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import enable_ - """function enable_(cap) - {return function() - {gl.enable(cap);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import enableVertexAttribArray_ - """function enableVertexAttribArray_(index) - {return function() - {gl.enableVertexAttribArray(index);};};""" - :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import finish_ - """function finish_() - {gl.finish();};""" - :: forall eff. (Eff (webgl :: WebGl | eff) Unit) - -foreign import flush_ - """function flush_() - {gl.flush();};""" - :: forall eff. (Eff (webgl :: WebGl | eff) Unit) - -foreign import framebufferRenderbuffer_ - """function framebufferRenderbuffer_(target) - {return function(attachment) - {return function(renderbuffertarget) - {return function(renderbuffer) - {return function() - {gl.framebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLenum-> - WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import framebufferTexture2D_ - """function framebufferTexture2D_(target) - {return function(attachment) - {return function(textarget) - {return function(texture) - {return function(level) - {return function() - {gl.framebufferTexture2D(target,attachment,textarget,texture,level);};};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLenum-> - WebGLTexture-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import frontFace_ - """function frontFace_(mode) - {return function() - {gl.frontFace(mode);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import generateMipmap_ - """function generateMipmap_(target) - {return function() - {gl.generateMipmap(target);};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import getActiveAttrib_ - """function getActiveAttrib_(program) - {return function(index) - {return function() - {var res = gl.getActiveAttrib(program,index); - if (res === undefined){ - throw "Undefined in getActiveAttrib"}; - return res;};};};""" - :: forall eff. WebGLProgram-> - GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) - -foreign import getActiveUniform_ - """function getActiveUniform_(program) - {return function(index) - {return function() - {var res = gl.getActiveUniform(program,index); - if (res === undefined){ - throw "Undefined in getActiveUniform"}; - return res;};};};""" - :: forall eff. WebGLProgram-> - GLuint - -> (Eff (webgl :: WebGl | eff) WebGLActiveInfo) - -foreign import getAttachedShaders_ - """function getAttachedShaders_(program) - {return function() - {var res = gl.getAttachedShaders(program); - if (res === undefined){ - throw "Undefined in getAttachedShaders"}; - return res;};};""" - :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) WebGLShader) - -foreign import getAttribLocation_ - """function getAttribLocation_(program) - {return function(name) - {return function() - {var res = gl.getAttribLocation(program,name); - if (res === undefined){ - throw "Undefined in getAttribLocation"}; - return res;};};};""" - :: forall eff. WebGLProgram-> - String - -> (Eff (webgl :: WebGl | eff) GLint) - -foreign import getParameter_ - """function getParameter_(pname) - {return function() - {var res = gl.getParameter(pname); - if (res === undefined){ - throw "Undefined in getParameter"}; - return res;};};""" - :: forall eff ret. GLenum -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getBufferParameter_ - """function getBufferParameter_(target) - {return function(pname) - {return function() - {var res = gl.getBufferParameter(target,pname); - if (res === undefined){ - throw "Undefined in getBufferParameter"}; - return res;};};};""" - :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getError_ - """function getError_() - {var res = gl.getError(); - if (res === undefined){ - throw "Undefined in getError"}; - return res;};""" - :: forall eff. (Eff (webgl :: WebGl | eff) GLenum) - -foreign import getFramebufferAttachmentParameter_ - """function getFramebufferAttachmentParameter_(target) - {return function(attachment) - {return function(pname) - {return function() - {var res = gl.getFramebufferAttachmentParameter(target,attachment,pname); - if (res === undefined){ - throw "Undefined in getFramebufferAttachmentParameter"}; - return res;};};};};""" - :: forall eff ret. GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getProgramParameter_ - """function getProgramParameter_(program) - {return function(pname) - {return function() - {var res = gl.getProgramParameter(program,pname); - if (res === undefined){ - throw "Undefined in getProgramParameter"}; - return res;};};};""" - :: forall eff ret. WebGLProgram-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getProgramInfoLog_ - """function getProgramInfoLog_(program) - {return function() - {var res = gl.getProgramInfoLog(program); - if (res === undefined){ - throw "Undefined in getProgramInfoLog"}; - return res;};};""" - :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) String) - -foreign import getRenderbufferParameter_ - """function getRenderbufferParameter_(target) - {return function(pname) - {return function() - {var res = gl.getRenderbufferParameter(target,pname); - if (res === undefined){ - throw "Undefined in getRenderbufferParameter"}; - return res;};};};""" - :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getShaderParameter_ - """function getShaderParameter_(shader) - {return function(pname) - {return function() - {var res = gl.getShaderParameter(shader,pname); - if (res === undefined){ - throw "Undefined in getShaderParameter"}; - return res;};};};""" - :: forall eff ret. WebGLShader-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getShaderInfoLog_ - """function getShaderInfoLog_(shader) - {return function() - {var res = gl.getShaderInfoLog(shader); - if (res === undefined){ - throw "Undefined in getShaderInfoLog"}; - return res;};};""" - :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) - -foreign import getShaderSource_ - """function getShaderSource_(shader) - {return function() - {var res = gl.getShaderSource(shader); - if (res === undefined){ - throw "Undefined in getShaderSource"}; - return res;};};""" - :: forall eff. WebGLShader -> (Eff (webgl :: WebGl | eff) String) - -foreign import getTexParameter_ - """function getTexParameter_(target) - {return function(pname) - {return function() - {var res = gl.getTexParameter(target,pname); - if (res === undefined){ - throw "Undefined in getTexParameter"}; - return res;};};};""" - :: forall eff ret. GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getUniform_ - """function getUniform_(program) - {return function(location) - {return function() - {var res = gl.getUniform(program,location); - if (res === undefined){ - throw "Undefined in getUniform"}; - return res;};};};""" - :: forall eff ret. WebGLProgram-> - WebGLUniformLocation - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getUniformLocation_ - """function getUniformLocation_(program) - {return function(name) - {return function() - {var res = gl.getUniformLocation(program,name); - if (res === undefined){ - throw "Undefined in getUniformLocation"}; - return res;};};};""" - :: forall eff. WebGLProgram-> - String - -> (Eff (webgl :: WebGl | eff) WebGLUniformLocation) - -foreign import getVertexAttrib_ - """function getVertexAttrib_(index) - {return function(pname) - {return function() - {var res = gl.getVertexAttrib(index,pname); - if (res === undefined){ - throw "Undefined in getVertexAttrib"}; - return res;};};};""" - :: forall eff ret. GLuint-> - GLenum - -> (Eff (webgl :: WebGl | eff) ret) - -foreign import getVertexAttribOffset_ - """function getVertexAttribOffset_(index) - {return function(pname) - {return function() - {var res = gl.getVertexAttribOffset(index,pname); - if (res === undefined){ - throw "Undefined in getVertexAttribOffset"}; - return res;};};};""" - :: forall eff. GLuint-> - GLenum - -> (Eff (webgl :: WebGl | eff) GLsizeiptr) - -foreign import hint_ - """function hint_(target) - {return function(mode) - {return function() - {gl.hint(target,mode);};};};""" - :: forall eff. GLenum-> GLenum -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import isBuffer_ - """function isBuffer_(buffer) - {return function() - {var res = gl.isBuffer(buffer); - if (res === undefined){ - throw "Undefined in isBuffer"}; - return res;};};""" - :: forall eff. WebGLBuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isEnabled_ - """function isEnabled_(cap) - {return function() - {var res = gl.isEnabled(cap); - if (res === undefined){ - throw "Undefined in isEnabled"}; - return res;};};""" - :: forall eff. GLenum -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isFramebuffer_ - """function isFramebuffer_(framebuffer) - {return function() - {var res = gl.isFramebuffer(framebuffer); - if (res === undefined){ - throw "Undefined in isFramebuffer"}; - return res;};};""" - :: forall eff. WebGLFramebuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isProgram_ - """function isProgram_(program) - {return function() - {var res = gl.isProgram(program); - if (res === undefined){ - throw "Undefined in isProgram"}; - return res;};};""" - :: forall eff. WebGLProgram - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isRenderbuffer_ - """function isRenderbuffer_(renderbuffer) - {return function() - {var res = gl.isRenderbuffer(renderbuffer); - if (res === undefined){ - throw "Undefined in isRenderbuffer"}; - return res;};};""" - :: forall eff. WebGLRenderbuffer - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isShader_ - """function isShader_(shader) - {return function() - {var res = gl.isShader(shader); - if (res === undefined){ - throw "Undefined in isShader"}; - return res;};};""" - :: forall eff. WebGLShader - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import isTexture_ - """function isTexture_(texture) - {return function() - {var res = gl.isTexture(texture); - if (res === undefined){ - throw "Undefined in isTexture"}; - return res;};};""" - :: forall eff. WebGLTexture - -> (Eff (webgl :: WebGl | eff) GLboolean) - -foreign import lineWidth_ - """function lineWidth_(width) - {return function() - {gl.lineWidth(width);};};""" - :: forall eff. GLfloat -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import linkProgram_ - """function linkProgram_(program) - {return function() - {gl.linkProgram(program);};};""" - :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import pixelStorei_ - """function pixelStorei_(pname) - {return function(param) - {return function() - {gl.pixelStorei(pname,param);};};};""" - :: forall eff. GLenum-> GLint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import polygonOffset_ - """function polygonOffset_(factor) - {return function(units) - {return function() - {gl.polygonOffset(factor,units);};};};""" - :: forall eff. GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import readPixels_ - """function readPixels_(x) - {return function(y) - {return function(width) - {return function(height) - {return function(format) - {return function(type) - {return function(pixels) - {return function() - {gl.readPixels(x,y,width,height,format,type,pixels);};};};};};};};};""" - :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import renderbufferStorage_ - """function renderbufferStorage_(target) - {return function(internalformat) - {return function(width) - {return function(height) - {return function() - {gl.renderbufferStorage(target,internalformat,width,height);};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import sampleCoverage_ - """function sampleCoverage_(value) - {return function(invert) - {return function() - {gl.sampleCoverage(value,invert);};};};""" - :: forall eff. GLclampf-> - GLboolean - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import scissor_ - """function scissor_(x) - {return function(y) - {return function(width) - {return function(height) - {return function() - {gl.scissor(x,y,width,height);};};};};};""" - :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import shaderSource_ - """function shaderSource_(shader) - {return function(source) - {return function() - {gl.shaderSource(shader,source);};};};""" - :: forall eff. WebGLShader-> - String - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilFunc_ - """function stencilFunc_(func) - {return function(ref) - {return function(mask) - {return function() - {gl.stencilFunc(func,ref,mask);};};};};""" - :: forall eff. GLenum-> - GLint-> - GLuint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilFuncSeparate_ - """function stencilFuncSeparate_(face) - {return function(func) - {return function(ref) - {return function(mask) - {return function() - {gl.stencilFuncSeparate(face,func,ref,mask);};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLint-> - GLuint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilMask_ - """function stencilMask_(mask) - {return function() - {gl.stencilMask(mask);};};""" - :: forall eff. GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilMaskSeparate_ - """function stencilMaskSeparate_(face) - {return function(mask) - {return function() - {gl.stencilMaskSeparate(face,mask);};};};""" - :: forall eff. GLenum-> GLuint -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilOp_ - """function stencilOp_(fail) - {return function(zfail) - {return function(zpass) - {return function() - {gl.stencilOp(fail,zfail,zpass);};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import stencilOpSeparate_ - """function stencilOpSeparate_(face) - {return function(fail) - {return function(zfail) - {return function(zpass) - {return function() - {gl.stencilOpSeparate(face,fail,zfail,zpass);};};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLenum-> - GLenum - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texImage2D_ - """function texImage2D_(target) - {return function(level) - {return function(internalformat) - {return function(width) - {return function(height) - {return function(border) - {return function(format) - {return function(type) - {return function(pixels) - {return function() - {gl.texImage2D(target,level,internalformat,width,height,border,format,type,pixels);};};};};};};};};};};""" - :: forall eff. GLenum-> - GLint-> - GLenum-> - GLsizei-> - GLsizei-> - GLint-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texParameterf_ - """function texParameterf_(target) - {return function(pname) - {return function(param) - {return function() - {gl.texParameterf(target,pname,param);};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texParameteri_ - """function texParameteri_(target) - {return function(pname) - {return function(param) - {return function() - {gl.texParameteri(target,pname,param);};};};};""" - :: forall eff. GLenum-> - GLenum-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import texSubImage2D_ - """function texSubImage2D_(target) - {return function(level) - {return function(xoffset) - {return function(yoffset) - {return function(width) - {return function(height) - {return function(format) - {return function(type) - {return function(pixels) - {return function() - {gl.texSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);};};};};};};};};};};""" - :: forall eff. GLenum-> - GLint-> - GLint-> - GLint-> - GLsizei-> - GLsizei-> - GLenum-> - GLenum-> - ArrayBufferView - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1f_ - """function uniform1f_(location) - {return function(x) - {return function() - {gl.uniform1f(location,x);};};};""" - :: forall eff. WebGLUniformLocation-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1fv_ - """function uniform1fv_(location) - {return function(v) - {return function() - {gl.uniform1fv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1i_ - """function uniform1i_(location) - {return function(x) - {return function() - {gl.uniform1i(location,x);};};};""" - :: forall eff. WebGLUniformLocation-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform1iv_ - """function uniform1iv_(location) - {return function(v) - {return function() - {gl.uniform1iv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2f_ - """function uniform2f_(location) - {return function(x) - {return function(y) - {return function() - {gl.uniform2f(location,x,y);};};};};""" - :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2fv_ - """function uniform2fv_(location) - {return function(v) - {return function() - {gl.uniform2fv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2i_ - """function uniform2i_(location) - {return function(x) - {return function(y) - {return function() - {gl.uniform2i(location,x,y);};};};};""" - :: forall eff. WebGLUniformLocation-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform2iv_ - """function uniform2iv_(location) - {return function(v) - {return function() - {gl.uniform2iv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3f_ - """function uniform3f_(location) - {return function(x) - {return function(y) - {return function(z) - {return function() - {gl.uniform3f(location,x,y,z);};};};};};""" - :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3fv_ - """function uniform3fv_(location) - {return function(v) - {return function() - {gl.uniform3fv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3i_ - """function uniform3i_(location) - {return function(x) - {return function(y) - {return function(z) - {return function() - {gl.uniform3i(location,x,y,z);};};};};};""" - :: forall eff. WebGLUniformLocation-> - GLint-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform3iv_ - """function uniform3iv_(location) - {return function(v) - {return function() - {gl.uniform3iv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4f_ - """function uniform4f_(location) - {return function(x) - {return function(y) - {return function(z) - {return function(w) - {return function() - {gl.uniform4f(location,x,y,z,w);};};};};};};""" - :: forall eff. WebGLUniformLocation-> - GLfloat-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4fv_ - """function uniform4fv_(location) - {return function(v) - {return function() - {gl.uniform4fv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4i_ - """function uniform4i_(location) - {return function(x) - {return function(y) - {return function(z) - {return function(w) - {return function() - {gl.uniform4i(location,x,y,z,w);};};};};};};""" - :: forall eff. WebGLUniformLocation-> - GLint-> - GLint-> - GLint-> - GLint - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniform4iv_ - """function uniform4iv_(location) - {return function(v) - {return function() - {gl.uniform4iv(location,v);};};};""" - :: forall eff. WebGLUniformLocation-> - Int32Array - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix2fv_ - """function uniformMatrix2fv_(location) - {return function(transpose) - {return function(value) - {return function() - {gl.uniformMatrix2fv(location,transpose,value);};};};};""" - :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix3fv_ - """function uniformMatrix3fv_(location) - {return function(transpose) - {return function(value) - {return function() - {gl.uniformMatrix3fv(location,transpose,value);};};};};""" - :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import uniformMatrix4fv_ - """function uniformMatrix4fv_(location) - {return function(transpose) - {return function(value) - {return function() - {gl.uniformMatrix4fv(location,transpose,value);};};};};""" - :: forall eff. WebGLUniformLocation-> - GLboolean-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import useProgram_ - """function useProgram_(program) - {return function() - {gl.useProgram(program);};};""" - :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import validateProgram_ - """function validateProgram_(program) - {return function() - {gl.validateProgram(program);};};""" - :: forall eff. WebGLProgram -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib1f_ - """function vertexAttrib1f_(indx) - {return function(x) - {return function() - {gl.vertexAttrib1f(indx,x);};};};""" - :: forall eff. GLuint-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib1fv_ - """function vertexAttrib1fv_(indx) - {return function(values) - {return function() - {gl.vertexAttrib1fv(indx,values);};};};""" - :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib2f_ - """function vertexAttrib2f_(indx) - {return function(x) - {return function(y) - {return function() - {gl.vertexAttrib2f(indx,x,y);};};};};""" - :: forall eff. GLuint-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib2fv_ - """function vertexAttrib2fv_(indx) - {return function(values) - {return function() - {gl.vertexAttrib2fv(indx,values);};};};""" - :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib3f_ - """function vertexAttrib3f_(indx) - {return function(x) - {return function(y) - {return function(z) - {return function() - {gl.vertexAttrib3f(indx,x,y,z);};};};};};""" - :: forall eff. GLuint-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib3fv_ - """function vertexAttrib3fv_(indx) - {return function(values) - {return function() - {gl.vertexAttrib3fv(indx,values);};};};""" - :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib4f_ - """function vertexAttrib4f_(indx) - {return function(x) - {return function(y) - {return function(z) - {return function(w) - {return function() - {gl.vertexAttrib4f(indx,x,y,z,w);};};};};};};""" - :: forall eff. GLuint-> - GLfloat-> - GLfloat-> - GLfloat-> - GLfloat - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttrib4fv_ - """function vertexAttrib4fv_(indx) - {return function(values) - {return function() - {gl.vertexAttrib4fv(indx,values);};};};""" - :: forall eff. GLuint-> - FloatArray - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import vertexAttribPointer_ - """function vertexAttribPointer_(indx) - {return function(size) - {return function(type) - {return function(normalized) - {return function(stride) - {return function(offset) - {return function() - {gl.vertexAttribPointer(indx,size,type,normalized,stride,offset);};};};};};};};""" - :: forall eff. GLuint-> - GLint-> - GLenum-> - GLboolean-> - GLsizei-> - GLintptr - -> (Eff (webgl :: WebGl | eff) Unit) - -foreign import viewport_ - """function viewport_(x) - {return function(y) - {return function(width) - {return function(height) - {return function() - {gl.viewport(x,y,width,height);};};};};};""" - :: forall eff. GLint-> - GLint-> - GLsizei-> - GLsizei - -> (Eff (webgl :: WebGl | eff) Unit) \ No newline at end of file diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs new file mode 100644 index 0000000..c21d785 --- /dev/null +++ b/src/Graphics/WebGL/Raw.purs @@ -0,0 +1,1406 @@ +-- This file is automatically generated! Don't edit this file, but +-- instead modify purescript-webgl-generator. + +module Graphics.WebGL.Raw where + +import Control.Monad.Eff +import Control.Monad.Eff.WebGL +import Data.ArrayBuffer.Types +import Data.TypedArray + +type GLenum = Number +type GLboolean = Boolean +type GLbitfield = Number +type GLbyte = Number +type GLshort = Number +type GLint = Number +type GLsizei = Number +type GLintptr = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLushort = Number +type GLuint = Number +type GLfloat = Number +type GLclampf = Number +type FloatArray = Float32Array + +foreign import data ArrayBufferView :: * +foreign import data HTMLImageElement :: * +foreign import data HTMLVideoElement :: * +foreign import data ImageData :: * +foreign import data WebGLActiveInfo :: * +foreign import data WebGLBuffer :: * +foreign import data WebGLContext :: * +foreign import data WebGLContextAttributes :: * +foreign import data WebGLFramebuffer :: * +foreign import data WebGLProgram :: * +foreign import data WebGLRenderbuffer :: * +foreign import data WebGLShader :: * +foreign import data WebGLTexture :: * +foreign import data WebGLUniformLocation :: * + +_DEPTH_BUFFER_BIT = 256 +_STENCIL_BUFFER_BIT = 1024 +_COLOR_BUFFER_BIT = 16384 +_POINTS = 0 +_LINES = 1 +_LINE_LOOP = 2 +_LINE_STRIP = 3 +_TRIANGLES = 4 +_TRIANGLE_STRIP = 5 +_TRIANGLE_FAN = 6 +_ZERO = 0 +_ONE = 1 +_SRC_COLOR = 768 +_ONE_MINUS_SRC_COLOR = 769 +_SRC_ALPHA = 770 +_ONE_MINUS_SRC_ALPHA = 771 +_DST_ALPHA = 772 +_ONE_MINUS_DST_ALPHA = 773 +_DST_COLOR = 774 +_ONE_MINUS_DST_COLOR = 775 +_SRC_ALPHA_SATURATE = 776 +_FUNC_ADD = 32774 +_BLEND_EQUATION = 32777 +_BLEND_EQUATION_RGB = 32777 +_BLEND_EQUATION_ALPHA = 34877 +_FUNC_SUBTRACT = 32778 +_FUNC_REVERSE_SUBTRACT = 32779 +_BLEND_DST_RGB = 32968 +_BLEND_SRC_RGB = 32969 +_BLEND_DST_ALPHA = 32970 +_BLEND_SRC_ALPHA = 32971 +_CONSTANT_COLOR = 32769 +_ONE_MINUS_CONSTANT_COLOR = 32770 +_CONSTANT_ALPHA = 32771 +_ONE_MINUS_CONSTANT_ALPHA = 32772 +_BLEND_COLOR = 32773 +_ARRAY_BUFFER = 34962 +_ELEMENT_ARRAY_BUFFER = 34963 +_ARRAY_BUFFER_BINDING = 34964 +_ELEMENT_ARRAY_BUFFER_BINDING = 34965 +_STREAM_DRAW = 35040 +_STATIC_DRAW = 35044 +_DYNAMIC_DRAW = 35048 +_BUFFER_SIZE = 34660 +_BUFFER_USAGE = 34661 +_CURRENT_VERTEX_ATTRIB = 34342 +_FRONT = 1028 +_BACK = 1029 +_FRONT_AND_BACK = 1032 +_TEXTURE_2D = 3553 +_CULL_FACE = 2884 +_BLEND = 3042 +_DITHER = 3024 +_STENCIL_TEST = 2960 +_DEPTH_TEST = 2929 +_SCISSOR_TEST = 3089 +_POLYGON_OFFSET_FILL = 32823 +_SAMPLE_ALPHA_TO_COVERAGE = 32926 +_SAMPLE_COVERAGE = 32928 +_NO_ERROR = 0 +_INVALID_ENUM = 1280 +_INVALID_VALUE = 1281 +_INVALID_OPERATION = 1282 +_OUT_OF_MEMORY = 1285 +_CW = 2304 +_CCW = 2305 +_LINE_WIDTH = 2849 +_ALIASED_POINT_SIZE_RANGE = 33901 +_ALIASED_LINE_WIDTH_RANGE = 33902 +_CULL_FACE_MODE = 2885 +_FRONT_FACE = 2886 +_DEPTH_RANGE = 2928 +_DEPTH_WRITEMASK = 2930 +_DEPTH_CLEAR_VALUE = 2931 +_DEPTH_FUNC = 2932 +_STENCIL_CLEAR_VALUE = 2961 +_STENCIL_FUNC = 2962 +_STENCIL_FAIL = 2964 +_STENCIL_PASS_DEPTH_FAIL = 2965 +_STENCIL_PASS_DEPTH_PASS = 2966 +_STENCIL_REF = 2967 +_STENCIL_VALUE_MASK = 2963 +_STENCIL_WRITEMASK = 2968 +_STENCIL_BACK_FUNC = 34816 +_STENCIL_BACK_FAIL = 34817 +_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 +_STENCIL_BACK_PASS_DEPTH_PASS = 34819 +_STENCIL_BACK_REF = 36003 +_STENCIL_BACK_VALUE_MASK = 36004 +_STENCIL_BACK_WRITEMASK = 36005 +_VIEWPORT = 2978 +_SCISSOR_BOX = 3088 +_COLOR_CLEAR_VALUE = 3106 +_COLOR_WRITEMASK = 3107 +_UNPACK_ALIGNMENT = 3317 +_PACK_ALIGNMENT = 3333 +_MAX_TEXTURE_SIZE = 3379 +_MAX_VIEWPORT_DIMS = 3386 +_SUBPIXEL_BITS = 3408 +_RED_BITS = 3410 +_GREEN_BITS = 3411 +_BLUE_BITS = 3412 +_ALPHA_BITS = 3413 +_DEPTH_BITS = 3414 +_STENCIL_BITS = 3415 +_POLYGON_OFFSET_UNITS = 10752 +_POLYGON_OFFSET_FACTOR = 32824 +_TEXTURE_BINDING_2D = 32873 +_SAMPLE_BUFFERS = 32936 +_SAMPLES = 32937 +_SAMPLE_COVERAGE_VALUE = 32938 +_SAMPLE_COVERAGE_INVERT = 32939 +_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 +_COMPRESSED_TEXTURE_FORMATS = 34467 +_DONT_CARE = 4352 +_FASTEST = 4353 +_NICEST = 4354 +_GENERATE_MIPMAP_HINT = 33170 +_BYTE = 5120 +_UNSIGNED_BYTE = 5121 +_SHORT = 5122 +_UNSIGNED_SHORT = 5123 +_INT = 5124 +_UNSIGNED_INT = 5125 +_FLOAT = 5126 +_DEPTH_COMPONENT = 6402 +_ALPHA = 6406 +_RGB = 6407 +_RGBA = 6408 +_LUMINANCE = 6409 +_LUMINANCE_ALPHA = 6410 +_UNSIGNED_SHORT_4_4_4_4 = 32819 +_UNSIGNED_SHORT_5_5_5_1 = 32820 +_UNSIGNED_SHORT_5_6_5 = 33635 +_FRAGMENT_SHADER = 35632 +_VERTEX_SHADER = 35633 +_MAX_VERTEX_ATTRIBS = 34921 +_MAX_VERTEX_UNIFORM_VECTORS = 36347 +_MAX_VARYING_VECTORS = 36348 +_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 +_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 +_MAX_TEXTURE_IMAGE_UNITS = 34930 +_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 +_SHADER_TYPE = 35663 +_DELETE_STATUS = 35712 +_LINK_STATUS = 35714 +_VALIDATE_STATUS = 35715 +_ATTACHED_SHADERS = 35717 +_ACTIVE_UNIFORMS = 35718 +_ACTIVE_UNIFORM_MAX_LENGTH = 35719 +_ACTIVE_ATTRIBUTES = 35721 +_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 +_SHADING_LANGUAGE_VERSION = 35724 +_CURRENT_PROGRAM = 35725 +_NEVER = 512 +_LESS = 513 +_EQUAL = 514 +_LEQUAL = 515 +_GREATER = 516 +_NOTEQUAL = 517 +_GEQUAL = 518 +_ALWAYS = 519 +_KEEP = 7680 +_REPLACE = 7681 +_INCR = 7682 +_DECR = 7683 +_INVERT = 5386 +_INCR_WRAP = 34055 +_DECR_WRAP = 34056 +_VENDOR = 7936 +_RENDERER = 7937 +_VERSION = 7938 +_NEAREST = 9728 +_LINEAR = 9729 +_NEAREST_MIPMAP_NEAREST = 9984 +_LINEAR_MIPMAP_NEAREST = 9985 +_NEAREST_MIPMAP_LINEAR = 9986 +_LINEAR_MIPMAP_LINEAR = 9987 +_TEXTURE_MAG_FILTER = 10240 +_TEXTURE_MIN_FILTER = 10241 +_TEXTURE_WRAP_S = 10242 +_TEXTURE_WRAP_T = 10243 +_TEXTURE = 5890 +_TEXTURE_CUBE_MAP = 34067 +_TEXTURE_BINDING_CUBE_MAP = 34068 +_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 +_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 +_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 +_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 +_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 +_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 +_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 +_TEXTURE0 = 33984 +_TEXTURE1 = 33985 +_TEXTURE2 = 33986 +_TEXTURE3 = 33987 +_TEXTURE4 = 33988 +_TEXTURE5 = 33989 +_TEXTURE6 = 33990 +_TEXTURE7 = 33991 +_TEXTURE8 = 33992 +_TEXTURE9 = 33993 +_TEXTURE10 = 33994 +_TEXTURE11 = 33995 +_TEXTURE12 = 33996 +_TEXTURE13 = 33997 +_TEXTURE14 = 33998 +_TEXTURE15 = 33999 +_TEXTURE16 = 34000 +_TEXTURE17 = 34001 +_TEXTURE18 = 34002 +_TEXTURE19 = 34003 +_TEXTURE20 = 34004 +_TEXTURE21 = 34005 +_TEXTURE22 = 34006 +_TEXTURE23 = 34007 +_TEXTURE24 = 34008 +_TEXTURE25 = 34009 +_TEXTURE26 = 34010 +_TEXTURE27 = 34011 +_TEXTURE28 = 34012 +_TEXTURE29 = 34013 +_TEXTURE30 = 34014 +_TEXTURE31 = 34015 +_ACTIVE_TEXTURE = 34016 +_REPEAT = 10497 +_CLAMP_TO_EDGE = 33071 +_MIRRORED_REPEAT = 33648 +_FLOAT_VEC2 = 35664 +_FLOAT_VEC3 = 35665 +_FLOAT_VEC4 = 35666 +_INT_VEC2 = 35667 +_INT_VEC3 = 35668 +_INT_VEC4 = 35669 +_BOOL = 35670 +_BOOL_VEC2 = 35671 +_BOOL_VEC3 = 35672 +_BOOL_VEC4 = 35673 +_FLOAT_MAT2 = 35674 +_FLOAT_MAT3 = 35675 +_FLOAT_MAT4 = 35676 +_SAMPLER_2D = 35678 +_SAMPLER_CUBE = 35680 +_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 +_VERTEX_ATTRIB_ARRAY_SIZE = 34339 +_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 +_VERTEX_ATTRIB_ARRAY_TYPE = 34341 +_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 +_VERTEX_ATTRIB_ARRAY_POINTER = 34373 +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 +_COMPILE_STATUS = 35713 +_INFO_LOG_LENGTH = 35716 +_SHADER_SOURCE_LENGTH = 35720 +_LOW_FLOAT = 36336 +_MEDIUM_FLOAT = 36337 +_HIGH_FLOAT = 36338 +_LOW_INT = 36339 +_MEDIUM_INT = 36340 +_HIGH_INT = 36341 +_FRAMEBUFFER = 36160 +_RENDERBUFFER = 36161 +_RGBA4 = 32854 +_RGB5_A1 = 32855 +_RGB565 = 36194 +_DEPTH_COMPONENT16 = 33189 +_STENCIL_INDEX = 6401 +_STENCIL_INDEX8 = 36168 +_DEPTH_STENCIL = 34041 +_RENDERBUFFER_WIDTH = 36162 +_RENDERBUFFER_HEIGHT = 36163 +_RENDERBUFFER_INTERNAL_FORMAT = 36164 +_RENDERBUFFER_RED_SIZE = 36176 +_RENDERBUFFER_GREEN_SIZE = 36177 +_RENDERBUFFER_BLUE_SIZE = 36178 +_RENDERBUFFER_ALPHA_SIZE = 36179 +_RENDERBUFFER_DEPTH_SIZE = 36180 +_RENDERBUFFER_STENCIL_SIZE = 36181 +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 +_COLOR_ATTACHMENT0 = 36064 +_DEPTH_ATTACHMENT = 36096 +_STENCIL_ATTACHMENT = 36128 +_DEPTH_STENCIL_ATTACHMENT = 33306 +_NONE = 0 +_FRAMEBUFFER_COMPLETE = 36053 +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 +_FRAMEBUFFER_UNSUPPORTED = 36061 +_FRAMEBUFFER_BINDING = 36006 +_RENDERBUFFER_BINDING = 36007 +_MAX_RENDERBUFFER_SIZE = 34024 +_INVALID_FRAMEBUFFER_OPERATION = 1286 +_UNPACK_FLIP_Y_WEBGL = 37440 +_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 +_CONTEXT_LOST_WEBGL = 37442 +_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 +_BROWSER_DEFAULT_WEBGL = 37444 + +foreign import getContextAttributesImpl """ + function getContextAttributesImpl(webgl) { + return function () { + return webgl.getContextAttributes(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) + +foreign import isContextLostImpl """ + function isContextLostImpl(webgl) { + return function () { + return webgl.isContextLost(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) + +foreign import getSupportedExtensionsImpl """ + function getSupportedExtensionsImpl(webgl) { + return function () { + return webgl.getSupportedExtensions(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [String]) + +foreign import getExtensionImpl """ + function getExtensionImpl(webgl, name) { + return function () { + return webgl.getExtension(name); + }; + } +""" :: forall eff a. Fn2 WebGLContext String (Eff (canvas :: Canvas | eff) a) + +foreign import activeTextureImpl """ + function activeTextureImpl(webgl, texture) { + return function () { + return webgl.activeTexture(texture); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import attachShaderImpl """ + function attachShaderImpl(webgl, program, shader) { + return function () { + return webgl.attachShader(program, shader); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) + +foreign import bindAttribLocationImpl """ + function bindAttribLocationImpl(webgl, program, index, name) { + return function () { + return webgl.bindAttribLocation(program, index, name); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint String (Eff (canvas :: Canvas | eff) Unit) + +foreign import bindBufferImpl """ + function bindBufferImpl(webgl, target, buffer) { + return function () { + return webgl.bindBuffer(target, buffer); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import bindFramebufferImpl """ + function bindFramebufferImpl(webgl, target, framebuffer) { + return function () { + return webgl.bindFramebuffer(target, framebuffer); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import bindRenderbufferImpl """ + function bindRenderbufferImpl(webgl, target, renderbuffer) { + return function () { + return webgl.bindRenderbuffer(target, renderbuffer); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import bindTextureImpl """ + function bindTextureImpl(webgl, target, texture) { + return function () { + return webgl.bindTexture(target, texture); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) + +foreign import blendColorImpl """ + function blendColorImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.blendColor(red, green, blue, alpha); + }; + } +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) + +foreign import blendEquationImpl """ + function blendEquationImpl(webgl, mode) { + return function () { + return webgl.blendEquation(mode); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import blendEquationSeparateImpl """ + function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { + return function () { + return webgl.blendEquationSeparate(modeRGB, modeAlpha); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import blendFuncImpl """ + function blendFuncImpl(webgl, sfactor, dfactor) { + return function () { + return webgl.blendFunc(sfactor, dfactor); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import blendFuncSeparateImpl """ + function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { + return function () { + return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import bufferDataImpl """ + function bufferDataImpl(webgl, target, data, usage) { + return function () { + return webgl.bufferData(target, data, usage); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import bufferSubDataImpl """ + function bufferSubDataImpl(webgl, target, offset, data) { + return function () { + return webgl.bufferSubData(target, offset, data); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +foreign import checkFramebufferStatusImpl """ + function checkFramebufferStatusImpl(webgl, target) { + return function () { + return webgl.checkFramebufferStatus(target); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) + +foreign import clearImpl """ + function clearImpl(webgl, mask) { + return function () { + return webgl.clear(mask); + }; + } +""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) + +foreign import clearColorImpl """ + function clearColorImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.clearColor(red, green, blue, alpha); + }; + } +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) + +foreign import clearDepthImpl """ + function clearDepthImpl(webgl, depth) { + return function () { + return webgl.clearDepth(depth); + }; + } +""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) + +foreign import clearStencilImpl """ + function clearStencilImpl(webgl, s) { + return function () { + return webgl.clearStencil(s); + }; + } +""" :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import colorMaskImpl """ + function colorMaskImpl(webgl, red, green, blue, alpha) { + return function () { + return webgl.colorMask(red, green, blue, alpha); + }; + } +""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) + +foreign import compileShaderImpl """ + function compileShaderImpl(webgl, shader) { + return function () { + return webgl.compileShader(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) + +foreign import copyTexImage2DImpl """ + function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { + return function () { + return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); + }; + } +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import copyTexSubImage2DImpl """ + function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { + return function () { + return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + }; + } +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) + +foreign import createBufferImpl """ + function createBufferImpl(webgl) { + return function () { + return webgl.createBuffer(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) + +foreign import createFramebufferImpl """ + function createFramebufferImpl(webgl) { + return function () { + return webgl.createFramebuffer(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) + +foreign import createProgramImpl """ + function createProgramImpl(webgl) { + return function () { + return webgl.createProgram(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) + +foreign import createRenderbufferImpl """ + function createRenderbufferImpl(webgl) { + return function () { + return webgl.createRenderbuffer(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) + +foreign import createShaderImpl """ + function createShaderImpl(webgl, type) { + return function () { + return webgl.createShader(type); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) + +foreign import createTextureImpl """ + function createTextureImpl(webgl) { + return function () { + return webgl.createTexture(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) + +foreign import cullFaceImpl """ + function cullFaceImpl(webgl, mode) { + return function () { + return webgl.cullFace(mode); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteBufferImpl """ + function deleteBufferImpl(webgl, buffer) { + return function () { + return webgl.deleteBuffer(buffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteFramebufferImpl """ + function deleteFramebufferImpl(webgl, framebuffer) { + return function () { + return webgl.deleteFramebuffer(framebuffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteProgramImpl """ + function deleteProgramImpl(webgl, program) { + return function () { + return webgl.deleteProgram(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteRenderbufferImpl """ + function deleteRenderbufferImpl(webgl, renderbuffer) { + return function () { + return webgl.deleteRenderbuffer(renderbuffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteShaderImpl """ + function deleteShaderImpl(webgl, shader) { + return function () { + return webgl.deleteShader(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) + +foreign import deleteTextureImpl """ + function deleteTextureImpl(webgl, texture) { + return function () { + return webgl.deleteTexture(texture); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) + +foreign import depthFuncImpl """ + function depthFuncImpl(webgl, func) { + return function () { + return webgl.depthFunc(func); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import depthMaskImpl """ + function depthMaskImpl(webgl, flag) { + return function () { + return webgl.depthMask(flag); + }; + } +""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) + +foreign import depthRangeImpl """ + function depthRangeImpl(webgl, zNear, zFar) { + return function () { + return webgl.depthRange(zNear, zFar); + }; + } +""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) + +foreign import detachShaderImpl """ + function detachShaderImpl(webgl, program, shader) { + return function () { + return webgl.detachShader(program, shader); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) + +foreign import disableImpl """ + function disableImpl(webgl, cap) { + return function () { + return webgl.disable(cap); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import disableVertexAttribArrayImpl """ + function disableVertexAttribArrayImpl(webgl, index) { + return function () { + return webgl.disableVertexAttribArray(index); + }; + } +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import drawArraysImpl """ + function drawArraysImpl(webgl, mode, first, count) { + return function () { + return webgl.drawArrays(mode, first, count); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) + +foreign import drawElementsImpl """ + function drawElementsImpl(webgl, mode, count, type, offset) { + return function () { + return webgl.drawElements(mode, count, type, offset); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) + +foreign import enableImpl """ + function enableImpl(webgl, cap) { + return function () { + return webgl.enable(cap); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import enableVertexAttribArrayImpl """ + function enableVertexAttribArrayImpl(webgl, index) { + return function () { + return webgl.enableVertexAttribArray(index); + }; + } +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import finishImpl """ + function finishImpl(webgl) { + return function () { + return webgl.finish(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) + +foreign import flushImpl """ + function flushImpl(webgl) { + return function () { + return webgl.flush(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) + +foreign import framebufferRenderbufferImpl """ + function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { + return function () { + return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) + +foreign import framebufferTexture2DImpl """ + function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { + return function () { + return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); + }; + } +""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import frontFaceImpl """ + function frontFaceImpl(webgl, mode) { + return function () { + return webgl.frontFace(mode); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import generateMipmapImpl """ + function generateMipmapImpl(webgl, target) { + return function () { + return webgl.generateMipmap(target); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import getActiveAttribImpl """ + function getActiveAttribImpl(webgl, program, index) { + return function () { + return webgl.getActiveAttrib(program, index); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) + +foreign import getActiveUniformImpl """ + function getActiveUniformImpl(webgl, program, index) { + return function () { + return webgl.getActiveUniform(program, index); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) + +foreign import getAttachedShadersImpl """ + function getAttachedShadersImpl(webgl, program) { + return function () { + return webgl.getAttachedShaders(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) + +foreign import getAttribLocationImpl """ + function getAttribLocationImpl(webgl, program, name) { + return function () { + return webgl.getAttribLocation(program, name); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram String (Eff (canvas :: Canvas | eff) GLint) + +foreign import getParameterImpl """ + function getParameterImpl(webgl, pname) { + return function () { + return webgl.getParameter(pname); + }; + } +""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getBufferParameterImpl """ + function getBufferParameterImpl(webgl, target, pname) { + return function () { + return webgl.getBufferParameter(target, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getErrorImpl """ + function getErrorImpl(webgl) { + return function () { + return webgl.getError(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) + +foreign import getFramebufferAttachmentParameterImpl """ + function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { + return function () { + return webgl.getFramebufferAttachmentParameter(target, attachment, pname); + }; + } +""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getProgramParameterImpl """ + function getProgramParameterImpl(webgl, program, pname) { + return function () { + return webgl.getProgramParameter(program, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getProgramInfoLogImpl """ + function getProgramInfoLogImpl(webgl, program) { + return function () { + return webgl.getProgramInfoLog(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) String) + +foreign import getRenderbufferParameterImpl """ + function getRenderbufferParameterImpl(webgl, target, pname) { + return function () { + return webgl.getRenderbufferParameter(target, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getShaderParameterImpl """ + function getShaderParameterImpl(webgl, shader, pname) { + return function () { + return webgl.getShaderParameter(shader, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getShaderInfoLogImpl """ + function getShaderInfoLogImpl(webgl, shader) { + return function () { + return webgl.getShaderInfoLog(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) String) + +foreign import getShaderSourceImpl """ + function getShaderSourceImpl(webgl, shader) { + return function () { + return webgl.getShaderSource(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) String) + +foreign import getTexParameterImpl """ + function getTexParameterImpl(webgl, target, pname) { + return function () { + return webgl.getTexParameter(target, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getUniformImpl """ + function getUniformImpl(webgl, program, location) { + return function () { + return webgl.getUniform(program, location); + }; + } +""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) + +foreign import getUniformLocationImpl """ + function getUniformLocationImpl(webgl, program, name) { + return function () { + return webgl.getUniformLocation(program, name); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLProgram String (Eff (canvas :: Canvas | eff) WebGLUniformLocation) + +foreign import getVertexAttribImpl """ + function getVertexAttribImpl(webgl, index, pname) { + return function () { + return webgl.getVertexAttrib(index, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) + +foreign import getVertexAttribOffsetImpl """ + function getVertexAttribOffsetImpl(webgl, index, pname) { + return function () { + return webgl.getVertexAttribOffset(index, pname); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) + +foreign import hintImpl """ + function hintImpl(webgl, target, mode) { + return function () { + return webgl.hint(target, mode); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import isBufferImpl """ + function isBufferImpl(webgl, buffer) { + return function () { + return webgl.isBuffer(buffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isEnabledImpl """ + function isEnabledImpl(webgl, cap) { + return function () { + return webgl.isEnabled(cap); + }; + } +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isFramebufferImpl """ + function isFramebufferImpl(webgl, framebuffer) { + return function () { + return webgl.isFramebuffer(framebuffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isProgramImpl """ + function isProgramImpl(webgl, program) { + return function () { + return webgl.isProgram(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isRenderbufferImpl """ + function isRenderbufferImpl(webgl, renderbuffer) { + return function () { + return webgl.isRenderbuffer(renderbuffer); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isShaderImpl """ + function isShaderImpl(webgl, shader) { + return function () { + return webgl.isShader(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import isTextureImpl """ + function isTextureImpl(webgl, texture) { + return function () { + return webgl.isTexture(texture); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) + +foreign import lineWidthImpl """ + function lineWidthImpl(webgl, width) { + return function () { + return webgl.lineWidth(width); + }; + } +""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import linkProgramImpl """ + function linkProgramImpl(webgl, program) { + return function () { + return webgl.linkProgram(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) + +foreign import pixelStoreiImpl """ + function pixelStoreiImpl(webgl, pname, param) { + return function () { + return webgl.pixelStorei(pname, param); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import polygonOffsetImpl """ + function polygonOffsetImpl(webgl, factor, units) { + return function () { + return webgl.polygonOffset(factor, units); + }; + } +""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import readPixelsImpl """ + function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { + return function () { + return webgl.readPixels(x, y, width, height, format, type, pixels); + }; + } +""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +foreign import renderbufferStorageImpl """ + function renderbufferStorageImpl(webgl, target, internalformat, width, height) { + return function () { + return webgl.renderbufferStorage(target, internalformat, width, height); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) + +foreign import sampleCoverageImpl """ + function sampleCoverageImpl(webgl, value, invert) { + return function () { + return webgl.sampleCoverage(value, invert); + }; + } +""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) + +foreign import scissorImpl """ + function scissorImpl(webgl, x, y, width, height) { + return function () { + return webgl.scissor(x, y, width, height); + }; + } +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) + +foreign import shaderSourceImpl """ + function shaderSourceImpl(webgl, shader, source) { + return function () { + return webgl.shaderSource(shader, source); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLShader String (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilFuncImpl """ + function stencilFuncImpl(webgl, func, ref, mask) { + return function () { + return webgl.stencilFunc(func, ref, mask); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilFuncSeparateImpl """ + function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { + return function () { + return webgl.stencilFuncSeparate(face, func, ref, mask); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilMaskImpl """ + function stencilMaskImpl(webgl, mask) { + return function () { + return webgl.stencilMask(mask); + }; + } +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilMaskSeparateImpl """ + function stencilMaskSeparateImpl(webgl, face, mask) { + return function () { + return webgl.stencilMaskSeparate(face, mask); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilOpImpl """ + function stencilOpImpl(webgl, fail, zfail, zpass) { + return function () { + return webgl.stencilOp(fail, zfail, zpass); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import stencilOpSeparateImpl """ + function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { + return function () { + return webgl.stencilOpSeparate(face, fail, zfail, zpass); + }; + } +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) + +foreign import texImage2DImpl """ + function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { + return function () { + return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); + }; + } +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +foreign import texParameterfImpl """ + function texParameterfImpl(webgl, target, pname, param) { + return function () { + return webgl.texParameterf(target, pname, param); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import texParameteriImpl """ + function texParameteriImpl(webgl, target, pname, param) { + return function () { + return webgl.texParameteri(target, pname, param); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import texSubImage2DImpl """ + function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { + return function () { + return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + }; + } +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform1fImpl """ + function uniform1fImpl(webgl, location, x) { + return function () { + return webgl.uniform1f(location, x); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform1fvImpl """ + function uniform1fvImpl(webgl, location, v) { + return function () { + return webgl.uniform1fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform1iImpl """ + function uniform1iImpl(webgl, location, x) { + return function () { + return webgl.uniform1i(location, x); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform1ivImpl """ + function uniform1ivImpl(webgl, location, v) { + return function () { + return webgl.uniform1iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform2fImpl """ + function uniform2fImpl(webgl, location, x, y) { + return function () { + return webgl.uniform2f(location, x, y); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform2fvImpl """ + function uniform2fvImpl(webgl, location, v) { + return function () { + return webgl.uniform2fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform2iImpl """ + function uniform2iImpl(webgl, location, x, y) { + return function () { + return webgl.uniform2i(location, x, y); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform2ivImpl """ + function uniform2ivImpl(webgl, location, v) { + return function () { + return webgl.uniform2iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform3fImpl """ + function uniform3fImpl(webgl, location, x, y, z) { + return function () { + return webgl.uniform3f(location, x, y, z); + }; + } +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform3fvImpl """ + function uniform3fvImpl(webgl, location, v) { + return function () { + return webgl.uniform3fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform3iImpl """ + function uniform3iImpl(webgl, location, x, y, z) { + return function () { + return webgl.uniform3i(location, x, y, z); + }; + } +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform3ivImpl """ + function uniform3ivImpl(webgl, location, v) { + return function () { + return webgl.uniform3iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform4fImpl """ + function uniform4fImpl(webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4f(location, x, y, z, w); + }; + } +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform4fvImpl """ + function uniform4fvImpl(webgl, location, v) { + return function () { + return webgl.uniform4fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform4iImpl """ + function uniform4iImpl(webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4i(location, x, y, z, w); + }; + } +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniform4ivImpl """ + function uniform4ivImpl(webgl, location, v) { + return function () { + return webgl.uniform4iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniformMatrix2fvImpl """ + function uniformMatrix2fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix2fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniformMatrix3fvImpl """ + function uniformMatrix3fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix3fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import uniformMatrix4fvImpl """ + function uniformMatrix4fvImpl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix4fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import useProgramImpl """ + function useProgramImpl(webgl, program) { + return function () { + return webgl.useProgram(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) + +foreign import validateProgramImpl """ + function validateProgramImpl(webgl, program) { + return function () { + return webgl.validateProgram(program); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib1fImpl """ + function vertexAttrib1fImpl(webgl, indx, x) { + return function () { + return webgl.vertexAttrib1f(indx, x); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib1fvImpl """ + function vertexAttrib1fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib1fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib2fImpl """ + function vertexAttrib2fImpl(webgl, indx, x, y) { + return function () { + return webgl.vertexAttrib2f(indx, x, y); + }; + } +""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib2fvImpl """ + function vertexAttrib2fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib2fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib3fImpl """ + function vertexAttrib3fImpl(webgl, indx, x, y, z) { + return function () { + return webgl.vertexAttrib3f(indx, x, y, z); + }; + } +""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib3fvImpl """ + function vertexAttrib3fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib3fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib4fImpl """ + function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { + return function () { + return webgl.vertexAttrib4f(indx, x, y, z, w); + }; + } +""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttrib4fvImpl """ + function vertexAttrib4fvImpl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib4fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) + +foreign import vertexAttribPointerImpl """ + function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { + return function () { + return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); + }; + } +""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) + +foreign import viewportImpl """ + function viewportImpl(webgl, x, y, width, height) { + return function () { + return webgl.viewport(x, y, width, height); + }; + } +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) + From e07c70289e155e7f141e2f8a291610ca8669d85a Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Mon, 25 May 2015 13:18:24 -0500 Subject: [PATCH 17/51] add more package files --- .gitignore | 3 +++ README.md | 0 gruntfile.js | 32 ++++++++++++++++++++++++++++++++ package.json | 16 ++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 README.md create mode 100644 gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 011c4f3..eb2f753 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ dist/ *.project .cabal-sandbox cabal.sandbox.config +node_modules/ +bower_components/ +.psci/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..07b0405 --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,32 @@ +module.exports = function(grunt) { + "use strict"; + + grunt.initConfig({ + + srcFiles: [ + "src/**/*.purs", + "bower_components/purescript-*/src/**/*.purs" + ], + + dotPsci: ["<%=srcFiles%>"], + pscMake: ["<%=srcFiles%>"], + + psc: { + options: { + modules: 'Graphics.WebGL.Raw', + main: 'Graphics.WebGL.Raw' + } + }, + + pscDocs: { + readme: { + src: "src/**/*.purs", + dest: "docs/README.md" + } + }, + + }); + + grunt.loadNpmTasks("grunt-purescript"); + grunt.registerTask("default", ["pscMake", "dotPsci", "pscDocs"]); +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..1d12c10 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "purescript-webgl-raw", + "description": "a generated low-level PureScript wrapper of WebGL methods", + "version": "0.0.1", + "license": "CPL-2", + + "repository": { + "type": "git", + "url": "https://github.com/Jonplussed/purescript-webgl-raw" + }, + + "dependencies": { + "grunt": "^0.4.5", + "grunt-purescript": "^0.6.0" + } +} From 690c01c499a51fe75780c5db6caf02003cb8b267 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Mon, 25 May 2015 13:44:27 -0500 Subject: [PATCH 18/51] added a basic README --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/README.md b/README.md index e69de29..aa0d3af 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,51 @@ +# purescript-webgl-raw + +This package consists of two pieces: +1. a Haskell generator, which parses the Khronos WebGL specification to create +2. the PureScript source, which contains the wrapped WebGL methods + +The files in `src` should only be modified by modifying the generator. + +## Generator + +To build the generator, ensure you have a recent version of Haskell and +`cabal-install` installed, and then: + +```sh +> cabal sandbox init +> cabal install --only-dependencies +> cabal build +``` + +To run the generator on the included [Khronos IDL][1] and output the contents +into the PureScript module: + + [1]: https://www.khronos.org/registry/webgl/specs/1.0.3/ + +```sh +> dist/build/purescript-webgl-raw/purescript-webgl-raw \ +> docs/WebGL-1.0.3.idl > src/Graphics/WebGL/Raw.purs +``` + +## PureScript + +`Graphics.WebGL.Raw` is intended as the lowest-possible-level wrapping of the +WebGL API for PureScript. It is not intended for use outside of the +`purescript-webgl-unsafe` package, which provides a type-safe (but not +error-checked) wrapper around the raw methods. + +To build the `Graphics.WebGL.Raw` module, ensure you have a recent version of +Node and `npm` installed, and then: + +```sh +> npm install +> bower install +> grunt +``` + +## Credits + +This package is built upon the amazing amounts of hard work done by [Jurgen +Nicklisch-Franken][2], from whom this package is branched. + + [2]: https://github.com/jutaro From dc255246ca353f25efc608ed10258ed5ededd6d5 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Tue, 26 May 2015 13:48:57 -0500 Subject: [PATCH 19/51] significant cleanup --- generator/IDL/AST.hs | 62 ++++++++++++++++------------ generator/IDL/Parser.hs | 88 ++++++++++++++++++++++++++++++++-------- generator/IDL/Printer.hs | 86 +++++++++++---------------------------- generator/Main.hs | 2 +- 4 files changed, 133 insertions(+), 105 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index b8d424f..7008281 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -1,14 +1,13 @@ module IDL.AST where -type Idl = [Decl] - -isEnum :: Decl -> Bool -isEnum Enum{} = True -isEnum _ = False - -isFunction :: Decl -> Bool -isFunction Function{} = True -isFunction _ = False +data IDL = IDL + { enums :: [Decl] + , comments :: [Decl] + , functions :: [Decl] + , attributes :: [Decl] + , types :: [Type] + } + deriving Show data Decl = Enum @@ -25,26 +24,37 @@ data Decl , methodRaises :: Maybe String } | Attribute - { attIsReadonly :: Bool - , attType :: Type - , attName :: String + { attrIsReadonly :: Bool + , attrType :: Type + , attrName :: String } - deriving (Eq,Show) + deriving Show -data Type - = Type - { typeName :: String - , typeIsArray :: Bool - , typeCondPara :: Maybe String - } - deriving (Eq,Show) +instance Eq Decl where + x@Enum{} == y@Enum{} = enumName x == enumName y + x@Comment{} == y@Comment{} = comment x == comment y + x@Function{} == y@Function{} = methodName x == methodName y + x@Attribute{} == y@Attribute{} = attrName x == attrName y + _ == _ = False + +data Type = Type + { typeName :: String + , typeIsArray :: Bool + , typeCondPara :: Maybe String + } + deriving Show + +instance Eq Type where + x == y = typeName x == typeName y instance Ord Type where compare x y = compare (typeName x) (typeName y) -data Arg - = Arg - { argType :: Type - , argName :: String - } - deriving (Eq,Show) +data Arg = Arg + { argType :: Type + , argName :: String + } + deriving Show + +emptyIdl :: IDL +emptyIdl = IDL [] [] [] [] [] diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index 1f59c46..def7a9a 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -1,7 +1,8 @@ -module IDL.Parser (idlParser) where +module IDL.Parser (parseIdl) where import Control.Monad (liftM) import Data.Functor.Identity (Identity(..)) +import Data.List (nub) import qualified Text.Parsec.Token as PP import qualified Text.Parsec as PP @@ -13,8 +14,6 @@ import IDL.AST type Parse a = PP.Parsec String () a -trace _ b = b - symbol' = PP.symbol lexer whiteSpace' = PP.whiteSpace lexer identifier' = PP.identifier lexer @@ -24,22 +23,79 @@ parens' = PP.parens lexer brackets' = PP.brackets lexer angles' = PP.angles lexer -idlParser :: Parse Idl -idlParser = - PP.manyTill decls PP.eof PP. "expecting idl" - where - decls = do - whiteSpace' - d <- declParser - trace ("decl: " ++ show d) (return d) +webglTypes :: [String] +webglTypes = + [ "ArrayBuffer" + , "DOMString" + , "Float32Array" + , "FloatArray" + , "GLbitfield" + , "GLboolean" + , "GLbyte" + , "GLclampf" + , "GLenum" + , "GLfloat" + , "GLint" + , "GLintptr" + , "GLshort" + , "GLsizei" + , "GLsizeiptr" + , "GLubyte" + , "GLuint" + , "GLushort" + , "HTMLCanvasElement" + , "Int32Array" + , "any" + , "boolean" + , "object" + , "sequence" + , "void" + ] lexer :: PP.GenTokenParser String u Identity lexer = PP.makeTokenParser PP.emptyDef +parseIdl :: Parse IDL +parseIdl = + parseDecls >>= + return . foldr partition emptyIdl >>= + return . cleanup + +-- helpers + +partition :: Decl -> IDL -> IDL +partition e@Enum{} idl = idl + { enums = e : enums idl + } +partition c@Comment{} idl = idl + { comments = c : comments idl + } +partition f@Function{} idl = idl + { functions = f : functions idl + , types = methodRetType f : map argType (methodArgs f) ++ types idl + } +partition a@Attribute{} idl = idl + { attributes = a : attributes idl + , types = attrType a : types idl + } + +cleanup :: IDL -> IDL +cleanup idl = IDL + { enums = nub $ enums idl + , comments = nub $ comments idl + , functions = nub $ functions idl + , attributes = nub $ attributes idl + , types = nub . filter (\t -> typeName t `notElem` webglTypes) $ types idl + } + -- parsers -declParser :: Parse Decl -declParser = decl PP. "expecting decl" +parseDecls :: Parse [Decl] +parseDecls = + PP.manyTill (whiteSpace' >> parseDecl) PP.eof PP. "expecting idl" + +parseDecl :: Parse Decl +parseDecl = decl PP. "expecting decl" where decl = PP.try parseConst PP.<|> PP.try parseComment PP.<|> @@ -89,9 +145,9 @@ parseAttr = do name <- identifier' semi' return Attribute - { attIsReadonly = isReadonly - , attType = typ - , attName = name + { attrIsReadonly = isReadonly + , attrType = typ + , attrName = name } parseType :: Parse Type diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 715d120..45e0a04 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -1,27 +1,24 @@ module IDL.Printer (ppPureScriptFFI) where -import Data.List (nubBy, sort) +import Data.List (sort) import Data.Maybe (isNothing) -import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, space, - hcat, punctuate, semi, lbrace, rbrace, empty, parens, nest, integer, text, +import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, + hcat, integer, lbrace, nest, parens, punctuate, rbrace, semi, space, text, vcat) import IDL.AST -ppPureScriptFFI :: Idl -> Doc +ppPureScriptFFI :: IDL -> Doc ppPureScriptFFI idl = header $+$ blankLine $+$ typeDecls $+$ blankLine $+$ constants $+$ blankLine $+$ methods $+$ blankLine where - -- TODO: these need some heavy cleanup header = vcat . map text $ moduleHeader ++ [""] ++ typedefs - typeDecls = vcat $ map ppTypeDecl $ sort $ nubBy (\t1 t2-> typeName t1 == typeName t2) - [t | d <- idl, t <- extractTypes d, not ((typeName t) `elem` webglTypes)] - constants = vcat [ppConstant c | c <- idl , isEnum c] - methods = vcat $ map ppFuncImpl $ nubBy (\t1 t2-> methodName t1 == methodName t2) - [c | c <- idl , isFunction c] + typeDecls = vcat . map ppTypeDecl . sort $ types idl + constants = vcat . map ppConstant $ enums idl + methods = vcat . map ppFuncImpl $ functions idl -- predefined strings @@ -33,57 +30,29 @@ moduleHeader = , "module Graphics.WebGL.Raw where" , "" , "import Control.Monad.Eff" - , "import Control.Monad.Eff.WebGL" , "import Data.ArrayBuffer.Types" , "import Data.TypedArray" ] typedefs :: [String] typedefs = - [ "type GLenum = Number" - , "type GLboolean = Boolean" - , "type GLbitfield = Number" - , "type GLbyte = Number" - , "type GLshort = Number" - , "type GLint = Number" - , "type GLsizei = Number" - , "type GLintptr = Number" - , "type GLsizeiptr = Number" - , "type GLubyte = Number" - , "type GLushort = Number" - , "type GLuint = Number" - , "type GLfloat = Number" - , "type GLclampf = Number" - , "type FloatArray = Float32Array" - ] - -webglTypes :: [String] -webglTypes = - [ "ArrayBuffer" - , "DOMString" - , "Float32Array" - , "FloatArray" - , "GLbitfield" - , "GLboolean" - , "GLbyte" - , "GLclampf" - , "GLenum" - , "GLfloat" - , "GLint" - , "GLintptr" - , "GLshort" - , "GLsizei" - , "GLsizeiptr" - , "GLubyte" - , "GLuint" - , "GLushort" - , "HTMLCanvasElement" - , "Int32Array" - , "any" - , "boolean" - , "object" - , "sequence" - , "void" + [ "type ArrayBuffer = Float32Array" + , "type DOMString = String" + , "type FloatArray = Float32Array" + , "type GLbitfield = Number" + , "type GLboolean = Boolean" + , "type GLbyte = Number" + , "type GLclampf = Number" + , "type GLenum = Number" + , "type GLfloat = Number" + , "type GLint = Number" + , "type GLintptr = Number" + , "type GLshort = Number" + , "type GLsizei = Number" + , "type GLsizeiptr = Number" + , "type GLubyte = Number" + , "type GLuint = Number" + , "type GLushort = Number" ] -- component pretty-printers @@ -143,8 +112,6 @@ ppType :: Type -> Doc ppType Type { typeName = name, typeIsArray = isArray } | name == "void" = toType "Unit" | name == "boolean" = toType "Boolean" - | name == "DOMString" = toType "String" - | name == "ArrayBuffer" = toType "Float32Array" | otherwise = toType name where toType = if isArray then brackets . text else text @@ -154,11 +121,6 @@ ppType Type { typeName = name, typeIsArray = isArray } blankLine :: Doc blankLine = text "" -extractTypes :: Decl -> [Type] -extractTypes f@Function{methodRetType = t1} = t1 : map argType (funcArgs f) -extractTypes Attribute{attType = t1} = [t1] -extractTypes _ = [] - implName :: Decl -> String implName f = methodName f ++ "Impl" diff --git a/generator/Main.hs b/generator/Main.hs index fbd684f..46033ff 100644 --- a/generator/Main.hs +++ b/generator/Main.hs @@ -24,6 +24,6 @@ getFilepath _ = putStrLn noIdlError >> exitSuccess runParser :: String -> IO () runParser body = - case PP.runParser idlParser () "" body of + case PP.runParser parseIdl () "" body of Left err -> mapM_ (putStrLn . PP.messageString) (PP.errorMessages err) Right idl -> putStr . render $ ppPureScriptFFI idl From 89e674a3a48adcd45536beff5fc6ccbf0e47004b Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Tue, 26 May 2015 14:57:03 -0500 Subject: [PATCH 20/51] additional cleanup --- generator/IDL/AST.hs | 6 +++++ generator/IDL/Parser.hs | 8 +++---- generator/IDL/Printer.hs | 52 +++++++++++++++++++--------------------- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 7008281..6f38278 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -58,3 +58,9 @@ data Arg = Arg emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] + +webglContext :: Arg +webglContext = Arg (Type "WebGLContext" False Nothing) "webgl" + +funcArgs :: Decl -> [Arg] +funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index def7a9a..ba10e7c 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -23,8 +23,8 @@ parens' = PP.parens lexer brackets' = PP.brackets lexer angles' = PP.angles lexer -webglTypes :: [String] -webglTypes = +excludedTypes :: [String] +excludedTypes = [ "ArrayBuffer" , "DOMString" , "Float32Array" @@ -72,7 +72,7 @@ partition c@Comment{} idl = idl } partition f@Function{} idl = idl { functions = f : functions idl - , types = methodRetType f : map argType (methodArgs f) ++ types idl + , types = methodRetType f : map argType (funcArgs f) ++ types idl } partition a@Attribute{} idl = idl { attributes = a : attributes idl @@ -85,7 +85,7 @@ cleanup idl = IDL , comments = nub $ comments idl , functions = nub $ functions idl , attributes = nub $ attributes idl - , types = nub . filter (\t -> typeName t `notElem` webglTypes) $ types idl + , types = nub . filter (\t -> typeName t `notElem` excludedTypes) $ types idl } -- parsers diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 45e0a04..4cbc1e8 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -1,3 +1,5 @@ +{-# LANGUAGE OverloadedStrings #-} + module IDL.Printer (ppPureScriptFFI) where import Data.List (sort) @@ -15,14 +17,14 @@ ppPureScriptFFI idl = $+$ constants $+$ blankLine $+$ methods $+$ blankLine where - header = vcat . map text $ moduleHeader ++ [""] ++ typedefs + header = vcat $ moduleHeader ++ [""] ++ typedefs ++ [""] ++ effects typeDecls = vcat . map ppTypeDecl . sort $ types idl constants = vcat . map ppConstant $ enums idl methods = vcat . map ppFuncImpl $ functions idl --- predefined strings +-- predefined text -moduleHeader :: [String] +moduleHeader :: [Doc] moduleHeader = [ "-- This file is automatically generated! Don't edit this file, but" , "-- instead modify purescript-webgl-generator." @@ -34,7 +36,7 @@ moduleHeader = , "import Data.TypedArray" ] -typedefs :: [String] +typedefs :: [Doc] typedefs = [ "type ArrayBuffer = Float32Array" , "type DOMString = String" @@ -55,28 +57,30 @@ typedefs = , "type GLushort = Number" ] +effects :: [Doc] +effects = ["foreign import data WebGL :: !"] + -- component pretty-printers ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = - text constName <+> text "=" $$ nest 48 (integer v) + text constName <+> "=" $$ nest 48 (integer v) where constName = '_' : n ppTypeSig :: Decl -> Doc ppTypeSig f | hasGenericReturnType = - text ":: forall eff a." <+> argList <+> effMonad (char 'a') + ":: forall eff a." <+> argList <+> effMonad (char 'a') | otherwise = - text ":: forall eff." <+> argList <+> effMonad (ppType $ methodRetType f) + ":: forall eff." <+> argList <+> effMonad (ppType $ methodRetType f) where hasGenericReturnType = typeName (methodRetType f) `elem` ["any", "object"] effMonad doc = - parens $ text "Eff (canvas :: Canvas | eff)" <+> doc + parens $ "Eff (webgl :: WebGL | eff)" <+> doc argList = - text "Fn" <> - text (show . length $ funcArgs f) <+> + "Fn" <> text (show . length $ funcArgs f) <+> hcat (punctuate space (map (ppType . argType) (funcArgs f))) ppMethod :: Decl -> Doc @@ -85,28 +89,28 @@ ppMethod f = ppFuncImplBody :: Decl -> Doc ppFuncImplBody f = - func <+> text (implName f) <> parens (ppArgs funcArgs f) <+> lbrace $+$ + func <+> implName f <> parens (ppArgs funcArgs f) <+> lbrace $+$ nest 2 (ret <+> func <+> parens empty <+> lbrace) $+$ nest 4 (ret <+> ppMethod f) $+$ nest 2 rbrace <> semi $+$ rbrace where - func = text "function" - ret = text "return" + func = "function" + ret = "return" ppArgs :: (Decl -> [Arg]) -> Decl -> Doc -ppArgs f = hcat . punctuate (text ", ") . map (text . argName) . f +ppArgs f = hcat . punctuate ", " . map (text . argName) . f ppFuncImpl :: Decl -> Doc ppFuncImpl f = - text "foreign import" <+> text (implName f) <+> + "foreign import" <+> implName f <+> jsBlock $+$ nest 2 (ppFuncImplBody f) $+$ jsBlock <+> ppTypeSig f $+$ blankLine where - jsBlock = text "\"\"\"" + jsBlock = "\"\"\"" ppTypeDecl :: Type -> Doc -ppTypeDecl d = text "foreign import data" <+> text (typeName d) <+> text ":: *" +ppTypeDecl d = "foreign import data" <+> text (typeName d) <+> ":: *" ppType :: Type -> Doc ppType Type { typeName = name, typeIsArray = isArray } @@ -119,16 +123,10 @@ ppType Type { typeName = name, typeIsArray = isArray } -- helpers blankLine :: Doc -blankLine = text "" - -implName :: Decl -> String -implName f = methodName f ++ "Impl" - -funcArgs :: Decl -> [Arg] -funcArgs f = webglContext : methodArgs f +blankLine = "" -webglContext :: Arg -webglContext = Arg (Type "WebGLContext" False Nothing) "webgl" +implName :: Decl -> Doc +implName f = text (methodName f) <> "Impl" prefixWebgl :: Doc -prefixWebgl = text (argName webglContext) <> text "." +prefixWebgl = text (argName webglContext) <> "." From 3f092fdee6eba24ed4ab7a259086376df50b4749 Mon Sep 17 00:00:00 2001 From: Jonathan Childress Date: Tue, 26 May 2015 15:08:27 -0500 Subject: [PATCH 21/51] minor edits --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index aa0d3af..cdbd328 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ # purescript-webgl-raw This package consists of two pieces: -1. a Haskell generator, which parses the Khronos WebGL specification to create -2. the PureScript source, which contains the wrapped WebGL methods -The files in `src` should only be modified by modifying the generator. +1. a Haskell generator, which parses the Khronos WebGL specification to create... +2. the PureScript wrapper of the WebGL methods + +The files in `src` should only be edited by modifying the generator. ## Generator @@ -27,15 +28,15 @@ into the PureScript module: > docs/WebGL-1.0.3.idl > src/Graphics/WebGL/Raw.purs ``` -## PureScript +## Graphics.WebGL.Raw -`Graphics.WebGL.Raw` is intended as the lowest-possible-level wrapping of the -WebGL API for PureScript. It is not intended for use outside of the +The generated library is intended as the lowest-possible-level wrapping of +the WebGL API for PureScript. It is not intended for use outside of the `purescript-webgl-unsafe` package, which provides a type-safe (but not error-checked) wrapper around the raw methods. -To build the `Graphics.WebGL.Raw` module, ensure you have a recent version of -Node and `npm` installed, and then: +To build `Graphics.WebGL.Raw`, ensure you have a recent version of Node +and `npm` installed, and then: ```sh > npm install @@ -46,6 +47,6 @@ Node and `npm` installed, and then: ## Credits This package is built upon the amazing amounts of hard work done by [Jurgen -Nicklisch-Franken][2], from whom this package is branched. +Nicklisch-Franken][2], from whom this package is forked. [2]: https://github.com/jutaro From 387fd1f1087abb96141d27030d16df476f07536f Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Tue, 26 May 2015 15:26:51 -0500 Subject: [PATCH 22/51] add typesig to constants for doc generation --- .gitignore | 3 +- docs/README.md | 3251 +++++++++++++++++++++++++++++++++++ generator/IDL/Printer.hs | 16 +- src/Graphics/WebGL/Raw.purs | 1501 +++++++++++----- 4 files changed, 4312 insertions(+), 459 deletions(-) create mode 100644 docs/README.md diff --git a/.gitignore b/.gitignore index eb2f753..5529cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ dist/ cabal.sandbox.config node_modules/ bower_components/ -.psci/ +.psci +output/ diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..6668be3 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,3251 @@ +# Module Documentation + +## Module Graphics.WebGL.Raw + + +#### `DOMString` + +``` purescript +type DOMString = String +``` + + +#### `FloatArray` + +``` purescript +type FloatArray = Float32Array +``` + + +#### `GLbitfield` + +``` purescript +type GLbitfield = Number +``` + + +#### `GLboolean` + +``` purescript +type GLboolean = Boolean +``` + + +#### `GLbyte` + +``` purescript +type GLbyte = Number +``` + + +#### `GLclampf` + +``` purescript +type GLclampf = Number +``` + + +#### `GLenum` + +``` purescript +type GLenum = Number +``` + + +#### `GLfloat` + +``` purescript +type GLfloat = Number +``` + + +#### `GLint` + +``` purescript +type GLint = Number +``` + + +#### `GLintptr` + +``` purescript +type GLintptr = Number +``` + + +#### `GLshort` + +``` purescript +type GLshort = Number +``` + + +#### `GLsizei` + +``` purescript +type GLsizei = Number +``` + + +#### `GLsizeiptr` + +``` purescript +type GLsizeiptr = Number +``` + + +#### `GLubyte` + +``` purescript +type GLubyte = Number +``` + + +#### `GLuint` + +``` purescript +type GLuint = Number +``` + + +#### `GLushort` + +``` purescript +type GLushort = Number +``` + + +#### `WebGL` + +``` purescript +data WebGL :: ! +``` + + +#### `ArrayBufferView` + +``` purescript +data ArrayBufferView :: * +``` + + +#### `HTMLImageElement` + +``` purescript +data HTMLImageElement :: * +``` + + +#### `HTMLVideoElement` + +``` purescript +data HTMLVideoElement :: * +``` + + +#### `ImageData` + +``` purescript +data ImageData :: * +``` + + +#### `WebGLActiveInfo` + +``` purescript +data WebGLActiveInfo :: * +``` + + +#### `WebGLBuffer` + +``` purescript +data WebGLBuffer :: * +``` + + +#### `WebGLContext` + +``` purescript +data WebGLContext :: * +``` + + +#### `WebGLContextAttributes` + +``` purescript +data WebGLContextAttributes :: * +``` + + +#### `WebGLFramebuffer` + +``` purescript +data WebGLFramebuffer :: * +``` + + +#### `WebGLProgram` + +``` purescript +data WebGLProgram :: * +``` + + +#### `WebGLRenderbuffer` + +``` purescript +data WebGLRenderbuffer :: * +``` + + +#### `WebGLShader` + +``` purescript +data WebGLShader :: * +``` + + +#### `WebGLTexture` + +``` purescript +data WebGLTexture :: * +``` + + +#### `WebGLUniformLocation` + +``` purescript +data WebGLUniformLocation :: * +``` + + +#### `_DEPTH_BUFFER_BIT` + +``` purescript +_DEPTH_BUFFER_BIT :: GLenum +``` + + +#### `_STENCIL_BUFFER_BIT` + +``` purescript +_STENCIL_BUFFER_BIT :: GLenum +``` + + +#### `_COLOR_BUFFER_BIT` + +``` purescript +_COLOR_BUFFER_BIT :: GLenum +``` + + +#### `_POINTS` + +``` purescript +_POINTS :: GLenum +``` + + +#### `_LINES` + +``` purescript +_LINES :: GLenum +``` + + +#### `_LINE_LOOP` + +``` purescript +_LINE_LOOP :: GLenum +``` + + +#### `_LINE_STRIP` + +``` purescript +_LINE_STRIP :: GLenum +``` + + +#### `_TRIANGLES` + +``` purescript +_TRIANGLES :: GLenum +``` + + +#### `_TRIANGLE_STRIP` + +``` purescript +_TRIANGLE_STRIP :: GLenum +``` + + +#### `_TRIANGLE_FAN` + +``` purescript +_TRIANGLE_FAN :: GLenum +``` + + +#### `_ZERO` + +``` purescript +_ZERO :: GLenum +``` + + +#### `_ONE` + +``` purescript +_ONE :: GLenum +``` + + +#### `_SRC_COLOR` + +``` purescript +_SRC_COLOR :: GLenum +``` + + +#### `_ONE_MINUS_SRC_COLOR` + +``` purescript +_ONE_MINUS_SRC_COLOR :: GLenum +``` + + +#### `_SRC_ALPHA` + +``` purescript +_SRC_ALPHA :: GLenum +``` + + +#### `_ONE_MINUS_SRC_ALPHA` + +``` purescript +_ONE_MINUS_SRC_ALPHA :: GLenum +``` + + +#### `_DST_ALPHA` + +``` purescript +_DST_ALPHA :: GLenum +``` + + +#### `_ONE_MINUS_DST_ALPHA` + +``` purescript +_ONE_MINUS_DST_ALPHA :: GLenum +``` + + +#### `_DST_COLOR` + +``` purescript +_DST_COLOR :: GLenum +``` + + +#### `_ONE_MINUS_DST_COLOR` + +``` purescript +_ONE_MINUS_DST_COLOR :: GLenum +``` + + +#### `_SRC_ALPHA_SATURATE` + +``` purescript +_SRC_ALPHA_SATURATE :: GLenum +``` + + +#### `_FUNC_ADD` + +``` purescript +_FUNC_ADD :: GLenum +``` + + +#### `_BLEND_EQUATION` + +``` purescript +_BLEND_EQUATION :: GLenum +``` + + +#### `_BLEND_EQUATION_RGB` + +``` purescript +_BLEND_EQUATION_RGB :: GLenum +``` + + +#### `_BLEND_EQUATION_ALPHA` + +``` purescript +_BLEND_EQUATION_ALPHA :: GLenum +``` + + +#### `_FUNC_SUBTRACT` + +``` purescript +_FUNC_SUBTRACT :: GLenum +``` + + +#### `_FUNC_REVERSE_SUBTRACT` + +``` purescript +_FUNC_REVERSE_SUBTRACT :: GLenum +``` + + +#### `_BLEND_DST_RGB` + +``` purescript +_BLEND_DST_RGB :: GLenum +``` + + +#### `_BLEND_SRC_RGB` + +``` purescript +_BLEND_SRC_RGB :: GLenum +``` + + +#### `_BLEND_DST_ALPHA` + +``` purescript +_BLEND_DST_ALPHA :: GLenum +``` + + +#### `_BLEND_SRC_ALPHA` + +``` purescript +_BLEND_SRC_ALPHA :: GLenum +``` + + +#### `_CONSTANT_COLOR` + +``` purescript +_CONSTANT_COLOR :: GLenum +``` + + +#### `_ONE_MINUS_CONSTANT_COLOR` + +``` purescript +_ONE_MINUS_CONSTANT_COLOR :: GLenum +``` + + +#### `_CONSTANT_ALPHA` + +``` purescript +_CONSTANT_ALPHA :: GLenum +``` + + +#### `_ONE_MINUS_CONSTANT_ALPHA` + +``` purescript +_ONE_MINUS_CONSTANT_ALPHA :: GLenum +``` + + +#### `_BLEND_COLOR` + +``` purescript +_BLEND_COLOR :: GLenum +``` + + +#### `_ARRAY_BUFFER` + +``` purescript +_ARRAY_BUFFER :: GLenum +``` + + +#### `_ELEMENT_ARRAY_BUFFER` + +``` purescript +_ELEMENT_ARRAY_BUFFER :: GLenum +``` + + +#### `_ARRAY_BUFFER_BINDING` + +``` purescript +_ARRAY_BUFFER_BINDING :: GLenum +``` + + +#### `_ELEMENT_ARRAY_BUFFER_BINDING` + +``` purescript +_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum +``` + + +#### `_STREAM_DRAW` + +``` purescript +_STREAM_DRAW :: GLenum +``` + + +#### `_STATIC_DRAW` + +``` purescript +_STATIC_DRAW :: GLenum +``` + + +#### `_DYNAMIC_DRAW` + +``` purescript +_DYNAMIC_DRAW :: GLenum +``` + + +#### `_BUFFER_SIZE` + +``` purescript +_BUFFER_SIZE :: GLenum +``` + + +#### `_BUFFER_USAGE` + +``` purescript +_BUFFER_USAGE :: GLenum +``` + + +#### `_CURRENT_VERTEX_ATTRIB` + +``` purescript +_CURRENT_VERTEX_ATTRIB :: GLenum +``` + + +#### `_FRONT` + +``` purescript +_FRONT :: GLenum +``` + + +#### `_BACK` + +``` purescript +_BACK :: GLenum +``` + + +#### `_FRONT_AND_BACK` + +``` purescript +_FRONT_AND_BACK :: GLenum +``` + + +#### `_TEXTURE_2D` + +``` purescript +_TEXTURE_2D :: GLenum +``` + + +#### `_CULL_FACE` + +``` purescript +_CULL_FACE :: GLenum +``` + + +#### `_BLEND` + +``` purescript +_BLEND :: GLenum +``` + + +#### `_DITHER` + +``` purescript +_DITHER :: GLenum +``` + + +#### `_STENCIL_TEST` + +``` purescript +_STENCIL_TEST :: GLenum +``` + + +#### `_DEPTH_TEST` + +``` purescript +_DEPTH_TEST :: GLenum +``` + + +#### `_SCISSOR_TEST` + +``` purescript +_SCISSOR_TEST :: GLenum +``` + + +#### `_POLYGON_OFFSET_FILL` + +``` purescript +_POLYGON_OFFSET_FILL :: GLenum +``` + + +#### `_SAMPLE_ALPHA_TO_COVERAGE` + +``` purescript +_SAMPLE_ALPHA_TO_COVERAGE :: GLenum +``` + + +#### `_SAMPLE_COVERAGE` + +``` purescript +_SAMPLE_COVERAGE :: GLenum +``` + + +#### `_NO_ERROR` + +``` purescript +_NO_ERROR :: GLenum +``` + + +#### `_INVALID_ENUM` + +``` purescript +_INVALID_ENUM :: GLenum +``` + + +#### `_INVALID_VALUE` + +``` purescript +_INVALID_VALUE :: GLenum +``` + + +#### `_INVALID_OPERATION` + +``` purescript +_INVALID_OPERATION :: GLenum +``` + + +#### `_OUT_OF_MEMORY` + +``` purescript +_OUT_OF_MEMORY :: GLenum +``` + + +#### `_CW` + +``` purescript +_CW :: GLenum +``` + + +#### `_CCW` + +``` purescript +_CCW :: GLenum +``` + + +#### `_LINE_WIDTH` + +``` purescript +_LINE_WIDTH :: GLenum +``` + + +#### `_ALIASED_POINT_SIZE_RANGE` + +``` purescript +_ALIASED_POINT_SIZE_RANGE :: GLenum +``` + + +#### `_ALIASED_LINE_WIDTH_RANGE` + +``` purescript +_ALIASED_LINE_WIDTH_RANGE :: GLenum +``` + + +#### `_CULL_FACE_MODE` + +``` purescript +_CULL_FACE_MODE :: GLenum +``` + + +#### `_FRONT_FACE` + +``` purescript +_FRONT_FACE :: GLenum +``` + + +#### `_DEPTH_RANGE` + +``` purescript +_DEPTH_RANGE :: GLenum +``` + + +#### `_DEPTH_WRITEMASK` + +``` purescript +_DEPTH_WRITEMASK :: GLenum +``` + + +#### `_DEPTH_CLEAR_VALUE` + +``` purescript +_DEPTH_CLEAR_VALUE :: GLenum +``` + + +#### `_DEPTH_FUNC` + +``` purescript +_DEPTH_FUNC :: GLenum +``` + + +#### `_STENCIL_CLEAR_VALUE` + +``` purescript +_STENCIL_CLEAR_VALUE :: GLenum +``` + + +#### `_STENCIL_FUNC` + +``` purescript +_STENCIL_FUNC :: GLenum +``` + + +#### `_STENCIL_FAIL` + +``` purescript +_STENCIL_FAIL :: GLenum +``` + + +#### `_STENCIL_PASS_DEPTH_FAIL` + +``` purescript +_STENCIL_PASS_DEPTH_FAIL :: GLenum +``` + + +#### `_STENCIL_PASS_DEPTH_PASS` + +``` purescript +_STENCIL_PASS_DEPTH_PASS :: GLenum +``` + + +#### `_STENCIL_REF` + +``` purescript +_STENCIL_REF :: GLenum +``` + + +#### `_STENCIL_VALUE_MASK` + +``` purescript +_STENCIL_VALUE_MASK :: GLenum +``` + + +#### `_STENCIL_WRITEMASK` + +``` purescript +_STENCIL_WRITEMASK :: GLenum +``` + + +#### `_STENCIL_BACK_FUNC` + +``` purescript +_STENCIL_BACK_FUNC :: GLenum +``` + + +#### `_STENCIL_BACK_FAIL` + +``` purescript +_STENCIL_BACK_FAIL :: GLenum +``` + + +#### `_STENCIL_BACK_PASS_DEPTH_FAIL` + +``` purescript +_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum +``` + + +#### `_STENCIL_BACK_PASS_DEPTH_PASS` + +``` purescript +_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum +``` + + +#### `_STENCIL_BACK_REF` + +``` purescript +_STENCIL_BACK_REF :: GLenum +``` + + +#### `_STENCIL_BACK_VALUE_MASK` + +``` purescript +_STENCIL_BACK_VALUE_MASK :: GLenum +``` + + +#### `_STENCIL_BACK_WRITEMASK` + +``` purescript +_STENCIL_BACK_WRITEMASK :: GLenum +``` + + +#### `_VIEWPORT` + +``` purescript +_VIEWPORT :: GLenum +``` + + +#### `_SCISSOR_BOX` + +``` purescript +_SCISSOR_BOX :: GLenum +``` + + +#### `_COLOR_CLEAR_VALUE` + +``` purescript +_COLOR_CLEAR_VALUE :: GLenum +``` + + +#### `_COLOR_WRITEMASK` + +``` purescript +_COLOR_WRITEMASK :: GLenum +``` + + +#### `_UNPACK_ALIGNMENT` + +``` purescript +_UNPACK_ALIGNMENT :: GLenum +``` + + +#### `_PACK_ALIGNMENT` + +``` purescript +_PACK_ALIGNMENT :: GLenum +``` + + +#### `_MAX_TEXTURE_SIZE` + +``` purescript +_MAX_TEXTURE_SIZE :: GLenum +``` + + +#### `_MAX_VIEWPORT_DIMS` + +``` purescript +_MAX_VIEWPORT_DIMS :: GLenum +``` + + +#### `_SUBPIXEL_BITS` + +``` purescript +_SUBPIXEL_BITS :: GLenum +``` + + +#### `_RED_BITS` + +``` purescript +_RED_BITS :: GLenum +``` + + +#### `_GREEN_BITS` + +``` purescript +_GREEN_BITS :: GLenum +``` + + +#### `_BLUE_BITS` + +``` purescript +_BLUE_BITS :: GLenum +``` + + +#### `_ALPHA_BITS` + +``` purescript +_ALPHA_BITS :: GLenum +``` + + +#### `_DEPTH_BITS` + +``` purescript +_DEPTH_BITS :: GLenum +``` + + +#### `_STENCIL_BITS` + +``` purescript +_STENCIL_BITS :: GLenum +``` + + +#### `_POLYGON_OFFSET_UNITS` + +``` purescript +_POLYGON_OFFSET_UNITS :: GLenum +``` + + +#### `_POLYGON_OFFSET_FACTOR` + +``` purescript +_POLYGON_OFFSET_FACTOR :: GLenum +``` + + +#### `_TEXTURE_BINDING_2D` + +``` purescript +_TEXTURE_BINDING_2D :: GLenum +``` + + +#### `_SAMPLE_BUFFERS` + +``` purescript +_SAMPLE_BUFFERS :: GLenum +``` + + +#### `_SAMPLES` + +``` purescript +_SAMPLES :: GLenum +``` + + +#### `_SAMPLE_COVERAGE_VALUE` + +``` purescript +_SAMPLE_COVERAGE_VALUE :: GLenum +``` + + +#### `_SAMPLE_COVERAGE_INVERT` + +``` purescript +_SAMPLE_COVERAGE_INVERT :: GLenum +``` + + +#### `_NUM_COMPRESSED_TEXTURE_FORMATS` + +``` purescript +_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum +``` + + +#### `_COMPRESSED_TEXTURE_FORMATS` + +``` purescript +_COMPRESSED_TEXTURE_FORMATS :: GLenum +``` + + +#### `_DONT_CARE` + +``` purescript +_DONT_CARE :: GLenum +``` + + +#### `_FASTEST` + +``` purescript +_FASTEST :: GLenum +``` + + +#### `_NICEST` + +``` purescript +_NICEST :: GLenum +``` + + +#### `_GENERATE_MIPMAP_HINT` + +``` purescript +_GENERATE_MIPMAP_HINT :: GLenum +``` + + +#### `_BYTE` + +``` purescript +_BYTE :: GLenum +``` + + +#### `_UNSIGNED_BYTE` + +``` purescript +_UNSIGNED_BYTE :: GLenum +``` + + +#### `_SHORT` + +``` purescript +_SHORT :: GLenum +``` + + +#### `_UNSIGNED_SHORT` + +``` purescript +_UNSIGNED_SHORT :: GLenum +``` + + +#### `_INT` + +``` purescript +_INT :: GLenum +``` + + +#### `_UNSIGNED_INT` + +``` purescript +_UNSIGNED_INT :: GLenum +``` + + +#### `_FLOAT` + +``` purescript +_FLOAT :: GLenum +``` + + +#### `_DEPTH_COMPONENT` + +``` purescript +_DEPTH_COMPONENT :: GLenum +``` + + +#### `_ALPHA` + +``` purescript +_ALPHA :: GLenum +``` + + +#### `_RGB` + +``` purescript +_RGB :: GLenum +``` + + +#### `_RGBA` + +``` purescript +_RGBA :: GLenum +``` + + +#### `_LUMINANCE` + +``` purescript +_LUMINANCE :: GLenum +``` + + +#### `_LUMINANCE_ALPHA` + +``` purescript +_LUMINANCE_ALPHA :: GLenum +``` + + +#### `_UNSIGNED_SHORT_4_4_4_4` + +``` purescript +_UNSIGNED_SHORT_4_4_4_4 :: GLenum +``` + + +#### `_UNSIGNED_SHORT_5_5_5_1` + +``` purescript +_UNSIGNED_SHORT_5_5_5_1 :: GLenum +``` + + +#### `_UNSIGNED_SHORT_5_6_5` + +``` purescript +_UNSIGNED_SHORT_5_6_5 :: GLenum +``` + + +#### `_FRAGMENT_SHADER` + +``` purescript +_FRAGMENT_SHADER :: GLenum +``` + + +#### `_VERTEX_SHADER` + +``` purescript +_VERTEX_SHADER :: GLenum +``` + + +#### `_MAX_VERTEX_ATTRIBS` + +``` purescript +_MAX_VERTEX_ATTRIBS :: GLenum +``` + + +#### `_MAX_VERTEX_UNIFORM_VECTORS` + +``` purescript +_MAX_VERTEX_UNIFORM_VECTORS :: GLenum +``` + + +#### `_MAX_VARYING_VECTORS` + +``` purescript +_MAX_VARYING_VECTORS :: GLenum +``` + + +#### `_MAX_COMBINED_TEXTURE_IMAGE_UNITS` + +``` purescript +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum +``` + + +#### `_MAX_VERTEX_TEXTURE_IMAGE_UNITS` + +``` purescript +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum +``` + + +#### `_MAX_TEXTURE_IMAGE_UNITS` + +``` purescript +_MAX_TEXTURE_IMAGE_UNITS :: GLenum +``` + + +#### `_MAX_FRAGMENT_UNIFORM_VECTORS` + +``` purescript +_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum +``` + + +#### `_SHADER_TYPE` + +``` purescript +_SHADER_TYPE :: GLenum +``` + + +#### `_DELETE_STATUS` + +``` purescript +_DELETE_STATUS :: GLenum +``` + + +#### `_LINK_STATUS` + +``` purescript +_LINK_STATUS :: GLenum +``` + + +#### `_VALIDATE_STATUS` + +``` purescript +_VALIDATE_STATUS :: GLenum +``` + + +#### `_ATTACHED_SHADERS` + +``` purescript +_ATTACHED_SHADERS :: GLenum +``` + + +#### `_ACTIVE_UNIFORMS` + +``` purescript +_ACTIVE_UNIFORMS :: GLenum +``` + + +#### `_ACTIVE_UNIFORM_MAX_LENGTH` + +``` purescript +_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum +``` + + +#### `_ACTIVE_ATTRIBUTES` + +``` purescript +_ACTIVE_ATTRIBUTES :: GLenum +``` + + +#### `_ACTIVE_ATTRIBUTE_MAX_LENGTH` + +``` purescript +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum +``` + + +#### `_SHADING_LANGUAGE_VERSION` + +``` purescript +_SHADING_LANGUAGE_VERSION :: GLenum +``` + + +#### `_CURRENT_PROGRAM` + +``` purescript +_CURRENT_PROGRAM :: GLenum +``` + + +#### `_NEVER` + +``` purescript +_NEVER :: GLenum +``` + + +#### `_LESS` + +``` purescript +_LESS :: GLenum +``` + + +#### `_EQUAL` + +``` purescript +_EQUAL :: GLenum +``` + + +#### `_LEQUAL` + +``` purescript +_LEQUAL :: GLenum +``` + + +#### `_GREATER` + +``` purescript +_GREATER :: GLenum +``` + + +#### `_NOTEQUAL` + +``` purescript +_NOTEQUAL :: GLenum +``` + + +#### `_GEQUAL` + +``` purescript +_GEQUAL :: GLenum +``` + + +#### `_ALWAYS` + +``` purescript +_ALWAYS :: GLenum +``` + + +#### `_KEEP` + +``` purescript +_KEEP :: GLenum +``` + + +#### `_REPLACE` + +``` purescript +_REPLACE :: GLenum +``` + + +#### `_INCR` + +``` purescript +_INCR :: GLenum +``` + + +#### `_DECR` + +``` purescript +_DECR :: GLenum +``` + + +#### `_INVERT` + +``` purescript +_INVERT :: GLenum +``` + + +#### `_INCR_WRAP` + +``` purescript +_INCR_WRAP :: GLenum +``` + + +#### `_DECR_WRAP` + +``` purescript +_DECR_WRAP :: GLenum +``` + + +#### `_VENDOR` + +``` purescript +_VENDOR :: GLenum +``` + + +#### `_RENDERER` + +``` purescript +_RENDERER :: GLenum +``` + + +#### `_VERSION` + +``` purescript +_VERSION :: GLenum +``` + + +#### `_NEAREST` + +``` purescript +_NEAREST :: GLenum +``` + + +#### `_LINEAR` + +``` purescript +_LINEAR :: GLenum +``` + + +#### `_NEAREST_MIPMAP_NEAREST` + +``` purescript +_NEAREST_MIPMAP_NEAREST :: GLenum +``` + + +#### `_LINEAR_MIPMAP_NEAREST` + +``` purescript +_LINEAR_MIPMAP_NEAREST :: GLenum +``` + + +#### `_NEAREST_MIPMAP_LINEAR` + +``` purescript +_NEAREST_MIPMAP_LINEAR :: GLenum +``` + + +#### `_LINEAR_MIPMAP_LINEAR` + +``` purescript +_LINEAR_MIPMAP_LINEAR :: GLenum +``` + + +#### `_TEXTURE_MAG_FILTER` + +``` purescript +_TEXTURE_MAG_FILTER :: GLenum +``` + + +#### `_TEXTURE_MIN_FILTER` + +``` purescript +_TEXTURE_MIN_FILTER :: GLenum +``` + + +#### `_TEXTURE_WRAP_S` + +``` purescript +_TEXTURE_WRAP_S :: GLenum +``` + + +#### `_TEXTURE_WRAP_T` + +``` purescript +_TEXTURE_WRAP_T :: GLenum +``` + + +#### `_TEXTURE` + +``` purescript +_TEXTURE :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP` + +``` purescript +_TEXTURE_CUBE_MAP :: GLenum +``` + + +#### `_TEXTURE_BINDING_CUBE_MAP` + +``` purescript +_TEXTURE_BINDING_CUBE_MAP :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_POSITIVE_X` + +``` purescript +_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_NEGATIVE_X` + +``` purescript +_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_POSITIVE_Y` + +``` purescript +_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_NEGATIVE_Y` + +``` purescript +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_POSITIVE_Z` + +``` purescript +_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum +``` + + +#### `_TEXTURE_CUBE_MAP_NEGATIVE_Z` + +``` purescript +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum +``` + + +#### `_MAX_CUBE_MAP_TEXTURE_SIZE` + +``` purescript +_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum +``` + + +#### `_TEXTURE0` + +``` purescript +_TEXTURE0 :: GLenum +``` + + +#### `_TEXTURE1` + +``` purescript +_TEXTURE1 :: GLenum +``` + + +#### `_TEXTURE2` + +``` purescript +_TEXTURE2 :: GLenum +``` + + +#### `_TEXTURE3` + +``` purescript +_TEXTURE3 :: GLenum +``` + + +#### `_TEXTURE4` + +``` purescript +_TEXTURE4 :: GLenum +``` + + +#### `_TEXTURE5` + +``` purescript +_TEXTURE5 :: GLenum +``` + + +#### `_TEXTURE6` + +``` purescript +_TEXTURE6 :: GLenum +``` + + +#### `_TEXTURE7` + +``` purescript +_TEXTURE7 :: GLenum +``` + + +#### `_TEXTURE8` + +``` purescript +_TEXTURE8 :: GLenum +``` + + +#### `_TEXTURE9` + +``` purescript +_TEXTURE9 :: GLenum +``` + + +#### `_TEXTURE10` + +``` purescript +_TEXTURE10 :: GLenum +``` + + +#### `_TEXTURE11` + +``` purescript +_TEXTURE11 :: GLenum +``` + + +#### `_TEXTURE12` + +``` purescript +_TEXTURE12 :: GLenum +``` + + +#### `_TEXTURE13` + +``` purescript +_TEXTURE13 :: GLenum +``` + + +#### `_TEXTURE14` + +``` purescript +_TEXTURE14 :: GLenum +``` + + +#### `_TEXTURE15` + +``` purescript +_TEXTURE15 :: GLenum +``` + + +#### `_TEXTURE16` + +``` purescript +_TEXTURE16 :: GLenum +``` + + +#### `_TEXTURE17` + +``` purescript +_TEXTURE17 :: GLenum +``` + + +#### `_TEXTURE18` + +``` purescript +_TEXTURE18 :: GLenum +``` + + +#### `_TEXTURE19` + +``` purescript +_TEXTURE19 :: GLenum +``` + + +#### `_TEXTURE20` + +``` purescript +_TEXTURE20 :: GLenum +``` + + +#### `_TEXTURE21` + +``` purescript +_TEXTURE21 :: GLenum +``` + + +#### `_TEXTURE22` + +``` purescript +_TEXTURE22 :: GLenum +``` + + +#### `_TEXTURE23` + +``` purescript +_TEXTURE23 :: GLenum +``` + + +#### `_TEXTURE24` + +``` purescript +_TEXTURE24 :: GLenum +``` + + +#### `_TEXTURE25` + +``` purescript +_TEXTURE25 :: GLenum +``` + + +#### `_TEXTURE26` + +``` purescript +_TEXTURE26 :: GLenum +``` + + +#### `_TEXTURE27` + +``` purescript +_TEXTURE27 :: GLenum +``` + + +#### `_TEXTURE28` + +``` purescript +_TEXTURE28 :: GLenum +``` + + +#### `_TEXTURE29` + +``` purescript +_TEXTURE29 :: GLenum +``` + + +#### `_TEXTURE30` + +``` purescript +_TEXTURE30 :: GLenum +``` + + +#### `_TEXTURE31` + +``` purescript +_TEXTURE31 :: GLenum +``` + + +#### `_ACTIVE_TEXTURE` + +``` purescript +_ACTIVE_TEXTURE :: GLenum +``` + + +#### `_REPEAT` + +``` purescript +_REPEAT :: GLenum +``` + + +#### `_CLAMP_TO_EDGE` + +``` purescript +_CLAMP_TO_EDGE :: GLenum +``` + + +#### `_MIRRORED_REPEAT` + +``` purescript +_MIRRORED_REPEAT :: GLenum +``` + + +#### `_FLOAT_VEC2` + +``` purescript +_FLOAT_VEC2 :: GLenum +``` + + +#### `_FLOAT_VEC3` + +``` purescript +_FLOAT_VEC3 :: GLenum +``` + + +#### `_FLOAT_VEC4` + +``` purescript +_FLOAT_VEC4 :: GLenum +``` + + +#### `_INT_VEC2` + +``` purescript +_INT_VEC2 :: GLenum +``` + + +#### `_INT_VEC3` + +``` purescript +_INT_VEC3 :: GLenum +``` + + +#### `_INT_VEC4` + +``` purescript +_INT_VEC4 :: GLenum +``` + + +#### `_BOOL` + +``` purescript +_BOOL :: GLenum +``` + + +#### `_BOOL_VEC2` + +``` purescript +_BOOL_VEC2 :: GLenum +``` + + +#### `_BOOL_VEC3` + +``` purescript +_BOOL_VEC3 :: GLenum +``` + + +#### `_BOOL_VEC4` + +``` purescript +_BOOL_VEC4 :: GLenum +``` + + +#### `_FLOAT_MAT2` + +``` purescript +_FLOAT_MAT2 :: GLenum +``` + + +#### `_FLOAT_MAT3` + +``` purescript +_FLOAT_MAT3 :: GLenum +``` + + +#### `_FLOAT_MAT4` + +``` purescript +_FLOAT_MAT4 :: GLenum +``` + + +#### `_SAMPLER_2D` + +``` purescript +_SAMPLER_2D :: GLenum +``` + + +#### `_SAMPLER_CUBE` + +``` purescript +_SAMPLER_CUBE :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_ENABLED` + +``` purescript +_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_SIZE` + +``` purescript +_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_STRIDE` + +``` purescript +_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_TYPE` + +``` purescript +_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_NORMALIZED` + +``` purescript +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_POINTER` + +``` purescript +_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum +``` + + +#### `_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING` + +``` purescript +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum +``` + + +#### `_COMPILE_STATUS` + +``` purescript +_COMPILE_STATUS :: GLenum +``` + + +#### `_INFO_LOG_LENGTH` + +``` purescript +_INFO_LOG_LENGTH :: GLenum +``` + + +#### `_SHADER_SOURCE_LENGTH` + +``` purescript +_SHADER_SOURCE_LENGTH :: GLenum +``` + + +#### `_LOW_FLOAT` + +``` purescript +_LOW_FLOAT :: GLenum +``` + + +#### `_MEDIUM_FLOAT` + +``` purescript +_MEDIUM_FLOAT :: GLenum +``` + + +#### `_HIGH_FLOAT` + +``` purescript +_HIGH_FLOAT :: GLenum +``` + + +#### `_LOW_INT` + +``` purescript +_LOW_INT :: GLenum +``` + + +#### `_MEDIUM_INT` + +``` purescript +_MEDIUM_INT :: GLenum +``` + + +#### `_HIGH_INT` + +``` purescript +_HIGH_INT :: GLenum +``` + + +#### `_FRAMEBUFFER` + +``` purescript +_FRAMEBUFFER :: GLenum +``` + + +#### `_RENDERBUFFER` + +``` purescript +_RENDERBUFFER :: GLenum +``` + + +#### `_RGBA4` + +``` purescript +_RGBA4 :: GLenum +``` + + +#### `_RGB5_A1` + +``` purescript +_RGB5_A1 :: GLenum +``` + + +#### `_RGB565` + +``` purescript +_RGB565 :: GLenum +``` + + +#### `_DEPTH_COMPONENT16` + +``` purescript +_DEPTH_COMPONENT16 :: GLenum +``` + + +#### `_STENCIL_INDEX` + +``` purescript +_STENCIL_INDEX :: GLenum +``` + + +#### `_STENCIL_INDEX8` + +``` purescript +_STENCIL_INDEX8 :: GLenum +``` + + +#### `_DEPTH_STENCIL` + +``` purescript +_DEPTH_STENCIL :: GLenum +``` + + +#### `_RENDERBUFFER_WIDTH` + +``` purescript +_RENDERBUFFER_WIDTH :: GLenum +``` + + +#### `_RENDERBUFFER_HEIGHT` + +``` purescript +_RENDERBUFFER_HEIGHT :: GLenum +``` + + +#### `_RENDERBUFFER_INTERNAL_FORMAT` + +``` purescript +_RENDERBUFFER_INTERNAL_FORMAT :: GLenum +``` + + +#### `_RENDERBUFFER_RED_SIZE` + +``` purescript +_RENDERBUFFER_RED_SIZE :: GLenum +``` + + +#### `_RENDERBUFFER_GREEN_SIZE` + +``` purescript +_RENDERBUFFER_GREEN_SIZE :: GLenum +``` + + +#### `_RENDERBUFFER_BLUE_SIZE` + +``` purescript +_RENDERBUFFER_BLUE_SIZE :: GLenum +``` + + +#### `_RENDERBUFFER_ALPHA_SIZE` + +``` purescript +_RENDERBUFFER_ALPHA_SIZE :: GLenum +``` + + +#### `_RENDERBUFFER_DEPTH_SIZE` + +``` purescript +_RENDERBUFFER_DEPTH_SIZE :: GLenum +``` + + +#### `_RENDERBUFFER_STENCIL_SIZE` + +``` purescript +_RENDERBUFFER_STENCIL_SIZE :: GLenum +``` + + +#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE` + +``` purescript +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum +``` + + +#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME` + +``` purescript +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum +``` + + +#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL` + +``` purescript +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum +``` + + +#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE` + +``` purescript +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum +``` + + +#### `_COLOR_ATTACHMENT0` + +``` purescript +_COLOR_ATTACHMENT0 :: GLenum +``` + + +#### `_DEPTH_ATTACHMENT` + +``` purescript +_DEPTH_ATTACHMENT :: GLenum +``` + + +#### `_STENCIL_ATTACHMENT` + +``` purescript +_STENCIL_ATTACHMENT :: GLenum +``` + + +#### `_DEPTH_STENCIL_ATTACHMENT` + +``` purescript +_DEPTH_STENCIL_ATTACHMENT :: GLenum +``` + + +#### `_NONE` + +``` purescript +_NONE :: GLenum +``` + + +#### `_FRAMEBUFFER_COMPLETE` + +``` purescript +_FRAMEBUFFER_COMPLETE :: GLenum +``` + + +#### `_FRAMEBUFFER_INCOMPLETE_ATTACHMENT` + +``` purescript +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum +``` + + +#### `_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT` + +``` purescript +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum +``` + + +#### `_FRAMEBUFFER_INCOMPLETE_DIMENSIONS` + +``` purescript +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum +``` + + +#### `_FRAMEBUFFER_UNSUPPORTED` + +``` purescript +_FRAMEBUFFER_UNSUPPORTED :: GLenum +``` + + +#### `_FRAMEBUFFER_BINDING` + +``` purescript +_FRAMEBUFFER_BINDING :: GLenum +``` + + +#### `_RENDERBUFFER_BINDING` + +``` purescript +_RENDERBUFFER_BINDING :: GLenum +``` + + +#### `_MAX_RENDERBUFFER_SIZE` + +``` purescript +_MAX_RENDERBUFFER_SIZE :: GLenum +``` + + +#### `_INVALID_FRAMEBUFFER_OPERATION` + +``` purescript +_INVALID_FRAMEBUFFER_OPERATION :: GLenum +``` + + +#### `_UNPACK_FLIP_Y_WEBGL` + +``` purescript +_UNPACK_FLIP_Y_WEBGL :: GLenum +``` + + +#### `_UNPACK_PREMULTIPLY_ALPHA_WEBGL` + +``` purescript +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum +``` + + +#### `_CONTEXT_LOST_WEBGL` + +``` purescript +_CONTEXT_LOST_WEBGL :: GLenum +``` + + +#### `_UNPACK_COLORSPACE_CONVERSION_WEBGL` + +``` purescript +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum +``` + + +#### `_BROWSER_DEFAULT_WEBGL` + +``` purescript +_BROWSER_DEFAULT_WEBGL :: GLenum +``` + + +#### `getContextAttributesImpl` + +``` purescript +getContextAttributesImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) +``` + + +#### `isContextLostImpl` + +``` purescript +isContextLostImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) +``` + + +#### `getSupportedExtensionsImpl` + +``` purescript +getSupportedExtensionsImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) +``` + + +#### `getExtensionImpl` + +``` purescript +getExtensionImpl :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) +``` + + +#### `activeTextureImpl` + +``` purescript +activeTextureImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `attachShaderImpl` + +``` purescript +attachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bindAttribLocationImpl` + +``` purescript +bindAttribLocationImpl :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bindBufferImpl` + +``` purescript +bindBufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bindFramebufferImpl` + +``` purescript +bindFramebufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bindRenderbufferImpl` + +``` purescript +bindRenderbufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bindTextureImpl` + +``` purescript +bindTextureImpl :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `blendColorImpl` + +``` purescript +blendColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `blendEquationImpl` + +``` purescript +blendEquationImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `blendEquationSeparateImpl` + +``` purescript +blendEquationSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `blendFuncImpl` + +``` purescript +blendFuncImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `blendFuncSeparateImpl` + +``` purescript +blendFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bufferDataImpl` + +``` purescript +bufferDataImpl :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `bufferSubDataImpl` + +``` purescript +bufferSubDataImpl :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `checkFramebufferStatusImpl` + +``` purescript +checkFramebufferStatusImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) +``` + + +#### `clearImpl` + +``` purescript +clearImpl :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `clearColorImpl` + +``` purescript +clearColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `clearDepthImpl` + +``` purescript +clearDepthImpl :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `clearStencilImpl` + +``` purescript +clearStencilImpl :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `colorMaskImpl` + +``` purescript +colorMaskImpl :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `compileShaderImpl` + +``` purescript +compileShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `copyTexImage2DImpl` + +``` purescript +copyTexImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `copyTexSubImage2DImpl` + +``` purescript +copyTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `createBufferImpl` + +``` purescript +createBufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) +``` + + +#### `createFramebufferImpl` + +``` purescript +createFramebufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) +``` + + +#### `createProgramImpl` + +``` purescript +createProgramImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) +``` + + +#### `createRenderbufferImpl` + +``` purescript +createRenderbufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) +``` + + +#### `createShaderImpl` + +``` purescript +createShaderImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) +``` + + +#### `createTextureImpl` + +``` purescript +createTextureImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) +``` + + +#### `cullFaceImpl` + +``` purescript +cullFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteBufferImpl` + +``` purescript +deleteBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteFramebufferImpl` + +``` purescript +deleteFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteProgramImpl` + +``` purescript +deleteProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteRenderbufferImpl` + +``` purescript +deleteRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteShaderImpl` + +``` purescript +deleteShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `deleteTextureImpl` + +``` purescript +deleteTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `depthFuncImpl` + +``` purescript +depthFuncImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `depthMaskImpl` + +``` purescript +depthMaskImpl :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `depthRangeImpl` + +``` purescript +depthRangeImpl :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `detachShaderImpl` + +``` purescript +detachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `disableImpl` + +``` purescript +disableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `disableVertexAttribArrayImpl` + +``` purescript +disableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `drawArraysImpl` + +``` purescript +drawArraysImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `drawElementsImpl` + +``` purescript +drawElementsImpl :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `enableImpl` + +``` purescript +enableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `enableVertexAttribArrayImpl` + +``` purescript +enableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `finishImpl` + +``` purescript +finishImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `flushImpl` + +``` purescript +flushImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `framebufferRenderbufferImpl` + +``` purescript +framebufferRenderbufferImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `framebufferTexture2DImpl` + +``` purescript +framebufferTexture2DImpl :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `frontFaceImpl` + +``` purescript +frontFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `generateMipmapImpl` + +``` purescript +generateMipmapImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `getActiveAttribImpl` + +``` purescript +getActiveAttribImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +``` + + +#### `getActiveUniformImpl` + +``` purescript +getActiveUniformImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +``` + + +#### `getAttachedShadersImpl` + +``` purescript +getAttachedShadersImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) +``` + + +#### `getAttribLocationImpl` + +``` purescript +getAttribLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) +``` + + +#### `getParameterImpl` + +``` purescript +getParameterImpl :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getBufferParameterImpl` + +``` purescript +getBufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getErrorImpl` + +``` purescript +getErrorImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) +``` + + +#### `getFramebufferAttachmentParameterImpl` + +``` purescript +getFramebufferAttachmentParameterImpl :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getProgramParameterImpl` + +``` purescript +getProgramParameterImpl :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getProgramInfoLogImpl` + +``` purescript +getProgramInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) +``` + + +#### `getRenderbufferParameterImpl` + +``` purescript +getRenderbufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getShaderParameterImpl` + +``` purescript +getShaderParameterImpl :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getShaderInfoLogImpl` + +``` purescript +getShaderInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +``` + + +#### `getShaderSourceImpl` + +``` purescript +getShaderSourceImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +``` + + +#### `getTexParameterImpl` + +``` purescript +getTexParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getUniformImpl` + +``` purescript +getUniformImpl :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getUniformLocationImpl` + +``` purescript +getUniformLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) +``` + + +#### `getVertexAttribImpl` + +``` purescript +getVertexAttribImpl :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) +``` + + +#### `getVertexAttribOffsetImpl` + +``` purescript +getVertexAttribOffsetImpl :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) +``` + + +#### `hintImpl` + +``` purescript +hintImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `isBufferImpl` + +``` purescript +isBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isEnabledImpl` + +``` purescript +isEnabledImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isFramebufferImpl` + +``` purescript +isFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isProgramImpl` + +``` purescript +isProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isRenderbufferImpl` + +``` purescript +isRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isShaderImpl` + +``` purescript +isShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `isTextureImpl` + +``` purescript +isTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) +``` + + +#### `lineWidthImpl` + +``` purescript +lineWidthImpl :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `linkProgramImpl` + +``` purescript +linkProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `pixelStoreiImpl` + +``` purescript +pixelStoreiImpl :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `polygonOffsetImpl` + +``` purescript +polygonOffsetImpl :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `readPixelsImpl` + +``` purescript +readPixelsImpl :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `renderbufferStorageImpl` + +``` purescript +renderbufferStorageImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `sampleCoverageImpl` + +``` purescript +sampleCoverageImpl :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `scissorImpl` + +``` purescript +scissorImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `shaderSourceImpl` + +``` purescript +shaderSourceImpl :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilFuncImpl` + +``` purescript +stencilFuncImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilFuncSeparateImpl` + +``` purescript +stencilFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilMaskImpl` + +``` purescript +stencilMaskImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilMaskSeparateImpl` + +``` purescript +stencilMaskSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilOpImpl` + +``` purescript +stencilOpImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `stencilOpSeparateImpl` + +``` purescript +stencilOpSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `texImage2DImpl` + +``` purescript +texImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `texParameterfImpl` + +``` purescript +texParameterfImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `texParameteriImpl` + +``` purescript +texParameteriImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `texSubImage2DImpl` + +``` purescript +texSubImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform1fImpl` + +``` purescript +uniform1fImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform1fvImpl` + +``` purescript +uniform1fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform1iImpl` + +``` purescript +uniform1iImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform1ivImpl` + +``` purescript +uniform1ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform2fImpl` + +``` purescript +uniform2fImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform2fvImpl` + +``` purescript +uniform2fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform2iImpl` + +``` purescript +uniform2iImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform2ivImpl` + +``` purescript +uniform2ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform3fImpl` + +``` purescript +uniform3fImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform3fvImpl` + +``` purescript +uniform3fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform3iImpl` + +``` purescript +uniform3iImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform3ivImpl` + +``` purescript +uniform3ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform4fImpl` + +``` purescript +uniform4fImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform4fvImpl` + +``` purescript +uniform4fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform4iImpl` + +``` purescript +uniform4iImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniform4ivImpl` + +``` purescript +uniform4ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniformMatrix2fvImpl` + +``` purescript +uniformMatrix2fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniformMatrix3fvImpl` + +``` purescript +uniformMatrix3fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `uniformMatrix4fvImpl` + +``` purescript +uniformMatrix4fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `useProgramImpl` + +``` purescript +useProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `validateProgramImpl` + +``` purescript +validateProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib1fImpl` + +``` purescript +vertexAttrib1fImpl :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib1fvImpl` + +``` purescript +vertexAttrib1fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib2fImpl` + +``` purescript +vertexAttrib2fImpl :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib2fvImpl` + +``` purescript +vertexAttrib2fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib3fImpl` + +``` purescript +vertexAttrib3fImpl :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib3fvImpl` + +``` purescript +vertexAttrib3fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib4fImpl` + +``` purescript +vertexAttrib4fImpl :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttrib4fvImpl` + +``` purescript +vertexAttrib4fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `vertexAttribPointerImpl` + +``` purescript +vertexAttribPointerImpl :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) +``` + + +#### `viewportImpl` + +``` purescript +viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +``` \ No newline at end of file diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 4cbc1e8..7bda5ea 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -12,10 +12,7 @@ import IDL.AST ppPureScriptFFI :: IDL -> Doc ppPureScriptFFI idl = - header $+$ blankLine - $+$ typeDecls $+$ blankLine - $+$ constants $+$ blankLine - $+$ methods $+$ blankLine + header $+$ blankLine $+$ typeDecls $+$ blankLine $+$ constants $+$ methods where header = vcat $ moduleHeader ++ [""] ++ typedefs ++ [""] ++ effects typeDecls = vcat . map ppTypeDecl . sort $ types idl @@ -34,12 +31,12 @@ moduleHeader = , "import Control.Monad.Eff" , "import Data.ArrayBuffer.Types" , "import Data.TypedArray" + , "import Data.Function" ] typedefs :: [Doc] typedefs = - [ "type ArrayBuffer = Float32Array" - , "type DOMString = String" + [ "type DOMString = String" , "type FloatArray = Float32Array" , "type GLbitfield = Number" , "type GLboolean = Boolean" @@ -64,9 +61,11 @@ effects = ["foreign import data WebGL :: !"] ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = - text constName <+> "=" $$ nest 48 (integer v) + constName <+> ":: GLenum" $$ + constName <+> "=" <+> (integer v) $$ + blankLine where - constName = '_' : n + constName = text $ '_' : n ppTypeSig :: Decl -> Doc ppTypeSig f @@ -116,6 +115,7 @@ ppType :: Type -> Doc ppType Type { typeName = name, typeIsArray = isArray } | name == "void" = toType "Unit" | name == "boolean" = toType "Boolean" + | name == "ArrayBuffer" = toType "Float32Array" | otherwise = toType name where toType = if isArray then brackets . text else text diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index c21d785..9f1ee0b 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -4,25 +4,28 @@ module Graphics.WebGL.Raw where import Control.Monad.Eff -import Control.Monad.Eff.WebGL import Data.ArrayBuffer.Types import Data.TypedArray - -type GLenum = Number -type GLboolean = Boolean -type GLbitfield = Number -type GLbyte = Number -type GLshort = Number -type GLint = Number -type GLsizei = Number -type GLintptr = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLushort = Number -type GLuint = Number -type GLfloat = Number -type GLclampf = Number -type FloatArray = Float32Array +import Data.Function + +type DOMString = String +type FloatArray = Float32Array +type GLbitfield = Number +type GLboolean = Boolean +type GLbyte = Number +type GLclampf = Number +type GLenum = Number +type GLfloat = Number +type GLint = Number +type GLintptr = Number +type GLshort = Number +type GLsizei = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLuint = Number +type GLushort = Number + +foreign import data WebGL :: ! foreign import data ArrayBufferView :: * foreign import data HTMLImageElement :: * @@ -39,306 +42,905 @@ foreign import data WebGLShader :: * foreign import data WebGLTexture :: * foreign import data WebGLUniformLocation :: * -_DEPTH_BUFFER_BIT = 256 -_STENCIL_BUFFER_BIT = 1024 -_COLOR_BUFFER_BIT = 16384 -_POINTS = 0 -_LINES = 1 -_LINE_LOOP = 2 -_LINE_STRIP = 3 -_TRIANGLES = 4 -_TRIANGLE_STRIP = 5 -_TRIANGLE_FAN = 6 -_ZERO = 0 -_ONE = 1 -_SRC_COLOR = 768 -_ONE_MINUS_SRC_COLOR = 769 -_SRC_ALPHA = 770 -_ONE_MINUS_SRC_ALPHA = 771 -_DST_ALPHA = 772 -_ONE_MINUS_DST_ALPHA = 773 -_DST_COLOR = 774 -_ONE_MINUS_DST_COLOR = 775 -_SRC_ALPHA_SATURATE = 776 -_FUNC_ADD = 32774 -_BLEND_EQUATION = 32777 -_BLEND_EQUATION_RGB = 32777 -_BLEND_EQUATION_ALPHA = 34877 -_FUNC_SUBTRACT = 32778 -_FUNC_REVERSE_SUBTRACT = 32779 -_BLEND_DST_RGB = 32968 -_BLEND_SRC_RGB = 32969 -_BLEND_DST_ALPHA = 32970 -_BLEND_SRC_ALPHA = 32971 -_CONSTANT_COLOR = 32769 -_ONE_MINUS_CONSTANT_COLOR = 32770 -_CONSTANT_ALPHA = 32771 -_ONE_MINUS_CONSTANT_ALPHA = 32772 -_BLEND_COLOR = 32773 -_ARRAY_BUFFER = 34962 -_ELEMENT_ARRAY_BUFFER = 34963 -_ARRAY_BUFFER_BINDING = 34964 -_ELEMENT_ARRAY_BUFFER_BINDING = 34965 -_STREAM_DRAW = 35040 -_STATIC_DRAW = 35044 -_DYNAMIC_DRAW = 35048 -_BUFFER_SIZE = 34660 -_BUFFER_USAGE = 34661 -_CURRENT_VERTEX_ATTRIB = 34342 -_FRONT = 1028 -_BACK = 1029 -_FRONT_AND_BACK = 1032 -_TEXTURE_2D = 3553 -_CULL_FACE = 2884 -_BLEND = 3042 -_DITHER = 3024 -_STENCIL_TEST = 2960 -_DEPTH_TEST = 2929 -_SCISSOR_TEST = 3089 -_POLYGON_OFFSET_FILL = 32823 -_SAMPLE_ALPHA_TO_COVERAGE = 32926 -_SAMPLE_COVERAGE = 32928 -_NO_ERROR = 0 -_INVALID_ENUM = 1280 -_INVALID_VALUE = 1281 -_INVALID_OPERATION = 1282 -_OUT_OF_MEMORY = 1285 -_CW = 2304 -_CCW = 2305 -_LINE_WIDTH = 2849 -_ALIASED_POINT_SIZE_RANGE = 33901 -_ALIASED_LINE_WIDTH_RANGE = 33902 -_CULL_FACE_MODE = 2885 -_FRONT_FACE = 2886 -_DEPTH_RANGE = 2928 -_DEPTH_WRITEMASK = 2930 -_DEPTH_CLEAR_VALUE = 2931 -_DEPTH_FUNC = 2932 -_STENCIL_CLEAR_VALUE = 2961 -_STENCIL_FUNC = 2962 -_STENCIL_FAIL = 2964 -_STENCIL_PASS_DEPTH_FAIL = 2965 -_STENCIL_PASS_DEPTH_PASS = 2966 -_STENCIL_REF = 2967 -_STENCIL_VALUE_MASK = 2963 -_STENCIL_WRITEMASK = 2968 -_STENCIL_BACK_FUNC = 34816 -_STENCIL_BACK_FAIL = 34817 -_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 -_STENCIL_BACK_PASS_DEPTH_PASS = 34819 -_STENCIL_BACK_REF = 36003 -_STENCIL_BACK_VALUE_MASK = 36004 -_STENCIL_BACK_WRITEMASK = 36005 -_VIEWPORT = 2978 -_SCISSOR_BOX = 3088 -_COLOR_CLEAR_VALUE = 3106 -_COLOR_WRITEMASK = 3107 -_UNPACK_ALIGNMENT = 3317 -_PACK_ALIGNMENT = 3333 -_MAX_TEXTURE_SIZE = 3379 -_MAX_VIEWPORT_DIMS = 3386 -_SUBPIXEL_BITS = 3408 -_RED_BITS = 3410 -_GREEN_BITS = 3411 -_BLUE_BITS = 3412 -_ALPHA_BITS = 3413 -_DEPTH_BITS = 3414 -_STENCIL_BITS = 3415 -_POLYGON_OFFSET_UNITS = 10752 -_POLYGON_OFFSET_FACTOR = 32824 -_TEXTURE_BINDING_2D = 32873 -_SAMPLE_BUFFERS = 32936 -_SAMPLES = 32937 -_SAMPLE_COVERAGE_VALUE = 32938 -_SAMPLE_COVERAGE_INVERT = 32939 -_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 -_COMPRESSED_TEXTURE_FORMATS = 34467 -_DONT_CARE = 4352 -_FASTEST = 4353 -_NICEST = 4354 -_GENERATE_MIPMAP_HINT = 33170 -_BYTE = 5120 -_UNSIGNED_BYTE = 5121 -_SHORT = 5122 -_UNSIGNED_SHORT = 5123 -_INT = 5124 -_UNSIGNED_INT = 5125 -_FLOAT = 5126 -_DEPTH_COMPONENT = 6402 -_ALPHA = 6406 -_RGB = 6407 -_RGBA = 6408 -_LUMINANCE = 6409 -_LUMINANCE_ALPHA = 6410 -_UNSIGNED_SHORT_4_4_4_4 = 32819 -_UNSIGNED_SHORT_5_5_5_1 = 32820 -_UNSIGNED_SHORT_5_6_5 = 33635 -_FRAGMENT_SHADER = 35632 -_VERTEX_SHADER = 35633 -_MAX_VERTEX_ATTRIBS = 34921 -_MAX_VERTEX_UNIFORM_VECTORS = 36347 -_MAX_VARYING_VECTORS = 36348 -_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 -_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 -_MAX_TEXTURE_IMAGE_UNITS = 34930 -_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 -_SHADER_TYPE = 35663 -_DELETE_STATUS = 35712 -_LINK_STATUS = 35714 -_VALIDATE_STATUS = 35715 -_ATTACHED_SHADERS = 35717 -_ACTIVE_UNIFORMS = 35718 -_ACTIVE_UNIFORM_MAX_LENGTH = 35719 -_ACTIVE_ATTRIBUTES = 35721 -_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 -_SHADING_LANGUAGE_VERSION = 35724 -_CURRENT_PROGRAM = 35725 -_NEVER = 512 -_LESS = 513 -_EQUAL = 514 -_LEQUAL = 515 -_GREATER = 516 -_NOTEQUAL = 517 -_GEQUAL = 518 -_ALWAYS = 519 -_KEEP = 7680 -_REPLACE = 7681 -_INCR = 7682 -_DECR = 7683 -_INVERT = 5386 -_INCR_WRAP = 34055 -_DECR_WRAP = 34056 -_VENDOR = 7936 -_RENDERER = 7937 -_VERSION = 7938 -_NEAREST = 9728 -_LINEAR = 9729 -_NEAREST_MIPMAP_NEAREST = 9984 -_LINEAR_MIPMAP_NEAREST = 9985 -_NEAREST_MIPMAP_LINEAR = 9986 -_LINEAR_MIPMAP_LINEAR = 9987 -_TEXTURE_MAG_FILTER = 10240 -_TEXTURE_MIN_FILTER = 10241 -_TEXTURE_WRAP_S = 10242 -_TEXTURE_WRAP_T = 10243 -_TEXTURE = 5890 -_TEXTURE_CUBE_MAP = 34067 -_TEXTURE_BINDING_CUBE_MAP = 34068 -_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 -_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 -_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 -_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 -_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 -_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 -_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 -_TEXTURE0 = 33984 -_TEXTURE1 = 33985 -_TEXTURE2 = 33986 -_TEXTURE3 = 33987 -_TEXTURE4 = 33988 -_TEXTURE5 = 33989 -_TEXTURE6 = 33990 -_TEXTURE7 = 33991 -_TEXTURE8 = 33992 -_TEXTURE9 = 33993 -_TEXTURE10 = 33994 -_TEXTURE11 = 33995 -_TEXTURE12 = 33996 -_TEXTURE13 = 33997 -_TEXTURE14 = 33998 -_TEXTURE15 = 33999 -_TEXTURE16 = 34000 -_TEXTURE17 = 34001 -_TEXTURE18 = 34002 -_TEXTURE19 = 34003 -_TEXTURE20 = 34004 -_TEXTURE21 = 34005 -_TEXTURE22 = 34006 -_TEXTURE23 = 34007 -_TEXTURE24 = 34008 -_TEXTURE25 = 34009 -_TEXTURE26 = 34010 -_TEXTURE27 = 34011 -_TEXTURE28 = 34012 -_TEXTURE29 = 34013 -_TEXTURE30 = 34014 -_TEXTURE31 = 34015 -_ACTIVE_TEXTURE = 34016 -_REPEAT = 10497 -_CLAMP_TO_EDGE = 33071 -_MIRRORED_REPEAT = 33648 -_FLOAT_VEC2 = 35664 -_FLOAT_VEC3 = 35665 -_FLOAT_VEC4 = 35666 -_INT_VEC2 = 35667 -_INT_VEC3 = 35668 -_INT_VEC4 = 35669 -_BOOL = 35670 -_BOOL_VEC2 = 35671 -_BOOL_VEC3 = 35672 -_BOOL_VEC4 = 35673 -_FLOAT_MAT2 = 35674 -_FLOAT_MAT3 = 35675 -_FLOAT_MAT4 = 35676 -_SAMPLER_2D = 35678 -_SAMPLER_CUBE = 35680 -_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 -_VERTEX_ATTRIB_ARRAY_SIZE = 34339 -_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 -_VERTEX_ATTRIB_ARRAY_TYPE = 34341 -_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 -_VERTEX_ATTRIB_ARRAY_POINTER = 34373 -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 -_COMPILE_STATUS = 35713 -_INFO_LOG_LENGTH = 35716 -_SHADER_SOURCE_LENGTH = 35720 -_LOW_FLOAT = 36336 -_MEDIUM_FLOAT = 36337 -_HIGH_FLOAT = 36338 -_LOW_INT = 36339 -_MEDIUM_INT = 36340 -_HIGH_INT = 36341 -_FRAMEBUFFER = 36160 -_RENDERBUFFER = 36161 -_RGBA4 = 32854 -_RGB5_A1 = 32855 -_RGB565 = 36194 -_DEPTH_COMPONENT16 = 33189 -_STENCIL_INDEX = 6401 -_STENCIL_INDEX8 = 36168 -_DEPTH_STENCIL = 34041 -_RENDERBUFFER_WIDTH = 36162 -_RENDERBUFFER_HEIGHT = 36163 -_RENDERBUFFER_INTERNAL_FORMAT = 36164 -_RENDERBUFFER_RED_SIZE = 36176 -_RENDERBUFFER_GREEN_SIZE = 36177 -_RENDERBUFFER_BLUE_SIZE = 36178 -_RENDERBUFFER_ALPHA_SIZE = 36179 -_RENDERBUFFER_DEPTH_SIZE = 36180 -_RENDERBUFFER_STENCIL_SIZE = 36181 -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 +_DEPTH_BUFFER_BIT :: GLenum +_DEPTH_BUFFER_BIT = 256 + +_STENCIL_BUFFER_BIT :: GLenum +_STENCIL_BUFFER_BIT = 1024 + +_COLOR_BUFFER_BIT :: GLenum +_COLOR_BUFFER_BIT = 16384 + +_POINTS :: GLenum +_POINTS = 0 + +_LINES :: GLenum +_LINES = 1 + +_LINE_LOOP :: GLenum +_LINE_LOOP = 2 + +_LINE_STRIP :: GLenum +_LINE_STRIP = 3 + +_TRIANGLES :: GLenum +_TRIANGLES = 4 + +_TRIANGLE_STRIP :: GLenum +_TRIANGLE_STRIP = 5 + +_TRIANGLE_FAN :: GLenum +_TRIANGLE_FAN = 6 + +_ZERO :: GLenum +_ZERO = 0 + +_ONE :: GLenum +_ONE = 1 + +_SRC_COLOR :: GLenum +_SRC_COLOR = 768 + +_ONE_MINUS_SRC_COLOR :: GLenum +_ONE_MINUS_SRC_COLOR = 769 + +_SRC_ALPHA :: GLenum +_SRC_ALPHA = 770 + +_ONE_MINUS_SRC_ALPHA :: GLenum +_ONE_MINUS_SRC_ALPHA = 771 + +_DST_ALPHA :: GLenum +_DST_ALPHA = 772 + +_ONE_MINUS_DST_ALPHA :: GLenum +_ONE_MINUS_DST_ALPHA = 773 + +_DST_COLOR :: GLenum +_DST_COLOR = 774 + +_ONE_MINUS_DST_COLOR :: GLenum +_ONE_MINUS_DST_COLOR = 775 + +_SRC_ALPHA_SATURATE :: GLenum +_SRC_ALPHA_SATURATE = 776 + +_FUNC_ADD :: GLenum +_FUNC_ADD = 32774 + +_BLEND_EQUATION :: GLenum +_BLEND_EQUATION = 32777 + +_BLEND_EQUATION_RGB :: GLenum +_BLEND_EQUATION_RGB = 32777 + +_BLEND_EQUATION_ALPHA :: GLenum +_BLEND_EQUATION_ALPHA = 34877 + +_FUNC_SUBTRACT :: GLenum +_FUNC_SUBTRACT = 32778 + +_FUNC_REVERSE_SUBTRACT :: GLenum +_FUNC_REVERSE_SUBTRACT = 32779 + +_BLEND_DST_RGB :: GLenum +_BLEND_DST_RGB = 32968 + +_BLEND_SRC_RGB :: GLenum +_BLEND_SRC_RGB = 32969 + +_BLEND_DST_ALPHA :: GLenum +_BLEND_DST_ALPHA = 32970 + +_BLEND_SRC_ALPHA :: GLenum +_BLEND_SRC_ALPHA = 32971 + +_CONSTANT_COLOR :: GLenum +_CONSTANT_COLOR = 32769 + +_ONE_MINUS_CONSTANT_COLOR :: GLenum +_ONE_MINUS_CONSTANT_COLOR = 32770 + +_CONSTANT_ALPHA :: GLenum +_CONSTANT_ALPHA = 32771 + +_ONE_MINUS_CONSTANT_ALPHA :: GLenum +_ONE_MINUS_CONSTANT_ALPHA = 32772 + +_BLEND_COLOR :: GLenum +_BLEND_COLOR = 32773 + +_ARRAY_BUFFER :: GLenum +_ARRAY_BUFFER = 34962 + +_ELEMENT_ARRAY_BUFFER :: GLenum +_ELEMENT_ARRAY_BUFFER = 34963 + +_ARRAY_BUFFER_BINDING :: GLenum +_ARRAY_BUFFER_BINDING = 34964 + +_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum +_ELEMENT_ARRAY_BUFFER_BINDING = 34965 + +_STREAM_DRAW :: GLenum +_STREAM_DRAW = 35040 + +_STATIC_DRAW :: GLenum +_STATIC_DRAW = 35044 + +_DYNAMIC_DRAW :: GLenum +_DYNAMIC_DRAW = 35048 + +_BUFFER_SIZE :: GLenum +_BUFFER_SIZE = 34660 + +_BUFFER_USAGE :: GLenum +_BUFFER_USAGE = 34661 + +_CURRENT_VERTEX_ATTRIB :: GLenum +_CURRENT_VERTEX_ATTRIB = 34342 + +_FRONT :: GLenum +_FRONT = 1028 + +_BACK :: GLenum +_BACK = 1029 + +_FRONT_AND_BACK :: GLenum +_FRONT_AND_BACK = 1032 + +_TEXTURE_2D :: GLenum +_TEXTURE_2D = 3553 + +_CULL_FACE :: GLenum +_CULL_FACE = 2884 + +_BLEND :: GLenum +_BLEND = 3042 + +_DITHER :: GLenum +_DITHER = 3024 + +_STENCIL_TEST :: GLenum +_STENCIL_TEST = 2960 + +_DEPTH_TEST :: GLenum +_DEPTH_TEST = 2929 + +_SCISSOR_TEST :: GLenum +_SCISSOR_TEST = 3089 + +_POLYGON_OFFSET_FILL :: GLenum +_POLYGON_OFFSET_FILL = 32823 + +_SAMPLE_ALPHA_TO_COVERAGE :: GLenum +_SAMPLE_ALPHA_TO_COVERAGE = 32926 + +_SAMPLE_COVERAGE :: GLenum +_SAMPLE_COVERAGE = 32928 + +_NO_ERROR :: GLenum +_NO_ERROR = 0 + +_INVALID_ENUM :: GLenum +_INVALID_ENUM = 1280 + +_INVALID_VALUE :: GLenum +_INVALID_VALUE = 1281 + +_INVALID_OPERATION :: GLenum +_INVALID_OPERATION = 1282 + +_OUT_OF_MEMORY :: GLenum +_OUT_OF_MEMORY = 1285 + +_CW :: GLenum +_CW = 2304 + +_CCW :: GLenum +_CCW = 2305 + +_LINE_WIDTH :: GLenum +_LINE_WIDTH = 2849 + +_ALIASED_POINT_SIZE_RANGE :: GLenum +_ALIASED_POINT_SIZE_RANGE = 33901 + +_ALIASED_LINE_WIDTH_RANGE :: GLenum +_ALIASED_LINE_WIDTH_RANGE = 33902 + +_CULL_FACE_MODE :: GLenum +_CULL_FACE_MODE = 2885 + +_FRONT_FACE :: GLenum +_FRONT_FACE = 2886 + +_DEPTH_RANGE :: GLenum +_DEPTH_RANGE = 2928 + +_DEPTH_WRITEMASK :: GLenum +_DEPTH_WRITEMASK = 2930 + +_DEPTH_CLEAR_VALUE :: GLenum +_DEPTH_CLEAR_VALUE = 2931 + +_DEPTH_FUNC :: GLenum +_DEPTH_FUNC = 2932 + +_STENCIL_CLEAR_VALUE :: GLenum +_STENCIL_CLEAR_VALUE = 2961 + +_STENCIL_FUNC :: GLenum +_STENCIL_FUNC = 2962 + +_STENCIL_FAIL :: GLenum +_STENCIL_FAIL = 2964 + +_STENCIL_PASS_DEPTH_FAIL :: GLenum +_STENCIL_PASS_DEPTH_FAIL = 2965 + +_STENCIL_PASS_DEPTH_PASS :: GLenum +_STENCIL_PASS_DEPTH_PASS = 2966 + +_STENCIL_REF :: GLenum +_STENCIL_REF = 2967 + +_STENCIL_VALUE_MASK :: GLenum +_STENCIL_VALUE_MASK = 2963 + +_STENCIL_WRITEMASK :: GLenum +_STENCIL_WRITEMASK = 2968 + +_STENCIL_BACK_FUNC :: GLenum +_STENCIL_BACK_FUNC = 34816 + +_STENCIL_BACK_FAIL :: GLenum +_STENCIL_BACK_FAIL = 34817 + +_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum +_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 + +_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum +_STENCIL_BACK_PASS_DEPTH_PASS = 34819 + +_STENCIL_BACK_REF :: GLenum +_STENCIL_BACK_REF = 36003 + +_STENCIL_BACK_VALUE_MASK :: GLenum +_STENCIL_BACK_VALUE_MASK = 36004 + +_STENCIL_BACK_WRITEMASK :: GLenum +_STENCIL_BACK_WRITEMASK = 36005 + +_VIEWPORT :: GLenum +_VIEWPORT = 2978 + +_SCISSOR_BOX :: GLenum +_SCISSOR_BOX = 3088 + +_COLOR_CLEAR_VALUE :: GLenum +_COLOR_CLEAR_VALUE = 3106 + +_COLOR_WRITEMASK :: GLenum +_COLOR_WRITEMASK = 3107 + +_UNPACK_ALIGNMENT :: GLenum +_UNPACK_ALIGNMENT = 3317 + +_PACK_ALIGNMENT :: GLenum +_PACK_ALIGNMENT = 3333 + +_MAX_TEXTURE_SIZE :: GLenum +_MAX_TEXTURE_SIZE = 3379 + +_MAX_VIEWPORT_DIMS :: GLenum +_MAX_VIEWPORT_DIMS = 3386 + +_SUBPIXEL_BITS :: GLenum +_SUBPIXEL_BITS = 3408 + +_RED_BITS :: GLenum +_RED_BITS = 3410 + +_GREEN_BITS :: GLenum +_GREEN_BITS = 3411 + +_BLUE_BITS :: GLenum +_BLUE_BITS = 3412 + +_ALPHA_BITS :: GLenum +_ALPHA_BITS = 3413 + +_DEPTH_BITS :: GLenum +_DEPTH_BITS = 3414 + +_STENCIL_BITS :: GLenum +_STENCIL_BITS = 3415 + +_POLYGON_OFFSET_UNITS :: GLenum +_POLYGON_OFFSET_UNITS = 10752 + +_POLYGON_OFFSET_FACTOR :: GLenum +_POLYGON_OFFSET_FACTOR = 32824 + +_TEXTURE_BINDING_2D :: GLenum +_TEXTURE_BINDING_2D = 32873 + +_SAMPLE_BUFFERS :: GLenum +_SAMPLE_BUFFERS = 32936 + +_SAMPLES :: GLenum +_SAMPLES = 32937 + +_SAMPLE_COVERAGE_VALUE :: GLenum +_SAMPLE_COVERAGE_VALUE = 32938 + +_SAMPLE_COVERAGE_INVERT :: GLenum +_SAMPLE_COVERAGE_INVERT = 32939 + +_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum +_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 + +_COMPRESSED_TEXTURE_FORMATS :: GLenum +_COMPRESSED_TEXTURE_FORMATS = 34467 + +_DONT_CARE :: GLenum +_DONT_CARE = 4352 + +_FASTEST :: GLenum +_FASTEST = 4353 + +_NICEST :: GLenum +_NICEST = 4354 + +_GENERATE_MIPMAP_HINT :: GLenum +_GENERATE_MIPMAP_HINT = 33170 + +_BYTE :: GLenum +_BYTE = 5120 + +_UNSIGNED_BYTE :: GLenum +_UNSIGNED_BYTE = 5121 + +_SHORT :: GLenum +_SHORT = 5122 + +_UNSIGNED_SHORT :: GLenum +_UNSIGNED_SHORT = 5123 + +_INT :: GLenum +_INT = 5124 + +_UNSIGNED_INT :: GLenum +_UNSIGNED_INT = 5125 + +_FLOAT :: GLenum +_FLOAT = 5126 + +_DEPTH_COMPONENT :: GLenum +_DEPTH_COMPONENT = 6402 + +_ALPHA :: GLenum +_ALPHA = 6406 + +_RGB :: GLenum +_RGB = 6407 + +_RGBA :: GLenum +_RGBA = 6408 + +_LUMINANCE :: GLenum +_LUMINANCE = 6409 + +_LUMINANCE_ALPHA :: GLenum +_LUMINANCE_ALPHA = 6410 + +_UNSIGNED_SHORT_4_4_4_4 :: GLenum +_UNSIGNED_SHORT_4_4_4_4 = 32819 + +_UNSIGNED_SHORT_5_5_5_1 :: GLenum +_UNSIGNED_SHORT_5_5_5_1 = 32820 + +_UNSIGNED_SHORT_5_6_5 :: GLenum +_UNSIGNED_SHORT_5_6_5 = 33635 + +_FRAGMENT_SHADER :: GLenum +_FRAGMENT_SHADER = 35632 + +_VERTEX_SHADER :: GLenum +_VERTEX_SHADER = 35633 + +_MAX_VERTEX_ATTRIBS :: GLenum +_MAX_VERTEX_ATTRIBS = 34921 + +_MAX_VERTEX_UNIFORM_VECTORS :: GLenum +_MAX_VERTEX_UNIFORM_VECTORS = 36347 + +_MAX_VARYING_VECTORS :: GLenum +_MAX_VARYING_VECTORS = 36348 + +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 + +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 + +_MAX_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_TEXTURE_IMAGE_UNITS = 34930 + +_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum +_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 + +_SHADER_TYPE :: GLenum +_SHADER_TYPE = 35663 + +_DELETE_STATUS :: GLenum +_DELETE_STATUS = 35712 + +_LINK_STATUS :: GLenum +_LINK_STATUS = 35714 + +_VALIDATE_STATUS :: GLenum +_VALIDATE_STATUS = 35715 + +_ATTACHED_SHADERS :: GLenum +_ATTACHED_SHADERS = 35717 + +_ACTIVE_UNIFORMS :: GLenum +_ACTIVE_UNIFORMS = 35718 + +_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum +_ACTIVE_UNIFORM_MAX_LENGTH = 35719 + +_ACTIVE_ATTRIBUTES :: GLenum +_ACTIVE_ATTRIBUTES = 35721 + +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum +_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 + +_SHADING_LANGUAGE_VERSION :: GLenum +_SHADING_LANGUAGE_VERSION = 35724 + +_CURRENT_PROGRAM :: GLenum +_CURRENT_PROGRAM = 35725 + +_NEVER :: GLenum +_NEVER = 512 + +_LESS :: GLenum +_LESS = 513 + +_EQUAL :: GLenum +_EQUAL = 514 + +_LEQUAL :: GLenum +_LEQUAL = 515 + +_GREATER :: GLenum +_GREATER = 516 + +_NOTEQUAL :: GLenum +_NOTEQUAL = 517 + +_GEQUAL :: GLenum +_GEQUAL = 518 + +_ALWAYS :: GLenum +_ALWAYS = 519 + +_KEEP :: GLenum +_KEEP = 7680 + +_REPLACE :: GLenum +_REPLACE = 7681 + +_INCR :: GLenum +_INCR = 7682 + +_DECR :: GLenum +_DECR = 7683 + +_INVERT :: GLenum +_INVERT = 5386 + +_INCR_WRAP :: GLenum +_INCR_WRAP = 34055 + +_DECR_WRAP :: GLenum +_DECR_WRAP = 34056 + +_VENDOR :: GLenum +_VENDOR = 7936 + +_RENDERER :: GLenum +_RENDERER = 7937 + +_VERSION :: GLenum +_VERSION = 7938 + +_NEAREST :: GLenum +_NEAREST = 9728 + +_LINEAR :: GLenum +_LINEAR = 9729 + +_NEAREST_MIPMAP_NEAREST :: GLenum +_NEAREST_MIPMAP_NEAREST = 9984 + +_LINEAR_MIPMAP_NEAREST :: GLenum +_LINEAR_MIPMAP_NEAREST = 9985 + +_NEAREST_MIPMAP_LINEAR :: GLenum +_NEAREST_MIPMAP_LINEAR = 9986 + +_LINEAR_MIPMAP_LINEAR :: GLenum +_LINEAR_MIPMAP_LINEAR = 9987 + +_TEXTURE_MAG_FILTER :: GLenum +_TEXTURE_MAG_FILTER = 10240 + +_TEXTURE_MIN_FILTER :: GLenum +_TEXTURE_MIN_FILTER = 10241 + +_TEXTURE_WRAP_S :: GLenum +_TEXTURE_WRAP_S = 10242 + +_TEXTURE_WRAP_T :: GLenum +_TEXTURE_WRAP_T = 10243 + +_TEXTURE :: GLenum +_TEXTURE = 5890 + +_TEXTURE_CUBE_MAP :: GLenum +_TEXTURE_CUBE_MAP = 34067 + +_TEXTURE_BINDING_CUBE_MAP :: GLenum +_TEXTURE_BINDING_CUBE_MAP = 34068 + +_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 + +_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 + +_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 + +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 + +_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 + +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 + +_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum +_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 + +_TEXTURE0 :: GLenum +_TEXTURE0 = 33984 + +_TEXTURE1 :: GLenum +_TEXTURE1 = 33985 + +_TEXTURE2 :: GLenum +_TEXTURE2 = 33986 + +_TEXTURE3 :: GLenum +_TEXTURE3 = 33987 + +_TEXTURE4 :: GLenum +_TEXTURE4 = 33988 + +_TEXTURE5 :: GLenum +_TEXTURE5 = 33989 + +_TEXTURE6 :: GLenum +_TEXTURE6 = 33990 + +_TEXTURE7 :: GLenum +_TEXTURE7 = 33991 + +_TEXTURE8 :: GLenum +_TEXTURE8 = 33992 + +_TEXTURE9 :: GLenum +_TEXTURE9 = 33993 + +_TEXTURE10 :: GLenum +_TEXTURE10 = 33994 + +_TEXTURE11 :: GLenum +_TEXTURE11 = 33995 + +_TEXTURE12 :: GLenum +_TEXTURE12 = 33996 + +_TEXTURE13 :: GLenum +_TEXTURE13 = 33997 + +_TEXTURE14 :: GLenum +_TEXTURE14 = 33998 + +_TEXTURE15 :: GLenum +_TEXTURE15 = 33999 + +_TEXTURE16 :: GLenum +_TEXTURE16 = 34000 + +_TEXTURE17 :: GLenum +_TEXTURE17 = 34001 + +_TEXTURE18 :: GLenum +_TEXTURE18 = 34002 + +_TEXTURE19 :: GLenum +_TEXTURE19 = 34003 + +_TEXTURE20 :: GLenum +_TEXTURE20 = 34004 + +_TEXTURE21 :: GLenum +_TEXTURE21 = 34005 + +_TEXTURE22 :: GLenum +_TEXTURE22 = 34006 + +_TEXTURE23 :: GLenum +_TEXTURE23 = 34007 + +_TEXTURE24 :: GLenum +_TEXTURE24 = 34008 + +_TEXTURE25 :: GLenum +_TEXTURE25 = 34009 + +_TEXTURE26 :: GLenum +_TEXTURE26 = 34010 + +_TEXTURE27 :: GLenum +_TEXTURE27 = 34011 + +_TEXTURE28 :: GLenum +_TEXTURE28 = 34012 + +_TEXTURE29 :: GLenum +_TEXTURE29 = 34013 + +_TEXTURE30 :: GLenum +_TEXTURE30 = 34014 + +_TEXTURE31 :: GLenum +_TEXTURE31 = 34015 + +_ACTIVE_TEXTURE :: GLenum +_ACTIVE_TEXTURE = 34016 + +_REPEAT :: GLenum +_REPEAT = 10497 + +_CLAMP_TO_EDGE :: GLenum +_CLAMP_TO_EDGE = 33071 + +_MIRRORED_REPEAT :: GLenum +_MIRRORED_REPEAT = 33648 + +_FLOAT_VEC2 :: GLenum +_FLOAT_VEC2 = 35664 + +_FLOAT_VEC3 :: GLenum +_FLOAT_VEC3 = 35665 + +_FLOAT_VEC4 :: GLenum +_FLOAT_VEC4 = 35666 + +_INT_VEC2 :: GLenum +_INT_VEC2 = 35667 + +_INT_VEC3 :: GLenum +_INT_VEC3 = 35668 + +_INT_VEC4 :: GLenum +_INT_VEC4 = 35669 + +_BOOL :: GLenum +_BOOL = 35670 + +_BOOL_VEC2 :: GLenum +_BOOL_VEC2 = 35671 + +_BOOL_VEC3 :: GLenum +_BOOL_VEC3 = 35672 + +_BOOL_VEC4 :: GLenum +_BOOL_VEC4 = 35673 + +_FLOAT_MAT2 :: GLenum +_FLOAT_MAT2 = 35674 + +_FLOAT_MAT3 :: GLenum +_FLOAT_MAT3 = 35675 + +_FLOAT_MAT4 :: GLenum +_FLOAT_MAT4 = 35676 + +_SAMPLER_2D :: GLenum +_SAMPLER_2D = 35678 + +_SAMPLER_CUBE :: GLenum +_SAMPLER_CUBE = 35680 + +_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum +_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 + +_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum +_VERTEX_ATTRIB_ARRAY_SIZE = 34339 + +_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum +_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 + +_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum +_VERTEX_ATTRIB_ARRAY_TYPE = 34341 + +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum +_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 + +_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum +_VERTEX_ATTRIB_ARRAY_POINTER = 34373 + +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 + +_COMPILE_STATUS :: GLenum +_COMPILE_STATUS = 35713 + +_INFO_LOG_LENGTH :: GLenum +_INFO_LOG_LENGTH = 35716 + +_SHADER_SOURCE_LENGTH :: GLenum +_SHADER_SOURCE_LENGTH = 35720 + +_LOW_FLOAT :: GLenum +_LOW_FLOAT = 36336 + +_MEDIUM_FLOAT :: GLenum +_MEDIUM_FLOAT = 36337 + +_HIGH_FLOAT :: GLenum +_HIGH_FLOAT = 36338 + +_LOW_INT :: GLenum +_LOW_INT = 36339 + +_MEDIUM_INT :: GLenum +_MEDIUM_INT = 36340 + +_HIGH_INT :: GLenum +_HIGH_INT = 36341 + +_FRAMEBUFFER :: GLenum +_FRAMEBUFFER = 36160 + +_RENDERBUFFER :: GLenum +_RENDERBUFFER = 36161 + +_RGBA4 :: GLenum +_RGBA4 = 32854 + +_RGB5_A1 :: GLenum +_RGB5_A1 = 32855 + +_RGB565 :: GLenum +_RGB565 = 36194 + +_DEPTH_COMPONENT16 :: GLenum +_DEPTH_COMPONENT16 = 33189 + +_STENCIL_INDEX :: GLenum +_STENCIL_INDEX = 6401 + +_STENCIL_INDEX8 :: GLenum +_STENCIL_INDEX8 = 36168 + +_DEPTH_STENCIL :: GLenum +_DEPTH_STENCIL = 34041 + +_RENDERBUFFER_WIDTH :: GLenum +_RENDERBUFFER_WIDTH = 36162 + +_RENDERBUFFER_HEIGHT :: GLenum +_RENDERBUFFER_HEIGHT = 36163 + +_RENDERBUFFER_INTERNAL_FORMAT :: GLenum +_RENDERBUFFER_INTERNAL_FORMAT = 36164 + +_RENDERBUFFER_RED_SIZE :: GLenum +_RENDERBUFFER_RED_SIZE = 36176 + +_RENDERBUFFER_GREEN_SIZE :: GLenum +_RENDERBUFFER_GREEN_SIZE = 36177 + +_RENDERBUFFER_BLUE_SIZE :: GLenum +_RENDERBUFFER_BLUE_SIZE = 36178 + +_RENDERBUFFER_ALPHA_SIZE :: GLenum +_RENDERBUFFER_ALPHA_SIZE = 36179 + +_RENDERBUFFER_DEPTH_SIZE :: GLenum +_RENDERBUFFER_DEPTH_SIZE = 36180 + +_RENDERBUFFER_STENCIL_SIZE :: GLenum +_RENDERBUFFER_STENCIL_SIZE = 36181 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum _FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 -_COLOR_ATTACHMENT0 = 36064 -_DEPTH_ATTACHMENT = 36096 -_STENCIL_ATTACHMENT = 36128 -_DEPTH_STENCIL_ATTACHMENT = 33306 -_NONE = 0 -_FRAMEBUFFER_COMPLETE = 36053 -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 -_FRAMEBUFFER_UNSUPPORTED = 36061 -_FRAMEBUFFER_BINDING = 36006 -_RENDERBUFFER_BINDING = 36007 -_MAX_RENDERBUFFER_SIZE = 34024 -_INVALID_FRAMEBUFFER_OPERATION = 1286 -_UNPACK_FLIP_Y_WEBGL = 37440 -_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 -_CONTEXT_LOST_WEBGL = 37442 -_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 -_BROWSER_DEFAULT_WEBGL = 37444 + +_COLOR_ATTACHMENT0 :: GLenum +_COLOR_ATTACHMENT0 = 36064 + +_DEPTH_ATTACHMENT :: GLenum +_DEPTH_ATTACHMENT = 36096 + +_STENCIL_ATTACHMENT :: GLenum +_STENCIL_ATTACHMENT = 36128 + +_DEPTH_STENCIL_ATTACHMENT :: GLenum +_DEPTH_STENCIL_ATTACHMENT = 33306 + +_NONE :: GLenum +_NONE = 0 + +_FRAMEBUFFER_COMPLETE :: GLenum +_FRAMEBUFFER_COMPLETE = 36053 + +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 + +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 + +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 + +_FRAMEBUFFER_UNSUPPORTED :: GLenum +_FRAMEBUFFER_UNSUPPORTED = 36061 + +_FRAMEBUFFER_BINDING :: GLenum +_FRAMEBUFFER_BINDING = 36006 + +_RENDERBUFFER_BINDING :: GLenum +_RENDERBUFFER_BINDING = 36007 + +_MAX_RENDERBUFFER_SIZE :: GLenum +_MAX_RENDERBUFFER_SIZE = 34024 + +_INVALID_FRAMEBUFFER_OPERATION :: GLenum +_INVALID_FRAMEBUFFER_OPERATION = 1286 + +_UNPACK_FLIP_Y_WEBGL :: GLenum +_UNPACK_FLIP_Y_WEBGL = 37440 + +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum +_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 + +_CONTEXT_LOST_WEBGL :: GLenum +_CONTEXT_LOST_WEBGL = 37442 + +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum +_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 + +_BROWSER_DEFAULT_WEBGL :: GLenum +_BROWSER_DEFAULT_WEBGL = 37444 foreign import getContextAttributesImpl """ function getContextAttributesImpl(webgl) { @@ -346,7 +948,7 @@ foreign import getContextAttributesImpl """ return webgl.getContextAttributes(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) foreign import isContextLostImpl """ function isContextLostImpl(webgl) { @@ -354,7 +956,7 @@ foreign import isContextLostImpl """ return webgl.isContextLost(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) foreign import getSupportedExtensionsImpl """ function getSupportedExtensionsImpl(webgl) { @@ -362,7 +964,7 @@ foreign import getSupportedExtensionsImpl """ return webgl.getSupportedExtensions(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [String]) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) foreign import getExtensionImpl """ function getExtensionImpl(webgl, name) { @@ -370,7 +972,7 @@ foreign import getExtensionImpl """ return webgl.getExtension(name); }; } -""" :: forall eff a. Fn2 WebGLContext String (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) foreign import activeTextureImpl """ function activeTextureImpl(webgl, texture) { @@ -378,7 +980,7 @@ foreign import activeTextureImpl """ return webgl.activeTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import attachShaderImpl """ function attachShaderImpl(webgl, program, shader) { @@ -386,7 +988,7 @@ foreign import attachShaderImpl """ return webgl.attachShader(program, shader); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) foreign import bindAttribLocationImpl """ function bindAttribLocationImpl(webgl, program, index, name) { @@ -394,7 +996,7 @@ foreign import bindAttribLocationImpl """ return webgl.bindAttribLocation(program, index, name); }; } -""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint String (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) foreign import bindBufferImpl """ function bindBufferImpl(webgl, target, buffer) { @@ -402,7 +1004,7 @@ foreign import bindBufferImpl """ return webgl.bindBuffer(target, buffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) foreign import bindFramebufferImpl """ function bindFramebufferImpl(webgl, target, framebuffer) { @@ -410,7 +1012,7 @@ foreign import bindFramebufferImpl """ return webgl.bindFramebuffer(target, framebuffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) foreign import bindRenderbufferImpl """ function bindRenderbufferImpl(webgl, target, renderbuffer) { @@ -418,7 +1020,7 @@ foreign import bindRenderbufferImpl """ return webgl.bindRenderbuffer(target, renderbuffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) foreign import bindTextureImpl """ function bindTextureImpl(webgl, target, texture) { @@ -426,7 +1028,7 @@ foreign import bindTextureImpl """ return webgl.bindTexture(target, texture); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) foreign import blendColorImpl """ function blendColorImpl(webgl, red, green, blue, alpha) { @@ -434,7 +1036,7 @@ foreign import blendColorImpl """ return webgl.blendColor(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) foreign import blendEquationImpl """ function blendEquationImpl(webgl, mode) { @@ -442,7 +1044,7 @@ foreign import blendEquationImpl """ return webgl.blendEquation(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import blendEquationSeparateImpl """ function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { @@ -450,7 +1052,7 @@ foreign import blendEquationSeparateImpl """ return webgl.blendEquationSeparate(modeRGB, modeAlpha); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import blendFuncImpl """ function blendFuncImpl(webgl, sfactor, dfactor) { @@ -458,7 +1060,7 @@ foreign import blendFuncImpl """ return webgl.blendFunc(sfactor, dfactor); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import blendFuncSeparateImpl """ function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { @@ -466,7 +1068,7 @@ foreign import blendFuncSeparateImpl """ return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import bufferDataImpl """ function bufferDataImpl(webgl, target, data, usage) { @@ -474,7 +1076,7 @@ foreign import bufferDataImpl """ return webgl.bufferData(target, data, usage); }; } -""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import bufferSubDataImpl """ function bufferSubDataImpl(webgl, target, offset, data) { @@ -482,7 +1084,7 @@ foreign import bufferSubDataImpl """ return webgl.bufferSubData(target, offset, data); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) foreign import checkFramebufferStatusImpl """ function checkFramebufferStatusImpl(webgl, target) { @@ -490,7 +1092,7 @@ foreign import checkFramebufferStatusImpl """ return webgl.checkFramebufferStatus(target); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) foreign import clearImpl """ function clearImpl(webgl, mask) { @@ -498,7 +1100,7 @@ foreign import clearImpl """ return webgl.clear(mask); }; } -""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) foreign import clearColorImpl """ function clearColorImpl(webgl, red, green, blue, alpha) { @@ -506,7 +1108,7 @@ foreign import clearColorImpl """ return webgl.clearColor(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) foreign import clearDepthImpl """ function clearDepthImpl(webgl, depth) { @@ -514,7 +1116,7 @@ foreign import clearDepthImpl """ return webgl.clearDepth(depth); }; } -""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) foreign import clearStencilImpl """ function clearStencilImpl(webgl, s) { @@ -522,7 +1124,7 @@ foreign import clearStencilImpl """ return webgl.clearStencil(s); }; } -""" :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) foreign import colorMaskImpl """ function colorMaskImpl(webgl, red, green, blue, alpha) { @@ -530,7 +1132,7 @@ foreign import colorMaskImpl """ return webgl.colorMask(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) foreign import compileShaderImpl """ function compileShaderImpl(webgl, shader) { @@ -538,7 +1140,7 @@ foreign import compileShaderImpl """ return webgl.compileShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) foreign import copyTexImage2DImpl """ function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { @@ -546,7 +1148,7 @@ foreign import copyTexImage2DImpl """ return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); }; } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) foreign import copyTexSubImage2DImpl """ function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { @@ -554,7 +1156,7 @@ foreign import copyTexSubImage2DImpl """ return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); }; } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) foreign import createBufferImpl """ function createBufferImpl(webgl) { @@ -562,7 +1164,7 @@ foreign import createBufferImpl """ return webgl.createBuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) foreign import createFramebufferImpl """ function createFramebufferImpl(webgl) { @@ -570,7 +1172,7 @@ foreign import createFramebufferImpl """ return webgl.createFramebuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) foreign import createProgramImpl """ function createProgramImpl(webgl) { @@ -578,7 +1180,7 @@ foreign import createProgramImpl """ return webgl.createProgram(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) foreign import createRenderbufferImpl """ function createRenderbufferImpl(webgl) { @@ -586,7 +1188,7 @@ foreign import createRenderbufferImpl """ return webgl.createRenderbuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) foreign import createShaderImpl """ function createShaderImpl(webgl, type) { @@ -594,7 +1196,7 @@ foreign import createShaderImpl """ return webgl.createShader(type); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) foreign import createTextureImpl """ function createTextureImpl(webgl) { @@ -602,7 +1204,7 @@ foreign import createTextureImpl """ return webgl.createTexture(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) foreign import cullFaceImpl """ function cullFaceImpl(webgl, mode) { @@ -610,7 +1212,7 @@ foreign import cullFaceImpl """ return webgl.cullFace(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import deleteBufferImpl """ function deleteBufferImpl(webgl, buffer) { @@ -618,7 +1220,7 @@ foreign import deleteBufferImpl """ return webgl.deleteBuffer(buffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) foreign import deleteFramebufferImpl """ function deleteFramebufferImpl(webgl, framebuffer) { @@ -626,7 +1228,7 @@ foreign import deleteFramebufferImpl """ return webgl.deleteFramebuffer(framebuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) foreign import deleteProgramImpl """ function deleteProgramImpl(webgl, program) { @@ -634,7 +1236,7 @@ foreign import deleteProgramImpl """ return webgl.deleteProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) foreign import deleteRenderbufferImpl """ function deleteRenderbufferImpl(webgl, renderbuffer) { @@ -642,7 +1244,7 @@ foreign import deleteRenderbufferImpl """ return webgl.deleteRenderbuffer(renderbuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) foreign import deleteShaderImpl """ function deleteShaderImpl(webgl, shader) { @@ -650,7 +1252,7 @@ foreign import deleteShaderImpl """ return webgl.deleteShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) foreign import deleteTextureImpl """ function deleteTextureImpl(webgl, texture) { @@ -658,7 +1260,7 @@ foreign import deleteTextureImpl """ return webgl.deleteTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) foreign import depthFuncImpl """ function depthFuncImpl(webgl, func) { @@ -666,7 +1268,7 @@ foreign import depthFuncImpl """ return webgl.depthFunc(func); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import depthMaskImpl """ function depthMaskImpl(webgl, flag) { @@ -674,7 +1276,7 @@ foreign import depthMaskImpl """ return webgl.depthMask(flag); }; } -""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) foreign import depthRangeImpl """ function depthRangeImpl(webgl, zNear, zFar) { @@ -682,7 +1284,7 @@ foreign import depthRangeImpl """ return webgl.depthRange(zNear, zFar); }; } -""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) foreign import detachShaderImpl """ function detachShaderImpl(webgl, program, shader) { @@ -690,7 +1292,7 @@ foreign import detachShaderImpl """ return webgl.detachShader(program, shader); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) foreign import disableImpl """ function disableImpl(webgl, cap) { @@ -698,7 +1300,7 @@ foreign import disableImpl """ return webgl.disable(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import disableVertexAttribArrayImpl """ function disableVertexAttribArrayImpl(webgl, index) { @@ -706,7 +1308,7 @@ foreign import disableVertexAttribArrayImpl """ return webgl.disableVertexAttribArray(index); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import drawArraysImpl """ function drawArraysImpl(webgl, mode, first, count) { @@ -714,7 +1316,7 @@ foreign import drawArraysImpl """ return webgl.drawArrays(mode, first, count); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) foreign import drawElementsImpl """ function drawElementsImpl(webgl, mode, count, type, offset) { @@ -722,7 +1324,7 @@ foreign import drawElementsImpl """ return webgl.drawElements(mode, count, type, offset); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) foreign import enableImpl """ function enableImpl(webgl, cap) { @@ -730,7 +1332,7 @@ foreign import enableImpl """ return webgl.enable(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import enableVertexAttribArrayImpl """ function enableVertexAttribArrayImpl(webgl, index) { @@ -738,7 +1340,7 @@ foreign import enableVertexAttribArrayImpl """ return webgl.enableVertexAttribArray(index); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import finishImpl """ function finishImpl(webgl) { @@ -746,7 +1348,7 @@ foreign import finishImpl """ return webgl.finish(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) foreign import flushImpl """ function flushImpl(webgl) { @@ -754,7 +1356,7 @@ foreign import flushImpl """ return webgl.flush(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) foreign import framebufferRenderbufferImpl """ function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { @@ -762,7 +1364,7 @@ foreign import framebufferRenderbufferImpl """ return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) foreign import framebufferTexture2DImpl """ function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { @@ -770,7 +1372,7 @@ foreign import framebufferTexture2DImpl """ return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); }; } -""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) foreign import frontFaceImpl """ function frontFaceImpl(webgl, mode) { @@ -778,7 +1380,7 @@ foreign import frontFaceImpl """ return webgl.frontFace(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import generateMipmapImpl """ function generateMipmapImpl(webgl, target) { @@ -786,7 +1388,7 @@ foreign import generateMipmapImpl """ return webgl.generateMipmap(target); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import getActiveAttribImpl """ function getActiveAttribImpl(webgl, program, index) { @@ -794,7 +1396,7 @@ foreign import getActiveAttribImpl """ return webgl.getActiveAttrib(program, index); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) foreign import getActiveUniformImpl """ function getActiveUniformImpl(webgl, program, index) { @@ -802,7 +1404,7 @@ foreign import getActiveUniformImpl """ return webgl.getActiveUniform(program, index); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) foreign import getAttachedShadersImpl """ function getAttachedShadersImpl(webgl, program) { @@ -810,7 +1412,7 @@ foreign import getAttachedShadersImpl """ return webgl.getAttachedShaders(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) foreign import getAttribLocationImpl """ function getAttribLocationImpl(webgl, program, name) { @@ -818,7 +1420,7 @@ foreign import getAttribLocationImpl """ return webgl.getAttribLocation(program, name); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram String (Eff (canvas :: Canvas | eff) GLint) +""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) foreign import getParameterImpl """ function getParameterImpl(webgl, pname) { @@ -826,7 +1428,7 @@ foreign import getParameterImpl """ return webgl.getParameter(pname); }; } -""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) foreign import getBufferParameterImpl """ function getBufferParameterImpl(webgl, target, pname) { @@ -834,7 +1436,7 @@ foreign import getBufferParameterImpl """ return webgl.getBufferParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) foreign import getErrorImpl """ function getErrorImpl(webgl) { @@ -842,7 +1444,7 @@ foreign import getErrorImpl """ return webgl.getError(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) +""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) foreign import getFramebufferAttachmentParameterImpl """ function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { @@ -850,7 +1452,7 @@ foreign import getFramebufferAttachmentParameterImpl """ return webgl.getFramebufferAttachmentParameter(target, attachment, pname); }; } -""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) foreign import getProgramParameterImpl """ function getProgramParameterImpl(webgl, program, pname) { @@ -858,7 +1460,7 @@ foreign import getProgramParameterImpl """ return webgl.getProgramParameter(program, pname); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) foreign import getProgramInfoLogImpl """ function getProgramInfoLogImpl(webgl, program) { @@ -866,7 +1468,7 @@ foreign import getProgramInfoLogImpl """ return webgl.getProgramInfoLog(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) String) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) foreign import getRenderbufferParameterImpl """ function getRenderbufferParameterImpl(webgl, target, pname) { @@ -874,7 +1476,7 @@ foreign import getRenderbufferParameterImpl """ return webgl.getRenderbufferParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) foreign import getShaderParameterImpl """ function getShaderParameterImpl(webgl, shader, pname) { @@ -882,7 +1484,7 @@ foreign import getShaderParameterImpl """ return webgl.getShaderParameter(shader, pname); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) foreign import getShaderInfoLogImpl """ function getShaderInfoLogImpl(webgl, shader) { @@ -890,7 +1492,7 @@ foreign import getShaderInfoLogImpl """ return webgl.getShaderInfoLog(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) String) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) foreign import getShaderSourceImpl """ function getShaderSourceImpl(webgl, shader) { @@ -898,7 +1500,7 @@ foreign import getShaderSourceImpl """ return webgl.getShaderSource(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) String) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) foreign import getTexParameterImpl """ function getTexParameterImpl(webgl, target, pname) { @@ -906,7 +1508,7 @@ foreign import getTexParameterImpl """ return webgl.getTexParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) foreign import getUniformImpl """ function getUniformImpl(webgl, program, location) { @@ -914,7 +1516,7 @@ foreign import getUniformImpl """ return webgl.getUniform(program, location); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) foreign import getUniformLocationImpl """ function getUniformLocationImpl(webgl, program, name) { @@ -922,7 +1524,7 @@ foreign import getUniformLocationImpl """ return webgl.getUniformLocation(program, name); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram String (Eff (canvas :: Canvas | eff) WebGLUniformLocation) +""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) foreign import getVertexAttribImpl """ function getVertexAttribImpl(webgl, index, pname) { @@ -930,7 +1532,7 @@ foreign import getVertexAttribImpl """ return webgl.getVertexAttrib(index, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) foreign import getVertexAttribOffsetImpl """ function getVertexAttribOffsetImpl(webgl, index, pname) { @@ -938,7 +1540,7 @@ foreign import getVertexAttribOffsetImpl """ return webgl.getVertexAttribOffset(index, pname); }; } -""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) +""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) foreign import hintImpl """ function hintImpl(webgl, target, mode) { @@ -946,7 +1548,7 @@ foreign import hintImpl """ return webgl.hint(target, mode); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import isBufferImpl """ function isBufferImpl(webgl, buffer) { @@ -954,7 +1556,7 @@ foreign import isBufferImpl """ return webgl.isBuffer(buffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) foreign import isEnabledImpl """ function isEnabledImpl(webgl, cap) { @@ -962,7 +1564,7 @@ foreign import isEnabledImpl """ return webgl.isEnabled(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) foreign import isFramebufferImpl """ function isFramebufferImpl(webgl, framebuffer) { @@ -970,7 +1572,7 @@ foreign import isFramebufferImpl """ return webgl.isFramebuffer(framebuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) foreign import isProgramImpl """ function isProgramImpl(webgl, program) { @@ -978,7 +1580,7 @@ foreign import isProgramImpl """ return webgl.isProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) foreign import isRenderbufferImpl """ function isRenderbufferImpl(webgl, renderbuffer) { @@ -986,7 +1588,7 @@ foreign import isRenderbufferImpl """ return webgl.isRenderbuffer(renderbuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) foreign import isShaderImpl """ function isShaderImpl(webgl, shader) { @@ -994,7 +1596,7 @@ foreign import isShaderImpl """ return webgl.isShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) foreign import isTextureImpl """ function isTextureImpl(webgl, texture) { @@ -1002,7 +1604,7 @@ foreign import isTextureImpl """ return webgl.isTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) foreign import lineWidthImpl """ function lineWidthImpl(webgl, width) { @@ -1010,7 +1612,7 @@ foreign import lineWidthImpl """ return webgl.lineWidth(width); }; } -""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import linkProgramImpl """ function linkProgramImpl(webgl, program) { @@ -1018,7 +1620,7 @@ foreign import linkProgramImpl """ return webgl.linkProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) foreign import pixelStoreiImpl """ function pixelStoreiImpl(webgl, pname, param) { @@ -1026,7 +1628,7 @@ foreign import pixelStoreiImpl """ return webgl.pixelStorei(pname, param); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) foreign import polygonOffsetImpl """ function polygonOffsetImpl(webgl, factor, units) { @@ -1034,7 +1636,7 @@ foreign import polygonOffsetImpl """ return webgl.polygonOffset(factor, units); }; } -""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import readPixelsImpl """ function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { @@ -1042,7 +1644,7 @@ foreign import readPixelsImpl """ return webgl.readPixels(x, y, width, height, format, type, pixels); }; } -""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) foreign import renderbufferStorageImpl """ function renderbufferStorageImpl(webgl, target, internalformat, width, height) { @@ -1050,7 +1652,7 @@ foreign import renderbufferStorageImpl """ return webgl.renderbufferStorage(target, internalformat, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) foreign import sampleCoverageImpl """ function sampleCoverageImpl(webgl, value, invert) { @@ -1058,7 +1660,7 @@ foreign import sampleCoverageImpl """ return webgl.sampleCoverage(value, invert); }; } -""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) foreign import scissorImpl """ function scissorImpl(webgl, x, y, width, height) { @@ -1066,7 +1668,7 @@ foreign import scissorImpl """ return webgl.scissor(x, y, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) foreign import shaderSourceImpl """ function shaderSourceImpl(webgl, shader, source) { @@ -1074,7 +1676,7 @@ foreign import shaderSourceImpl """ return webgl.shaderSource(shader, source); }; } -""" :: forall eff. Fn3 WebGLContext WebGLShader String (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) foreign import stencilFuncImpl """ function stencilFuncImpl(webgl, func, ref, mask) { @@ -1082,7 +1684,7 @@ foreign import stencilFuncImpl """ return webgl.stencilFunc(func, ref, mask); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import stencilFuncSeparateImpl """ function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { @@ -1090,7 +1692,7 @@ foreign import stencilFuncSeparateImpl """ return webgl.stencilFuncSeparate(face, func, ref, mask); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import stencilMaskImpl """ function stencilMaskImpl(webgl, mask) { @@ -1098,7 +1700,7 @@ foreign import stencilMaskImpl """ return webgl.stencilMask(mask); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import stencilMaskSeparateImpl """ function stencilMaskSeparateImpl(webgl, face, mask) { @@ -1106,7 +1708,7 @@ foreign import stencilMaskSeparateImpl """ return webgl.stencilMaskSeparate(face, mask); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) foreign import stencilOpImpl """ function stencilOpImpl(webgl, fail, zfail, zpass) { @@ -1114,7 +1716,7 @@ foreign import stencilOpImpl """ return webgl.stencilOp(fail, zfail, zpass); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import stencilOpSeparateImpl """ function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { @@ -1122,7 +1724,7 @@ foreign import stencilOpSeparateImpl """ return webgl.stencilOpSeparate(face, fail, zfail, zpass); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) foreign import texImage2DImpl """ function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { @@ -1130,7 +1732,7 @@ foreign import texImage2DImpl """ return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); }; } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) foreign import texParameterfImpl """ function texParameterfImpl(webgl, target, pname, param) { @@ -1138,7 +1740,7 @@ foreign import texParameterfImpl """ return webgl.texParameterf(target, pname, param); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import texParameteriImpl """ function texParameteriImpl(webgl, target, pname, param) { @@ -1146,7 +1748,7 @@ foreign import texParameteriImpl """ return webgl.texParameteri(target, pname, param); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) foreign import texSubImage2DImpl """ function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { @@ -1154,7 +1756,7 @@ foreign import texSubImage2DImpl """ return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); }; } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) foreign import uniform1fImpl """ function uniform1fImpl(webgl, location, x) { @@ -1162,7 +1764,7 @@ foreign import uniform1fImpl """ return webgl.uniform1f(location, x); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import uniform1fvImpl """ function uniform1fvImpl(webgl, location, v) { @@ -1170,7 +1772,7 @@ foreign import uniform1fvImpl """ return webgl.uniform1fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniform1iImpl """ function uniform1iImpl(webgl, location, x) { @@ -1178,7 +1780,7 @@ foreign import uniform1iImpl """ return webgl.uniform1i(location, x); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) foreign import uniform1ivImpl """ function uniform1ivImpl(webgl, location, v) { @@ -1186,7 +1788,7 @@ foreign import uniform1ivImpl """ return webgl.uniform1iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) foreign import uniform2fImpl """ function uniform2fImpl(webgl, location, x, y) { @@ -1194,7 +1796,7 @@ foreign import uniform2fImpl """ return webgl.uniform2f(location, x, y); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import uniform2fvImpl """ function uniform2fvImpl(webgl, location, v) { @@ -1202,7 +1804,7 @@ foreign import uniform2fvImpl """ return webgl.uniform2fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniform2iImpl """ function uniform2iImpl(webgl, location, x, y) { @@ -1210,7 +1812,7 @@ foreign import uniform2iImpl """ return webgl.uniform2i(location, x, y); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) foreign import uniform2ivImpl """ function uniform2ivImpl(webgl, location, v) { @@ -1218,7 +1820,7 @@ foreign import uniform2ivImpl """ return webgl.uniform2iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) foreign import uniform3fImpl """ function uniform3fImpl(webgl, location, x, y, z) { @@ -1226,7 +1828,7 @@ foreign import uniform3fImpl """ return webgl.uniform3f(location, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import uniform3fvImpl """ function uniform3fvImpl(webgl, location, v) { @@ -1234,7 +1836,7 @@ foreign import uniform3fvImpl """ return webgl.uniform3fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniform3iImpl """ function uniform3iImpl(webgl, location, x, y, z) { @@ -1242,7 +1844,7 @@ foreign import uniform3iImpl """ return webgl.uniform3i(location, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) foreign import uniform3ivImpl """ function uniform3ivImpl(webgl, location, v) { @@ -1250,7 +1852,7 @@ foreign import uniform3ivImpl """ return webgl.uniform3iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) foreign import uniform4fImpl """ function uniform4fImpl(webgl, location, x, y, z, w) { @@ -1258,7 +1860,7 @@ foreign import uniform4fImpl """ return webgl.uniform4f(location, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import uniform4fvImpl """ function uniform4fvImpl(webgl, location, v) { @@ -1266,7 +1868,7 @@ foreign import uniform4fvImpl """ return webgl.uniform4fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniform4iImpl """ function uniform4iImpl(webgl, location, x, y, z, w) { @@ -1274,7 +1876,7 @@ foreign import uniform4iImpl """ return webgl.uniform4i(location, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) foreign import uniform4ivImpl """ function uniform4ivImpl(webgl, location, v) { @@ -1282,7 +1884,7 @@ foreign import uniform4ivImpl """ return webgl.uniform4iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) foreign import uniformMatrix2fvImpl """ function uniformMatrix2fvImpl(webgl, location, transpose, value) { @@ -1290,7 +1892,7 @@ foreign import uniformMatrix2fvImpl """ return webgl.uniformMatrix2fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniformMatrix3fvImpl """ function uniformMatrix3fvImpl(webgl, location, transpose, value) { @@ -1298,7 +1900,7 @@ foreign import uniformMatrix3fvImpl """ return webgl.uniformMatrix3fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import uniformMatrix4fvImpl """ function uniformMatrix4fvImpl(webgl, location, transpose, value) { @@ -1306,7 +1908,7 @@ foreign import uniformMatrix4fvImpl """ return webgl.uniformMatrix4fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import useProgramImpl """ function useProgramImpl(webgl, program) { @@ -1314,7 +1916,7 @@ foreign import useProgramImpl """ return webgl.useProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) foreign import validateProgramImpl """ function validateProgramImpl(webgl, program) { @@ -1322,7 +1924,7 @@ foreign import validateProgramImpl """ return webgl.validateProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib1fImpl """ function vertexAttrib1fImpl(webgl, indx, x) { @@ -1330,7 +1932,7 @@ foreign import vertexAttrib1fImpl """ return webgl.vertexAttrib1f(indx, x); }; } -""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib1fvImpl """ function vertexAttrib1fvImpl(webgl, indx, values) { @@ -1338,7 +1940,7 @@ foreign import vertexAttrib1fvImpl """ return webgl.vertexAttrib1fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib2fImpl """ function vertexAttrib2fImpl(webgl, indx, x, y) { @@ -1346,7 +1948,7 @@ foreign import vertexAttrib2fImpl """ return webgl.vertexAttrib2f(indx, x, y); }; } -""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib2fvImpl """ function vertexAttrib2fvImpl(webgl, indx, values) { @@ -1354,7 +1956,7 @@ foreign import vertexAttrib2fvImpl """ return webgl.vertexAttrib2fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib3fImpl """ function vertexAttrib3fImpl(webgl, indx, x, y, z) { @@ -1362,7 +1964,7 @@ foreign import vertexAttrib3fImpl """ return webgl.vertexAttrib3f(indx, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib3fvImpl """ function vertexAttrib3fvImpl(webgl, indx, values) { @@ -1370,7 +1972,7 @@ foreign import vertexAttrib3fvImpl """ return webgl.vertexAttrib3fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib4fImpl """ function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { @@ -1378,7 +1980,7 @@ foreign import vertexAttrib4fImpl """ return webgl.vertexAttrib4f(indx, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttrib4fvImpl """ function vertexAttrib4fvImpl(webgl, indx, values) { @@ -1386,7 +1988,7 @@ foreign import vertexAttrib4fvImpl """ return webgl.vertexAttrib4fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) foreign import vertexAttribPointerImpl """ function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { @@ -1394,7 +1996,7 @@ foreign import vertexAttribPointerImpl """ return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); }; } -""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) foreign import viewportImpl """ function viewportImpl(webgl, x, y, width, height) { @@ -1402,5 +2004,4 @@ foreign import viewportImpl """ return webgl.viewport(x, y, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) - +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) From 67c0d7d41bc3e024679d15ebb9d20061cdc6ab74 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Tue, 26 May 2015 22:02:01 -0500 Subject: [PATCH 23/51] split output in multiple files for easier use --- docs/README.md | 1868 +++++++++++++++-------------- generator/IDL/Printer.hs | 73 +- generator/Main.hs | 15 +- src/Graphics/WebGL/Raw.purs | 938 +-------------- src/Graphics/WebGL/Raw/Enums.purs | 907 ++++++++++++++ src/Graphics/WebGL/Raw/Types.purs | 38 + 6 files changed, 1954 insertions(+), 1885 deletions(-) create mode 100644 src/Graphics/WebGL/Raw/Enums.purs create mode 100644 src/Graphics/WebGL/Raw/Types.purs diff --git a/docs/README.md b/docs/README.md index 6668be3..11a5e9d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,3249 +3,3257 @@ ## Module Graphics.WebGL.Raw -#### `DOMString` +#### `WebGL` ``` purescript -type DOMString = String +data WebGL :: ! ``` -#### `FloatArray` +#### `getContextAttributesImpl` ``` purescript -type FloatArray = Float32Array +getContextAttributesImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) ``` -#### `GLbitfield` +#### `isContextLostImpl` ``` purescript -type GLbitfield = Number +isContextLostImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) ``` -#### `GLboolean` +#### `getSupportedExtensionsImpl` ``` purescript -type GLboolean = Boolean +getSupportedExtensionsImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) ``` -#### `GLbyte` +#### `getExtensionImpl` ``` purescript -type GLbyte = Number +getExtensionImpl :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) ``` -#### `GLclampf` +#### `activeTextureImpl` ``` purescript -type GLclampf = Number +activeTextureImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLenum` +#### `attachShaderImpl` ``` purescript -type GLenum = Number +attachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLfloat` +#### `bindAttribLocationImpl` ``` purescript -type GLfloat = Number +bindAttribLocationImpl :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLint` +#### `bindBufferImpl` ``` purescript -type GLint = Number +bindBufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLintptr` +#### `bindFramebufferImpl` ``` purescript -type GLintptr = Number +bindFramebufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLshort` +#### `bindRenderbufferImpl` ``` purescript -type GLshort = Number +bindRenderbufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLsizei` +#### `bindTextureImpl` ``` purescript -type GLsizei = Number +bindTextureImpl :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLsizeiptr` +#### `blendColorImpl` ``` purescript -type GLsizeiptr = Number +blendColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLubyte` +#### `blendEquationImpl` ``` purescript -type GLubyte = Number +blendEquationImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLuint` +#### `blendEquationSeparateImpl` ``` purescript -type GLuint = Number +blendEquationSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `GLushort` +#### `blendFuncImpl` ``` purescript -type GLushort = Number +blendFuncImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGL` +#### `blendFuncSeparateImpl` ``` purescript -data WebGL :: ! +blendFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `ArrayBufferView` +#### `bufferDataImpl` ``` purescript -data ArrayBufferView :: * +bufferDataImpl :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `HTMLImageElement` +#### `bufferSubDataImpl` ``` purescript -data HTMLImageElement :: * +bufferSubDataImpl :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) ``` -#### `HTMLVideoElement` +#### `checkFramebufferStatusImpl` ``` purescript -data HTMLVideoElement :: * +checkFramebufferStatusImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) ``` -#### `ImageData` +#### `clearImpl` ``` purescript -data ImageData :: * +clearImpl :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLActiveInfo` +#### `clearColorImpl` ``` purescript -data WebGLActiveInfo :: * +clearColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLBuffer` +#### `clearDepthImpl` ``` purescript -data WebGLBuffer :: * +clearDepthImpl :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLContext` +#### `clearStencilImpl` ``` purescript -data WebGLContext :: * +clearStencilImpl :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLContextAttributes` +#### `colorMaskImpl` ``` purescript -data WebGLContextAttributes :: * +colorMaskImpl :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLFramebuffer` +#### `compileShaderImpl` ``` purescript -data WebGLFramebuffer :: * +compileShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLProgram` +#### `copyTexImage2DImpl` ``` purescript -data WebGLProgram :: * +copyTexImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLRenderbuffer` +#### `copyTexSubImage2DImpl` ``` purescript -data WebGLRenderbuffer :: * +copyTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) ``` -#### `WebGLShader` +#### `createBufferImpl` ``` purescript -data WebGLShader :: * +createBufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) ``` -#### `WebGLTexture` +#### `createFramebufferImpl` ``` purescript -data WebGLTexture :: * +createFramebufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) ``` -#### `WebGLUniformLocation` +#### `createProgramImpl` ``` purescript -data WebGLUniformLocation :: * +createProgramImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) ``` -#### `_DEPTH_BUFFER_BIT` +#### `createRenderbufferImpl` ``` purescript -_DEPTH_BUFFER_BIT :: GLenum +createRenderbufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) ``` -#### `_STENCIL_BUFFER_BIT` +#### `createShaderImpl` ``` purescript -_STENCIL_BUFFER_BIT :: GLenum +createShaderImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) ``` -#### `_COLOR_BUFFER_BIT` +#### `createTextureImpl` ``` purescript -_COLOR_BUFFER_BIT :: GLenum +createTextureImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) ``` -#### `_POINTS` +#### `cullFaceImpl` ``` purescript -_POINTS :: GLenum +cullFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_LINES` +#### `deleteBufferImpl` ``` purescript -_LINES :: GLenum +deleteBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_LINE_LOOP` +#### `deleteFramebufferImpl` ``` purescript -_LINE_LOOP :: GLenum +deleteFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_LINE_STRIP` +#### `deleteProgramImpl` ``` purescript -_LINE_STRIP :: GLenum +deleteProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_TRIANGLES` +#### `deleteRenderbufferImpl` ``` purescript -_TRIANGLES :: GLenum +deleteRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_TRIANGLE_STRIP` +#### `deleteShaderImpl` ``` purescript -_TRIANGLE_STRIP :: GLenum +deleteShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_TRIANGLE_FAN` +#### `deleteTextureImpl` ``` purescript -_TRIANGLE_FAN :: GLenum +deleteTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ZERO` +#### `depthFuncImpl` ``` purescript -_ZERO :: GLenum +depthFuncImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ONE` +#### `depthMaskImpl` ``` purescript -_ONE :: GLenum +depthMaskImpl :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SRC_COLOR` +#### `depthRangeImpl` ``` purescript -_SRC_COLOR :: GLenum +depthRangeImpl :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ONE_MINUS_SRC_COLOR` +#### `detachShaderImpl` ``` purescript -_ONE_MINUS_SRC_COLOR :: GLenum +detachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SRC_ALPHA` +#### `disableImpl` ``` purescript -_SRC_ALPHA :: GLenum +disableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ONE_MINUS_SRC_ALPHA` +#### `disableVertexAttribArrayImpl` ``` purescript -_ONE_MINUS_SRC_ALPHA :: GLenum +disableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DST_ALPHA` +#### `drawArraysImpl` ``` purescript -_DST_ALPHA :: GLenum +drawArraysImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ONE_MINUS_DST_ALPHA` +#### `drawElementsImpl` ``` purescript -_ONE_MINUS_DST_ALPHA :: GLenum +drawElementsImpl :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DST_COLOR` +#### `enableImpl` ``` purescript -_DST_COLOR :: GLenum +enableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ONE_MINUS_DST_COLOR` +#### `enableVertexAttribArrayImpl` ``` purescript -_ONE_MINUS_DST_COLOR :: GLenum +enableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SRC_ALPHA_SATURATE` +#### `finishImpl` ``` purescript -_SRC_ALPHA_SATURATE :: GLenum +finishImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_FUNC_ADD` +#### `flushImpl` ``` purescript -_FUNC_ADD :: GLenum +flushImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_BLEND_EQUATION` +#### `framebufferRenderbufferImpl` ``` purescript -_BLEND_EQUATION :: GLenum +framebufferRenderbufferImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_BLEND_EQUATION_RGB` +#### `framebufferTexture2DImpl` ``` purescript -_BLEND_EQUATION_RGB :: GLenum +framebufferTexture2DImpl :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_BLEND_EQUATION_ALPHA` +#### `frontFaceImpl` ``` purescript -_BLEND_EQUATION_ALPHA :: GLenum +frontFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_FUNC_SUBTRACT` +#### `generateMipmapImpl` ``` purescript -_FUNC_SUBTRACT :: GLenum +generateMipmapImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_FUNC_REVERSE_SUBTRACT` +#### `getActiveAttribImpl` ``` purescript -_FUNC_REVERSE_SUBTRACT :: GLenum +getActiveAttribImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) ``` -#### `_BLEND_DST_RGB` +#### `getActiveUniformImpl` ``` purescript -_BLEND_DST_RGB :: GLenum +getActiveUniformImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) ``` -#### `_BLEND_SRC_RGB` +#### `getAttachedShadersImpl` ``` purescript -_BLEND_SRC_RGB :: GLenum +getAttachedShadersImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) ``` -#### `_BLEND_DST_ALPHA` +#### `getAttribLocationImpl` ``` purescript -_BLEND_DST_ALPHA :: GLenum +getAttribLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) ``` -#### `_BLEND_SRC_ALPHA` +#### `getParameterImpl` ``` purescript -_BLEND_SRC_ALPHA :: GLenum +getParameterImpl :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_CONSTANT_COLOR` +#### `getBufferParameterImpl` ``` purescript -_CONSTANT_COLOR :: GLenum +getBufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_ONE_MINUS_CONSTANT_COLOR` +#### `getErrorImpl` ``` purescript -_ONE_MINUS_CONSTANT_COLOR :: GLenum +getErrorImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) ``` -#### `_CONSTANT_ALPHA` +#### `getFramebufferAttachmentParameterImpl` ``` purescript -_CONSTANT_ALPHA :: GLenum +getFramebufferAttachmentParameterImpl :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_ONE_MINUS_CONSTANT_ALPHA` +#### `getProgramParameterImpl` ``` purescript -_ONE_MINUS_CONSTANT_ALPHA :: GLenum +getProgramParameterImpl :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_BLEND_COLOR` +#### `getProgramInfoLogImpl` ``` purescript -_BLEND_COLOR :: GLenum +getProgramInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) ``` -#### `_ARRAY_BUFFER` +#### `getRenderbufferParameterImpl` ``` purescript -_ARRAY_BUFFER :: GLenum +getRenderbufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_ELEMENT_ARRAY_BUFFER` +#### `getShaderParameterImpl` ``` purescript -_ELEMENT_ARRAY_BUFFER :: GLenum +getShaderParameterImpl :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_ARRAY_BUFFER_BINDING` +#### `getShaderInfoLogImpl` ``` purescript -_ARRAY_BUFFER_BINDING :: GLenum +getShaderInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) ``` -#### `_ELEMENT_ARRAY_BUFFER_BINDING` +#### `getShaderSourceImpl` ``` purescript -_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum +getShaderSourceImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) ``` -#### `_STREAM_DRAW` +#### `getTexParameterImpl` ``` purescript -_STREAM_DRAW :: GLenum +getTexParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_STATIC_DRAW` +#### `getUniformImpl` ``` purescript -_STATIC_DRAW :: GLenum +getUniformImpl :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) ``` -#### `_DYNAMIC_DRAW` +#### `getUniformLocationImpl` ``` purescript -_DYNAMIC_DRAW :: GLenum +getUniformLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) ``` -#### `_BUFFER_SIZE` +#### `getVertexAttribImpl` ``` purescript -_BUFFER_SIZE :: GLenum +getVertexAttribImpl :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) ``` -#### `_BUFFER_USAGE` +#### `getVertexAttribOffsetImpl` ``` purescript -_BUFFER_USAGE :: GLenum +getVertexAttribOffsetImpl :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) ``` -#### `_CURRENT_VERTEX_ATTRIB` +#### `hintImpl` ``` purescript -_CURRENT_VERTEX_ATTRIB :: GLenum +hintImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_FRONT` +#### `isBufferImpl` ``` purescript -_FRONT :: GLenum +isBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_BACK` +#### `isEnabledImpl` ``` purescript -_BACK :: GLenum +isEnabledImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_FRONT_AND_BACK` +#### `isFramebufferImpl` ``` purescript -_FRONT_AND_BACK :: GLenum +isFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_TEXTURE_2D` +#### `isProgramImpl` ``` purescript -_TEXTURE_2D :: GLenum +isProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_CULL_FACE` +#### `isRenderbufferImpl` ``` purescript -_CULL_FACE :: GLenum +isRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_BLEND` +#### `isShaderImpl` ``` purescript -_BLEND :: GLenum +isShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_DITHER` +#### `isTextureImpl` ``` purescript -_DITHER :: GLenum +isTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) ``` -#### `_STENCIL_TEST` +#### `lineWidthImpl` ``` purescript -_STENCIL_TEST :: GLenum +lineWidthImpl :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_TEST` +#### `linkProgramImpl` ``` purescript -_DEPTH_TEST :: GLenum +linkProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SCISSOR_TEST` +#### `pixelStoreiImpl` ``` purescript -_SCISSOR_TEST :: GLenum +pixelStoreiImpl :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_POLYGON_OFFSET_FILL` +#### `polygonOffsetImpl` ``` purescript -_POLYGON_OFFSET_FILL :: GLenum +polygonOffsetImpl :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SAMPLE_ALPHA_TO_COVERAGE` +#### `readPixelsImpl` ``` purescript -_SAMPLE_ALPHA_TO_COVERAGE :: GLenum +readPixelsImpl :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SAMPLE_COVERAGE` +#### `renderbufferStorageImpl` ``` purescript -_SAMPLE_COVERAGE :: GLenum +renderbufferStorageImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_NO_ERROR` +#### `sampleCoverageImpl` ``` purescript -_NO_ERROR :: GLenum +sampleCoverageImpl :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_INVALID_ENUM` +#### `scissorImpl` ``` purescript -_INVALID_ENUM :: GLenum +scissorImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_INVALID_VALUE` +#### `shaderSourceImpl` ``` purescript -_INVALID_VALUE :: GLenum +shaderSourceImpl :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_INVALID_OPERATION` +#### `stencilFuncImpl` ``` purescript -_INVALID_OPERATION :: GLenum +stencilFuncImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_OUT_OF_MEMORY` +#### `stencilFuncSeparateImpl` ``` purescript -_OUT_OF_MEMORY :: GLenum +stencilFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_CW` +#### `stencilMaskImpl` ``` purescript -_CW :: GLenum +stencilMaskImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_CCW` +#### `stencilMaskSeparateImpl` ``` purescript -_CCW :: GLenum +stencilMaskSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_LINE_WIDTH` +#### `stencilOpImpl` ``` purescript -_LINE_WIDTH :: GLenum +stencilOpImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ALIASED_POINT_SIZE_RANGE` +#### `stencilOpSeparateImpl` ``` purescript -_ALIASED_POINT_SIZE_RANGE :: GLenum +stencilOpSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ALIASED_LINE_WIDTH_RANGE` +#### `texImage2DImpl` ``` purescript -_ALIASED_LINE_WIDTH_RANGE :: GLenum +texImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_CULL_FACE_MODE` +#### `texParameterfImpl` ``` purescript -_CULL_FACE_MODE :: GLenum +texParameterfImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_FRONT_FACE` +#### `texParameteriImpl` ``` purescript -_FRONT_FACE :: GLenum +texParameteriImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_RANGE` +#### `texSubImage2DImpl` ``` purescript -_DEPTH_RANGE :: GLenum +texSubImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_WRITEMASK` +#### `uniform1fImpl` ``` purescript -_DEPTH_WRITEMASK :: GLenum +uniform1fImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_CLEAR_VALUE` +#### `uniform1fvImpl` ``` purescript -_DEPTH_CLEAR_VALUE :: GLenum +uniform1fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_FUNC` +#### `uniform1iImpl` ``` purescript -_DEPTH_FUNC :: GLenum +uniform1iImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_CLEAR_VALUE` +#### `uniform1ivImpl` ``` purescript -_STENCIL_CLEAR_VALUE :: GLenum +uniform1ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_FUNC` +#### `uniform2fImpl` ``` purescript -_STENCIL_FUNC :: GLenum +uniform2fImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_FAIL` +#### `uniform2fvImpl` ``` purescript -_STENCIL_FAIL :: GLenum +uniform2fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_PASS_DEPTH_FAIL` +#### `uniform2iImpl` ``` purescript -_STENCIL_PASS_DEPTH_FAIL :: GLenum +uniform2iImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_PASS_DEPTH_PASS` +#### `uniform2ivImpl` ``` purescript -_STENCIL_PASS_DEPTH_PASS :: GLenum +uniform2ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_REF` +#### `uniform3fImpl` ``` purescript -_STENCIL_REF :: GLenum +uniform3fImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_VALUE_MASK` +#### `uniform3fvImpl` ``` purescript -_STENCIL_VALUE_MASK :: GLenum +uniform3fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_WRITEMASK` +#### `uniform3iImpl` ``` purescript -_STENCIL_WRITEMASK :: GLenum +uniform3iImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_FUNC` +#### `uniform3ivImpl` ``` purescript -_STENCIL_BACK_FUNC :: GLenum +uniform3ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_FAIL` +#### `uniform4fImpl` ``` purescript -_STENCIL_BACK_FAIL :: GLenum +uniform4fImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_PASS_DEPTH_FAIL` +#### `uniform4fvImpl` ``` purescript -_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum +uniform4fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_PASS_DEPTH_PASS` +#### `uniform4iImpl` ``` purescript -_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum +uniform4iImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_REF` +#### `uniform4ivImpl` ``` purescript -_STENCIL_BACK_REF :: GLenum +uniform4ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_VALUE_MASK` +#### `uniformMatrix2fvImpl` ``` purescript -_STENCIL_BACK_VALUE_MASK :: GLenum +uniformMatrix2fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_STENCIL_BACK_WRITEMASK` +#### `uniformMatrix3fvImpl` ``` purescript -_STENCIL_BACK_WRITEMASK :: GLenum +uniformMatrix3fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_VIEWPORT` +#### `uniformMatrix4fvImpl` ``` purescript -_VIEWPORT :: GLenum +uniformMatrix4fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SCISSOR_BOX` +#### `useProgramImpl` ``` purescript -_SCISSOR_BOX :: GLenum +useProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_COLOR_CLEAR_VALUE` +#### `validateProgramImpl` ``` purescript -_COLOR_CLEAR_VALUE :: GLenum +validateProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_COLOR_WRITEMASK` +#### `vertexAttrib1fImpl` ``` purescript -_COLOR_WRITEMASK :: GLenum +vertexAttrib1fImpl :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_UNPACK_ALIGNMENT` +#### `vertexAttrib1fvImpl` ``` purescript -_UNPACK_ALIGNMENT :: GLenum +vertexAttrib1fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_PACK_ALIGNMENT` +#### `vertexAttrib2fImpl` ``` purescript -_PACK_ALIGNMENT :: GLenum +vertexAttrib2fImpl :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_MAX_TEXTURE_SIZE` +#### `vertexAttrib2fvImpl` ``` purescript -_MAX_TEXTURE_SIZE :: GLenum +vertexAttrib2fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_MAX_VIEWPORT_DIMS` +#### `vertexAttrib3fImpl` ``` purescript -_MAX_VIEWPORT_DIMS :: GLenum +vertexAttrib3fImpl :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_SUBPIXEL_BITS` +#### `vertexAttrib3fvImpl` ``` purescript -_SUBPIXEL_BITS :: GLenum +vertexAttrib3fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_RED_BITS` +#### `vertexAttrib4fImpl` ``` purescript -_RED_BITS :: GLenum +vertexAttrib4fImpl :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_GREEN_BITS` +#### `vertexAttrib4fvImpl` ``` purescript -_GREEN_BITS :: GLenum +vertexAttrib4fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_BLUE_BITS` +#### `vertexAttribPointerImpl` ``` purescript -_BLUE_BITS :: GLenum +vertexAttribPointerImpl :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_ALPHA_BITS` +#### `viewportImpl` ``` purescript -_ALPHA_BITS :: GLenum +viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) ``` -#### `_DEPTH_BITS` + +## Module Graphics.WebGL.Raw.Enums + + +#### `_DEPTH_BUFFER_BIT` ``` purescript -_DEPTH_BITS :: GLenum +_DEPTH_BUFFER_BIT :: GLenum ``` -#### `_STENCIL_BITS` +#### `_STENCIL_BUFFER_BIT` ``` purescript -_STENCIL_BITS :: GLenum +_STENCIL_BUFFER_BIT :: GLenum ``` -#### `_POLYGON_OFFSET_UNITS` +#### `_COLOR_BUFFER_BIT` ``` purescript -_POLYGON_OFFSET_UNITS :: GLenum +_COLOR_BUFFER_BIT :: GLenum ``` -#### `_POLYGON_OFFSET_FACTOR` +#### `_POINTS` ``` purescript -_POLYGON_OFFSET_FACTOR :: GLenum +_POINTS :: GLenum ``` -#### `_TEXTURE_BINDING_2D` +#### `_LINES` ``` purescript -_TEXTURE_BINDING_2D :: GLenum +_LINES :: GLenum ``` -#### `_SAMPLE_BUFFERS` +#### `_LINE_LOOP` ``` purescript -_SAMPLE_BUFFERS :: GLenum +_LINE_LOOP :: GLenum ``` -#### `_SAMPLES` +#### `_LINE_STRIP` ``` purescript -_SAMPLES :: GLenum +_LINE_STRIP :: GLenum ``` -#### `_SAMPLE_COVERAGE_VALUE` +#### `_TRIANGLES` ``` purescript -_SAMPLE_COVERAGE_VALUE :: GLenum +_TRIANGLES :: GLenum ``` -#### `_SAMPLE_COVERAGE_INVERT` +#### `_TRIANGLE_STRIP` ``` purescript -_SAMPLE_COVERAGE_INVERT :: GLenum +_TRIANGLE_STRIP :: GLenum ``` -#### `_NUM_COMPRESSED_TEXTURE_FORMATS` +#### `_TRIANGLE_FAN` ``` purescript -_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum +_TRIANGLE_FAN :: GLenum ``` -#### `_COMPRESSED_TEXTURE_FORMATS` +#### `_ZERO` ``` purescript -_COMPRESSED_TEXTURE_FORMATS :: GLenum +_ZERO :: GLenum ``` -#### `_DONT_CARE` +#### `_ONE` ``` purescript -_DONT_CARE :: GLenum +_ONE :: GLenum ``` -#### `_FASTEST` +#### `_SRC_COLOR` ``` purescript -_FASTEST :: GLenum +_SRC_COLOR :: GLenum ``` -#### `_NICEST` +#### `_ONE_MINUS_SRC_COLOR` ``` purescript -_NICEST :: GLenum +_ONE_MINUS_SRC_COLOR :: GLenum ``` -#### `_GENERATE_MIPMAP_HINT` +#### `_SRC_ALPHA` ``` purescript -_GENERATE_MIPMAP_HINT :: GLenum +_SRC_ALPHA :: GLenum ``` -#### `_BYTE` +#### `_ONE_MINUS_SRC_ALPHA` ``` purescript -_BYTE :: GLenum +_ONE_MINUS_SRC_ALPHA :: GLenum ``` -#### `_UNSIGNED_BYTE` +#### `_DST_ALPHA` ``` purescript -_UNSIGNED_BYTE :: GLenum +_DST_ALPHA :: GLenum ``` -#### `_SHORT` +#### `_ONE_MINUS_DST_ALPHA` ``` purescript -_SHORT :: GLenum +_ONE_MINUS_DST_ALPHA :: GLenum ``` -#### `_UNSIGNED_SHORT` +#### `_DST_COLOR` ``` purescript -_UNSIGNED_SHORT :: GLenum +_DST_COLOR :: GLenum ``` -#### `_INT` +#### `_ONE_MINUS_DST_COLOR` ``` purescript -_INT :: GLenum +_ONE_MINUS_DST_COLOR :: GLenum ``` -#### `_UNSIGNED_INT` +#### `_SRC_ALPHA_SATURATE` ``` purescript -_UNSIGNED_INT :: GLenum +_SRC_ALPHA_SATURATE :: GLenum ``` -#### `_FLOAT` +#### `_FUNC_ADD` ``` purescript -_FLOAT :: GLenum +_FUNC_ADD :: GLenum ``` -#### `_DEPTH_COMPONENT` +#### `_BLEND_EQUATION` ``` purescript -_DEPTH_COMPONENT :: GLenum +_BLEND_EQUATION :: GLenum ``` -#### `_ALPHA` +#### `_BLEND_EQUATION_RGB` ``` purescript -_ALPHA :: GLenum +_BLEND_EQUATION_RGB :: GLenum ``` -#### `_RGB` +#### `_BLEND_EQUATION_ALPHA` ``` purescript -_RGB :: GLenum +_BLEND_EQUATION_ALPHA :: GLenum ``` -#### `_RGBA` +#### `_FUNC_SUBTRACT` ``` purescript -_RGBA :: GLenum +_FUNC_SUBTRACT :: GLenum ``` -#### `_LUMINANCE` +#### `_FUNC_REVERSE_SUBTRACT` ``` purescript -_LUMINANCE :: GLenum +_FUNC_REVERSE_SUBTRACT :: GLenum ``` -#### `_LUMINANCE_ALPHA` +#### `_BLEND_DST_RGB` ``` purescript -_LUMINANCE_ALPHA :: GLenum +_BLEND_DST_RGB :: GLenum ``` -#### `_UNSIGNED_SHORT_4_4_4_4` +#### `_BLEND_SRC_RGB` ``` purescript -_UNSIGNED_SHORT_4_4_4_4 :: GLenum +_BLEND_SRC_RGB :: GLenum ``` -#### `_UNSIGNED_SHORT_5_5_5_1` +#### `_BLEND_DST_ALPHA` ``` purescript -_UNSIGNED_SHORT_5_5_5_1 :: GLenum +_BLEND_DST_ALPHA :: GLenum ``` -#### `_UNSIGNED_SHORT_5_6_5` +#### `_BLEND_SRC_ALPHA` ``` purescript -_UNSIGNED_SHORT_5_6_5 :: GLenum +_BLEND_SRC_ALPHA :: GLenum ``` -#### `_FRAGMENT_SHADER` +#### `_CONSTANT_COLOR` ``` purescript -_FRAGMENT_SHADER :: GLenum +_CONSTANT_COLOR :: GLenum ``` -#### `_VERTEX_SHADER` +#### `_ONE_MINUS_CONSTANT_COLOR` ``` purescript -_VERTEX_SHADER :: GLenum +_ONE_MINUS_CONSTANT_COLOR :: GLenum ``` -#### `_MAX_VERTEX_ATTRIBS` +#### `_CONSTANT_ALPHA` ``` purescript -_MAX_VERTEX_ATTRIBS :: GLenum +_CONSTANT_ALPHA :: GLenum ``` -#### `_MAX_VERTEX_UNIFORM_VECTORS` +#### `_ONE_MINUS_CONSTANT_ALPHA` ``` purescript -_MAX_VERTEX_UNIFORM_VECTORS :: GLenum +_ONE_MINUS_CONSTANT_ALPHA :: GLenum ``` -#### `_MAX_VARYING_VECTORS` +#### `_BLEND_COLOR` ``` purescript -_MAX_VARYING_VECTORS :: GLenum +_BLEND_COLOR :: GLenum ``` -#### `_MAX_COMBINED_TEXTURE_IMAGE_UNITS` +#### `_ARRAY_BUFFER` ``` purescript -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum +_ARRAY_BUFFER :: GLenum ``` -#### `_MAX_VERTEX_TEXTURE_IMAGE_UNITS` +#### `_ELEMENT_ARRAY_BUFFER` ``` purescript -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum +_ELEMENT_ARRAY_BUFFER :: GLenum ``` -#### `_MAX_TEXTURE_IMAGE_UNITS` +#### `_ARRAY_BUFFER_BINDING` ``` purescript -_MAX_TEXTURE_IMAGE_UNITS :: GLenum +_ARRAY_BUFFER_BINDING :: GLenum ``` -#### `_MAX_FRAGMENT_UNIFORM_VECTORS` +#### `_ELEMENT_ARRAY_BUFFER_BINDING` ``` purescript -_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum +_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum ``` -#### `_SHADER_TYPE` +#### `_STREAM_DRAW` ``` purescript -_SHADER_TYPE :: GLenum +_STREAM_DRAW :: GLenum ``` -#### `_DELETE_STATUS` +#### `_STATIC_DRAW` ``` purescript -_DELETE_STATUS :: GLenum +_STATIC_DRAW :: GLenum ``` -#### `_LINK_STATUS` +#### `_DYNAMIC_DRAW` ``` purescript -_LINK_STATUS :: GLenum +_DYNAMIC_DRAW :: GLenum ``` -#### `_VALIDATE_STATUS` +#### `_BUFFER_SIZE` ``` purescript -_VALIDATE_STATUS :: GLenum +_BUFFER_SIZE :: GLenum ``` -#### `_ATTACHED_SHADERS` +#### `_BUFFER_USAGE` ``` purescript -_ATTACHED_SHADERS :: GLenum +_BUFFER_USAGE :: GLenum ``` -#### `_ACTIVE_UNIFORMS` +#### `_CURRENT_VERTEX_ATTRIB` ``` purescript -_ACTIVE_UNIFORMS :: GLenum +_CURRENT_VERTEX_ATTRIB :: GLenum ``` -#### `_ACTIVE_UNIFORM_MAX_LENGTH` +#### `_FRONT` ``` purescript -_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum +_FRONT :: GLenum ``` -#### `_ACTIVE_ATTRIBUTES` +#### `_BACK` ``` purescript -_ACTIVE_ATTRIBUTES :: GLenum +_BACK :: GLenum ``` -#### `_ACTIVE_ATTRIBUTE_MAX_LENGTH` +#### `_FRONT_AND_BACK` ``` purescript -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum +_FRONT_AND_BACK :: GLenum ``` -#### `_SHADING_LANGUAGE_VERSION` +#### `_TEXTURE_2D` ``` purescript -_SHADING_LANGUAGE_VERSION :: GLenum +_TEXTURE_2D :: GLenum ``` -#### `_CURRENT_PROGRAM` +#### `_CULL_FACE` ``` purescript -_CURRENT_PROGRAM :: GLenum +_CULL_FACE :: GLenum ``` -#### `_NEVER` +#### `_BLEND` ``` purescript -_NEVER :: GLenum +_BLEND :: GLenum ``` -#### `_LESS` +#### `_DITHER` ``` purescript -_LESS :: GLenum +_DITHER :: GLenum ``` -#### `_EQUAL` +#### `_STENCIL_TEST` ``` purescript -_EQUAL :: GLenum +_STENCIL_TEST :: GLenum ``` -#### `_LEQUAL` +#### `_DEPTH_TEST` ``` purescript -_LEQUAL :: GLenum +_DEPTH_TEST :: GLenum ``` -#### `_GREATER` +#### `_SCISSOR_TEST` ``` purescript -_GREATER :: GLenum +_SCISSOR_TEST :: GLenum ``` -#### `_NOTEQUAL` +#### `_POLYGON_OFFSET_FILL` ``` purescript -_NOTEQUAL :: GLenum +_POLYGON_OFFSET_FILL :: GLenum ``` -#### `_GEQUAL` +#### `_SAMPLE_ALPHA_TO_COVERAGE` ``` purescript -_GEQUAL :: GLenum +_SAMPLE_ALPHA_TO_COVERAGE :: GLenum ``` -#### `_ALWAYS` +#### `_SAMPLE_COVERAGE` ``` purescript -_ALWAYS :: GLenum +_SAMPLE_COVERAGE :: GLenum ``` -#### `_KEEP` +#### `_NO_ERROR` ``` purescript -_KEEP :: GLenum +_NO_ERROR :: GLenum ``` -#### `_REPLACE` +#### `_INVALID_ENUM` ``` purescript -_REPLACE :: GLenum +_INVALID_ENUM :: GLenum ``` -#### `_INCR` +#### `_INVALID_VALUE` ``` purescript -_INCR :: GLenum +_INVALID_VALUE :: GLenum ``` -#### `_DECR` +#### `_INVALID_OPERATION` ``` purescript -_DECR :: GLenum +_INVALID_OPERATION :: GLenum ``` -#### `_INVERT` +#### `_OUT_OF_MEMORY` ``` purescript -_INVERT :: GLenum +_OUT_OF_MEMORY :: GLenum ``` -#### `_INCR_WRAP` +#### `_CW` ``` purescript -_INCR_WRAP :: GLenum +_CW :: GLenum ``` -#### `_DECR_WRAP` +#### `_CCW` ``` purescript -_DECR_WRAP :: GLenum +_CCW :: GLenum ``` -#### `_VENDOR` +#### `_LINE_WIDTH` ``` purescript -_VENDOR :: GLenum +_LINE_WIDTH :: GLenum ``` -#### `_RENDERER` +#### `_ALIASED_POINT_SIZE_RANGE` ``` purescript -_RENDERER :: GLenum +_ALIASED_POINT_SIZE_RANGE :: GLenum ``` -#### `_VERSION` +#### `_ALIASED_LINE_WIDTH_RANGE` ``` purescript -_VERSION :: GLenum +_ALIASED_LINE_WIDTH_RANGE :: GLenum ``` -#### `_NEAREST` +#### `_CULL_FACE_MODE` ``` purescript -_NEAREST :: GLenum +_CULL_FACE_MODE :: GLenum ``` -#### `_LINEAR` +#### `_FRONT_FACE` ``` purescript -_LINEAR :: GLenum +_FRONT_FACE :: GLenum ``` -#### `_NEAREST_MIPMAP_NEAREST` +#### `_DEPTH_RANGE` ``` purescript -_NEAREST_MIPMAP_NEAREST :: GLenum +_DEPTH_RANGE :: GLenum ``` -#### `_LINEAR_MIPMAP_NEAREST` +#### `_DEPTH_WRITEMASK` ``` purescript -_LINEAR_MIPMAP_NEAREST :: GLenum +_DEPTH_WRITEMASK :: GLenum ``` -#### `_NEAREST_MIPMAP_LINEAR` +#### `_DEPTH_CLEAR_VALUE` ``` purescript -_NEAREST_MIPMAP_LINEAR :: GLenum +_DEPTH_CLEAR_VALUE :: GLenum +``` + + +#### `_DEPTH_FUNC` + +``` purescript +_DEPTH_FUNC :: GLenum ``` -#### `_LINEAR_MIPMAP_LINEAR` +#### `_STENCIL_CLEAR_VALUE` ``` purescript -_LINEAR_MIPMAP_LINEAR :: GLenum +_STENCIL_CLEAR_VALUE :: GLenum ``` -#### `_TEXTURE_MAG_FILTER` +#### `_STENCIL_FUNC` ``` purescript -_TEXTURE_MAG_FILTER :: GLenum +_STENCIL_FUNC :: GLenum ``` -#### `_TEXTURE_MIN_FILTER` +#### `_STENCIL_FAIL` ``` purescript -_TEXTURE_MIN_FILTER :: GLenum +_STENCIL_FAIL :: GLenum ``` -#### `_TEXTURE_WRAP_S` +#### `_STENCIL_PASS_DEPTH_FAIL` ``` purescript -_TEXTURE_WRAP_S :: GLenum +_STENCIL_PASS_DEPTH_FAIL :: GLenum ``` -#### `_TEXTURE_WRAP_T` +#### `_STENCIL_PASS_DEPTH_PASS` ``` purescript -_TEXTURE_WRAP_T :: GLenum +_STENCIL_PASS_DEPTH_PASS :: GLenum ``` -#### `_TEXTURE` +#### `_STENCIL_REF` ``` purescript -_TEXTURE :: GLenum +_STENCIL_REF :: GLenum ``` -#### `_TEXTURE_CUBE_MAP` +#### `_STENCIL_VALUE_MASK` ``` purescript -_TEXTURE_CUBE_MAP :: GLenum +_STENCIL_VALUE_MASK :: GLenum ``` -#### `_TEXTURE_BINDING_CUBE_MAP` +#### `_STENCIL_WRITEMASK` ``` purescript -_TEXTURE_BINDING_CUBE_MAP :: GLenum +_STENCIL_WRITEMASK :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_X` +#### `_STENCIL_BACK_FUNC` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum +_STENCIL_BACK_FUNC :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_X` +#### `_STENCIL_BACK_FAIL` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum +_STENCIL_BACK_FAIL :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_Y` +#### `_STENCIL_BACK_PASS_DEPTH_FAIL` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum +_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_Y` +#### `_STENCIL_BACK_PASS_DEPTH_PASS` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum +_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_Z` +#### `_STENCIL_BACK_REF` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum +_STENCIL_BACK_REF :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_Z` +#### `_STENCIL_BACK_VALUE_MASK` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum +_STENCIL_BACK_VALUE_MASK :: GLenum ``` -#### `_MAX_CUBE_MAP_TEXTURE_SIZE` +#### `_STENCIL_BACK_WRITEMASK` ``` purescript -_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum +_STENCIL_BACK_WRITEMASK :: GLenum ``` -#### `_TEXTURE0` +#### `_VIEWPORT` ``` purescript -_TEXTURE0 :: GLenum +_VIEWPORT :: GLenum ``` -#### `_TEXTURE1` +#### `_SCISSOR_BOX` ``` purescript -_TEXTURE1 :: GLenum +_SCISSOR_BOX :: GLenum ``` -#### `_TEXTURE2` +#### `_COLOR_CLEAR_VALUE` ``` purescript -_TEXTURE2 :: GLenum +_COLOR_CLEAR_VALUE :: GLenum ``` -#### `_TEXTURE3` +#### `_COLOR_WRITEMASK` ``` purescript -_TEXTURE3 :: GLenum +_COLOR_WRITEMASK :: GLenum ``` -#### `_TEXTURE4` +#### `_UNPACK_ALIGNMENT` ``` purescript -_TEXTURE4 :: GLenum +_UNPACK_ALIGNMENT :: GLenum ``` -#### `_TEXTURE5` +#### `_PACK_ALIGNMENT` ``` purescript -_TEXTURE5 :: GLenum +_PACK_ALIGNMENT :: GLenum ``` -#### `_TEXTURE6` +#### `_MAX_TEXTURE_SIZE` ``` purescript -_TEXTURE6 :: GLenum +_MAX_TEXTURE_SIZE :: GLenum ``` -#### `_TEXTURE7` +#### `_MAX_VIEWPORT_DIMS` ``` purescript -_TEXTURE7 :: GLenum +_MAX_VIEWPORT_DIMS :: GLenum ``` -#### `_TEXTURE8` +#### `_SUBPIXEL_BITS` ``` purescript -_TEXTURE8 :: GLenum +_SUBPIXEL_BITS :: GLenum ``` -#### `_TEXTURE9` +#### `_RED_BITS` ``` purescript -_TEXTURE9 :: GLenum +_RED_BITS :: GLenum ``` -#### `_TEXTURE10` +#### `_GREEN_BITS` ``` purescript -_TEXTURE10 :: GLenum +_GREEN_BITS :: GLenum ``` -#### `_TEXTURE11` +#### `_BLUE_BITS` ``` purescript -_TEXTURE11 :: GLenum +_BLUE_BITS :: GLenum ``` -#### `_TEXTURE12` +#### `_ALPHA_BITS` ``` purescript -_TEXTURE12 :: GLenum +_ALPHA_BITS :: GLenum ``` -#### `_TEXTURE13` +#### `_DEPTH_BITS` ``` purescript -_TEXTURE13 :: GLenum +_DEPTH_BITS :: GLenum ``` -#### `_TEXTURE14` +#### `_STENCIL_BITS` ``` purescript -_TEXTURE14 :: GLenum +_STENCIL_BITS :: GLenum ``` -#### `_TEXTURE15` +#### `_POLYGON_OFFSET_UNITS` ``` purescript -_TEXTURE15 :: GLenum +_POLYGON_OFFSET_UNITS :: GLenum ``` -#### `_TEXTURE16` +#### `_POLYGON_OFFSET_FACTOR` ``` purescript -_TEXTURE16 :: GLenum +_POLYGON_OFFSET_FACTOR :: GLenum ``` -#### `_TEXTURE17` +#### `_TEXTURE_BINDING_2D` ``` purescript -_TEXTURE17 :: GLenum +_TEXTURE_BINDING_2D :: GLenum ``` -#### `_TEXTURE18` +#### `_SAMPLE_BUFFERS` ``` purescript -_TEXTURE18 :: GLenum +_SAMPLE_BUFFERS :: GLenum ``` -#### `_TEXTURE19` +#### `_SAMPLES` ``` purescript -_TEXTURE19 :: GLenum +_SAMPLES :: GLenum ``` -#### `_TEXTURE20` +#### `_SAMPLE_COVERAGE_VALUE` ``` purescript -_TEXTURE20 :: GLenum +_SAMPLE_COVERAGE_VALUE :: GLenum ``` -#### `_TEXTURE21` +#### `_SAMPLE_COVERAGE_INVERT` ``` purescript -_TEXTURE21 :: GLenum +_SAMPLE_COVERAGE_INVERT :: GLenum ``` -#### `_TEXTURE22` +#### `_NUM_COMPRESSED_TEXTURE_FORMATS` ``` purescript -_TEXTURE22 :: GLenum +_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum ``` -#### `_TEXTURE23` +#### `_COMPRESSED_TEXTURE_FORMATS` ``` purescript -_TEXTURE23 :: GLenum +_COMPRESSED_TEXTURE_FORMATS :: GLenum ``` -#### `_TEXTURE24` +#### `_DONT_CARE` ``` purescript -_TEXTURE24 :: GLenum +_DONT_CARE :: GLenum ``` -#### `_TEXTURE25` +#### `_FASTEST` ``` purescript -_TEXTURE25 :: GLenum +_FASTEST :: GLenum ``` -#### `_TEXTURE26` +#### `_NICEST` ``` purescript -_TEXTURE26 :: GLenum +_NICEST :: GLenum ``` -#### `_TEXTURE27` +#### `_GENERATE_MIPMAP_HINT` ``` purescript -_TEXTURE27 :: GLenum +_GENERATE_MIPMAP_HINT :: GLenum ``` -#### `_TEXTURE28` +#### `_BYTE` ``` purescript -_TEXTURE28 :: GLenum +_BYTE :: GLenum ``` -#### `_TEXTURE29` +#### `_UNSIGNED_BYTE` ``` purescript -_TEXTURE29 :: GLenum +_UNSIGNED_BYTE :: GLenum ``` -#### `_TEXTURE30` +#### `_SHORT` ``` purescript -_TEXTURE30 :: GLenum +_SHORT :: GLenum ``` -#### `_TEXTURE31` +#### `_UNSIGNED_SHORT` ``` purescript -_TEXTURE31 :: GLenum +_UNSIGNED_SHORT :: GLenum ``` -#### `_ACTIVE_TEXTURE` +#### `_INT` ``` purescript -_ACTIVE_TEXTURE :: GLenum +_INT :: GLenum ``` -#### `_REPEAT` +#### `_UNSIGNED_INT` ``` purescript -_REPEAT :: GLenum +_UNSIGNED_INT :: GLenum ``` -#### `_CLAMP_TO_EDGE` +#### `_FLOAT` ``` purescript -_CLAMP_TO_EDGE :: GLenum +_FLOAT :: GLenum ``` -#### `_MIRRORED_REPEAT` +#### `_DEPTH_COMPONENT` ``` purescript -_MIRRORED_REPEAT :: GLenum +_DEPTH_COMPONENT :: GLenum ``` -#### `_FLOAT_VEC2` +#### `_ALPHA` ``` purescript -_FLOAT_VEC2 :: GLenum +_ALPHA :: GLenum ``` -#### `_FLOAT_VEC3` +#### `_RGB` ``` purescript -_FLOAT_VEC3 :: GLenum +_RGB :: GLenum ``` -#### `_FLOAT_VEC4` +#### `_RGBA` ``` purescript -_FLOAT_VEC4 :: GLenum +_RGBA :: GLenum ``` -#### `_INT_VEC2` +#### `_LUMINANCE` ``` purescript -_INT_VEC2 :: GLenum +_LUMINANCE :: GLenum ``` -#### `_INT_VEC3` +#### `_LUMINANCE_ALPHA` ``` purescript -_INT_VEC3 :: GLenum +_LUMINANCE_ALPHA :: GLenum ``` -#### `_INT_VEC4` +#### `_UNSIGNED_SHORT_4_4_4_4` ``` purescript -_INT_VEC4 :: GLenum +_UNSIGNED_SHORT_4_4_4_4 :: GLenum ``` -#### `_BOOL` +#### `_UNSIGNED_SHORT_5_5_5_1` ``` purescript -_BOOL :: GLenum +_UNSIGNED_SHORT_5_5_5_1 :: GLenum ``` -#### `_BOOL_VEC2` +#### `_UNSIGNED_SHORT_5_6_5` ``` purescript -_BOOL_VEC2 :: GLenum +_UNSIGNED_SHORT_5_6_5 :: GLenum ``` -#### `_BOOL_VEC3` +#### `_FRAGMENT_SHADER` ``` purescript -_BOOL_VEC3 :: GLenum +_FRAGMENT_SHADER :: GLenum ``` -#### `_BOOL_VEC4` +#### `_VERTEX_SHADER` ``` purescript -_BOOL_VEC4 :: GLenum +_VERTEX_SHADER :: GLenum ``` -#### `_FLOAT_MAT2` +#### `_MAX_VERTEX_ATTRIBS` ``` purescript -_FLOAT_MAT2 :: GLenum +_MAX_VERTEX_ATTRIBS :: GLenum ``` -#### `_FLOAT_MAT3` +#### `_MAX_VERTEX_UNIFORM_VECTORS` ``` purescript -_FLOAT_MAT3 :: GLenum +_MAX_VERTEX_UNIFORM_VECTORS :: GLenum ``` -#### `_FLOAT_MAT4` +#### `_MAX_VARYING_VECTORS` ``` purescript -_FLOAT_MAT4 :: GLenum +_MAX_VARYING_VECTORS :: GLenum ``` -#### `_SAMPLER_2D` +#### `_MAX_COMBINED_TEXTURE_IMAGE_UNITS` ``` purescript -_SAMPLER_2D :: GLenum +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum ``` -#### `_SAMPLER_CUBE` +#### `_MAX_VERTEX_TEXTURE_IMAGE_UNITS` ``` purescript -_SAMPLER_CUBE :: GLenum +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_ENABLED` +#### `_MAX_TEXTURE_IMAGE_UNITS` ``` purescript -_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum +_MAX_TEXTURE_IMAGE_UNITS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_SIZE` +#### `_MAX_FRAGMENT_UNIFORM_VECTORS` ``` purescript -_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum +_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_STRIDE` +#### `_SHADER_TYPE` ``` purescript -_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum +_SHADER_TYPE :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_TYPE` +#### `_DELETE_STATUS` ``` purescript -_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum +_DELETE_STATUS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_NORMALIZED` +#### `_LINK_STATUS` ``` purescript -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum +_LINK_STATUS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_POINTER` +#### `_VALIDATE_STATUS` ``` purescript -_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum +_VALIDATE_STATUS :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING` +#### `_ATTACHED_SHADERS` ``` purescript -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum +_ATTACHED_SHADERS :: GLenum ``` -#### `_COMPILE_STATUS` +#### `_ACTIVE_UNIFORMS` ``` purescript -_COMPILE_STATUS :: GLenum +_ACTIVE_UNIFORMS :: GLenum ``` -#### `_INFO_LOG_LENGTH` +#### `_ACTIVE_UNIFORM_MAX_LENGTH` ``` purescript -_INFO_LOG_LENGTH :: GLenum +_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum ``` -#### `_SHADER_SOURCE_LENGTH` +#### `_ACTIVE_ATTRIBUTES` ``` purescript -_SHADER_SOURCE_LENGTH :: GLenum +_ACTIVE_ATTRIBUTES :: GLenum ``` -#### `_LOW_FLOAT` +#### `_ACTIVE_ATTRIBUTE_MAX_LENGTH` ``` purescript -_LOW_FLOAT :: GLenum +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum ``` -#### `_MEDIUM_FLOAT` +#### `_SHADING_LANGUAGE_VERSION` ``` purescript -_MEDIUM_FLOAT :: GLenum +_SHADING_LANGUAGE_VERSION :: GLenum ``` -#### `_HIGH_FLOAT` +#### `_CURRENT_PROGRAM` ``` purescript -_HIGH_FLOAT :: GLenum +_CURRENT_PROGRAM :: GLenum ``` -#### `_LOW_INT` +#### `_NEVER` ``` purescript -_LOW_INT :: GLenum +_NEVER :: GLenum ``` -#### `_MEDIUM_INT` +#### `_LESS` ``` purescript -_MEDIUM_INT :: GLenum +_LESS :: GLenum ``` -#### `_HIGH_INT` +#### `_EQUAL` ``` purescript -_HIGH_INT :: GLenum +_EQUAL :: GLenum ``` -#### `_FRAMEBUFFER` +#### `_LEQUAL` ``` purescript -_FRAMEBUFFER :: GLenum +_LEQUAL :: GLenum ``` -#### `_RENDERBUFFER` +#### `_GREATER` ``` purescript -_RENDERBUFFER :: GLenum +_GREATER :: GLenum ``` -#### `_RGBA4` +#### `_NOTEQUAL` ``` purescript -_RGBA4 :: GLenum +_NOTEQUAL :: GLenum ``` -#### `_RGB5_A1` +#### `_GEQUAL` ``` purescript -_RGB5_A1 :: GLenum +_GEQUAL :: GLenum ``` -#### `_RGB565` +#### `_ALWAYS` ``` purescript -_RGB565 :: GLenum +_ALWAYS :: GLenum ``` -#### `_DEPTH_COMPONENT16` +#### `_KEEP` ``` purescript -_DEPTH_COMPONENT16 :: GLenum +_KEEP :: GLenum ``` -#### `_STENCIL_INDEX` +#### `_REPLACE` ``` purescript -_STENCIL_INDEX :: GLenum +_REPLACE :: GLenum ``` -#### `_STENCIL_INDEX8` +#### `_INCR` ``` purescript -_STENCIL_INDEX8 :: GLenum +_INCR :: GLenum ``` -#### `_DEPTH_STENCIL` +#### `_DECR` ``` purescript -_DEPTH_STENCIL :: GLenum +_DECR :: GLenum ``` -#### `_RENDERBUFFER_WIDTH` +#### `_INVERT` ``` purescript -_RENDERBUFFER_WIDTH :: GLenum +_INVERT :: GLenum ``` -#### `_RENDERBUFFER_HEIGHT` +#### `_INCR_WRAP` ``` purescript -_RENDERBUFFER_HEIGHT :: GLenum +_INCR_WRAP :: GLenum ``` -#### `_RENDERBUFFER_INTERNAL_FORMAT` +#### `_DECR_WRAP` ``` purescript -_RENDERBUFFER_INTERNAL_FORMAT :: GLenum +_DECR_WRAP :: GLenum ``` -#### `_RENDERBUFFER_RED_SIZE` +#### `_VENDOR` ``` purescript -_RENDERBUFFER_RED_SIZE :: GLenum +_VENDOR :: GLenum ``` -#### `_RENDERBUFFER_GREEN_SIZE` +#### `_RENDERER` ``` purescript -_RENDERBUFFER_GREEN_SIZE :: GLenum +_RENDERER :: GLenum ``` -#### `_RENDERBUFFER_BLUE_SIZE` +#### `_VERSION` ``` purescript -_RENDERBUFFER_BLUE_SIZE :: GLenum +_VERSION :: GLenum ``` -#### `_RENDERBUFFER_ALPHA_SIZE` +#### `_NEAREST` ``` purescript -_RENDERBUFFER_ALPHA_SIZE :: GLenum +_NEAREST :: GLenum ``` -#### `_RENDERBUFFER_DEPTH_SIZE` +#### `_LINEAR` ``` purescript -_RENDERBUFFER_DEPTH_SIZE :: GLenum +_LINEAR :: GLenum ``` -#### `_RENDERBUFFER_STENCIL_SIZE` +#### `_NEAREST_MIPMAP_NEAREST` ``` purescript -_RENDERBUFFER_STENCIL_SIZE :: GLenum +_NEAREST_MIPMAP_NEAREST :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE` +#### `_LINEAR_MIPMAP_NEAREST` ``` purescript -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum +_LINEAR_MIPMAP_NEAREST :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME` +#### `_NEAREST_MIPMAP_LINEAR` ``` purescript -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum +_NEAREST_MIPMAP_LINEAR :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL` +#### `_LINEAR_MIPMAP_LINEAR` ``` purescript -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum +_LINEAR_MIPMAP_LINEAR :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE` +#### `_TEXTURE_MAG_FILTER` ``` purescript -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum +_TEXTURE_MAG_FILTER :: GLenum ``` -#### `_COLOR_ATTACHMENT0` +#### `_TEXTURE_MIN_FILTER` ``` purescript -_COLOR_ATTACHMENT0 :: GLenum +_TEXTURE_MIN_FILTER :: GLenum ``` -#### `_DEPTH_ATTACHMENT` +#### `_TEXTURE_WRAP_S` ``` purescript -_DEPTH_ATTACHMENT :: GLenum +_TEXTURE_WRAP_S :: GLenum ``` -#### `_STENCIL_ATTACHMENT` +#### `_TEXTURE_WRAP_T` ``` purescript -_STENCIL_ATTACHMENT :: GLenum +_TEXTURE_WRAP_T :: GLenum ``` -#### `_DEPTH_STENCIL_ATTACHMENT` +#### `_TEXTURE` ``` purescript -_DEPTH_STENCIL_ATTACHMENT :: GLenum +_TEXTURE :: GLenum ``` -#### `_NONE` +#### `_TEXTURE_CUBE_MAP` ``` purescript -_NONE :: GLenum +_TEXTURE_CUBE_MAP :: GLenum ``` -#### `_FRAMEBUFFER_COMPLETE` +#### `_TEXTURE_BINDING_CUBE_MAP` ``` purescript -_FRAMEBUFFER_COMPLETE :: GLenum +_TEXTURE_BINDING_CUBE_MAP :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_ATTACHMENT` +#### `_TEXTURE_CUBE_MAP_POSITIVE_X` ``` purescript -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT` +#### `_TEXTURE_CUBE_MAP_NEGATIVE_X` ``` purescript -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_DIMENSIONS` +#### `_TEXTURE_CUBE_MAP_POSITIVE_Y` ``` purescript -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum ``` -#### `_FRAMEBUFFER_UNSUPPORTED` +#### `_TEXTURE_CUBE_MAP_NEGATIVE_Y` ``` purescript -_FRAMEBUFFER_UNSUPPORTED :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum ``` -#### `_FRAMEBUFFER_BINDING` +#### `_TEXTURE_CUBE_MAP_POSITIVE_Z` ``` purescript -_FRAMEBUFFER_BINDING :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum ``` -#### `_RENDERBUFFER_BINDING` +#### `_TEXTURE_CUBE_MAP_NEGATIVE_Z` ``` purescript -_RENDERBUFFER_BINDING :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum ``` -#### `_MAX_RENDERBUFFER_SIZE` +#### `_MAX_CUBE_MAP_TEXTURE_SIZE` ``` purescript -_MAX_RENDERBUFFER_SIZE :: GLenum +_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum ``` -#### `_INVALID_FRAMEBUFFER_OPERATION` +#### `_TEXTURE0` ``` purescript -_INVALID_FRAMEBUFFER_OPERATION :: GLenum +_TEXTURE0 :: GLenum ``` -#### `_UNPACK_FLIP_Y_WEBGL` +#### `_TEXTURE1` ``` purescript -_UNPACK_FLIP_Y_WEBGL :: GLenum +_TEXTURE1 :: GLenum ``` -#### `_UNPACK_PREMULTIPLY_ALPHA_WEBGL` +#### `_TEXTURE2` ``` purescript -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum +_TEXTURE2 :: GLenum ``` -#### `_CONTEXT_LOST_WEBGL` +#### `_TEXTURE3` ``` purescript -_CONTEXT_LOST_WEBGL :: GLenum +_TEXTURE3 :: GLenum ``` -#### `_UNPACK_COLORSPACE_CONVERSION_WEBGL` +#### `_TEXTURE4` ``` purescript -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum +_TEXTURE4 :: GLenum ``` -#### `_BROWSER_DEFAULT_WEBGL` +#### `_TEXTURE5` ``` purescript -_BROWSER_DEFAULT_WEBGL :: GLenum +_TEXTURE5 :: GLenum ``` -#### `getContextAttributesImpl` +#### `_TEXTURE6` ``` purescript -getContextAttributesImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) +_TEXTURE6 :: GLenum ``` -#### `isContextLostImpl` +#### `_TEXTURE7` ``` purescript -isContextLostImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) +_TEXTURE7 :: GLenum ``` -#### `getSupportedExtensionsImpl` +#### `_TEXTURE8` ``` purescript -getSupportedExtensionsImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) +_TEXTURE8 :: GLenum ``` -#### `getExtensionImpl` +#### `_TEXTURE9` ``` purescript -getExtensionImpl :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) +_TEXTURE9 :: GLenum ``` -#### `activeTextureImpl` +#### `_TEXTURE10` ``` purescript -activeTextureImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE10 :: GLenum ``` -#### `attachShaderImpl` +#### `_TEXTURE11` ``` purescript -attachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE11 :: GLenum ``` -#### `bindAttribLocationImpl` +#### `_TEXTURE12` ``` purescript -bindAttribLocationImpl :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE12 :: GLenum ``` -#### `bindBufferImpl` +#### `_TEXTURE13` ``` purescript -bindBufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE13 :: GLenum ``` -#### `bindFramebufferImpl` +#### `_TEXTURE14` ``` purescript -bindFramebufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE14 :: GLenum ``` -#### `bindRenderbufferImpl` +#### `_TEXTURE15` ``` purescript -bindRenderbufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE15 :: GLenum ``` -#### `bindTextureImpl` +#### `_TEXTURE16` ``` purescript -bindTextureImpl :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE16 :: GLenum ``` -#### `blendColorImpl` +#### `_TEXTURE17` ``` purescript -blendColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE17 :: GLenum ``` -#### `blendEquationImpl` +#### `_TEXTURE18` ``` purescript -blendEquationImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE18 :: GLenum ``` -#### `blendEquationSeparateImpl` +#### `_TEXTURE19` ``` purescript -blendEquationSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE19 :: GLenum ``` -#### `blendFuncImpl` +#### `_TEXTURE20` ``` purescript -blendFuncImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE20 :: GLenum ``` -#### `blendFuncSeparateImpl` +#### `_TEXTURE21` ``` purescript -blendFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE21 :: GLenum ``` -#### `bufferDataImpl` +#### `_TEXTURE22` ``` purescript -bufferDataImpl :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE22 :: GLenum ``` -#### `bufferSubDataImpl` +#### `_TEXTURE23` ``` purescript -bufferSubDataImpl :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE23 :: GLenum ``` -#### `checkFramebufferStatusImpl` +#### `_TEXTURE24` ``` purescript -checkFramebufferStatusImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) +_TEXTURE24 :: GLenum ``` -#### `clearImpl` +#### `_TEXTURE25` ``` purescript -clearImpl :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE25 :: GLenum ``` -#### `clearColorImpl` +#### `_TEXTURE26` ``` purescript -clearColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE26 :: GLenum ``` -#### `clearDepthImpl` +#### `_TEXTURE27` ``` purescript -clearDepthImpl :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE27 :: GLenum ``` -#### `clearStencilImpl` +#### `_TEXTURE28` ``` purescript -clearStencilImpl :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE28 :: GLenum ``` -#### `colorMaskImpl` +#### `_TEXTURE29` ``` purescript -colorMaskImpl :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE29 :: GLenum ``` -#### `compileShaderImpl` +#### `_TEXTURE30` ``` purescript -compileShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE30 :: GLenum ``` -#### `copyTexImage2DImpl` +#### `_TEXTURE31` ``` purescript -copyTexImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) +_TEXTURE31 :: GLenum ``` -#### `copyTexSubImage2DImpl` +#### `_ACTIVE_TEXTURE` ``` purescript -copyTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +_ACTIVE_TEXTURE :: GLenum ``` -#### `createBufferImpl` +#### `_REPEAT` ``` purescript -createBufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) +_REPEAT :: GLenum ``` -#### `createFramebufferImpl` +#### `_CLAMP_TO_EDGE` ``` purescript -createFramebufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) +_CLAMP_TO_EDGE :: GLenum ``` -#### `createProgramImpl` +#### `_MIRRORED_REPEAT` ``` purescript -createProgramImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) +_MIRRORED_REPEAT :: GLenum ``` -#### `createRenderbufferImpl` +#### `_FLOAT_VEC2` ``` purescript -createRenderbufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) +_FLOAT_VEC2 :: GLenum ``` -#### `createShaderImpl` +#### `_FLOAT_VEC3` ``` purescript -createShaderImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) +_FLOAT_VEC3 :: GLenum ``` -#### `createTextureImpl` +#### `_FLOAT_VEC4` ``` purescript -createTextureImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) +_FLOAT_VEC4 :: GLenum ``` -#### `cullFaceImpl` +#### `_INT_VEC2` ``` purescript -cullFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_INT_VEC2 :: GLenum ``` -#### `deleteBufferImpl` +#### `_INT_VEC3` ``` purescript -deleteBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +_INT_VEC3 :: GLenum ``` -#### `deleteFramebufferImpl` +#### `_INT_VEC4` ``` purescript -deleteFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +_INT_VEC4 :: GLenum ``` -#### `deleteProgramImpl` +#### `_BOOL` ``` purescript -deleteProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +_BOOL :: GLenum ``` -#### `deleteRenderbufferImpl` +#### `_BOOL_VEC2` ``` purescript -deleteRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +_BOOL_VEC2 :: GLenum ``` -#### `deleteShaderImpl` +#### `_BOOL_VEC3` ``` purescript -deleteShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +_BOOL_VEC3 :: GLenum ``` -#### `deleteTextureImpl` +#### `_BOOL_VEC4` ``` purescript -deleteTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +_BOOL_VEC4 :: GLenum ``` -#### `depthFuncImpl` +#### `_FLOAT_MAT2` ``` purescript -depthFuncImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_FLOAT_MAT2 :: GLenum ``` -#### `depthMaskImpl` +#### `_FLOAT_MAT3` ``` purescript -depthMaskImpl :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) +_FLOAT_MAT3 :: GLenum ``` -#### `depthRangeImpl` +#### `_FLOAT_MAT4` ``` purescript -depthRangeImpl :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +_FLOAT_MAT4 :: GLenum ``` -#### `detachShaderImpl` +#### `_SAMPLER_2D` ``` purescript -detachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +_SAMPLER_2D :: GLenum ``` -#### `disableImpl` +#### `_SAMPLER_CUBE` ``` purescript -disableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_SAMPLER_CUBE :: GLenum ``` -#### `disableVertexAttribArrayImpl` +#### `_VERTEX_ATTRIB_ARRAY_ENABLED` ``` purescript -disableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum ``` -#### `drawArraysImpl` +#### `_VERTEX_ATTRIB_ARRAY_SIZE` ``` purescript -drawArraysImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum ``` -#### `drawElementsImpl` +#### `_VERTEX_ATTRIB_ARRAY_STRIDE` ``` purescript -drawElementsImpl :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum ``` -#### `enableImpl` +#### `_VERTEX_ATTRIB_ARRAY_TYPE` ``` purescript -enableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum ``` -#### `enableVertexAttribArrayImpl` +#### `_VERTEX_ATTRIB_ARRAY_NORMALIZED` ``` purescript -enableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum ``` -#### `finishImpl` +#### `_VERTEX_ATTRIB_ARRAY_POINTER` ``` purescript -finishImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum ``` -#### `flushImpl` +#### `_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING` ``` purescript -flushImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum ``` -#### `framebufferRenderbufferImpl` +#### `_COMPILE_STATUS` ``` purescript -framebufferRenderbufferImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +_COMPILE_STATUS :: GLenum ``` -#### `framebufferTexture2DImpl` +#### `_INFO_LOG_LENGTH` ``` purescript -framebufferTexture2DImpl :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) +_INFO_LOG_LENGTH :: GLenum ``` -#### `frontFaceImpl` +#### `_SHADER_SOURCE_LENGTH` ``` purescript -frontFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_SHADER_SOURCE_LENGTH :: GLenum ``` -#### `generateMipmapImpl` +#### `_LOW_FLOAT` ``` purescript -generateMipmapImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +_LOW_FLOAT :: GLenum ``` -#### `getActiveAttribImpl` +#### `_MEDIUM_FLOAT` ``` purescript -getActiveAttribImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +_MEDIUM_FLOAT :: GLenum ``` -#### `getActiveUniformImpl` +#### `_HIGH_FLOAT` ``` purescript -getActiveUniformImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +_HIGH_FLOAT :: GLenum ``` -#### `getAttachedShadersImpl` +#### `_LOW_INT` ``` purescript -getAttachedShadersImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) +_LOW_INT :: GLenum ``` -#### `getAttribLocationImpl` +#### `_MEDIUM_INT` ``` purescript -getAttribLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) +_MEDIUM_INT :: GLenum ``` -#### `getParameterImpl` +#### `_HIGH_INT` ``` purescript -getParameterImpl :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) +_HIGH_INT :: GLenum ``` -#### `getBufferParameterImpl` +#### `_FRAMEBUFFER` ``` purescript -getBufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +_FRAMEBUFFER :: GLenum ``` -#### `getErrorImpl` +#### `_RENDERBUFFER` ``` purescript -getErrorImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) +_RENDERBUFFER :: GLenum ``` -#### `getFramebufferAttachmentParameterImpl` +#### `_RGBA4` ``` purescript -getFramebufferAttachmentParameterImpl :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) +_RGBA4 :: GLenum ``` -#### `getProgramParameterImpl` +#### `_RGB5_A1` ``` purescript -getProgramParameterImpl :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) +_RGB5_A1 :: GLenum ``` -#### `getProgramInfoLogImpl` +#### `_RGB565` ``` purescript -getProgramInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) +_RGB565 :: GLenum ``` -#### `getRenderbufferParameterImpl` +#### `_DEPTH_COMPONENT16` ``` purescript -getRenderbufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +_DEPTH_COMPONENT16 :: GLenum ``` -#### `getShaderParameterImpl` +#### `_STENCIL_INDEX` ``` purescript -getShaderParameterImpl :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) +_STENCIL_INDEX :: GLenum ``` -#### `getShaderInfoLogImpl` +#### `_STENCIL_INDEX8` ``` purescript -getShaderInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +_STENCIL_INDEX8 :: GLenum ``` -#### `getShaderSourceImpl` +#### `_DEPTH_STENCIL` ``` purescript -getShaderSourceImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +_DEPTH_STENCIL :: GLenum ``` -#### `getTexParameterImpl` +#### `_RENDERBUFFER_WIDTH` ``` purescript -getTexParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +_RENDERBUFFER_WIDTH :: GLenum ``` -#### `getUniformImpl` +#### `_RENDERBUFFER_HEIGHT` ``` purescript -getUniformImpl :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) +_RENDERBUFFER_HEIGHT :: GLenum ``` -#### `getUniformLocationImpl` +#### `_RENDERBUFFER_INTERNAL_FORMAT` ``` purescript -getUniformLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) +_RENDERBUFFER_INTERNAL_FORMAT :: GLenum ``` -#### `getVertexAttribImpl` +#### `_RENDERBUFFER_RED_SIZE` ``` purescript -getVertexAttribImpl :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) +_RENDERBUFFER_RED_SIZE :: GLenum ``` -#### `getVertexAttribOffsetImpl` +#### `_RENDERBUFFER_GREEN_SIZE` ``` purescript -getVertexAttribOffsetImpl :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) +_RENDERBUFFER_GREEN_SIZE :: GLenum ``` -#### `hintImpl` +#### `_RENDERBUFFER_BLUE_SIZE` ``` purescript -hintImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_RENDERBUFFER_BLUE_SIZE :: GLenum ``` -#### `isBufferImpl` +#### `_RENDERBUFFER_ALPHA_SIZE` ``` purescript -isBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) +_RENDERBUFFER_ALPHA_SIZE :: GLenum ``` -#### `isEnabledImpl` +#### `_RENDERBUFFER_DEPTH_SIZE` ``` purescript -isEnabledImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) +_RENDERBUFFER_DEPTH_SIZE :: GLenum ``` -#### `isFramebufferImpl` +#### `_RENDERBUFFER_STENCIL_SIZE` ``` purescript -isFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) +_RENDERBUFFER_STENCIL_SIZE :: GLenum ``` -#### `isProgramImpl` +#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE` ``` purescript -isProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum ``` -#### `isRenderbufferImpl` +#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME` ``` purescript -isRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum ``` -#### `isShaderImpl` +#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL` ``` purescript -isShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum ``` -#### `isTextureImpl` +#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE` ``` purescript -isTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum ``` -#### `lineWidthImpl` +#### `_COLOR_ATTACHMENT0` ``` purescript -lineWidthImpl :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) +_COLOR_ATTACHMENT0 :: GLenum ``` -#### `linkProgramImpl` +#### `_DEPTH_ATTACHMENT` ``` purescript -linkProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +_DEPTH_ATTACHMENT :: GLenum ``` -#### `pixelStoreiImpl` +#### `_STENCIL_ATTACHMENT` ``` purescript -pixelStoreiImpl :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +_STENCIL_ATTACHMENT :: GLenum ``` -#### `polygonOffsetImpl` +#### `_DEPTH_STENCIL_ATTACHMENT` ``` purescript -polygonOffsetImpl :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +_DEPTH_STENCIL_ATTACHMENT :: GLenum ``` -#### `readPixelsImpl` +#### `_NONE` ``` purescript -readPixelsImpl :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +_NONE :: GLenum ``` -#### `renderbufferStorageImpl` +#### `_FRAMEBUFFER_COMPLETE` ``` purescript -renderbufferStorageImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_COMPLETE :: GLenum ``` -#### `sampleCoverageImpl` +#### `_FRAMEBUFFER_INCOMPLETE_ATTACHMENT` ``` purescript -sampleCoverageImpl :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum ``` -#### `scissorImpl` +#### `_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT` ``` purescript -scissorImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum ``` -#### `shaderSourceImpl` +#### `_FRAMEBUFFER_INCOMPLETE_DIMENSIONS` ``` purescript -shaderSourceImpl :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum ``` -#### `stencilFuncImpl` +#### `_FRAMEBUFFER_UNSUPPORTED` ``` purescript -stencilFuncImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_UNSUPPORTED :: GLenum ``` -#### `stencilFuncSeparateImpl` +#### `_FRAMEBUFFER_BINDING` ``` purescript -stencilFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +_FRAMEBUFFER_BINDING :: GLenum ``` -#### `stencilMaskImpl` +#### `_RENDERBUFFER_BINDING` ``` purescript -stencilMaskImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +_RENDERBUFFER_BINDING :: GLenum ``` -#### `stencilMaskSeparateImpl` +#### `_MAX_RENDERBUFFER_SIZE` ``` purescript -stencilMaskSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) +_MAX_RENDERBUFFER_SIZE :: GLenum ``` -#### `stencilOpImpl` +#### `_INVALID_FRAMEBUFFER_OPERATION` ``` purescript -stencilOpImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_INVALID_FRAMEBUFFER_OPERATION :: GLenum ``` -#### `stencilOpSeparateImpl` +#### `_UNPACK_FLIP_Y_WEBGL` ``` purescript -stencilOpSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +_UNPACK_FLIP_Y_WEBGL :: GLenum ``` -#### `texImage2DImpl` +#### `_UNPACK_PREMULTIPLY_ALPHA_WEBGL` ``` purescript -texImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum ``` -#### `texParameterfImpl` +#### `_CONTEXT_LOST_WEBGL` ``` purescript -texParameterfImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) +_CONTEXT_LOST_WEBGL :: GLenum ``` -#### `texParameteriImpl` +#### `_UNPACK_COLORSPACE_CONVERSION_WEBGL` ``` purescript -texParameteriImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum ``` -#### `texSubImage2DImpl` +#### `_BROWSER_DEFAULT_WEBGL` ``` purescript -texSubImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +_BROWSER_DEFAULT_WEBGL :: GLenum ``` -#### `uniform1fImpl` -``` purescript -uniform1fImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) -``` +## Module Graphics.WebGL.Raw.Types -#### `uniform1fvImpl` +#### `DOMString` ``` purescript -uniform1fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +type DOMString = String ``` -#### `uniform1iImpl` +#### `FloatArray` ``` purescript -uniform1iImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) +type FloatArray = Float32Array ``` -#### `uniform1ivImpl` +#### `GLbitfield` ``` purescript -uniform1ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +type GLbitfield = Number ``` -#### `uniform2fImpl` +#### `GLboolean` ``` purescript -uniform2fImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +type GLboolean = Boolean ``` -#### `uniform2fvImpl` +#### `GLbyte` ``` purescript -uniform2fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +type GLbyte = Number ``` -#### `uniform2iImpl` +#### `GLclampf` ``` purescript -uniform2iImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) +type GLclampf = Number ``` -#### `uniform2ivImpl` +#### `GLenum` ``` purescript -uniform2ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +type GLenum = Number ``` -#### `uniform3fImpl` +#### `GLfloat` ``` purescript -uniform3fImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +type GLfloat = Number ``` -#### `uniform3fvImpl` +#### `GLint` ``` purescript -uniform3fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +type GLint = Number ``` -#### `uniform3iImpl` +#### `GLintptr` ``` purescript -uniform3iImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +type GLintptr = Number ``` -#### `uniform3ivImpl` +#### `GLshort` ``` purescript -uniform3ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +type GLshort = Number ``` -#### `uniform4fImpl` +#### `GLsizei` ``` purescript -uniform4fImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +type GLsizei = Number ``` -#### `uniform4fvImpl` +#### `GLsizeiptr` ``` purescript -uniform4fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +type GLsizeiptr = Number ``` -#### `uniform4iImpl` +#### `GLubyte` ``` purescript -uniform4iImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +type GLubyte = Number ``` -#### `uniform4ivImpl` +#### `GLuint` ``` purescript -uniform4ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +type GLuint = Number ``` -#### `uniformMatrix2fvImpl` +#### `GLushort` ``` purescript -uniformMatrix2fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +type GLushort = Number ``` -#### `uniformMatrix3fvImpl` +#### `ArrayBufferView` ``` purescript -uniformMatrix3fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +data ArrayBufferView :: * ``` -#### `uniformMatrix4fvImpl` +#### `HTMLImageElement` ``` purescript -uniformMatrix4fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +data HTMLImageElement :: * ``` -#### `useProgramImpl` +#### `HTMLVideoElement` ``` purescript -useProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +data HTMLVideoElement :: * ``` -#### `validateProgramImpl` +#### `ImageData` ``` purescript -validateProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +data ImageData :: * ``` -#### `vertexAttrib1fImpl` +#### `WebGLActiveInfo` ``` purescript -vertexAttrib1fImpl :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) +data WebGLActiveInfo :: * ``` -#### `vertexAttrib1fvImpl` +#### `WebGLBuffer` ``` purescript -vertexAttrib1fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +data WebGLBuffer :: * ``` -#### `vertexAttrib2fImpl` +#### `WebGLContext` ``` purescript -vertexAttrib2fImpl :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +data WebGLContext :: * ``` -#### `vertexAttrib2fvImpl` +#### `WebGLContextAttributes` ``` purescript -vertexAttrib2fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +data WebGLContextAttributes :: * ``` -#### `vertexAttrib3fImpl` +#### `WebGLFramebuffer` ``` purescript -vertexAttrib3fImpl :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +data WebGLFramebuffer :: * ``` -#### `vertexAttrib3fvImpl` +#### `WebGLProgram` ``` purescript -vertexAttrib3fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +data WebGLProgram :: * ``` -#### `vertexAttrib4fImpl` +#### `WebGLRenderbuffer` ``` purescript -vertexAttrib4fImpl :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +data WebGLRenderbuffer :: * ``` -#### `vertexAttrib4fvImpl` +#### `WebGLShader` ``` purescript -vertexAttrib4fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +data WebGLShader :: * ``` -#### `vertexAttribPointerImpl` +#### `WebGLTexture` ``` purescript -vertexAttribPointerImpl :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) +data WebGLTexture :: * ``` -#### `viewportImpl` +#### `WebGLUniformLocation` ``` purescript -viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +data WebGLUniformLocation :: * ``` \ No newline at end of file diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 7bda5ea..370fc1d 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -1,6 +1,10 @@ {-# LANGUAGE OverloadedStrings #-} -module IDL.Printer (ppPureScriptFFI) where +module IDL.Printer +( typesFFI +, enumsFFI +, funcsFFI +) where import Data.List (sort) import Data.Maybe (isNothing) @@ -10,32 +14,66 @@ import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, import IDL.AST -ppPureScriptFFI :: IDL -> Doc -ppPureScriptFFI idl = - header $+$ blankLine $+$ typeDecls $+$ blankLine $+$ constants $+$ methods +typesFFI :: IDL -> Doc +typesFFI idl = + generatedWarning $+$ blankLine $+$ + header $+$ blankLine $+$ + typeDefs $+$ blankLine $+$ + typeDecls $+$ blankLine where - header = vcat $ moduleHeader ++ [""] ++ typedefs ++ [""] ++ effects typeDecls = vcat . map ppTypeDecl . sort $ types idl + header = vcat + [ "module Graphics.WebGL.Raw.Types where" + , "" + , "import Data.ArrayBuffer.Types (Float32Array ())" + ] + +enumsFFI :: IDL -> Doc +enumsFFI idl = + generatedWarning $+$ blankLine $+$ + header $+$ blankLine $+$ + constants $+$ blankLine + where constants = vcat . map ppConstant $ enums idl + header = vcat + [ "module Graphics.WebGL.Raw.Enums where" + , "" + , "import Graphics.WebGL.Raw.Types (GLenum ())" + ] + +funcsFFI :: IDL -> Doc +funcsFFI idl = + generatedWarning $+$ blankLine $+$ + header $+$ blankLine $+$ + methods $+$ blankLine + where methods = vcat . map ppFuncImpl $ functions idl + header = vcat + [ "-- This file is automatically generated! Don't edit this file, but" + , "-- instead modify purescript-webgl-generator." + , "" + , "module Graphics.WebGL.Raw where" + , "" + , "import Control.Monad.Eff" + , "import Data.ArrayBuffer.Types" + , "import Data.TypedArray" + , "import Data.Function" + , "import Graphics.WebGL.Raw.Enums" + , "import Graphics.WebGL.Raw.Types" + , "" + , "foreign import data WebGL :: !" + ] -- predefined text -moduleHeader :: [Doc] -moduleHeader = +generatedWarning :: Doc +generatedWarning = vcat [ "-- This file is automatically generated! Don't edit this file, but" , "-- instead modify purescript-webgl-generator." - , "" - , "module Graphics.WebGL.Raw where" - , "" - , "import Control.Monad.Eff" - , "import Data.ArrayBuffer.Types" - , "import Data.TypedArray" - , "import Data.Function" ] -typedefs :: [Doc] -typedefs = +typeDefs :: Doc +typeDefs = vcat [ "type DOMString = String" , "type FloatArray = Float32Array" , "type GLbitfield = Number" @@ -54,9 +92,6 @@ typedefs = , "type GLushort = Number" ] -effects :: [Doc] -effects = ["foreign import data WebGL :: !"] - -- component pretty-printers ppConstant :: Decl -> Doc diff --git a/generator/Main.hs b/generator/Main.hs index 46033ff..b760837 100644 --- a/generator/Main.hs +++ b/generator/Main.hs @@ -2,6 +2,7 @@ module Main (main) where import System.Environment (getArgs) import System.Exit (exitSuccess) +import System.IO (writeFile) import Debug.Trace (trace) import Text.PrettyPrint (render) @@ -12,12 +13,12 @@ import IDL.AST import IDL.Parser import IDL.Printer -main :: IO () -main = getArgs >>= getFilepath >>= readFile >>= runParser - noIdlError :: String noIdlError = "WebGL generator requires input IDL file" +main :: IO () +main = getArgs >>= getFilepath >>= readFile >>= runParser + getFilepath :: [String] -> IO String getFilepath (fp:_) = return fp getFilepath _ = putStrLn noIdlError >> exitSuccess @@ -26,4 +27,10 @@ runParser :: String -> IO () runParser body = case PP.runParser parseIdl () "" body of Left err -> mapM_ (putStrLn . PP.messageString) (PP.errorMessages err) - Right idl -> putStr . render $ ppPureScriptFFI idl + Right idl -> printFiles idl + +printFiles :: IDL -> IO () +printFiles idl = do + writeFile "src/Graphics/WebGL/Raw/Types.purs" . render $ typesFFI idl + writeFile "src/Graphics/WebGL/Raw/Enums.purs" . render $ enumsFFI idl + writeFile "src/Graphics/WebGL/Raw.purs" . render $ funcsFFI idl diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index 9f1ee0b..d18b0fc 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -1,947 +1,20 @@ -- This file is automatically generated! Don't edit this file, but -- instead modify purescript-webgl-generator. +-- This file is automatically generated! Don't edit this file, but +-- instead modify purescript-webgl-generator. + module Graphics.WebGL.Raw where import Control.Monad.Eff import Data.ArrayBuffer.Types import Data.TypedArray import Data.Function - -type DOMString = String -type FloatArray = Float32Array -type GLbitfield = Number -type GLboolean = Boolean -type GLbyte = Number -type GLclampf = Number -type GLenum = Number -type GLfloat = Number -type GLint = Number -type GLintptr = Number -type GLshort = Number -type GLsizei = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLuint = Number -type GLushort = Number +import Graphics.WebGL.Raw.Enums +import Graphics.WebGL.Raw.Types foreign import data WebGL :: ! -foreign import data ArrayBufferView :: * -foreign import data HTMLImageElement :: * -foreign import data HTMLVideoElement :: * -foreign import data ImageData :: * -foreign import data WebGLActiveInfo :: * -foreign import data WebGLBuffer :: * -foreign import data WebGLContext :: * -foreign import data WebGLContextAttributes :: * -foreign import data WebGLFramebuffer :: * -foreign import data WebGLProgram :: * -foreign import data WebGLRenderbuffer :: * -foreign import data WebGLShader :: * -foreign import data WebGLTexture :: * -foreign import data WebGLUniformLocation :: * - -_DEPTH_BUFFER_BIT :: GLenum -_DEPTH_BUFFER_BIT = 256 - -_STENCIL_BUFFER_BIT :: GLenum -_STENCIL_BUFFER_BIT = 1024 - -_COLOR_BUFFER_BIT :: GLenum -_COLOR_BUFFER_BIT = 16384 - -_POINTS :: GLenum -_POINTS = 0 - -_LINES :: GLenum -_LINES = 1 - -_LINE_LOOP :: GLenum -_LINE_LOOP = 2 - -_LINE_STRIP :: GLenum -_LINE_STRIP = 3 - -_TRIANGLES :: GLenum -_TRIANGLES = 4 - -_TRIANGLE_STRIP :: GLenum -_TRIANGLE_STRIP = 5 - -_TRIANGLE_FAN :: GLenum -_TRIANGLE_FAN = 6 - -_ZERO :: GLenum -_ZERO = 0 - -_ONE :: GLenum -_ONE = 1 - -_SRC_COLOR :: GLenum -_SRC_COLOR = 768 - -_ONE_MINUS_SRC_COLOR :: GLenum -_ONE_MINUS_SRC_COLOR = 769 - -_SRC_ALPHA :: GLenum -_SRC_ALPHA = 770 - -_ONE_MINUS_SRC_ALPHA :: GLenum -_ONE_MINUS_SRC_ALPHA = 771 - -_DST_ALPHA :: GLenum -_DST_ALPHA = 772 - -_ONE_MINUS_DST_ALPHA :: GLenum -_ONE_MINUS_DST_ALPHA = 773 - -_DST_COLOR :: GLenum -_DST_COLOR = 774 - -_ONE_MINUS_DST_COLOR :: GLenum -_ONE_MINUS_DST_COLOR = 775 - -_SRC_ALPHA_SATURATE :: GLenum -_SRC_ALPHA_SATURATE = 776 - -_FUNC_ADD :: GLenum -_FUNC_ADD = 32774 - -_BLEND_EQUATION :: GLenum -_BLEND_EQUATION = 32777 - -_BLEND_EQUATION_RGB :: GLenum -_BLEND_EQUATION_RGB = 32777 - -_BLEND_EQUATION_ALPHA :: GLenum -_BLEND_EQUATION_ALPHA = 34877 - -_FUNC_SUBTRACT :: GLenum -_FUNC_SUBTRACT = 32778 - -_FUNC_REVERSE_SUBTRACT :: GLenum -_FUNC_REVERSE_SUBTRACT = 32779 - -_BLEND_DST_RGB :: GLenum -_BLEND_DST_RGB = 32968 - -_BLEND_SRC_RGB :: GLenum -_BLEND_SRC_RGB = 32969 - -_BLEND_DST_ALPHA :: GLenum -_BLEND_DST_ALPHA = 32970 - -_BLEND_SRC_ALPHA :: GLenum -_BLEND_SRC_ALPHA = 32971 - -_CONSTANT_COLOR :: GLenum -_CONSTANT_COLOR = 32769 - -_ONE_MINUS_CONSTANT_COLOR :: GLenum -_ONE_MINUS_CONSTANT_COLOR = 32770 - -_CONSTANT_ALPHA :: GLenum -_CONSTANT_ALPHA = 32771 - -_ONE_MINUS_CONSTANT_ALPHA :: GLenum -_ONE_MINUS_CONSTANT_ALPHA = 32772 - -_BLEND_COLOR :: GLenum -_BLEND_COLOR = 32773 - -_ARRAY_BUFFER :: GLenum -_ARRAY_BUFFER = 34962 - -_ELEMENT_ARRAY_BUFFER :: GLenum -_ELEMENT_ARRAY_BUFFER = 34963 - -_ARRAY_BUFFER_BINDING :: GLenum -_ARRAY_BUFFER_BINDING = 34964 - -_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum -_ELEMENT_ARRAY_BUFFER_BINDING = 34965 - -_STREAM_DRAW :: GLenum -_STREAM_DRAW = 35040 - -_STATIC_DRAW :: GLenum -_STATIC_DRAW = 35044 - -_DYNAMIC_DRAW :: GLenum -_DYNAMIC_DRAW = 35048 - -_BUFFER_SIZE :: GLenum -_BUFFER_SIZE = 34660 - -_BUFFER_USAGE :: GLenum -_BUFFER_USAGE = 34661 - -_CURRENT_VERTEX_ATTRIB :: GLenum -_CURRENT_VERTEX_ATTRIB = 34342 - -_FRONT :: GLenum -_FRONT = 1028 - -_BACK :: GLenum -_BACK = 1029 - -_FRONT_AND_BACK :: GLenum -_FRONT_AND_BACK = 1032 - -_TEXTURE_2D :: GLenum -_TEXTURE_2D = 3553 - -_CULL_FACE :: GLenum -_CULL_FACE = 2884 - -_BLEND :: GLenum -_BLEND = 3042 - -_DITHER :: GLenum -_DITHER = 3024 - -_STENCIL_TEST :: GLenum -_STENCIL_TEST = 2960 - -_DEPTH_TEST :: GLenum -_DEPTH_TEST = 2929 - -_SCISSOR_TEST :: GLenum -_SCISSOR_TEST = 3089 - -_POLYGON_OFFSET_FILL :: GLenum -_POLYGON_OFFSET_FILL = 32823 - -_SAMPLE_ALPHA_TO_COVERAGE :: GLenum -_SAMPLE_ALPHA_TO_COVERAGE = 32926 - -_SAMPLE_COVERAGE :: GLenum -_SAMPLE_COVERAGE = 32928 - -_NO_ERROR :: GLenum -_NO_ERROR = 0 - -_INVALID_ENUM :: GLenum -_INVALID_ENUM = 1280 - -_INVALID_VALUE :: GLenum -_INVALID_VALUE = 1281 - -_INVALID_OPERATION :: GLenum -_INVALID_OPERATION = 1282 - -_OUT_OF_MEMORY :: GLenum -_OUT_OF_MEMORY = 1285 - -_CW :: GLenum -_CW = 2304 - -_CCW :: GLenum -_CCW = 2305 - -_LINE_WIDTH :: GLenum -_LINE_WIDTH = 2849 - -_ALIASED_POINT_SIZE_RANGE :: GLenum -_ALIASED_POINT_SIZE_RANGE = 33901 - -_ALIASED_LINE_WIDTH_RANGE :: GLenum -_ALIASED_LINE_WIDTH_RANGE = 33902 - -_CULL_FACE_MODE :: GLenum -_CULL_FACE_MODE = 2885 - -_FRONT_FACE :: GLenum -_FRONT_FACE = 2886 - -_DEPTH_RANGE :: GLenum -_DEPTH_RANGE = 2928 - -_DEPTH_WRITEMASK :: GLenum -_DEPTH_WRITEMASK = 2930 - -_DEPTH_CLEAR_VALUE :: GLenum -_DEPTH_CLEAR_VALUE = 2931 - -_DEPTH_FUNC :: GLenum -_DEPTH_FUNC = 2932 - -_STENCIL_CLEAR_VALUE :: GLenum -_STENCIL_CLEAR_VALUE = 2961 - -_STENCIL_FUNC :: GLenum -_STENCIL_FUNC = 2962 - -_STENCIL_FAIL :: GLenum -_STENCIL_FAIL = 2964 - -_STENCIL_PASS_DEPTH_FAIL :: GLenum -_STENCIL_PASS_DEPTH_FAIL = 2965 - -_STENCIL_PASS_DEPTH_PASS :: GLenum -_STENCIL_PASS_DEPTH_PASS = 2966 - -_STENCIL_REF :: GLenum -_STENCIL_REF = 2967 - -_STENCIL_VALUE_MASK :: GLenum -_STENCIL_VALUE_MASK = 2963 - -_STENCIL_WRITEMASK :: GLenum -_STENCIL_WRITEMASK = 2968 - -_STENCIL_BACK_FUNC :: GLenum -_STENCIL_BACK_FUNC = 34816 - -_STENCIL_BACK_FAIL :: GLenum -_STENCIL_BACK_FAIL = 34817 - -_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum -_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 - -_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum -_STENCIL_BACK_PASS_DEPTH_PASS = 34819 - -_STENCIL_BACK_REF :: GLenum -_STENCIL_BACK_REF = 36003 - -_STENCIL_BACK_VALUE_MASK :: GLenum -_STENCIL_BACK_VALUE_MASK = 36004 - -_STENCIL_BACK_WRITEMASK :: GLenum -_STENCIL_BACK_WRITEMASK = 36005 - -_VIEWPORT :: GLenum -_VIEWPORT = 2978 - -_SCISSOR_BOX :: GLenum -_SCISSOR_BOX = 3088 - -_COLOR_CLEAR_VALUE :: GLenum -_COLOR_CLEAR_VALUE = 3106 - -_COLOR_WRITEMASK :: GLenum -_COLOR_WRITEMASK = 3107 - -_UNPACK_ALIGNMENT :: GLenum -_UNPACK_ALIGNMENT = 3317 - -_PACK_ALIGNMENT :: GLenum -_PACK_ALIGNMENT = 3333 - -_MAX_TEXTURE_SIZE :: GLenum -_MAX_TEXTURE_SIZE = 3379 - -_MAX_VIEWPORT_DIMS :: GLenum -_MAX_VIEWPORT_DIMS = 3386 - -_SUBPIXEL_BITS :: GLenum -_SUBPIXEL_BITS = 3408 - -_RED_BITS :: GLenum -_RED_BITS = 3410 - -_GREEN_BITS :: GLenum -_GREEN_BITS = 3411 - -_BLUE_BITS :: GLenum -_BLUE_BITS = 3412 - -_ALPHA_BITS :: GLenum -_ALPHA_BITS = 3413 - -_DEPTH_BITS :: GLenum -_DEPTH_BITS = 3414 - -_STENCIL_BITS :: GLenum -_STENCIL_BITS = 3415 - -_POLYGON_OFFSET_UNITS :: GLenum -_POLYGON_OFFSET_UNITS = 10752 - -_POLYGON_OFFSET_FACTOR :: GLenum -_POLYGON_OFFSET_FACTOR = 32824 - -_TEXTURE_BINDING_2D :: GLenum -_TEXTURE_BINDING_2D = 32873 - -_SAMPLE_BUFFERS :: GLenum -_SAMPLE_BUFFERS = 32936 - -_SAMPLES :: GLenum -_SAMPLES = 32937 - -_SAMPLE_COVERAGE_VALUE :: GLenum -_SAMPLE_COVERAGE_VALUE = 32938 - -_SAMPLE_COVERAGE_INVERT :: GLenum -_SAMPLE_COVERAGE_INVERT = 32939 - -_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum -_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 - -_COMPRESSED_TEXTURE_FORMATS :: GLenum -_COMPRESSED_TEXTURE_FORMATS = 34467 - -_DONT_CARE :: GLenum -_DONT_CARE = 4352 - -_FASTEST :: GLenum -_FASTEST = 4353 - -_NICEST :: GLenum -_NICEST = 4354 - -_GENERATE_MIPMAP_HINT :: GLenum -_GENERATE_MIPMAP_HINT = 33170 - -_BYTE :: GLenum -_BYTE = 5120 - -_UNSIGNED_BYTE :: GLenum -_UNSIGNED_BYTE = 5121 - -_SHORT :: GLenum -_SHORT = 5122 - -_UNSIGNED_SHORT :: GLenum -_UNSIGNED_SHORT = 5123 - -_INT :: GLenum -_INT = 5124 - -_UNSIGNED_INT :: GLenum -_UNSIGNED_INT = 5125 - -_FLOAT :: GLenum -_FLOAT = 5126 - -_DEPTH_COMPONENT :: GLenum -_DEPTH_COMPONENT = 6402 - -_ALPHA :: GLenum -_ALPHA = 6406 - -_RGB :: GLenum -_RGB = 6407 - -_RGBA :: GLenum -_RGBA = 6408 - -_LUMINANCE :: GLenum -_LUMINANCE = 6409 - -_LUMINANCE_ALPHA :: GLenum -_LUMINANCE_ALPHA = 6410 - -_UNSIGNED_SHORT_4_4_4_4 :: GLenum -_UNSIGNED_SHORT_4_4_4_4 = 32819 - -_UNSIGNED_SHORT_5_5_5_1 :: GLenum -_UNSIGNED_SHORT_5_5_5_1 = 32820 - -_UNSIGNED_SHORT_5_6_5 :: GLenum -_UNSIGNED_SHORT_5_6_5 = 33635 - -_FRAGMENT_SHADER :: GLenum -_FRAGMENT_SHADER = 35632 - -_VERTEX_SHADER :: GLenum -_VERTEX_SHADER = 35633 - -_MAX_VERTEX_ATTRIBS :: GLenum -_MAX_VERTEX_ATTRIBS = 34921 - -_MAX_VERTEX_UNIFORM_VECTORS :: GLenum -_MAX_VERTEX_UNIFORM_VECTORS = 36347 - -_MAX_VARYING_VECTORS :: GLenum -_MAX_VARYING_VECTORS = 36348 - -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 - -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 - -_MAX_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_TEXTURE_IMAGE_UNITS = 34930 - -_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum -_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 - -_SHADER_TYPE :: GLenum -_SHADER_TYPE = 35663 - -_DELETE_STATUS :: GLenum -_DELETE_STATUS = 35712 - -_LINK_STATUS :: GLenum -_LINK_STATUS = 35714 - -_VALIDATE_STATUS :: GLenum -_VALIDATE_STATUS = 35715 - -_ATTACHED_SHADERS :: GLenum -_ATTACHED_SHADERS = 35717 - -_ACTIVE_UNIFORMS :: GLenum -_ACTIVE_UNIFORMS = 35718 - -_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum -_ACTIVE_UNIFORM_MAX_LENGTH = 35719 - -_ACTIVE_ATTRIBUTES :: GLenum -_ACTIVE_ATTRIBUTES = 35721 - -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum -_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 - -_SHADING_LANGUAGE_VERSION :: GLenum -_SHADING_LANGUAGE_VERSION = 35724 - -_CURRENT_PROGRAM :: GLenum -_CURRENT_PROGRAM = 35725 - -_NEVER :: GLenum -_NEVER = 512 - -_LESS :: GLenum -_LESS = 513 - -_EQUAL :: GLenum -_EQUAL = 514 - -_LEQUAL :: GLenum -_LEQUAL = 515 - -_GREATER :: GLenum -_GREATER = 516 - -_NOTEQUAL :: GLenum -_NOTEQUAL = 517 - -_GEQUAL :: GLenum -_GEQUAL = 518 - -_ALWAYS :: GLenum -_ALWAYS = 519 - -_KEEP :: GLenum -_KEEP = 7680 - -_REPLACE :: GLenum -_REPLACE = 7681 - -_INCR :: GLenum -_INCR = 7682 - -_DECR :: GLenum -_DECR = 7683 - -_INVERT :: GLenum -_INVERT = 5386 - -_INCR_WRAP :: GLenum -_INCR_WRAP = 34055 - -_DECR_WRAP :: GLenum -_DECR_WRAP = 34056 - -_VENDOR :: GLenum -_VENDOR = 7936 - -_RENDERER :: GLenum -_RENDERER = 7937 - -_VERSION :: GLenum -_VERSION = 7938 - -_NEAREST :: GLenum -_NEAREST = 9728 - -_LINEAR :: GLenum -_LINEAR = 9729 - -_NEAREST_MIPMAP_NEAREST :: GLenum -_NEAREST_MIPMAP_NEAREST = 9984 - -_LINEAR_MIPMAP_NEAREST :: GLenum -_LINEAR_MIPMAP_NEAREST = 9985 - -_NEAREST_MIPMAP_LINEAR :: GLenum -_NEAREST_MIPMAP_LINEAR = 9986 - -_LINEAR_MIPMAP_LINEAR :: GLenum -_LINEAR_MIPMAP_LINEAR = 9987 - -_TEXTURE_MAG_FILTER :: GLenum -_TEXTURE_MAG_FILTER = 10240 - -_TEXTURE_MIN_FILTER :: GLenum -_TEXTURE_MIN_FILTER = 10241 - -_TEXTURE_WRAP_S :: GLenum -_TEXTURE_WRAP_S = 10242 - -_TEXTURE_WRAP_T :: GLenum -_TEXTURE_WRAP_T = 10243 - -_TEXTURE :: GLenum -_TEXTURE = 5890 - -_TEXTURE_CUBE_MAP :: GLenum -_TEXTURE_CUBE_MAP = 34067 - -_TEXTURE_BINDING_CUBE_MAP :: GLenum -_TEXTURE_BINDING_CUBE_MAP = 34068 - -_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 - -_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 - -_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 - -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 - -_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 - -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 - -_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum -_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 - -_TEXTURE0 :: GLenum -_TEXTURE0 = 33984 - -_TEXTURE1 :: GLenum -_TEXTURE1 = 33985 - -_TEXTURE2 :: GLenum -_TEXTURE2 = 33986 - -_TEXTURE3 :: GLenum -_TEXTURE3 = 33987 - -_TEXTURE4 :: GLenum -_TEXTURE4 = 33988 - -_TEXTURE5 :: GLenum -_TEXTURE5 = 33989 - -_TEXTURE6 :: GLenum -_TEXTURE6 = 33990 - -_TEXTURE7 :: GLenum -_TEXTURE7 = 33991 - -_TEXTURE8 :: GLenum -_TEXTURE8 = 33992 - -_TEXTURE9 :: GLenum -_TEXTURE9 = 33993 - -_TEXTURE10 :: GLenum -_TEXTURE10 = 33994 - -_TEXTURE11 :: GLenum -_TEXTURE11 = 33995 - -_TEXTURE12 :: GLenum -_TEXTURE12 = 33996 - -_TEXTURE13 :: GLenum -_TEXTURE13 = 33997 - -_TEXTURE14 :: GLenum -_TEXTURE14 = 33998 - -_TEXTURE15 :: GLenum -_TEXTURE15 = 33999 - -_TEXTURE16 :: GLenum -_TEXTURE16 = 34000 - -_TEXTURE17 :: GLenum -_TEXTURE17 = 34001 - -_TEXTURE18 :: GLenum -_TEXTURE18 = 34002 - -_TEXTURE19 :: GLenum -_TEXTURE19 = 34003 - -_TEXTURE20 :: GLenum -_TEXTURE20 = 34004 - -_TEXTURE21 :: GLenum -_TEXTURE21 = 34005 - -_TEXTURE22 :: GLenum -_TEXTURE22 = 34006 - -_TEXTURE23 :: GLenum -_TEXTURE23 = 34007 - -_TEXTURE24 :: GLenum -_TEXTURE24 = 34008 - -_TEXTURE25 :: GLenum -_TEXTURE25 = 34009 - -_TEXTURE26 :: GLenum -_TEXTURE26 = 34010 - -_TEXTURE27 :: GLenum -_TEXTURE27 = 34011 - -_TEXTURE28 :: GLenum -_TEXTURE28 = 34012 - -_TEXTURE29 :: GLenum -_TEXTURE29 = 34013 - -_TEXTURE30 :: GLenum -_TEXTURE30 = 34014 - -_TEXTURE31 :: GLenum -_TEXTURE31 = 34015 - -_ACTIVE_TEXTURE :: GLenum -_ACTIVE_TEXTURE = 34016 - -_REPEAT :: GLenum -_REPEAT = 10497 - -_CLAMP_TO_EDGE :: GLenum -_CLAMP_TO_EDGE = 33071 - -_MIRRORED_REPEAT :: GLenum -_MIRRORED_REPEAT = 33648 - -_FLOAT_VEC2 :: GLenum -_FLOAT_VEC2 = 35664 - -_FLOAT_VEC3 :: GLenum -_FLOAT_VEC3 = 35665 - -_FLOAT_VEC4 :: GLenum -_FLOAT_VEC4 = 35666 - -_INT_VEC2 :: GLenum -_INT_VEC2 = 35667 - -_INT_VEC3 :: GLenum -_INT_VEC3 = 35668 - -_INT_VEC4 :: GLenum -_INT_VEC4 = 35669 - -_BOOL :: GLenum -_BOOL = 35670 - -_BOOL_VEC2 :: GLenum -_BOOL_VEC2 = 35671 - -_BOOL_VEC3 :: GLenum -_BOOL_VEC3 = 35672 - -_BOOL_VEC4 :: GLenum -_BOOL_VEC4 = 35673 - -_FLOAT_MAT2 :: GLenum -_FLOAT_MAT2 = 35674 - -_FLOAT_MAT3 :: GLenum -_FLOAT_MAT3 = 35675 - -_FLOAT_MAT4 :: GLenum -_FLOAT_MAT4 = 35676 - -_SAMPLER_2D :: GLenum -_SAMPLER_2D = 35678 - -_SAMPLER_CUBE :: GLenum -_SAMPLER_CUBE = 35680 - -_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum -_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 - -_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum -_VERTEX_ATTRIB_ARRAY_SIZE = 34339 - -_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum -_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 - -_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum -_VERTEX_ATTRIB_ARRAY_TYPE = 34341 - -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum -_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 - -_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum -_VERTEX_ATTRIB_ARRAY_POINTER = 34373 - -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 - -_COMPILE_STATUS :: GLenum -_COMPILE_STATUS = 35713 - -_INFO_LOG_LENGTH :: GLenum -_INFO_LOG_LENGTH = 35716 - -_SHADER_SOURCE_LENGTH :: GLenum -_SHADER_SOURCE_LENGTH = 35720 - -_LOW_FLOAT :: GLenum -_LOW_FLOAT = 36336 - -_MEDIUM_FLOAT :: GLenum -_MEDIUM_FLOAT = 36337 - -_HIGH_FLOAT :: GLenum -_HIGH_FLOAT = 36338 - -_LOW_INT :: GLenum -_LOW_INT = 36339 - -_MEDIUM_INT :: GLenum -_MEDIUM_INT = 36340 - -_HIGH_INT :: GLenum -_HIGH_INT = 36341 - -_FRAMEBUFFER :: GLenum -_FRAMEBUFFER = 36160 - -_RENDERBUFFER :: GLenum -_RENDERBUFFER = 36161 - -_RGBA4 :: GLenum -_RGBA4 = 32854 - -_RGB5_A1 :: GLenum -_RGB5_A1 = 32855 - -_RGB565 :: GLenum -_RGB565 = 36194 - -_DEPTH_COMPONENT16 :: GLenum -_DEPTH_COMPONENT16 = 33189 - -_STENCIL_INDEX :: GLenum -_STENCIL_INDEX = 6401 - -_STENCIL_INDEX8 :: GLenum -_STENCIL_INDEX8 = 36168 - -_DEPTH_STENCIL :: GLenum -_DEPTH_STENCIL = 34041 - -_RENDERBUFFER_WIDTH :: GLenum -_RENDERBUFFER_WIDTH = 36162 - -_RENDERBUFFER_HEIGHT :: GLenum -_RENDERBUFFER_HEIGHT = 36163 - -_RENDERBUFFER_INTERNAL_FORMAT :: GLenum -_RENDERBUFFER_INTERNAL_FORMAT = 36164 - -_RENDERBUFFER_RED_SIZE :: GLenum -_RENDERBUFFER_RED_SIZE = 36176 - -_RENDERBUFFER_GREEN_SIZE :: GLenum -_RENDERBUFFER_GREEN_SIZE = 36177 - -_RENDERBUFFER_BLUE_SIZE :: GLenum -_RENDERBUFFER_BLUE_SIZE = 36178 - -_RENDERBUFFER_ALPHA_SIZE :: GLenum -_RENDERBUFFER_ALPHA_SIZE = 36179 - -_RENDERBUFFER_DEPTH_SIZE :: GLenum -_RENDERBUFFER_DEPTH_SIZE = 36180 - -_RENDERBUFFER_STENCIL_SIZE :: GLenum -_RENDERBUFFER_STENCIL_SIZE = 36181 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 - -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 - -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 - -_COLOR_ATTACHMENT0 :: GLenum -_COLOR_ATTACHMENT0 = 36064 - -_DEPTH_ATTACHMENT :: GLenum -_DEPTH_ATTACHMENT = 36096 - -_STENCIL_ATTACHMENT :: GLenum -_STENCIL_ATTACHMENT = 36128 - -_DEPTH_STENCIL_ATTACHMENT :: GLenum -_DEPTH_STENCIL_ATTACHMENT = 33306 - -_NONE :: GLenum -_NONE = 0 - -_FRAMEBUFFER_COMPLETE :: GLenum -_FRAMEBUFFER_COMPLETE = 36053 - -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 - -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 - -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 - -_FRAMEBUFFER_UNSUPPORTED :: GLenum -_FRAMEBUFFER_UNSUPPORTED = 36061 - -_FRAMEBUFFER_BINDING :: GLenum -_FRAMEBUFFER_BINDING = 36006 - -_RENDERBUFFER_BINDING :: GLenum -_RENDERBUFFER_BINDING = 36007 - -_MAX_RENDERBUFFER_SIZE :: GLenum -_MAX_RENDERBUFFER_SIZE = 34024 - -_INVALID_FRAMEBUFFER_OPERATION :: GLenum -_INVALID_FRAMEBUFFER_OPERATION = 1286 - -_UNPACK_FLIP_Y_WEBGL :: GLenum -_UNPACK_FLIP_Y_WEBGL = 37440 - -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum -_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 - -_CONTEXT_LOST_WEBGL :: GLenum -_CONTEXT_LOST_WEBGL = 37442 - -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum -_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 - -_BROWSER_DEFAULT_WEBGL :: GLenum -_BROWSER_DEFAULT_WEBGL = 37444 - foreign import getContextAttributesImpl """ function getContextAttributesImpl(webgl) { return function () { @@ -2005,3 +1078,4 @@ foreign import viewportImpl """ }; } """ :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) + diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs new file mode 100644 index 0000000..00c369d --- /dev/null +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -0,0 +1,907 @@ +-- This file is automatically generated! Don't edit this file, but +-- instead modify purescript-webgl-generator. + +module Graphics.WebGL.Raw.Enums where + +import Graphics.WebGL.Raw.Types (GLenum ()) + +_DEPTH_BUFFER_BIT :: GLenum +_DEPTH_BUFFER_BIT = 256 + +_STENCIL_BUFFER_BIT :: GLenum +_STENCIL_BUFFER_BIT = 1024 + +_COLOR_BUFFER_BIT :: GLenum +_COLOR_BUFFER_BIT = 16384 + +_POINTS :: GLenum +_POINTS = 0 + +_LINES :: GLenum +_LINES = 1 + +_LINE_LOOP :: GLenum +_LINE_LOOP = 2 + +_LINE_STRIP :: GLenum +_LINE_STRIP = 3 + +_TRIANGLES :: GLenum +_TRIANGLES = 4 + +_TRIANGLE_STRIP :: GLenum +_TRIANGLE_STRIP = 5 + +_TRIANGLE_FAN :: GLenum +_TRIANGLE_FAN = 6 + +_ZERO :: GLenum +_ZERO = 0 + +_ONE :: GLenum +_ONE = 1 + +_SRC_COLOR :: GLenum +_SRC_COLOR = 768 + +_ONE_MINUS_SRC_COLOR :: GLenum +_ONE_MINUS_SRC_COLOR = 769 + +_SRC_ALPHA :: GLenum +_SRC_ALPHA = 770 + +_ONE_MINUS_SRC_ALPHA :: GLenum +_ONE_MINUS_SRC_ALPHA = 771 + +_DST_ALPHA :: GLenum +_DST_ALPHA = 772 + +_ONE_MINUS_DST_ALPHA :: GLenum +_ONE_MINUS_DST_ALPHA = 773 + +_DST_COLOR :: GLenum +_DST_COLOR = 774 + +_ONE_MINUS_DST_COLOR :: GLenum +_ONE_MINUS_DST_COLOR = 775 + +_SRC_ALPHA_SATURATE :: GLenum +_SRC_ALPHA_SATURATE = 776 + +_FUNC_ADD :: GLenum +_FUNC_ADD = 32774 + +_BLEND_EQUATION :: GLenum +_BLEND_EQUATION = 32777 + +_BLEND_EQUATION_RGB :: GLenum +_BLEND_EQUATION_RGB = 32777 + +_BLEND_EQUATION_ALPHA :: GLenum +_BLEND_EQUATION_ALPHA = 34877 + +_FUNC_SUBTRACT :: GLenum +_FUNC_SUBTRACT = 32778 + +_FUNC_REVERSE_SUBTRACT :: GLenum +_FUNC_REVERSE_SUBTRACT = 32779 + +_BLEND_DST_RGB :: GLenum +_BLEND_DST_RGB = 32968 + +_BLEND_SRC_RGB :: GLenum +_BLEND_SRC_RGB = 32969 + +_BLEND_DST_ALPHA :: GLenum +_BLEND_DST_ALPHA = 32970 + +_BLEND_SRC_ALPHA :: GLenum +_BLEND_SRC_ALPHA = 32971 + +_CONSTANT_COLOR :: GLenum +_CONSTANT_COLOR = 32769 + +_ONE_MINUS_CONSTANT_COLOR :: GLenum +_ONE_MINUS_CONSTANT_COLOR = 32770 + +_CONSTANT_ALPHA :: GLenum +_CONSTANT_ALPHA = 32771 + +_ONE_MINUS_CONSTANT_ALPHA :: GLenum +_ONE_MINUS_CONSTANT_ALPHA = 32772 + +_BLEND_COLOR :: GLenum +_BLEND_COLOR = 32773 + +_ARRAY_BUFFER :: GLenum +_ARRAY_BUFFER = 34962 + +_ELEMENT_ARRAY_BUFFER :: GLenum +_ELEMENT_ARRAY_BUFFER = 34963 + +_ARRAY_BUFFER_BINDING :: GLenum +_ARRAY_BUFFER_BINDING = 34964 + +_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum +_ELEMENT_ARRAY_BUFFER_BINDING = 34965 + +_STREAM_DRAW :: GLenum +_STREAM_DRAW = 35040 + +_STATIC_DRAW :: GLenum +_STATIC_DRAW = 35044 + +_DYNAMIC_DRAW :: GLenum +_DYNAMIC_DRAW = 35048 + +_BUFFER_SIZE :: GLenum +_BUFFER_SIZE = 34660 + +_BUFFER_USAGE :: GLenum +_BUFFER_USAGE = 34661 + +_CURRENT_VERTEX_ATTRIB :: GLenum +_CURRENT_VERTEX_ATTRIB = 34342 + +_FRONT :: GLenum +_FRONT = 1028 + +_BACK :: GLenum +_BACK = 1029 + +_FRONT_AND_BACK :: GLenum +_FRONT_AND_BACK = 1032 + +_TEXTURE_2D :: GLenum +_TEXTURE_2D = 3553 + +_CULL_FACE :: GLenum +_CULL_FACE = 2884 + +_BLEND :: GLenum +_BLEND = 3042 + +_DITHER :: GLenum +_DITHER = 3024 + +_STENCIL_TEST :: GLenum +_STENCIL_TEST = 2960 + +_DEPTH_TEST :: GLenum +_DEPTH_TEST = 2929 + +_SCISSOR_TEST :: GLenum +_SCISSOR_TEST = 3089 + +_POLYGON_OFFSET_FILL :: GLenum +_POLYGON_OFFSET_FILL = 32823 + +_SAMPLE_ALPHA_TO_COVERAGE :: GLenum +_SAMPLE_ALPHA_TO_COVERAGE = 32926 + +_SAMPLE_COVERAGE :: GLenum +_SAMPLE_COVERAGE = 32928 + +_NO_ERROR :: GLenum +_NO_ERROR = 0 + +_INVALID_ENUM :: GLenum +_INVALID_ENUM = 1280 + +_INVALID_VALUE :: GLenum +_INVALID_VALUE = 1281 + +_INVALID_OPERATION :: GLenum +_INVALID_OPERATION = 1282 + +_OUT_OF_MEMORY :: GLenum +_OUT_OF_MEMORY = 1285 + +_CW :: GLenum +_CW = 2304 + +_CCW :: GLenum +_CCW = 2305 + +_LINE_WIDTH :: GLenum +_LINE_WIDTH = 2849 + +_ALIASED_POINT_SIZE_RANGE :: GLenum +_ALIASED_POINT_SIZE_RANGE = 33901 + +_ALIASED_LINE_WIDTH_RANGE :: GLenum +_ALIASED_LINE_WIDTH_RANGE = 33902 + +_CULL_FACE_MODE :: GLenum +_CULL_FACE_MODE = 2885 + +_FRONT_FACE :: GLenum +_FRONT_FACE = 2886 + +_DEPTH_RANGE :: GLenum +_DEPTH_RANGE = 2928 + +_DEPTH_WRITEMASK :: GLenum +_DEPTH_WRITEMASK = 2930 + +_DEPTH_CLEAR_VALUE :: GLenum +_DEPTH_CLEAR_VALUE = 2931 + +_DEPTH_FUNC :: GLenum +_DEPTH_FUNC = 2932 + +_STENCIL_CLEAR_VALUE :: GLenum +_STENCIL_CLEAR_VALUE = 2961 + +_STENCIL_FUNC :: GLenum +_STENCIL_FUNC = 2962 + +_STENCIL_FAIL :: GLenum +_STENCIL_FAIL = 2964 + +_STENCIL_PASS_DEPTH_FAIL :: GLenum +_STENCIL_PASS_DEPTH_FAIL = 2965 + +_STENCIL_PASS_DEPTH_PASS :: GLenum +_STENCIL_PASS_DEPTH_PASS = 2966 + +_STENCIL_REF :: GLenum +_STENCIL_REF = 2967 + +_STENCIL_VALUE_MASK :: GLenum +_STENCIL_VALUE_MASK = 2963 + +_STENCIL_WRITEMASK :: GLenum +_STENCIL_WRITEMASK = 2968 + +_STENCIL_BACK_FUNC :: GLenum +_STENCIL_BACK_FUNC = 34816 + +_STENCIL_BACK_FAIL :: GLenum +_STENCIL_BACK_FAIL = 34817 + +_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum +_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 + +_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum +_STENCIL_BACK_PASS_DEPTH_PASS = 34819 + +_STENCIL_BACK_REF :: GLenum +_STENCIL_BACK_REF = 36003 + +_STENCIL_BACK_VALUE_MASK :: GLenum +_STENCIL_BACK_VALUE_MASK = 36004 + +_STENCIL_BACK_WRITEMASK :: GLenum +_STENCIL_BACK_WRITEMASK = 36005 + +_VIEWPORT :: GLenum +_VIEWPORT = 2978 + +_SCISSOR_BOX :: GLenum +_SCISSOR_BOX = 3088 + +_COLOR_CLEAR_VALUE :: GLenum +_COLOR_CLEAR_VALUE = 3106 + +_COLOR_WRITEMASK :: GLenum +_COLOR_WRITEMASK = 3107 + +_UNPACK_ALIGNMENT :: GLenum +_UNPACK_ALIGNMENT = 3317 + +_PACK_ALIGNMENT :: GLenum +_PACK_ALIGNMENT = 3333 + +_MAX_TEXTURE_SIZE :: GLenum +_MAX_TEXTURE_SIZE = 3379 + +_MAX_VIEWPORT_DIMS :: GLenum +_MAX_VIEWPORT_DIMS = 3386 + +_SUBPIXEL_BITS :: GLenum +_SUBPIXEL_BITS = 3408 + +_RED_BITS :: GLenum +_RED_BITS = 3410 + +_GREEN_BITS :: GLenum +_GREEN_BITS = 3411 + +_BLUE_BITS :: GLenum +_BLUE_BITS = 3412 + +_ALPHA_BITS :: GLenum +_ALPHA_BITS = 3413 + +_DEPTH_BITS :: GLenum +_DEPTH_BITS = 3414 + +_STENCIL_BITS :: GLenum +_STENCIL_BITS = 3415 + +_POLYGON_OFFSET_UNITS :: GLenum +_POLYGON_OFFSET_UNITS = 10752 + +_POLYGON_OFFSET_FACTOR :: GLenum +_POLYGON_OFFSET_FACTOR = 32824 + +_TEXTURE_BINDING_2D :: GLenum +_TEXTURE_BINDING_2D = 32873 + +_SAMPLE_BUFFERS :: GLenum +_SAMPLE_BUFFERS = 32936 + +_SAMPLES :: GLenum +_SAMPLES = 32937 + +_SAMPLE_COVERAGE_VALUE :: GLenum +_SAMPLE_COVERAGE_VALUE = 32938 + +_SAMPLE_COVERAGE_INVERT :: GLenum +_SAMPLE_COVERAGE_INVERT = 32939 + +_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum +_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 + +_COMPRESSED_TEXTURE_FORMATS :: GLenum +_COMPRESSED_TEXTURE_FORMATS = 34467 + +_DONT_CARE :: GLenum +_DONT_CARE = 4352 + +_FASTEST :: GLenum +_FASTEST = 4353 + +_NICEST :: GLenum +_NICEST = 4354 + +_GENERATE_MIPMAP_HINT :: GLenum +_GENERATE_MIPMAP_HINT = 33170 + +_BYTE :: GLenum +_BYTE = 5120 + +_UNSIGNED_BYTE :: GLenum +_UNSIGNED_BYTE = 5121 + +_SHORT :: GLenum +_SHORT = 5122 + +_UNSIGNED_SHORT :: GLenum +_UNSIGNED_SHORT = 5123 + +_INT :: GLenum +_INT = 5124 + +_UNSIGNED_INT :: GLenum +_UNSIGNED_INT = 5125 + +_FLOAT :: GLenum +_FLOAT = 5126 + +_DEPTH_COMPONENT :: GLenum +_DEPTH_COMPONENT = 6402 + +_ALPHA :: GLenum +_ALPHA = 6406 + +_RGB :: GLenum +_RGB = 6407 + +_RGBA :: GLenum +_RGBA = 6408 + +_LUMINANCE :: GLenum +_LUMINANCE = 6409 + +_LUMINANCE_ALPHA :: GLenum +_LUMINANCE_ALPHA = 6410 + +_UNSIGNED_SHORT_4_4_4_4 :: GLenum +_UNSIGNED_SHORT_4_4_4_4 = 32819 + +_UNSIGNED_SHORT_5_5_5_1 :: GLenum +_UNSIGNED_SHORT_5_5_5_1 = 32820 + +_UNSIGNED_SHORT_5_6_5 :: GLenum +_UNSIGNED_SHORT_5_6_5 = 33635 + +_FRAGMENT_SHADER :: GLenum +_FRAGMENT_SHADER = 35632 + +_VERTEX_SHADER :: GLenum +_VERTEX_SHADER = 35633 + +_MAX_VERTEX_ATTRIBS :: GLenum +_MAX_VERTEX_ATTRIBS = 34921 + +_MAX_VERTEX_UNIFORM_VECTORS :: GLenum +_MAX_VERTEX_UNIFORM_VECTORS = 36347 + +_MAX_VARYING_VECTORS :: GLenum +_MAX_VARYING_VECTORS = 36348 + +_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 + +_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 + +_MAX_TEXTURE_IMAGE_UNITS :: GLenum +_MAX_TEXTURE_IMAGE_UNITS = 34930 + +_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum +_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 + +_SHADER_TYPE :: GLenum +_SHADER_TYPE = 35663 + +_DELETE_STATUS :: GLenum +_DELETE_STATUS = 35712 + +_LINK_STATUS :: GLenum +_LINK_STATUS = 35714 + +_VALIDATE_STATUS :: GLenum +_VALIDATE_STATUS = 35715 + +_ATTACHED_SHADERS :: GLenum +_ATTACHED_SHADERS = 35717 + +_ACTIVE_UNIFORMS :: GLenum +_ACTIVE_UNIFORMS = 35718 + +_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum +_ACTIVE_UNIFORM_MAX_LENGTH = 35719 + +_ACTIVE_ATTRIBUTES :: GLenum +_ACTIVE_ATTRIBUTES = 35721 + +_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum +_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 + +_SHADING_LANGUAGE_VERSION :: GLenum +_SHADING_LANGUAGE_VERSION = 35724 + +_CURRENT_PROGRAM :: GLenum +_CURRENT_PROGRAM = 35725 + +_NEVER :: GLenum +_NEVER = 512 + +_LESS :: GLenum +_LESS = 513 + +_EQUAL :: GLenum +_EQUAL = 514 + +_LEQUAL :: GLenum +_LEQUAL = 515 + +_GREATER :: GLenum +_GREATER = 516 + +_NOTEQUAL :: GLenum +_NOTEQUAL = 517 + +_GEQUAL :: GLenum +_GEQUAL = 518 + +_ALWAYS :: GLenum +_ALWAYS = 519 + +_KEEP :: GLenum +_KEEP = 7680 + +_REPLACE :: GLenum +_REPLACE = 7681 + +_INCR :: GLenum +_INCR = 7682 + +_DECR :: GLenum +_DECR = 7683 + +_INVERT :: GLenum +_INVERT = 5386 + +_INCR_WRAP :: GLenum +_INCR_WRAP = 34055 + +_DECR_WRAP :: GLenum +_DECR_WRAP = 34056 + +_VENDOR :: GLenum +_VENDOR = 7936 + +_RENDERER :: GLenum +_RENDERER = 7937 + +_VERSION :: GLenum +_VERSION = 7938 + +_NEAREST :: GLenum +_NEAREST = 9728 + +_LINEAR :: GLenum +_LINEAR = 9729 + +_NEAREST_MIPMAP_NEAREST :: GLenum +_NEAREST_MIPMAP_NEAREST = 9984 + +_LINEAR_MIPMAP_NEAREST :: GLenum +_LINEAR_MIPMAP_NEAREST = 9985 + +_NEAREST_MIPMAP_LINEAR :: GLenum +_NEAREST_MIPMAP_LINEAR = 9986 + +_LINEAR_MIPMAP_LINEAR :: GLenum +_LINEAR_MIPMAP_LINEAR = 9987 + +_TEXTURE_MAG_FILTER :: GLenum +_TEXTURE_MAG_FILTER = 10240 + +_TEXTURE_MIN_FILTER :: GLenum +_TEXTURE_MIN_FILTER = 10241 + +_TEXTURE_WRAP_S :: GLenum +_TEXTURE_WRAP_S = 10242 + +_TEXTURE_WRAP_T :: GLenum +_TEXTURE_WRAP_T = 10243 + +_TEXTURE :: GLenum +_TEXTURE = 5890 + +_TEXTURE_CUBE_MAP :: GLenum +_TEXTURE_CUBE_MAP = 34067 + +_TEXTURE_BINDING_CUBE_MAP :: GLenum +_TEXTURE_BINDING_CUBE_MAP = 34068 + +_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 + +_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 + +_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 + +_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 + +_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum +_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 + +_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum +_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 + +_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum +_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 + +_TEXTURE0 :: GLenum +_TEXTURE0 = 33984 + +_TEXTURE1 :: GLenum +_TEXTURE1 = 33985 + +_TEXTURE2 :: GLenum +_TEXTURE2 = 33986 + +_TEXTURE3 :: GLenum +_TEXTURE3 = 33987 + +_TEXTURE4 :: GLenum +_TEXTURE4 = 33988 + +_TEXTURE5 :: GLenum +_TEXTURE5 = 33989 + +_TEXTURE6 :: GLenum +_TEXTURE6 = 33990 + +_TEXTURE7 :: GLenum +_TEXTURE7 = 33991 + +_TEXTURE8 :: GLenum +_TEXTURE8 = 33992 + +_TEXTURE9 :: GLenum +_TEXTURE9 = 33993 + +_TEXTURE10 :: GLenum +_TEXTURE10 = 33994 + +_TEXTURE11 :: GLenum +_TEXTURE11 = 33995 + +_TEXTURE12 :: GLenum +_TEXTURE12 = 33996 + +_TEXTURE13 :: GLenum +_TEXTURE13 = 33997 + +_TEXTURE14 :: GLenum +_TEXTURE14 = 33998 + +_TEXTURE15 :: GLenum +_TEXTURE15 = 33999 + +_TEXTURE16 :: GLenum +_TEXTURE16 = 34000 + +_TEXTURE17 :: GLenum +_TEXTURE17 = 34001 + +_TEXTURE18 :: GLenum +_TEXTURE18 = 34002 + +_TEXTURE19 :: GLenum +_TEXTURE19 = 34003 + +_TEXTURE20 :: GLenum +_TEXTURE20 = 34004 + +_TEXTURE21 :: GLenum +_TEXTURE21 = 34005 + +_TEXTURE22 :: GLenum +_TEXTURE22 = 34006 + +_TEXTURE23 :: GLenum +_TEXTURE23 = 34007 + +_TEXTURE24 :: GLenum +_TEXTURE24 = 34008 + +_TEXTURE25 :: GLenum +_TEXTURE25 = 34009 + +_TEXTURE26 :: GLenum +_TEXTURE26 = 34010 + +_TEXTURE27 :: GLenum +_TEXTURE27 = 34011 + +_TEXTURE28 :: GLenum +_TEXTURE28 = 34012 + +_TEXTURE29 :: GLenum +_TEXTURE29 = 34013 + +_TEXTURE30 :: GLenum +_TEXTURE30 = 34014 + +_TEXTURE31 :: GLenum +_TEXTURE31 = 34015 + +_ACTIVE_TEXTURE :: GLenum +_ACTIVE_TEXTURE = 34016 + +_REPEAT :: GLenum +_REPEAT = 10497 + +_CLAMP_TO_EDGE :: GLenum +_CLAMP_TO_EDGE = 33071 + +_MIRRORED_REPEAT :: GLenum +_MIRRORED_REPEAT = 33648 + +_FLOAT_VEC2 :: GLenum +_FLOAT_VEC2 = 35664 + +_FLOAT_VEC3 :: GLenum +_FLOAT_VEC3 = 35665 + +_FLOAT_VEC4 :: GLenum +_FLOAT_VEC4 = 35666 + +_INT_VEC2 :: GLenum +_INT_VEC2 = 35667 + +_INT_VEC3 :: GLenum +_INT_VEC3 = 35668 + +_INT_VEC4 :: GLenum +_INT_VEC4 = 35669 + +_BOOL :: GLenum +_BOOL = 35670 + +_BOOL_VEC2 :: GLenum +_BOOL_VEC2 = 35671 + +_BOOL_VEC3 :: GLenum +_BOOL_VEC3 = 35672 + +_BOOL_VEC4 :: GLenum +_BOOL_VEC4 = 35673 + +_FLOAT_MAT2 :: GLenum +_FLOAT_MAT2 = 35674 + +_FLOAT_MAT3 :: GLenum +_FLOAT_MAT3 = 35675 + +_FLOAT_MAT4 :: GLenum +_FLOAT_MAT4 = 35676 + +_SAMPLER_2D :: GLenum +_SAMPLER_2D = 35678 + +_SAMPLER_CUBE :: GLenum +_SAMPLER_CUBE = 35680 + +_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum +_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 + +_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum +_VERTEX_ATTRIB_ARRAY_SIZE = 34339 + +_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum +_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 + +_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum +_VERTEX_ATTRIB_ARRAY_TYPE = 34341 + +_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum +_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 + +_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum +_VERTEX_ATTRIB_ARRAY_POINTER = 34373 + +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum +_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 + +_COMPILE_STATUS :: GLenum +_COMPILE_STATUS = 35713 + +_INFO_LOG_LENGTH :: GLenum +_INFO_LOG_LENGTH = 35716 + +_SHADER_SOURCE_LENGTH :: GLenum +_SHADER_SOURCE_LENGTH = 35720 + +_LOW_FLOAT :: GLenum +_LOW_FLOAT = 36336 + +_MEDIUM_FLOAT :: GLenum +_MEDIUM_FLOAT = 36337 + +_HIGH_FLOAT :: GLenum +_HIGH_FLOAT = 36338 + +_LOW_INT :: GLenum +_LOW_INT = 36339 + +_MEDIUM_INT :: GLenum +_MEDIUM_INT = 36340 + +_HIGH_INT :: GLenum +_HIGH_INT = 36341 + +_FRAMEBUFFER :: GLenum +_FRAMEBUFFER = 36160 + +_RENDERBUFFER :: GLenum +_RENDERBUFFER = 36161 + +_RGBA4 :: GLenum +_RGBA4 = 32854 + +_RGB5_A1 :: GLenum +_RGB5_A1 = 32855 + +_RGB565 :: GLenum +_RGB565 = 36194 + +_DEPTH_COMPONENT16 :: GLenum +_DEPTH_COMPONENT16 = 33189 + +_STENCIL_INDEX :: GLenum +_STENCIL_INDEX = 6401 + +_STENCIL_INDEX8 :: GLenum +_STENCIL_INDEX8 = 36168 + +_DEPTH_STENCIL :: GLenum +_DEPTH_STENCIL = 34041 + +_RENDERBUFFER_WIDTH :: GLenum +_RENDERBUFFER_WIDTH = 36162 + +_RENDERBUFFER_HEIGHT :: GLenum +_RENDERBUFFER_HEIGHT = 36163 + +_RENDERBUFFER_INTERNAL_FORMAT :: GLenum +_RENDERBUFFER_INTERNAL_FORMAT = 36164 + +_RENDERBUFFER_RED_SIZE :: GLenum +_RENDERBUFFER_RED_SIZE = 36176 + +_RENDERBUFFER_GREEN_SIZE :: GLenum +_RENDERBUFFER_GREEN_SIZE = 36177 + +_RENDERBUFFER_BLUE_SIZE :: GLenum +_RENDERBUFFER_BLUE_SIZE = 36178 + +_RENDERBUFFER_ALPHA_SIZE :: GLenum +_RENDERBUFFER_ALPHA_SIZE = 36179 + +_RENDERBUFFER_DEPTH_SIZE :: GLenum +_RENDERBUFFER_DEPTH_SIZE = 36180 + +_RENDERBUFFER_STENCIL_SIZE :: GLenum +_RENDERBUFFER_STENCIL_SIZE = 36181 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum +_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 + +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum +_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum +_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 + +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum +_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 + +_COLOR_ATTACHMENT0 :: GLenum +_COLOR_ATTACHMENT0 = 36064 + +_DEPTH_ATTACHMENT :: GLenum +_DEPTH_ATTACHMENT = 36096 + +_STENCIL_ATTACHMENT :: GLenum +_STENCIL_ATTACHMENT = 36128 + +_DEPTH_STENCIL_ATTACHMENT :: GLenum +_DEPTH_STENCIL_ATTACHMENT = 33306 + +_NONE :: GLenum +_NONE = 0 + +_FRAMEBUFFER_COMPLETE :: GLenum +_FRAMEBUFFER_COMPLETE = 36053 + +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum +_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 + +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum +_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 + +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum +_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 + +_FRAMEBUFFER_UNSUPPORTED :: GLenum +_FRAMEBUFFER_UNSUPPORTED = 36061 + +_FRAMEBUFFER_BINDING :: GLenum +_FRAMEBUFFER_BINDING = 36006 + +_RENDERBUFFER_BINDING :: GLenum +_RENDERBUFFER_BINDING = 36007 + +_MAX_RENDERBUFFER_SIZE :: GLenum +_MAX_RENDERBUFFER_SIZE = 34024 + +_INVALID_FRAMEBUFFER_OPERATION :: GLenum +_INVALID_FRAMEBUFFER_OPERATION = 1286 + +_UNPACK_FLIP_Y_WEBGL :: GLenum +_UNPACK_FLIP_Y_WEBGL = 37440 + +_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum +_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 + +_CONTEXT_LOST_WEBGL :: GLenum +_CONTEXT_LOST_WEBGL = 37442 + +_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum +_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 + +_BROWSER_DEFAULT_WEBGL :: GLenum +_BROWSER_DEFAULT_WEBGL = 37444 + diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs new file mode 100644 index 0000000..080ac53 --- /dev/null +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -0,0 +1,38 @@ +-- This file is automatically generated! Don't edit this file, but +-- instead modify purescript-webgl-generator. + +module Graphics.WebGL.Raw.Types where + +import Data.ArrayBuffer.Types (Float32Array ()) + +type DOMString = String +type FloatArray = Float32Array +type GLbitfield = Number +type GLboolean = Boolean +type GLbyte = Number +type GLclampf = Number +type GLenum = Number +type GLfloat = Number +type GLint = Number +type GLintptr = Number +type GLshort = Number +type GLsizei = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLuint = Number +type GLushort = Number + +foreign import data ArrayBufferView :: * +foreign import data HTMLImageElement :: * +foreign import data HTMLVideoElement :: * +foreign import data ImageData :: * +foreign import data WebGLActiveInfo :: * +foreign import data WebGLBuffer :: * +foreign import data WebGLContext :: * +foreign import data WebGLContextAttributes :: * +foreign import data WebGLFramebuffer :: * +foreign import data WebGLProgram :: * +foreign import data WebGLRenderbuffer :: * +foreign import data WebGLShader :: * +foreign import data WebGLTexture :: * +foreign import data WebGLUniformLocation :: * From 4c8ebb5b5b37ebe36e61f814f1cb85921e8acec9 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 27 May 2015 08:12:49 -0500 Subject: [PATCH 24/51] correctly print function export list --- generator/IDL/Printer.hs | 55 +++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 370fc1d..c0f2c2b 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -16,10 +16,10 @@ import IDL.AST typesFFI :: IDL -> Doc typesFFI idl = - generatedWarning $+$ blankLine $+$ - header $+$ blankLine $+$ - typeDefs $+$ blankLine $+$ - typeDecls $+$ blankLine + generatedWarning $+$ blank $+$ + header $+$ blank $+$ + typeDefs $+$ blank $+$ + typeDecls $+$ blank where typeDecls = vcat . map ppTypeDecl . sort $ types idl header = vcat @@ -30,9 +30,9 @@ typesFFI idl = enumsFFI :: IDL -> Doc enumsFFI idl = - generatedWarning $+$ blankLine $+$ - header $+$ blankLine $+$ - constants $+$ blankLine + generatedWarning $+$ blank $+$ + header $+$ blank $+$ + constants $+$ blank where constants = vcat . map ppConstant $ enums idl header = vcat @@ -43,18 +43,18 @@ enumsFFI idl = funcsFFI :: IDL -> Doc funcsFFI idl = - generatedWarning $+$ blankLine $+$ - header $+$ blankLine $+$ - methods $+$ blankLine + generatedWarning $+$ blank $+$ + moduleDef $+$ blank $+$ + imports $+$ blank $+$ + methods $+$ blank where methods = vcat . map ppFuncImpl $ functions idl - header = vcat - [ "-- This file is automatically generated! Don't edit this file, but" - , "-- instead modify purescript-webgl-generator." - , "" - , "module Graphics.WebGL.Raw where" - , "" - , "import Control.Monad.Eff" + moduleDef = vcat + [ "module Graphics.WebGL.Raw" + , ppExportList (functions idl) $+$ ") where" + ] + imports = vcat + [ "import Control.Monad.Eff" , "import Data.ArrayBuffer.Types" , "import Data.TypedArray" , "import Data.Function" @@ -98,7 +98,7 @@ ppConstant :: Decl -> Doc ppConstant Enum { enumName = n, enumValue = v } = constName <+> ":: GLenum" $$ constName <+> "=" <+> (integer v) $$ - blankLine + blank where constName = text $ '_' : n @@ -139,7 +139,7 @@ ppFuncImpl :: Decl -> Doc ppFuncImpl f = "foreign import" <+> implName f <+> jsBlock $+$ nest 2 (ppFuncImplBody f) $+$ jsBlock <+> - ppTypeSig f $+$ blankLine + ppTypeSig f $+$ blank where jsBlock = "\"\"\"" @@ -155,13 +155,26 @@ ppType Type { typeName = name, typeIsArray = isArray } where toType = if isArray then brackets . text else text +ppExportList :: [Decl] -> Doc +ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) + where + addOpener (x:xs) = "(" <+> x : xs + addOpener xs = xs + -- helpers -blankLine :: Doc -blankLine = "" +blank :: Doc +blank = "" implName :: Decl -> Doc implName f = text (methodName f) <> "Impl" prefixWebgl :: Doc prefixWebgl = text (argName webglContext) <> "." + +prePunct :: Doc -> [Doc] -> [Doc] +prePunct p (x:x':xs) = x : go x xs + where + go y [] = [p <> y] + go y (z:zs) = (p <> y) : go z zs +prePunct _ xs = xs From 3b57845f12a335a786ffb165213a9ef5c3505232 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 27 May 2015 13:16:29 -0500 Subject: [PATCH 25/51] export non-impl functions for easier usage --- generator/IDL/AST.hs | 6 +- generator/IDL/Parser.hs | 18 +- generator/IDL/Printer.hs | 110 +++--- src/Graphics/WebGL/Raw.purs | 540 +++++++++++++++++++++++++++++- src/Graphics/WebGL/Raw/Types.purs | 2 + 5 files changed, 624 insertions(+), 52 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 6f38278..27e2b0b 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -37,7 +37,9 @@ instance Eq Decl where x@Attribute{} == y@Attribute{} = attrName x == attrName y _ == _ = False -data Type = Type +data Type + = Generic + | Concrete { typeName :: String , typeIsArray :: Bool , typeCondPara :: Maybe String @@ -60,7 +62,7 @@ emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] webglContext :: Arg -webglContext = Arg (Type "WebGLContext" False Nothing) "webgl" +webglContext = Arg (Concrete "WebGLContext" False Nothing) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index ba10e7c..33f48f5 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -85,8 +85,11 @@ cleanup idl = IDL , comments = nub $ comments idl , functions = nub $ functions idl , attributes = nub $ attributes idl - , types = nub . filter (\t -> typeName t `notElem` excludedTypes) $ types idl + , types = nub . filter onlyAllowedTypes $ types idl } + where + onlyAllowedTypes Concrete{ typeName = t } = t `notElem` excludedTypes + onlyAllowedTypes _ = False -- parsers @@ -160,11 +163,14 @@ parseType = typ PP. "expecting type" if ident == "sequence" then angles' identifier' >>= return . Just else return Nothing - return Type - { typeName = ident - , typeIsArray = isArray - , typeCondPara = condPara - } + return $ + if ident `elem` ["any", "object"] + then Generic + else Concrete + { typeName = ident + , typeIsArray = isArray + , typeCondPara = condPara + } parseArg :: Parse Arg parseArg = do diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index c0f2c2b..e559693 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -9,8 +9,7 @@ module IDL.Printer import Data.List (sort) import Data.Maybe (isNothing) import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, - hcat, integer, lbrace, nest, parens, punctuate, rbrace, semi, space, text, - vcat) + hcat, integer, nest, parens, punctuate, text, vcat) import IDL.AST @@ -26,6 +25,8 @@ typesFFI idl = [ "module Graphics.WebGL.Raw.Types where" , "" , "import Data.ArrayBuffer.Types (Float32Array ())" + , "" + , "foreign import data WebGL :: !" ] enumsFFI :: IDL -> Doc @@ -48,7 +49,7 @@ funcsFFI idl = imports $+$ blank $+$ methods $+$ blank where - methods = vcat . map ppFuncImpl $ functions idl + methods = vcat . map ppFunc $ functions idl moduleDef = vcat [ "module Graphics.WebGL.Raw" , ppExportList (functions idl) $+$ ") where" @@ -60,8 +61,6 @@ funcsFFI idl = , "import Data.Function" , "import Graphics.WebGL.Raw.Enums" , "import Graphics.WebGL.Raw.Types" - , "" - , "foreign import data WebGL :: !" ] -- predefined text @@ -102,58 +101,73 @@ ppConstant Enum { enumName = n, enumValue = v } = where constName = text $ '_' : n -ppTypeSig :: Decl -> Doc -ppTypeSig f - | hasGenericReturnType = - ":: forall eff a." <+> argList <+> effMonad (char 'a') - | otherwise = - ":: forall eff." <+> argList <+> effMonad (ppType $ methodRetType f) +ppImplTypeSig :: Decl -> Doc +ppImplTypeSig f@Function{} = + sigForall f <+> funcType <+> argList <+> parens (sigReturnType f) where - hasGenericReturnType = - typeName (methodRetType f) `elem` ["any", "object"] - effMonad doc = - parens $ "Eff (webgl :: WebGL | eff)" <+> doc - argList = - "Fn" <> text (show . length $ funcArgs f) <+> - hcat (punctuate space (map (ppType . argType) (funcArgs f))) + args = funcArgs f + funcType = "Fn" <> int (length args) + argList = hcat . punctuate " " $ map (ppConvertType . argType) args -ppMethod :: Decl -> Doc -ppMethod f = - prefixWebgl <> text (methodName f) <> parens (ppArgs methodArgs f) <> semi +ppRunTypeSig :: Decl -> Doc +ppRunTypeSig f@Function{ methodName = name } = + text name <+> sigForall f <+> argList + where + types = map (ppConvertType . argType) (funcArgs f) ++ [sigReturnType f] + argList = hcat $ punctuate " -> " types + +ppFunc :: Decl -> Doc +ppFunc f@Function{} = ppFuncImpl f $+$ blank $+$ ppRunFunc f $+$ blank + +ppRunFunc :: Decl -> Doc +ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f + +ppRunFuncBody :: Decl -> Doc +ppRunFuncBody f@Function { methodName = name } = + text name <+> "=" <+> + "runFn" <> int (length $ funcArgs f) <+> + implName f + +ppFuncImpl :: Decl -> Doc +ppFuncImpl f@Function{} = + "foreign import" <+> implName f <+> jsBlock $+$ + nest 2 (ppFuncImplBody f) $+$ + jsBlock <+> ppImplTypeSig f + where + jsBlock = "\"\"\"" ppFuncImplBody :: Decl -> Doc ppFuncImplBody f = - func <+> implName f <> parens (ppArgs funcArgs f) <+> lbrace $+$ - nest 2 (ret <+> func <+> parens empty <+> lbrace) $+$ + func <+> implName f <> parens (ppArgs funcArgs f) <+> "{" $+$ + nest 2 (ret <+> func <+> "() {") $+$ nest 4 (ret <+> ppMethod f) $+$ - nest 2 rbrace <> semi $+$ - rbrace + nest 2 "};" $+$ + "}" where func = "function" ret = "return" +ppMethod :: Decl -> Doc +ppMethod f@Function{} = + prefixWebgl <> text (methodName f) <> parens (ppArgs methodArgs f) <> ";" + ppArgs :: (Decl -> [Arg]) -> Decl -> Doc ppArgs f = hcat . punctuate ", " . map (text . argName) . f -ppFuncImpl :: Decl -> Doc -ppFuncImpl f = - "foreign import" <+> implName f <+> - jsBlock $+$ nest 2 (ppFuncImplBody f) $+$ jsBlock <+> - ppTypeSig f $+$ blank - where - jsBlock = "\"\"\"" - ppTypeDecl :: Type -> Doc -ppTypeDecl d = "foreign import data" <+> text (typeName d) <+> ":: *" +ppTypeDecl Concrete{ typeName = name } = + "foreign import data" <+> text name <+> ":: *" +ppTypeDecl _ = empty -ppType :: Type -> Doc -ppType Type { typeName = name, typeIsArray = isArray } +ppConvertType :: Type -> Doc +ppConvertType Concrete{ typeName = name, typeIsArray = isArray } | name == "void" = toType "Unit" | name == "boolean" = toType "Boolean" | name == "ArrayBuffer" = toType "Float32Array" | otherwise = toType name where toType = if isArray then brackets . text else text +ppConvertType _ = empty ppExportList :: [Decl] -> Doc ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) @@ -161,20 +175,40 @@ ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) addOpener (x:xs) = "(" <+> x : xs addOpener xs = xs +sigForall :: Decl -> Doc +sigForall Function{ methodRetType = ret } = + case ret of + Generic -> ":: forall eff" <+> genericType <> "." + _ -> ":: forall eff." + +sigReturnType :: Decl -> Doc +sigReturnType Function{ methodRetType = ret } = + case ret of + t@Concrete{} -> effMonad <+> ppConvertType t + _ -> effMonad <+> genericType + where + effMonad = "Eff (webgl :: WebGL | eff)" + -- helpers blank :: Doc blank = "" implName :: Decl -> Doc -implName f = text (methodName f) <> "Impl" +implName f@Function{} = text (methodName f) <> "Impl" prefixWebgl :: Doc prefixWebgl = text (argName webglContext) <> "." prePunct :: Doc -> [Doc] -> [Doc] -prePunct p (x:x':xs) = x : go x xs +prePunct p (x:x':xs) = x : go x' xs where go y [] = [p <> y] go y (z:zs) = (p <> y) : go z zs prePunct _ xs = xs + +genericType :: Doc +genericType = char 'a' + +int :: Int -> Doc +int = integer . fromIntegral diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index d18b0fc..a3577ba 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -1,10 +1,141 @@ -- This file is automatically generated! Don't edit this file, but -- instead modify purescript-webgl-generator. --- This file is automatically generated! Don't edit this file, but --- instead modify purescript-webgl-generator. - -module Graphics.WebGL.Raw where +module Graphics.WebGL.Raw +( getContextAttributes +, isContextLost +, getSupportedExtensions +, getExtension +, activeTexture +, attachShader +, bindAttribLocation +, bindBuffer +, bindFramebuffer +, bindRenderbuffer +, bindTexture +, blendColor +, blendEquation +, blendEquationSeparate +, blendFunc +, blendFuncSeparate +, bufferData +, bufferSubData +, checkFramebufferStatus +, clear +, clearColor +, clearDepth +, clearStencil +, colorMask +, compileShader +, copyTexImage2D +, copyTexSubImage2D +, createBuffer +, createFramebuffer +, createProgram +, createRenderbuffer +, createShader +, createTexture +, cullFace +, deleteBuffer +, deleteFramebuffer +, deleteProgram +, deleteRenderbuffer +, deleteShader +, deleteTexture +, depthFunc +, depthMask +, depthRange +, detachShader +, disable +, disableVertexAttribArray +, drawArrays +, drawElements +, enable +, enableVertexAttribArray +, finish +, flush +, framebufferRenderbuffer +, framebufferTexture2D +, frontFace +, generateMipmap +, getActiveAttrib +, getActiveUniform +, getAttachedShaders +, getAttribLocation +, getParameter +, getBufferParameter +, getError +, getFramebufferAttachmentParameter +, getProgramParameter +, getProgramInfoLog +, getRenderbufferParameter +, getShaderParameter +, getShaderInfoLog +, getShaderSource +, getTexParameter +, getUniform +, getUniformLocation +, getVertexAttrib +, getVertexAttribOffset +, hint +, isBuffer +, isEnabled +, isFramebuffer +, isProgram +, isRenderbuffer +, isShader +, isTexture +, lineWidth +, linkProgram +, pixelStorei +, polygonOffset +, readPixels +, renderbufferStorage +, sampleCoverage +, scissor +, shaderSource +, stencilFunc +, stencilFuncSeparate +, stencilMask +, stencilMaskSeparate +, stencilOp +, stencilOpSeparate +, texImage2D +, texParameterf +, texParameteri +, texSubImage2D +, uniform1f +, uniform1fv +, uniform1i +, uniform1iv +, uniform2f +, uniform2fv +, uniform2i +, uniform2iv +, uniform3f +, uniform3fv +, uniform3i +, uniform3iv +, uniform4f +, uniform4fv +, uniform4i +, uniform4iv +, uniformMatrix2fv +, uniformMatrix3fv +, uniformMatrix4fv +, useProgram +, validateProgram +, vertexAttrib1f +, vertexAttrib1fv +, vertexAttrib2f +, vertexAttrib2fv +, vertexAttrib3f +, vertexAttrib3fv +, vertexAttrib4f +, vertexAttrib4fv +, vertexAttribPointer +, viewport +) where import Control.Monad.Eff import Data.ArrayBuffer.Types @@ -13,8 +144,6 @@ import Data.Function import Graphics.WebGL.Raw.Enums import Graphics.WebGL.Raw.Types -foreign import data WebGL :: ! - foreign import getContextAttributesImpl """ function getContextAttributesImpl(webgl) { return function () { @@ -23,6 +152,9 @@ foreign import getContextAttributesImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) +getContextAttributes :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLContextAttributes +getContextAttributes = runFn1 getContextAttributesImpl + foreign import isContextLostImpl """ function isContextLostImpl(webgl) { return function () { @@ -31,6 +163,9 @@ foreign import isContextLostImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) +isContextLost :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Boolean +isContextLost = runFn1 isContextLostImpl + foreign import getSupportedExtensionsImpl """ function getSupportedExtensionsImpl(webgl) { return function () { @@ -39,6 +174,9 @@ foreign import getSupportedExtensionsImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) +getSupportedExtensions :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) [DOMString] +getSupportedExtensions = runFn1 getSupportedExtensionsImpl + foreign import getExtensionImpl """ function getExtensionImpl(webgl, name) { return function () { @@ -47,6 +185,9 @@ foreign import getExtensionImpl """ } """ :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (webgl :: WebGL | eff) a +getExtension = runFn2 getExtensionImpl + foreign import activeTextureImpl """ function activeTextureImpl(webgl, texture) { return function () { @@ -55,6 +196,9 @@ foreign import activeTextureImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +activeTexture = runFn2 activeTextureImpl + foreign import attachShaderImpl """ function attachShaderImpl(webgl, program, shader) { return function () { @@ -63,6 +207,9 @@ foreign import attachShaderImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +attachShader = runFn3 attachShaderImpl + foreign import bindAttribLocationImpl """ function bindAttribLocationImpl(webgl, program, index, name) { return function () { @@ -71,6 +218,9 @@ foreign import bindAttribLocationImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) +bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (webgl :: WebGL | eff) Unit +bindAttribLocation = runFn4 bindAttribLocationImpl + foreign import bindBufferImpl """ function bindBufferImpl(webgl, target, buffer) { return function () { @@ -79,6 +229,9 @@ foreign import bindBufferImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +bindBuffer = runFn3 bindBufferImpl + foreign import bindFramebufferImpl """ function bindFramebufferImpl(webgl, target, framebuffer) { return function () { @@ -87,6 +240,9 @@ foreign import bindFramebufferImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +bindFramebuffer = runFn3 bindFramebufferImpl + foreign import bindRenderbufferImpl """ function bindRenderbufferImpl(webgl, target, renderbuffer) { return function () { @@ -95,6 +251,9 @@ foreign import bindRenderbufferImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +bindRenderbuffer = runFn3 bindRenderbufferImpl + foreign import bindTextureImpl """ function bindTextureImpl(webgl, target, texture) { return function () { @@ -103,6 +262,9 @@ foreign import bindTextureImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +bindTexture = runFn3 bindTextureImpl + foreign import blendColorImpl """ function blendColorImpl(webgl, red, green, blue, alpha) { return function () { @@ -111,6 +273,9 @@ foreign import blendColorImpl """ } """ :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +blendColor = runFn5 blendColorImpl + foreign import blendEquationImpl """ function blendEquationImpl(webgl, mode) { return function () { @@ -119,6 +284,9 @@ foreign import blendEquationImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquation = runFn2 blendEquationImpl + foreign import blendEquationSeparateImpl """ function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { return function () { @@ -127,6 +295,9 @@ foreign import blendEquationSeparateImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquationSeparate = runFn3 blendEquationSeparateImpl + foreign import blendFuncImpl """ function blendFuncImpl(webgl, sfactor, dfactor) { return function () { @@ -135,6 +306,9 @@ foreign import blendFuncImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFunc = runFn3 blendFuncImpl + foreign import blendFuncSeparateImpl """ function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { return function () { @@ -143,6 +317,9 @@ foreign import blendFuncSeparateImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFuncSeparate = runFn5 blendFuncSeparateImpl + foreign import bufferDataImpl """ function bufferDataImpl(webgl, target, data, usage) { return function () { @@ -151,6 +328,9 @@ foreign import bufferDataImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) +bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (webgl :: WebGL | eff) Unit +bufferData = runFn4 bufferDataImpl + foreign import bufferSubDataImpl """ function bufferSubDataImpl(webgl, target, offset, data) { return function () { @@ -159,6 +339,9 @@ foreign import bufferSubDataImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +bufferSubData = runFn4 bufferSubDataImpl + foreign import checkFramebufferStatusImpl """ function checkFramebufferStatusImpl(webgl, target) { return function () { @@ -167,6 +350,9 @@ foreign import checkFramebufferStatusImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) +checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLenum +checkFramebufferStatus = runFn2 checkFramebufferStatusImpl + foreign import clearImpl """ function clearImpl(webgl, mask) { return function () { @@ -175,6 +361,9 @@ foreign import clearImpl """ } """ :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) +clear :: forall eff. WebGLContext -> GLbitfield -> Eff (webgl :: WebGL | eff) Unit +clear = runFn2 clearImpl + foreign import clearColorImpl """ function clearColorImpl(webgl, red, green, blue, alpha) { return function () { @@ -183,6 +372,9 @@ foreign import clearColorImpl """ } """ :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearColor = runFn5 clearColorImpl + foreign import clearDepthImpl """ function clearDepthImpl(webgl, depth) { return function () { @@ -191,6 +383,9 @@ foreign import clearDepthImpl """ } """ :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) +clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearDepth = runFn2 clearDepthImpl + foreign import clearStencilImpl """ function clearStencilImpl(webgl, s) { return function () { @@ -199,6 +394,9 @@ foreign import clearStencilImpl """ } """ :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) +clearStencil :: forall eff. WebGLContext -> GLint -> Eff (webgl :: WebGL | eff) Unit +clearStencil = runFn2 clearStencilImpl + foreign import colorMaskImpl """ function colorMaskImpl(webgl, red, green, blue, alpha) { return function () { @@ -207,6 +405,9 @@ foreign import colorMaskImpl """ } """ :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) +colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +colorMask = runFn5 colorMaskImpl + foreign import compileShaderImpl """ function compileShaderImpl(webgl, shader) { return function () { @@ -215,6 +416,9 @@ foreign import compileShaderImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +compileShader = runFn2 compileShaderImpl + foreign import copyTexImage2DImpl """ function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { return function () { @@ -223,6 +427,9 @@ foreign import copyTexImage2DImpl """ } """ :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) +copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (webgl :: WebGL | eff) Unit +copyTexImage2D = runFn9 copyTexImage2DImpl + foreign import copyTexSubImage2DImpl """ function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { return function () { @@ -231,6 +438,9 @@ foreign import copyTexSubImage2DImpl """ } """ :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +copyTexSubImage2D = runFn9 copyTexSubImage2DImpl + foreign import createBufferImpl """ function createBufferImpl(webgl) { return function () { @@ -239,6 +449,9 @@ foreign import createBufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) +createBuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLBuffer +createBuffer = runFn1 createBufferImpl + foreign import createFramebufferImpl """ function createFramebufferImpl(webgl) { return function () { @@ -247,6 +460,9 @@ foreign import createFramebufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) +createFramebuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLFramebuffer +createFramebuffer = runFn1 createFramebufferImpl + foreign import createProgramImpl """ function createProgramImpl(webgl) { return function () { @@ -255,6 +471,9 @@ foreign import createProgramImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) +createProgram :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLProgram +createProgram = runFn1 createProgramImpl + foreign import createRenderbufferImpl """ function createRenderbufferImpl(webgl) { return function () { @@ -263,6 +482,9 @@ foreign import createRenderbufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) +createRenderbuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLRenderbuffer +createRenderbuffer = runFn1 createRenderbufferImpl + foreign import createShaderImpl """ function createShaderImpl(webgl, type) { return function () { @@ -271,6 +493,9 @@ foreign import createShaderImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) +createShader :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) WebGLShader +createShader = runFn2 createShaderImpl + foreign import createTextureImpl """ function createTextureImpl(webgl) { return function () { @@ -279,6 +504,9 @@ foreign import createTextureImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) +createTexture :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLTexture +createTexture = runFn1 createTextureImpl + foreign import cullFaceImpl """ function cullFaceImpl(webgl, mode) { return function () { @@ -287,6 +515,9 @@ foreign import cullFaceImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +cullFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +cullFace = runFn2 cullFaceImpl + foreign import deleteBufferImpl """ function deleteBufferImpl(webgl, buffer) { return function () { @@ -295,6 +526,9 @@ foreign import deleteBufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +deleteBuffer = runFn2 deleteBufferImpl + foreign import deleteFramebufferImpl """ function deleteFramebufferImpl(webgl, framebuffer) { return function () { @@ -303,6 +537,9 @@ foreign import deleteFramebufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +deleteFramebuffer = runFn2 deleteFramebufferImpl + foreign import deleteProgramImpl """ function deleteProgramImpl(webgl, program) { return function () { @@ -311,6 +548,9 @@ foreign import deleteProgramImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +deleteProgram = runFn2 deleteProgramImpl + foreign import deleteRenderbufferImpl """ function deleteRenderbufferImpl(webgl, renderbuffer) { return function () { @@ -319,6 +559,9 @@ foreign import deleteRenderbufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +deleteRenderbuffer = runFn2 deleteRenderbufferImpl + foreign import deleteShaderImpl """ function deleteShaderImpl(webgl, shader) { return function () { @@ -327,6 +570,9 @@ foreign import deleteShaderImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +deleteShader = runFn2 deleteShaderImpl + foreign import deleteTextureImpl """ function deleteTextureImpl(webgl, texture) { return function () { @@ -335,6 +581,9 @@ foreign import deleteTextureImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +deleteTexture = runFn2 deleteTextureImpl + foreign import depthFuncImpl """ function depthFuncImpl(webgl, func) { return function () { @@ -343,6 +592,9 @@ foreign import depthFuncImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +depthFunc = runFn2 depthFuncImpl + foreign import depthMaskImpl """ function depthMaskImpl(webgl, flag) { return function () { @@ -351,6 +603,9 @@ foreign import depthMaskImpl """ } """ :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) +depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +depthMask = runFn2 depthMaskImpl + foreign import depthRangeImpl """ function depthRangeImpl(webgl, zNear, zFar) { return function () { @@ -359,6 +614,9 @@ foreign import depthRangeImpl """ } """ :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +depthRange = runFn3 depthRangeImpl + foreign import detachShaderImpl """ function detachShaderImpl(webgl, program, shader) { return function () { @@ -367,6 +625,9 @@ foreign import detachShaderImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +detachShader = runFn3 detachShaderImpl + foreign import disableImpl """ function disableImpl(webgl, cap) { return function () { @@ -375,6 +636,9 @@ foreign import disableImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +disable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +disable = runFn2 disableImpl + foreign import disableVertexAttribArrayImpl """ function disableVertexAttribArrayImpl(webgl, index) { return function () { @@ -383,6 +647,9 @@ foreign import disableVertexAttribArrayImpl """ } """ :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +disableVertexAttribArray = runFn2 disableVertexAttribArrayImpl + foreign import drawArraysImpl """ function drawArraysImpl(webgl, mode, first, count) { return function () { @@ -391,6 +658,9 @@ foreign import drawArraysImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) +drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +drawArrays = runFn4 drawArraysImpl + foreign import drawElementsImpl """ function drawElementsImpl(webgl, mode, count, type, offset) { return function () { @@ -399,6 +669,9 @@ foreign import drawElementsImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) +drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +drawElements = runFn5 drawElementsImpl + foreign import enableImpl """ function enableImpl(webgl, cap) { return function () { @@ -407,6 +680,9 @@ foreign import enableImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +enable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +enable = runFn2 enableImpl + foreign import enableVertexAttribArrayImpl """ function enableVertexAttribArrayImpl(webgl, index) { return function () { @@ -415,6 +691,9 @@ foreign import enableVertexAttribArrayImpl """ } """ :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +enableVertexAttribArray = runFn2 enableVertexAttribArrayImpl + foreign import finishImpl """ function finishImpl(webgl) { return function () { @@ -423,6 +702,9 @@ foreign import finishImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +finish :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +finish = runFn1 finishImpl + foreign import flushImpl """ function flushImpl(webgl) { return function () { @@ -431,6 +713,9 @@ foreign import flushImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +flush :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +flush = runFn1 flushImpl + foreign import framebufferRenderbufferImpl """ function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { return function () { @@ -439,6 +724,9 @@ foreign import framebufferRenderbufferImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +framebufferRenderbuffer = runFn5 framebufferRenderbufferImpl + foreign import framebufferTexture2DImpl """ function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { return function () { @@ -447,6 +735,9 @@ foreign import framebufferTexture2DImpl """ } """ :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) +framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (webgl :: WebGL | eff) Unit +framebufferTexture2D = runFn6 framebufferTexture2DImpl + foreign import frontFaceImpl """ function frontFaceImpl(webgl, mode) { return function () { @@ -455,6 +746,9 @@ foreign import frontFaceImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +frontFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +frontFace = runFn2 frontFaceImpl + foreign import generateMipmapImpl """ function generateMipmapImpl(webgl, target) { return function () { @@ -463,6 +757,9 @@ foreign import generateMipmapImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +generateMipmap = runFn2 generateMipmapImpl + foreign import getActiveAttribImpl """ function getActiveAttribImpl(webgl, program, index) { return function () { @@ -471,6 +768,9 @@ foreign import getActiveAttribImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveAttrib = runFn3 getActiveAttribImpl + foreign import getActiveUniformImpl """ function getActiveUniformImpl(webgl, program, index) { return function () { @@ -479,6 +779,9 @@ foreign import getActiveUniformImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveUniform = runFn3 getActiveUniformImpl + foreign import getAttachedShadersImpl """ function getAttachedShadersImpl(webgl, program) { return function () { @@ -487,6 +790,9 @@ foreign import getAttachedShadersImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) [WebGLShader] +getAttachedShaders = runFn2 getAttachedShadersImpl + foreign import getAttribLocationImpl """ function getAttribLocationImpl(webgl, program, name) { return function () { @@ -495,6 +801,9 @@ foreign import getAttribLocationImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) +getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) GLint +getAttribLocation = runFn3 getAttribLocationImpl + foreign import getParameterImpl """ function getParameterImpl(webgl, pname) { return function () { @@ -503,6 +812,9 @@ foreign import getParameterImpl """ } """ :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) a +getParameter = runFn2 getParameterImpl + foreign import getBufferParameterImpl """ function getBufferParameterImpl(webgl, target, pname) { return function () { @@ -511,6 +823,9 @@ foreign import getBufferParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getBufferParameter = runFn3 getBufferParameterImpl + foreign import getErrorImpl """ function getErrorImpl(webgl) { return function () { @@ -519,6 +834,9 @@ foreign import getErrorImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) +getError :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) GLenum +getError = runFn1 getErrorImpl + foreign import getFramebufferAttachmentParameterImpl """ function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { return function () { @@ -527,6 +845,9 @@ foreign import getFramebufferAttachmentParameterImpl """ } """ :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getFramebufferAttachmentParameter = runFn4 getFramebufferAttachmentParameterImpl + foreign import getProgramParameterImpl """ function getProgramParameterImpl(webgl, program, pname) { return function () { @@ -535,6 +856,9 @@ foreign import getProgramParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (webgl :: WebGL | eff) a +getProgramParameter = runFn3 getProgramParameterImpl + foreign import getProgramInfoLogImpl """ function getProgramInfoLogImpl(webgl, program) { return function () { @@ -543,6 +867,9 @@ foreign import getProgramInfoLogImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) DOMString +getProgramInfoLog = runFn2 getProgramInfoLogImpl + foreign import getRenderbufferParameterImpl """ function getRenderbufferParameterImpl(webgl, target, pname) { return function () { @@ -551,6 +878,9 @@ foreign import getRenderbufferParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getRenderbufferParameter = runFn3 getRenderbufferParameterImpl + foreign import getShaderParameterImpl """ function getShaderParameterImpl(webgl, shader, pname) { return function () { @@ -559,6 +889,9 @@ foreign import getShaderParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (webgl :: WebGL | eff) a +getShaderParameter = runFn3 getShaderParameterImpl + foreign import getShaderInfoLogImpl """ function getShaderInfoLogImpl(webgl, shader) { return function () { @@ -567,6 +900,9 @@ foreign import getShaderInfoLogImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderInfoLog = runFn2 getShaderInfoLogImpl + foreign import getShaderSourceImpl """ function getShaderSourceImpl(webgl, shader) { return function () { @@ -575,6 +911,9 @@ foreign import getShaderSourceImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderSource = runFn2 getShaderSourceImpl + foreign import getTexParameterImpl """ function getTexParameterImpl(webgl, target, pname) { return function () { @@ -583,6 +922,9 @@ foreign import getTexParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getTexParameter = runFn3 getTexParameterImpl + foreign import getUniformImpl """ function getUniformImpl(webgl, program, location) { return function () { @@ -591,6 +933,9 @@ foreign import getUniformImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (webgl :: WebGL | eff) a +getUniform = runFn3 getUniformImpl + foreign import getUniformLocationImpl """ function getUniformLocationImpl(webgl, program, name) { return function () { @@ -599,6 +944,9 @@ foreign import getUniformLocationImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) WebGLUniformLocation +getUniformLocation = runFn3 getUniformLocationImpl + foreign import getVertexAttribImpl """ function getVertexAttribImpl(webgl, index, pname) { return function () { @@ -607,6 +955,9 @@ foreign import getVertexAttribImpl """ } """ :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) a +getVertexAttrib = runFn3 getVertexAttribImpl + foreign import getVertexAttribOffsetImpl """ function getVertexAttribOffsetImpl(webgl, index, pname) { return function () { @@ -615,6 +966,9 @@ foreign import getVertexAttribOffsetImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) +getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) GLsizeiptr +getVertexAttribOffset = runFn3 getVertexAttribOffsetImpl + foreign import hintImpl """ function hintImpl(webgl, target, mode) { return function () { @@ -623,6 +977,9 @@ foreign import hintImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +hint = runFn3 hintImpl + foreign import isBufferImpl """ function isBufferImpl(webgl, buffer) { return function () { @@ -631,6 +988,9 @@ foreign import isBufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) +isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) GLboolean +isBuffer = runFn2 isBufferImpl + foreign import isEnabledImpl """ function isEnabledImpl(webgl, cap) { return function () { @@ -639,6 +999,9 @@ foreign import isEnabledImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) +isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLboolean +isEnabled = runFn2 isEnabledImpl + foreign import isFramebufferImpl """ function isFramebufferImpl(webgl, framebuffer) { return function () { @@ -647,6 +1010,9 @@ foreign import isFramebufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) +isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) GLboolean +isFramebuffer = runFn2 isFramebufferImpl + foreign import isProgramImpl """ function isProgramImpl(webgl, program) { return function () { @@ -655,6 +1021,9 @@ foreign import isProgramImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) +isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) GLboolean +isProgram = runFn2 isProgramImpl + foreign import isRenderbufferImpl """ function isRenderbufferImpl(webgl, renderbuffer) { return function () { @@ -663,6 +1032,9 @@ foreign import isRenderbufferImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) +isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) GLboolean +isRenderbuffer = runFn2 isRenderbufferImpl + foreign import isShaderImpl """ function isShaderImpl(webgl, shader) { return function () { @@ -671,6 +1043,9 @@ foreign import isShaderImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) +isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) GLboolean +isShader = runFn2 isShaderImpl + foreign import isTextureImpl """ function isTextureImpl(webgl, texture) { return function () { @@ -679,6 +1054,9 @@ foreign import isTextureImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) +isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) GLboolean +isTexture = runFn2 isTextureImpl + foreign import lineWidthImpl """ function lineWidthImpl(webgl, width) { return function () { @@ -687,6 +1065,9 @@ foreign import lineWidthImpl """ } """ :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) +lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +lineWidth = runFn2 lineWidthImpl + foreign import linkProgramImpl """ function linkProgramImpl(webgl, program) { return function () { @@ -695,6 +1076,9 @@ foreign import linkProgramImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +linkProgram = runFn2 linkProgramImpl + foreign import pixelStoreiImpl """ function pixelStoreiImpl(webgl, pname, param) { return function () { @@ -703,6 +1087,9 @@ foreign import pixelStoreiImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +pixelStorei = runFn3 pixelStoreiImpl + foreign import polygonOffsetImpl """ function polygonOffsetImpl(webgl, factor, units) { return function () { @@ -711,6 +1098,9 @@ foreign import polygonOffsetImpl """ } """ :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +polygonOffset = runFn3 polygonOffsetImpl + foreign import readPixelsImpl """ function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { return function () { @@ -719,6 +1109,9 @@ foreign import readPixelsImpl """ } """ :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +readPixels = runFn8 readPixelsImpl + foreign import renderbufferStorageImpl """ function renderbufferStorageImpl(webgl, target, internalformat, width, height) { return function () { @@ -727,6 +1120,9 @@ foreign import renderbufferStorageImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +renderbufferStorage = runFn5 renderbufferStorageImpl + foreign import sampleCoverageImpl """ function sampleCoverageImpl(webgl, value, invert) { return function () { @@ -735,6 +1131,9 @@ foreign import sampleCoverageImpl """ } """ :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) +sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +sampleCoverage = runFn3 sampleCoverageImpl + foreign import scissorImpl """ function scissorImpl(webgl, x, y, width, height) { return function () { @@ -743,6 +1142,9 @@ foreign import scissorImpl """ } """ :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +scissor = runFn5 scissorImpl + foreign import shaderSourceImpl """ function shaderSourceImpl(webgl, shader, source) { return function () { @@ -751,6 +1153,9 @@ foreign import shaderSourceImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) +shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (webgl :: WebGL | eff) Unit +shaderSource = runFn3 shaderSourceImpl + foreign import stencilFuncImpl """ function stencilFuncImpl(webgl, func, ref, mask) { return function () { @@ -759,6 +1164,9 @@ foreign import stencilFuncImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFunc = runFn4 stencilFuncImpl + foreign import stencilFuncSeparateImpl """ function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { return function () { @@ -767,6 +1175,9 @@ foreign import stencilFuncSeparateImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFuncSeparate = runFn5 stencilFuncSeparateImpl + foreign import stencilMaskImpl """ function stencilMaskImpl(webgl, mask) { return function () { @@ -775,6 +1186,9 @@ foreign import stencilMaskImpl """ } """ :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMask = runFn2 stencilMaskImpl + foreign import stencilMaskSeparateImpl """ function stencilMaskSeparateImpl(webgl, face, mask) { return function () { @@ -783,6 +1197,9 @@ foreign import stencilMaskSeparateImpl """ } """ :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMaskSeparate = runFn3 stencilMaskSeparateImpl + foreign import stencilOpImpl """ function stencilOpImpl(webgl, fail, zfail, zpass) { return function () { @@ -791,6 +1208,9 @@ foreign import stencilOpImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOp = runFn4 stencilOpImpl + foreign import stencilOpSeparateImpl """ function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { return function () { @@ -799,6 +1219,9 @@ foreign import stencilOpSeparateImpl """ } """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOpSeparate = runFn5 stencilOpSeparateImpl + foreign import texImage2DImpl """ function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { return function () { @@ -807,6 +1230,9 @@ foreign import texImage2DImpl """ } """ :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texImage2D = runFn10 texImage2DImpl + foreign import texParameterfImpl """ function texParameterfImpl(webgl, target, pname, param) { return function () { @@ -815,6 +1241,9 @@ foreign import texParameterfImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) +texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +texParameterf = runFn4 texParameterfImpl + foreign import texParameteriImpl """ function texParameteriImpl(webgl, target, pname, param) { return function () { @@ -823,6 +1252,9 @@ foreign import texParameteriImpl """ } """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +texParameteri = runFn4 texParameteriImpl + foreign import texSubImage2DImpl """ function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { return function () { @@ -831,6 +1263,9 @@ foreign import texSubImage2DImpl """ } """ :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texSubImage2D = runFn10 texSubImage2DImpl + foreign import uniform1fImpl """ function uniform1fImpl(webgl, location, x) { return function () { @@ -839,6 +1274,9 @@ foreign import uniform1fImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform1f = runFn3 uniform1fImpl + foreign import uniform1fvImpl """ function uniform1fvImpl(webgl, location, v) { return function () { @@ -847,6 +1285,9 @@ foreign import uniform1fvImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform1fv = runFn3 uniform1fvImpl + foreign import uniform1iImpl """ function uniform1iImpl(webgl, location, x) { return function () { @@ -855,6 +1296,9 @@ foreign import uniform1iImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) +uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform1i = runFn3 uniform1iImpl + foreign import uniform1ivImpl """ function uniform1ivImpl(webgl, location, v) { return function () { @@ -863,6 +1307,9 @@ foreign import uniform1ivImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform1iv = runFn3 uniform1ivImpl + foreign import uniform2fImpl """ function uniform2fImpl(webgl, location, x, y) { return function () { @@ -871,6 +1318,9 @@ foreign import uniform2fImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform2f = runFn4 uniform2fImpl + foreign import uniform2fvImpl """ function uniform2fvImpl(webgl, location, v) { return function () { @@ -879,6 +1329,9 @@ foreign import uniform2fvImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform2fv = runFn3 uniform2fvImpl + foreign import uniform2iImpl """ function uniform2iImpl(webgl, location, x, y) { return function () { @@ -887,6 +1340,9 @@ foreign import uniform2iImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform2i = runFn4 uniform2iImpl + foreign import uniform2ivImpl """ function uniform2ivImpl(webgl, location, v) { return function () { @@ -895,6 +1351,9 @@ foreign import uniform2ivImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform2iv = runFn3 uniform2ivImpl + foreign import uniform3fImpl """ function uniform3fImpl(webgl, location, x, y, z) { return function () { @@ -903,6 +1362,9 @@ foreign import uniform3fImpl """ } """ :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform3f = runFn5 uniform3fImpl + foreign import uniform3fvImpl """ function uniform3fvImpl(webgl, location, v) { return function () { @@ -911,6 +1373,9 @@ foreign import uniform3fvImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform3fv = runFn3 uniform3fvImpl + foreign import uniform3iImpl """ function uniform3iImpl(webgl, location, x, y, z) { return function () { @@ -919,6 +1384,9 @@ foreign import uniform3iImpl """ } """ :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform3i = runFn5 uniform3iImpl + foreign import uniform3ivImpl """ function uniform3ivImpl(webgl, location, v) { return function () { @@ -927,6 +1395,9 @@ foreign import uniform3ivImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform3iv = runFn3 uniform3ivImpl + foreign import uniform4fImpl """ function uniform4fImpl(webgl, location, x, y, z, w) { return function () { @@ -935,6 +1406,9 @@ foreign import uniform4fImpl """ } """ :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform4f = runFn6 uniform4fImpl + foreign import uniform4fvImpl """ function uniform4fvImpl(webgl, location, v) { return function () { @@ -943,6 +1417,9 @@ foreign import uniform4fvImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform4fv = runFn3 uniform4fvImpl + foreign import uniform4iImpl """ function uniform4iImpl(webgl, location, x, y, z, w) { return function () { @@ -951,6 +1428,9 @@ foreign import uniform4iImpl """ } """ :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform4i = runFn6 uniform4iImpl + foreign import uniform4ivImpl """ function uniform4ivImpl(webgl, location, v) { return function () { @@ -959,6 +1439,9 @@ foreign import uniform4ivImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform4iv = runFn3 uniform4ivImpl + foreign import uniformMatrix2fvImpl """ function uniformMatrix2fvImpl(webgl, location, transpose, value) { return function () { @@ -967,6 +1450,9 @@ foreign import uniformMatrix2fvImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix2fv = runFn4 uniformMatrix2fvImpl + foreign import uniformMatrix3fvImpl """ function uniformMatrix3fvImpl(webgl, location, transpose, value) { return function () { @@ -975,6 +1461,9 @@ foreign import uniformMatrix3fvImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix3fv = runFn4 uniformMatrix3fvImpl + foreign import uniformMatrix4fvImpl """ function uniformMatrix4fvImpl(webgl, location, transpose, value) { return function () { @@ -983,6 +1472,9 @@ foreign import uniformMatrix4fvImpl """ } """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix4fv = runFn4 uniformMatrix4fvImpl + foreign import useProgramImpl """ function useProgramImpl(webgl, program) { return function () { @@ -991,6 +1483,9 @@ foreign import useProgramImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +useProgram = runFn2 useProgramImpl + foreign import validateProgramImpl """ function validateProgramImpl(webgl, program) { return function () { @@ -999,6 +1494,9 @@ foreign import validateProgramImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +validateProgram = runFn2 validateProgramImpl + foreign import vertexAttrib1fImpl """ function vertexAttrib1fImpl(webgl, indx, x) { return function () { @@ -1007,6 +1505,9 @@ foreign import vertexAttrib1fImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1f = runFn3 vertexAttrib1fImpl + foreign import vertexAttrib1fvImpl """ function vertexAttrib1fvImpl(webgl, indx, values) { return function () { @@ -1015,6 +1516,9 @@ foreign import vertexAttrib1fvImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1fv = runFn3 vertexAttrib1fvImpl + foreign import vertexAttrib2fImpl """ function vertexAttrib2fImpl(webgl, indx, x, y) { return function () { @@ -1023,6 +1527,9 @@ foreign import vertexAttrib2fImpl """ } """ :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2f = runFn4 vertexAttrib2fImpl + foreign import vertexAttrib2fvImpl """ function vertexAttrib2fvImpl(webgl, indx, values) { return function () { @@ -1031,6 +1538,9 @@ foreign import vertexAttrib2fvImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2fv = runFn3 vertexAttrib2fvImpl + foreign import vertexAttrib3fImpl """ function vertexAttrib3fImpl(webgl, indx, x, y, z) { return function () { @@ -1039,6 +1549,9 @@ foreign import vertexAttrib3fImpl """ } """ :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3f = runFn5 vertexAttrib3fImpl + foreign import vertexAttrib3fvImpl """ function vertexAttrib3fvImpl(webgl, indx, values) { return function () { @@ -1047,6 +1560,9 @@ foreign import vertexAttrib3fvImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3fv = runFn3 vertexAttrib3fvImpl + foreign import vertexAttrib4fImpl """ function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { return function () { @@ -1055,6 +1571,9 @@ foreign import vertexAttrib4fImpl """ } """ :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4f = runFn6 vertexAttrib4fImpl + foreign import vertexAttrib4fvImpl """ function vertexAttrib4fvImpl(webgl, indx, values) { return function () { @@ -1063,6 +1582,9 @@ foreign import vertexAttrib4fvImpl """ } """ :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4fv = runFn3 vertexAttrib4fvImpl + foreign import vertexAttribPointerImpl """ function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { return function () { @@ -1071,6 +1593,9 @@ foreign import vertexAttribPointerImpl """ } """ :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) +vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +vertexAttribPointer = runFn7 vertexAttribPointerImpl + foreign import viewportImpl """ function viewportImpl(webgl, x, y, width, height) { return function () { @@ -1079,3 +1604,6 @@ foreign import viewportImpl """ } """ :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +viewport = runFn5 viewportImpl + diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 080ac53..1773d37 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -5,6 +5,8 @@ module Graphics.WebGL.Raw.Types where import Data.ArrayBuffer.Types (Float32Array ()) +foreign import data WebGL :: ! + type DOMString = String type FloatArray = Float32Array type GLbitfield = Number From 9068c6d6535d8484464a0acd9d1db80b0338b734 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 27 May 2015 13:58:28 -0500 Subject: [PATCH 26/51] print WebGL enums as camelCase --- docs/README.md | 1746 ++++++++++++++--------------- generator/IDL/Printer.hs | 26 +- src/Graphics/WebGL/Raw.purs | 2 - src/Graphics/WebGL/Raw/Enums.purs | 1203 ++++++++++---------- src/Graphics/WebGL/Raw/Types.purs | 2 +- 5 files changed, 1492 insertions(+), 1487 deletions(-) diff --git a/docs/README.md b/docs/README.md index 11a5e9d..1ed2f19 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,941 +3,934 @@ ## Module Graphics.WebGL.Raw -#### `WebGL` - -``` purescript -data WebGL :: ! -``` - - -#### `getContextAttributesImpl` +#### `getContextAttributes` ``` purescript -getContextAttributesImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) +getContextAttributes :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLContextAttributes ``` -#### `isContextLostImpl` +#### `isContextLost` ``` purescript -isContextLostImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) +isContextLost :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Boolean ``` -#### `getSupportedExtensionsImpl` +#### `getSupportedExtensions` ``` purescript -getSupportedExtensionsImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) +getSupportedExtensions :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) [DOMString] ``` -#### `getExtensionImpl` +#### `getExtension` ``` purescript -getExtensionImpl :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (webgl :: WebGL | eff) a ``` -#### `activeTextureImpl` +#### `activeTexture` ``` purescript -activeTextureImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `attachShaderImpl` +#### `attachShader` ``` purescript -attachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bindAttribLocationImpl` +#### `bindAttribLocation` ``` purescript -bindAttribLocationImpl :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) +bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bindBufferImpl` +#### `bindBuffer` ``` purescript -bindBufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bindFramebufferImpl` +#### `bindFramebuffer` ``` purescript -bindFramebufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bindRenderbufferImpl` +#### `bindRenderbuffer` ``` purescript -bindRenderbufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bindTextureImpl` +#### `bindTexture` ``` purescript -bindTextureImpl :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit ``` -#### `blendColorImpl` +#### `blendColor` ``` purescript -blendColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit ``` -#### `blendEquationImpl` +#### `blendEquation` ``` purescript -blendEquationImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `blendEquationSeparateImpl` +#### `blendEquationSeparate` ``` purescript -blendEquationSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `blendFuncImpl` +#### `blendFunc` ``` purescript -blendFuncImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `blendFuncSeparateImpl` +#### `blendFuncSeparate` ``` purescript -blendFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bufferDataImpl` +#### `bufferData` ``` purescript -bufferDataImpl :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) +bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `bufferSubDataImpl` +#### `bufferSubData` ``` purescript -bufferSubDataImpl :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit ``` -#### `checkFramebufferStatusImpl` +#### `checkFramebufferStatus` ``` purescript -checkFramebufferStatusImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) +checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLenum ``` -#### `clearImpl` +#### `clear` ``` purescript -clearImpl :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) +clear :: forall eff. WebGLContext -> GLbitfield -> Eff (webgl :: WebGL | eff) Unit ``` -#### `clearColorImpl` +#### `clearColor` ``` purescript -clearColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit ``` -#### `clearDepthImpl` +#### `clearDepth` ``` purescript -clearDepthImpl :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) +clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (webgl :: WebGL | eff) Unit ``` -#### `clearStencilImpl` +#### `clearStencil` ``` purescript -clearStencilImpl :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) +clearStencil :: forall eff. WebGLContext -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `colorMaskImpl` +#### `colorMask` ``` purescript -colorMaskImpl :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) +colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGL | eff) Unit ``` -#### `compileShaderImpl` +#### `compileShader` ``` purescript -compileShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit ``` -#### `copyTexImage2DImpl` +#### `copyTexImage2D` ``` purescript -copyTexImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) +copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `copyTexSubImage2DImpl` +#### `copyTexSubImage2D` ``` purescript -copyTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit ``` -#### `createBufferImpl` +#### `createBuffer` ``` purescript -createBufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) +createBuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLBuffer ``` -#### `createFramebufferImpl` +#### `createFramebuffer` ``` purescript -createFramebufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) +createFramebuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLFramebuffer ``` -#### `createProgramImpl` +#### `createProgram` ``` purescript -createProgramImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) +createProgram :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLProgram ``` -#### `createRenderbufferImpl` +#### `createRenderbuffer` ``` purescript -createRenderbufferImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) +createRenderbuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLRenderbuffer ``` -#### `createShaderImpl` +#### `createShader` ``` purescript -createShaderImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) +createShader :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) WebGLShader ``` -#### `createTextureImpl` +#### `createTexture` ``` purescript -createTextureImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) +createTexture :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLTexture ``` -#### `cullFaceImpl` +#### `cullFace` ``` purescript -cullFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +cullFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteBufferImpl` +#### `deleteBuffer` ``` purescript -deleteBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteFramebufferImpl` +#### `deleteFramebuffer` ``` purescript -deleteFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteProgramImpl` +#### `deleteProgram` ``` purescript -deleteProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteRenderbufferImpl` +#### `deleteRenderbuffer` ``` purescript -deleteRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteShaderImpl` +#### `deleteShader` ``` purescript -deleteShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit ``` -#### `deleteTextureImpl` +#### `deleteTexture` ``` purescript -deleteTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit ``` -#### `depthFuncImpl` +#### `depthFunc` ``` purescript -depthFuncImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `depthMaskImpl` +#### `depthMask` ``` purescript -depthMaskImpl :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) +depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (webgl :: WebGL | eff) Unit ``` -#### `depthRangeImpl` +#### `depthRange` ``` purescript -depthRangeImpl :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit ``` -#### `detachShaderImpl` +#### `detachShader` ``` purescript -detachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit ``` -#### `disableImpl` +#### `disable` ``` purescript -disableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +disable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `disableVertexAttribArrayImpl` +#### `disableVertexAttribArray` ``` purescript -disableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `drawArraysImpl` +#### `drawArrays` ``` purescript -drawArraysImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) +drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (webgl :: WebGL | eff) Unit ``` -#### `drawElementsImpl` +#### `drawElements` ``` purescript -drawElementsImpl :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) +drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (webgl :: WebGL | eff) Unit ``` -#### `enableImpl` +#### `enable` ``` purescript -enableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +enable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `enableVertexAttribArrayImpl` +#### `enableVertexAttribArray` ``` purescript -enableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `finishImpl` +#### `finish` ``` purescript -finishImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +finish :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit ``` -#### `flushImpl` +#### `flush` ``` purescript -flushImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +flush :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit ``` -#### `framebufferRenderbufferImpl` +#### `framebufferRenderbuffer` ``` purescript -framebufferRenderbufferImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit ``` -#### `framebufferTexture2DImpl` +#### `framebufferTexture2D` ``` purescript -framebufferTexture2DImpl :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) +framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `frontFaceImpl` +#### `frontFace` ``` purescript -frontFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +frontFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `generateMipmapImpl` +#### `generateMipmap` ``` purescript -generateMipmapImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `getActiveAttribImpl` +#### `getActiveAttrib` ``` purescript -getActiveAttribImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo ``` -#### `getActiveUniformImpl` +#### `getActiveUniform` ``` purescript -getActiveUniformImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo ``` -#### `getAttachedShadersImpl` +#### `getAttachedShaders` ``` purescript -getAttachedShadersImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) [WebGLShader] ``` -#### `getAttribLocationImpl` +#### `getAttribLocation` ``` purescript -getAttribLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) +getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) GLint ``` -#### `getParameterImpl` +#### `getParameter` ``` purescript -getParameterImpl :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getBufferParameterImpl` +#### `getBufferParameter` ``` purescript -getBufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getErrorImpl` +#### `getError` ``` purescript -getErrorImpl :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) +getError :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) GLenum ``` -#### `getFramebufferAttachmentParameterImpl` +#### `getFramebufferAttachmentParameter` ``` purescript -getFramebufferAttachmentParameterImpl :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getProgramParameterImpl` +#### `getProgramParameter` ``` purescript -getProgramParameterImpl :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getProgramInfoLogImpl` +#### `getProgramInfoLog` ``` purescript -getProgramInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) DOMString ``` -#### `getRenderbufferParameterImpl` +#### `getRenderbufferParameter` ``` purescript -getRenderbufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getShaderParameterImpl` +#### `getShaderParameter` ``` purescript -getShaderParameterImpl :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getShaderInfoLogImpl` +#### `getShaderInfoLog` ``` purescript -getShaderInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString ``` -#### `getShaderSourceImpl` +#### `getShaderSource` ``` purescript -getShaderSourceImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString ``` -#### `getTexParameterImpl` +#### `getTexParameter` ``` purescript -getTexParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getUniformImpl` +#### `getUniform` ``` purescript -getUniformImpl :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (webgl :: WebGL | eff) a ``` -#### `getUniformLocationImpl` +#### `getUniformLocation` ``` purescript -getUniformLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) WebGLUniformLocation ``` -#### `getVertexAttribImpl` +#### `getVertexAttrib` ``` purescript -getVertexAttribImpl :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) a ``` -#### `getVertexAttribOffsetImpl` +#### `getVertexAttribOffset` ``` purescript -getVertexAttribOffsetImpl :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) +getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) GLsizeiptr ``` -#### `hintImpl` +#### `hint` ``` purescript -hintImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `isBufferImpl` +#### `isBuffer` ``` purescript -isBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) +isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isEnabledImpl` +#### `isEnabled` ``` purescript -isEnabledImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) +isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isFramebufferImpl` +#### `isFramebuffer` ``` purescript -isFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) +isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isProgramImpl` +#### `isProgram` ``` purescript -isProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) +isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isRenderbufferImpl` +#### `isRenderbuffer` ``` purescript -isRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) +isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isShaderImpl` +#### `isShader` ``` purescript -isShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) +isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `isTextureImpl` +#### `isTexture` ``` purescript -isTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) +isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) GLboolean ``` -#### `lineWidthImpl` +#### `lineWidth` ``` purescript -lineWidthImpl :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) +lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `linkProgramImpl` +#### `linkProgram` ``` purescript -linkProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit ``` -#### `pixelStoreiImpl` +#### `pixelStorei` ``` purescript -pixelStoreiImpl :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `polygonOffsetImpl` +#### `polygonOffset` ``` purescript -polygonOffsetImpl :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `readPixelsImpl` +#### `readPixels` ``` purescript -readPixelsImpl :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit ``` -#### `renderbufferStorageImpl` +#### `renderbufferStorage` ``` purescript -renderbufferStorageImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit ``` -#### `sampleCoverageImpl` +#### `sampleCoverage` ``` purescript -sampleCoverageImpl :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) +sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (webgl :: WebGL | eff) Unit ``` -#### `scissorImpl` +#### `scissor` ``` purescript -scissorImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit ``` -#### `shaderSourceImpl` +#### `shaderSource` ``` purescript -shaderSourceImpl :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) +shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilFuncImpl` +#### `stencilFunc` ``` purescript -stencilFuncImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilFuncSeparateImpl` +#### `stencilFuncSeparate` ``` purescript -stencilFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilMaskImpl` +#### `stencilMask` ``` purescript -stencilMaskImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilMaskSeparateImpl` +#### `stencilMaskSeparate` ``` purescript -stencilMaskSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) +stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilOpImpl` +#### `stencilOp` ``` purescript -stencilOpImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `stencilOpSeparateImpl` +#### `stencilOpSeparate` ``` purescript -stencilOpSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit ``` -#### `texImage2DImpl` +#### `texImage2D` ``` purescript -texImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit ``` -#### `texParameterfImpl` +#### `texParameterf` ``` purescript -texParameterfImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) +texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `texParameteriImpl` +#### `texParameteri` ``` purescript -texParameteriImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `texSubImage2DImpl` +#### `texSubImage2D` ``` purescript -texSubImage2DImpl :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform1fImpl` +#### `uniform1f` ``` purescript -uniform1fImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform1fvImpl` +#### `uniform1fv` ``` purescript -uniform1fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform1iImpl` +#### `uniform1i` ``` purescript -uniform1iImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) +uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform1ivImpl` +#### `uniform1iv` ``` purescript -uniform1ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform2fImpl` +#### `uniform2f` ``` purescript -uniform2fImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform2fvImpl` +#### `uniform2fv` ``` purescript -uniform2fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform2iImpl` +#### `uniform2i` ``` purescript -uniform2iImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform2ivImpl` +#### `uniform2iv` ``` purescript -uniform2ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform3fImpl` +#### `uniform3f` ``` purescript -uniform3fImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform3fvImpl` +#### `uniform3fv` ``` purescript -uniform3fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform3iImpl` +#### `uniform3i` ``` purescript -uniform3iImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform3ivImpl` +#### `uniform3iv` ``` purescript -uniform3ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform4fImpl` +#### `uniform4f` ``` purescript -uniform4fImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform4fvImpl` +#### `uniform4fv` ``` purescript -uniform4fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform4iImpl` +#### `uniform4i` ``` purescript -uniform4iImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniform4ivImpl` +#### `uniform4iv` ``` purescript -uniform4ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniformMatrix2fvImpl` +#### `uniformMatrix2fv` ``` purescript -uniformMatrix2fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniformMatrix3fvImpl` +#### `uniformMatrix3fv` ``` purescript -uniformMatrix3fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `uniformMatrix4fvImpl` +#### `uniformMatrix4fv` ``` purescript -uniformMatrix4fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `useProgramImpl` +#### `useProgram` ``` purescript -useProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit ``` -#### `validateProgramImpl` +#### `validateProgram` ``` purescript -validateProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib1fImpl` +#### `vertexAttrib1f` ``` purescript -vertexAttrib1fImpl :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib1fvImpl` +#### `vertexAttrib1fv` ``` purescript -vertexAttrib1fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib2fImpl` +#### `vertexAttrib2f` ``` purescript -vertexAttrib2fImpl :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib2fvImpl` +#### `vertexAttrib2fv` ``` purescript -vertexAttrib2fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib3fImpl` +#### `vertexAttrib3f` ``` purescript -vertexAttrib3fImpl :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib3fvImpl` +#### `vertexAttrib3fv` ``` purescript -vertexAttrib3fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib4fImpl` +#### `vertexAttrib4f` ``` purescript -vertexAttrib4fImpl :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttrib4fvImpl` +#### `vertexAttrib4fv` ``` purescript -vertexAttrib4fvImpl :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit ``` -#### `vertexAttribPointerImpl` +#### `vertexAttribPointer` ``` purescript -vertexAttribPointerImpl :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) +vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (webgl :: WebGL | eff) Unit ``` -#### `viewportImpl` +#### `viewport` ``` purescript -viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit ``` @@ -945,2103 +938,2103 @@ viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (w ## Module Graphics.WebGL.Raw.Enums -#### `_DEPTH_BUFFER_BIT` +#### `depthBufferBit` ``` purescript -_DEPTH_BUFFER_BIT :: GLenum +depthBufferBit :: GLenum ``` -#### `_STENCIL_BUFFER_BIT` +#### `stencilBufferBit` ``` purescript -_STENCIL_BUFFER_BIT :: GLenum +stencilBufferBit :: GLenum ``` -#### `_COLOR_BUFFER_BIT` +#### `colorBufferBit` ``` purescript -_COLOR_BUFFER_BIT :: GLenum +colorBufferBit :: GLenum ``` -#### `_POINTS` +#### `points` ``` purescript -_POINTS :: GLenum +points :: GLenum ``` -#### `_LINES` +#### `lines` ``` purescript -_LINES :: GLenum +lines :: GLenum ``` -#### `_LINE_LOOP` +#### `lineLoop` ``` purescript -_LINE_LOOP :: GLenum +lineLoop :: GLenum ``` -#### `_LINE_STRIP` +#### `lineStrip` ``` purescript -_LINE_STRIP :: GLenum +lineStrip :: GLenum ``` -#### `_TRIANGLES` +#### `triangles` ``` purescript -_TRIANGLES :: GLenum +triangles :: GLenum ``` -#### `_TRIANGLE_STRIP` +#### `triangleStrip` ``` purescript -_TRIANGLE_STRIP :: GLenum +triangleStrip :: GLenum ``` -#### `_TRIANGLE_FAN` +#### `triangleFan` ``` purescript -_TRIANGLE_FAN :: GLenum +triangleFan :: GLenum ``` -#### `_ZERO` +#### `zero` ``` purescript -_ZERO :: GLenum +zero :: GLenum ``` -#### `_ONE` +#### `one` ``` purescript -_ONE :: GLenum +one :: GLenum ``` -#### `_SRC_COLOR` +#### `srcColor` ``` purescript -_SRC_COLOR :: GLenum +srcColor :: GLenum ``` -#### `_ONE_MINUS_SRC_COLOR` +#### `oneMinusSrcColor` ``` purescript -_ONE_MINUS_SRC_COLOR :: GLenum +oneMinusSrcColor :: GLenum ``` -#### `_SRC_ALPHA` +#### `srcAlpha` ``` purescript -_SRC_ALPHA :: GLenum +srcAlpha :: GLenum ``` -#### `_ONE_MINUS_SRC_ALPHA` +#### `oneMinusSrcAlpha` ``` purescript -_ONE_MINUS_SRC_ALPHA :: GLenum +oneMinusSrcAlpha :: GLenum ``` -#### `_DST_ALPHA` +#### `dstAlpha` ``` purescript -_DST_ALPHA :: GLenum +dstAlpha :: GLenum ``` -#### `_ONE_MINUS_DST_ALPHA` +#### `oneMinusDstAlpha` ``` purescript -_ONE_MINUS_DST_ALPHA :: GLenum +oneMinusDstAlpha :: GLenum ``` -#### `_DST_COLOR` +#### `dstColor` ``` purescript -_DST_COLOR :: GLenum +dstColor :: GLenum ``` -#### `_ONE_MINUS_DST_COLOR` +#### `oneMinusDstColor` ``` purescript -_ONE_MINUS_DST_COLOR :: GLenum +oneMinusDstColor :: GLenum ``` -#### `_SRC_ALPHA_SATURATE` +#### `srcAlphaSaturate` ``` purescript -_SRC_ALPHA_SATURATE :: GLenum +srcAlphaSaturate :: GLenum ``` -#### `_FUNC_ADD` +#### `funcAdd` ``` purescript -_FUNC_ADD :: GLenum +funcAdd :: GLenum ``` -#### `_BLEND_EQUATION` +#### `blendEquation` ``` purescript -_BLEND_EQUATION :: GLenum +blendEquation :: GLenum ``` -#### `_BLEND_EQUATION_RGB` +#### `blendEquationRgb` ``` purescript -_BLEND_EQUATION_RGB :: GLenum +blendEquationRgb :: GLenum ``` -#### `_BLEND_EQUATION_ALPHA` +#### `blendEquationAlpha` ``` purescript -_BLEND_EQUATION_ALPHA :: GLenum +blendEquationAlpha :: GLenum ``` -#### `_FUNC_SUBTRACT` +#### `funcSubtract` ``` purescript -_FUNC_SUBTRACT :: GLenum +funcSubtract :: GLenum ``` -#### `_FUNC_REVERSE_SUBTRACT` +#### `funcReverseSubtract` ``` purescript -_FUNC_REVERSE_SUBTRACT :: GLenum +funcReverseSubtract :: GLenum ``` -#### `_BLEND_DST_RGB` +#### `blendDstRgb` ``` purescript -_BLEND_DST_RGB :: GLenum +blendDstRgb :: GLenum ``` -#### `_BLEND_SRC_RGB` +#### `blendSrcRgb` ``` purescript -_BLEND_SRC_RGB :: GLenum +blendSrcRgb :: GLenum ``` -#### `_BLEND_DST_ALPHA` +#### `blendDstAlpha` ``` purescript -_BLEND_DST_ALPHA :: GLenum +blendDstAlpha :: GLenum ``` -#### `_BLEND_SRC_ALPHA` +#### `blendSrcAlpha` ``` purescript -_BLEND_SRC_ALPHA :: GLenum +blendSrcAlpha :: GLenum ``` -#### `_CONSTANT_COLOR` +#### `constantColor` ``` purescript -_CONSTANT_COLOR :: GLenum +constantColor :: GLenum ``` -#### `_ONE_MINUS_CONSTANT_COLOR` +#### `oneMinusConstantColor` ``` purescript -_ONE_MINUS_CONSTANT_COLOR :: GLenum +oneMinusConstantColor :: GLenum ``` -#### `_CONSTANT_ALPHA` +#### `constantAlpha` ``` purescript -_CONSTANT_ALPHA :: GLenum +constantAlpha :: GLenum ``` -#### `_ONE_MINUS_CONSTANT_ALPHA` +#### `oneMinusConstantAlpha` ``` purescript -_ONE_MINUS_CONSTANT_ALPHA :: GLenum +oneMinusConstantAlpha :: GLenum ``` -#### `_BLEND_COLOR` +#### `blendColor` ``` purescript -_BLEND_COLOR :: GLenum +blendColor :: GLenum ``` -#### `_ARRAY_BUFFER` +#### `arrayBuffer` ``` purescript -_ARRAY_BUFFER :: GLenum +arrayBuffer :: GLenum ``` -#### `_ELEMENT_ARRAY_BUFFER` +#### `elementArrayBuffer` ``` purescript -_ELEMENT_ARRAY_BUFFER :: GLenum +elementArrayBuffer :: GLenum ``` -#### `_ARRAY_BUFFER_BINDING` +#### `arrayBufferBinding` ``` purescript -_ARRAY_BUFFER_BINDING :: GLenum +arrayBufferBinding :: GLenum ``` -#### `_ELEMENT_ARRAY_BUFFER_BINDING` +#### `elementArrayBufferBinding` ``` purescript -_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum +elementArrayBufferBinding :: GLenum ``` -#### `_STREAM_DRAW` +#### `streamDraw` ``` purescript -_STREAM_DRAW :: GLenum +streamDraw :: GLenum ``` -#### `_STATIC_DRAW` +#### `staticDraw` ``` purescript -_STATIC_DRAW :: GLenum +staticDraw :: GLenum ``` -#### `_DYNAMIC_DRAW` +#### `dynamicDraw` ``` purescript -_DYNAMIC_DRAW :: GLenum +dynamicDraw :: GLenum ``` -#### `_BUFFER_SIZE` +#### `bufferSize` ``` purescript -_BUFFER_SIZE :: GLenum +bufferSize :: GLenum ``` -#### `_BUFFER_USAGE` +#### `bufferUsage` ``` purescript -_BUFFER_USAGE :: GLenum +bufferUsage :: GLenum ``` -#### `_CURRENT_VERTEX_ATTRIB` +#### `currentVertexAttrib` ``` purescript -_CURRENT_VERTEX_ATTRIB :: GLenum +currentVertexAttrib :: GLenum ``` -#### `_FRONT` +#### `front` ``` purescript -_FRONT :: GLenum +front :: GLenum ``` -#### `_BACK` +#### `back` ``` purescript -_BACK :: GLenum +back :: GLenum ``` -#### `_FRONT_AND_BACK` +#### `frontAndBack` ``` purescript -_FRONT_AND_BACK :: GLenum +frontAndBack :: GLenum ``` -#### `_TEXTURE_2D` +#### `texture2d` ``` purescript -_TEXTURE_2D :: GLenum +texture2d :: GLenum ``` -#### `_CULL_FACE` +#### `cullFace` ``` purescript -_CULL_FACE :: GLenum +cullFace :: GLenum ``` -#### `_BLEND` +#### `blend` ``` purescript -_BLEND :: GLenum +blend :: GLenum ``` -#### `_DITHER` +#### `dither` ``` purescript -_DITHER :: GLenum +dither :: GLenum ``` -#### `_STENCIL_TEST` +#### `stencilTest` ``` purescript -_STENCIL_TEST :: GLenum +stencilTest :: GLenum ``` -#### `_DEPTH_TEST` +#### `depthTest` ``` purescript -_DEPTH_TEST :: GLenum +depthTest :: GLenum ``` -#### `_SCISSOR_TEST` +#### `scissorTest` ``` purescript -_SCISSOR_TEST :: GLenum +scissorTest :: GLenum ``` -#### `_POLYGON_OFFSET_FILL` +#### `polygonOffsetFill` ``` purescript -_POLYGON_OFFSET_FILL :: GLenum +polygonOffsetFill :: GLenum ``` -#### `_SAMPLE_ALPHA_TO_COVERAGE` +#### `sampleAlphaToCoverage` ``` purescript -_SAMPLE_ALPHA_TO_COVERAGE :: GLenum +sampleAlphaToCoverage :: GLenum ``` -#### `_SAMPLE_COVERAGE` +#### `sampleCoverage` ``` purescript -_SAMPLE_COVERAGE :: GLenum +sampleCoverage :: GLenum ``` -#### `_NO_ERROR` +#### `noError` ``` purescript -_NO_ERROR :: GLenum +noError :: GLenum ``` -#### `_INVALID_ENUM` +#### `invalidEnum` ``` purescript -_INVALID_ENUM :: GLenum +invalidEnum :: GLenum ``` -#### `_INVALID_VALUE` +#### `invalidValue` ``` purescript -_INVALID_VALUE :: GLenum +invalidValue :: GLenum ``` -#### `_INVALID_OPERATION` +#### `invalidOperation` ``` purescript -_INVALID_OPERATION :: GLenum +invalidOperation :: GLenum ``` -#### `_OUT_OF_MEMORY` +#### `outOfMemory` ``` purescript -_OUT_OF_MEMORY :: GLenum +outOfMemory :: GLenum ``` -#### `_CW` +#### `cw` ``` purescript -_CW :: GLenum +cw :: GLenum ``` -#### `_CCW` +#### `ccw` ``` purescript -_CCW :: GLenum +ccw :: GLenum ``` -#### `_LINE_WIDTH` +#### `lineWidth` ``` purescript -_LINE_WIDTH :: GLenum +lineWidth :: GLenum ``` -#### `_ALIASED_POINT_SIZE_RANGE` +#### `aliasedPointSizeRange` ``` purescript -_ALIASED_POINT_SIZE_RANGE :: GLenum +aliasedPointSizeRange :: GLenum ``` -#### `_ALIASED_LINE_WIDTH_RANGE` +#### `aliasedLineWidthRange` ``` purescript -_ALIASED_LINE_WIDTH_RANGE :: GLenum +aliasedLineWidthRange :: GLenum ``` -#### `_CULL_FACE_MODE` +#### `cullFaceMode` ``` purescript -_CULL_FACE_MODE :: GLenum +cullFaceMode :: GLenum ``` -#### `_FRONT_FACE` +#### `frontFace` ``` purescript -_FRONT_FACE :: GLenum +frontFace :: GLenum ``` -#### `_DEPTH_RANGE` +#### `depthRange` ``` purescript -_DEPTH_RANGE :: GLenum +depthRange :: GLenum ``` -#### `_DEPTH_WRITEMASK` +#### `depthWritemask` ``` purescript -_DEPTH_WRITEMASK :: GLenum +depthWritemask :: GLenum ``` -#### `_DEPTH_CLEAR_VALUE` +#### `depthClearValue` ``` purescript -_DEPTH_CLEAR_VALUE :: GLenum +depthClearValue :: GLenum ``` -#### `_DEPTH_FUNC` +#### `depthFunc` ``` purescript -_DEPTH_FUNC :: GLenum +depthFunc :: GLenum ``` -#### `_STENCIL_CLEAR_VALUE` +#### `stencilClearValue` ``` purescript -_STENCIL_CLEAR_VALUE :: GLenum +stencilClearValue :: GLenum ``` -#### `_STENCIL_FUNC` +#### `stencilFunc` ``` purescript -_STENCIL_FUNC :: GLenum +stencilFunc :: GLenum ``` -#### `_STENCIL_FAIL` +#### `stencilFail` ``` purescript -_STENCIL_FAIL :: GLenum +stencilFail :: GLenum ``` -#### `_STENCIL_PASS_DEPTH_FAIL` +#### `stencilPassDepthFail` ``` purescript -_STENCIL_PASS_DEPTH_FAIL :: GLenum +stencilPassDepthFail :: GLenum ``` -#### `_STENCIL_PASS_DEPTH_PASS` +#### `stencilPassDepthPass` ``` purescript -_STENCIL_PASS_DEPTH_PASS :: GLenum +stencilPassDepthPass :: GLenum ``` -#### `_STENCIL_REF` +#### `stencilRef` ``` purescript -_STENCIL_REF :: GLenum +stencilRef :: GLenum ``` -#### `_STENCIL_VALUE_MASK` +#### `stencilValueMask` ``` purescript -_STENCIL_VALUE_MASK :: GLenum +stencilValueMask :: GLenum ``` -#### `_STENCIL_WRITEMASK` +#### `stencilWritemask` ``` purescript -_STENCIL_WRITEMASK :: GLenum +stencilWritemask :: GLenum ``` -#### `_STENCIL_BACK_FUNC` +#### `stencilBackFunc` ``` purescript -_STENCIL_BACK_FUNC :: GLenum +stencilBackFunc :: GLenum ``` -#### `_STENCIL_BACK_FAIL` +#### `stencilBackFail` ``` purescript -_STENCIL_BACK_FAIL :: GLenum +stencilBackFail :: GLenum ``` -#### `_STENCIL_BACK_PASS_DEPTH_FAIL` +#### `stencilBackPassDepthFail` ``` purescript -_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum +stencilBackPassDepthFail :: GLenum ``` -#### `_STENCIL_BACK_PASS_DEPTH_PASS` +#### `stencilBackPassDepthPass` ``` purescript -_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum +stencilBackPassDepthPass :: GLenum ``` -#### `_STENCIL_BACK_REF` +#### `stencilBackRef` ``` purescript -_STENCIL_BACK_REF :: GLenum +stencilBackRef :: GLenum ``` -#### `_STENCIL_BACK_VALUE_MASK` +#### `stencilBackValueMask` ``` purescript -_STENCIL_BACK_VALUE_MASK :: GLenum +stencilBackValueMask :: GLenum ``` -#### `_STENCIL_BACK_WRITEMASK` +#### `stencilBackWritemask` ``` purescript -_STENCIL_BACK_WRITEMASK :: GLenum +stencilBackWritemask :: GLenum ``` -#### `_VIEWPORT` +#### `viewport` ``` purescript -_VIEWPORT :: GLenum +viewport :: GLenum ``` -#### `_SCISSOR_BOX` +#### `scissorBox` ``` purescript -_SCISSOR_BOX :: GLenum +scissorBox :: GLenum ``` -#### `_COLOR_CLEAR_VALUE` +#### `colorClearValue` ``` purescript -_COLOR_CLEAR_VALUE :: GLenum +colorClearValue :: GLenum ``` -#### `_COLOR_WRITEMASK` +#### `colorWritemask` ``` purescript -_COLOR_WRITEMASK :: GLenum +colorWritemask :: GLenum ``` -#### `_UNPACK_ALIGNMENT` +#### `unpackAlignment` ``` purescript -_UNPACK_ALIGNMENT :: GLenum +unpackAlignment :: GLenum ``` -#### `_PACK_ALIGNMENT` +#### `packAlignment` ``` purescript -_PACK_ALIGNMENT :: GLenum +packAlignment :: GLenum ``` -#### `_MAX_TEXTURE_SIZE` +#### `maxTextureSize` ``` purescript -_MAX_TEXTURE_SIZE :: GLenum +maxTextureSize :: GLenum ``` -#### `_MAX_VIEWPORT_DIMS` +#### `maxViewportDims` ``` purescript -_MAX_VIEWPORT_DIMS :: GLenum +maxViewportDims :: GLenum ``` -#### `_SUBPIXEL_BITS` +#### `subpixelBits` ``` purescript -_SUBPIXEL_BITS :: GLenum +subpixelBits :: GLenum ``` -#### `_RED_BITS` +#### `redBits` ``` purescript -_RED_BITS :: GLenum +redBits :: GLenum ``` -#### `_GREEN_BITS` +#### `greenBits` ``` purescript -_GREEN_BITS :: GLenum +greenBits :: GLenum ``` -#### `_BLUE_BITS` +#### `blueBits` ``` purescript -_BLUE_BITS :: GLenum +blueBits :: GLenum ``` -#### `_ALPHA_BITS` +#### `alphaBits` ``` purescript -_ALPHA_BITS :: GLenum +alphaBits :: GLenum ``` -#### `_DEPTH_BITS` +#### `depthBits` ``` purescript -_DEPTH_BITS :: GLenum +depthBits :: GLenum ``` -#### `_STENCIL_BITS` +#### `stencilBits` ``` purescript -_STENCIL_BITS :: GLenum +stencilBits :: GLenum ``` -#### `_POLYGON_OFFSET_UNITS` +#### `polygonOffsetUnits` ``` purescript -_POLYGON_OFFSET_UNITS :: GLenum +polygonOffsetUnits :: GLenum ``` -#### `_POLYGON_OFFSET_FACTOR` +#### `polygonOffsetFactor` ``` purescript -_POLYGON_OFFSET_FACTOR :: GLenum +polygonOffsetFactor :: GLenum ``` -#### `_TEXTURE_BINDING_2D` +#### `textureBinding2d` ``` purescript -_TEXTURE_BINDING_2D :: GLenum +textureBinding2d :: GLenum ``` -#### `_SAMPLE_BUFFERS` +#### `sampleBuffers` ``` purescript -_SAMPLE_BUFFERS :: GLenum +sampleBuffers :: GLenum ``` -#### `_SAMPLES` +#### `samples` ``` purescript -_SAMPLES :: GLenum +samples :: GLenum ``` -#### `_SAMPLE_COVERAGE_VALUE` +#### `sampleCoverageValue` ``` purescript -_SAMPLE_COVERAGE_VALUE :: GLenum +sampleCoverageValue :: GLenum ``` -#### `_SAMPLE_COVERAGE_INVERT` +#### `sampleCoverageInvert` ``` purescript -_SAMPLE_COVERAGE_INVERT :: GLenum +sampleCoverageInvert :: GLenum ``` -#### `_NUM_COMPRESSED_TEXTURE_FORMATS` +#### `numCompressedTextureFormats` ``` purescript -_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum +numCompressedTextureFormats :: GLenum ``` -#### `_COMPRESSED_TEXTURE_FORMATS` +#### `compressedTextureFormats` ``` purescript -_COMPRESSED_TEXTURE_FORMATS :: GLenum +compressedTextureFormats :: GLenum ``` -#### `_DONT_CARE` +#### `dontCare` ``` purescript -_DONT_CARE :: GLenum +dontCare :: GLenum ``` -#### `_FASTEST` +#### `fastest` ``` purescript -_FASTEST :: GLenum +fastest :: GLenum ``` -#### `_NICEST` +#### `nicest` ``` purescript -_NICEST :: GLenum +nicest :: GLenum ``` -#### `_GENERATE_MIPMAP_HINT` +#### `generateMipmapHint` ``` purescript -_GENERATE_MIPMAP_HINT :: GLenum +generateMipmapHint :: GLenum ``` -#### `_BYTE` +#### `byte` ``` purescript -_BYTE :: GLenum +byte :: GLenum ``` -#### `_UNSIGNED_BYTE` +#### `unsignedByte` ``` purescript -_UNSIGNED_BYTE :: GLenum +unsignedByte :: GLenum ``` -#### `_SHORT` +#### `short` ``` purescript -_SHORT :: GLenum +short :: GLenum ``` -#### `_UNSIGNED_SHORT` +#### `unsignedShort` ``` purescript -_UNSIGNED_SHORT :: GLenum +unsignedShort :: GLenum ``` -#### `_INT` +#### `int` ``` purescript -_INT :: GLenum +int :: GLenum ``` -#### `_UNSIGNED_INT` +#### `unsignedInt` ``` purescript -_UNSIGNED_INT :: GLenum +unsignedInt :: GLenum ``` -#### `_FLOAT` +#### `float` ``` purescript -_FLOAT :: GLenum +float :: GLenum ``` -#### `_DEPTH_COMPONENT` +#### `depthComponent` ``` purescript -_DEPTH_COMPONENT :: GLenum +depthComponent :: GLenum ``` -#### `_ALPHA` +#### `alpha` ``` purescript -_ALPHA :: GLenum +alpha :: GLenum ``` -#### `_RGB` +#### `rgb` ``` purescript -_RGB :: GLenum +rgb :: GLenum ``` -#### `_RGBA` +#### `rgba` ``` purescript -_RGBA :: GLenum +rgba :: GLenum ``` -#### `_LUMINANCE` +#### `luminance` ``` purescript -_LUMINANCE :: GLenum +luminance :: GLenum ``` -#### `_LUMINANCE_ALPHA` +#### `luminanceAlpha` ``` purescript -_LUMINANCE_ALPHA :: GLenum +luminanceAlpha :: GLenum ``` -#### `_UNSIGNED_SHORT_4_4_4_4` +#### `unsignedShort4444` ``` purescript -_UNSIGNED_SHORT_4_4_4_4 :: GLenum +unsignedShort4444 :: GLenum ``` -#### `_UNSIGNED_SHORT_5_5_5_1` +#### `unsignedShort5551` ``` purescript -_UNSIGNED_SHORT_5_5_5_1 :: GLenum +unsignedShort5551 :: GLenum ``` -#### `_UNSIGNED_SHORT_5_6_5` +#### `unsignedShort565` ``` purescript -_UNSIGNED_SHORT_5_6_5 :: GLenum +unsignedShort565 :: GLenum ``` -#### `_FRAGMENT_SHADER` +#### `fragmentShader` ``` purescript -_FRAGMENT_SHADER :: GLenum +fragmentShader :: GLenum ``` -#### `_VERTEX_SHADER` +#### `vertexShader` ``` purescript -_VERTEX_SHADER :: GLenum +vertexShader :: GLenum ``` -#### `_MAX_VERTEX_ATTRIBS` +#### `maxVertexAttribs` ``` purescript -_MAX_VERTEX_ATTRIBS :: GLenum +maxVertexAttribs :: GLenum ``` -#### `_MAX_VERTEX_UNIFORM_VECTORS` +#### `maxVertexUniformVectors` ``` purescript -_MAX_VERTEX_UNIFORM_VECTORS :: GLenum +maxVertexUniformVectors :: GLenum ``` -#### `_MAX_VARYING_VECTORS` +#### `maxVaryingVectors` ``` purescript -_MAX_VARYING_VECTORS :: GLenum +maxVaryingVectors :: GLenum ``` -#### `_MAX_COMBINED_TEXTURE_IMAGE_UNITS` +#### `maxCombinedTextureImageUnits` ``` purescript -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum +maxCombinedTextureImageUnits :: GLenum ``` -#### `_MAX_VERTEX_TEXTURE_IMAGE_UNITS` +#### `maxVertexTextureImageUnits` ``` purescript -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum +maxVertexTextureImageUnits :: GLenum ``` -#### `_MAX_TEXTURE_IMAGE_UNITS` +#### `maxTextureImageUnits` ``` purescript -_MAX_TEXTURE_IMAGE_UNITS :: GLenum +maxTextureImageUnits :: GLenum ``` -#### `_MAX_FRAGMENT_UNIFORM_VECTORS` +#### `maxFragmentUniformVectors` ``` purescript -_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum +maxFragmentUniformVectors :: GLenum ``` -#### `_SHADER_TYPE` +#### `shaderType` ``` purescript -_SHADER_TYPE :: GLenum +shaderType :: GLenum ``` -#### `_DELETE_STATUS` +#### `deleteStatus` ``` purescript -_DELETE_STATUS :: GLenum +deleteStatus :: GLenum ``` -#### `_LINK_STATUS` +#### `linkStatus` ``` purescript -_LINK_STATUS :: GLenum +linkStatus :: GLenum ``` -#### `_VALIDATE_STATUS` +#### `validateStatus` ``` purescript -_VALIDATE_STATUS :: GLenum +validateStatus :: GLenum ``` -#### `_ATTACHED_SHADERS` +#### `attachedShaders` ``` purescript -_ATTACHED_SHADERS :: GLenum +attachedShaders :: GLenum ``` -#### `_ACTIVE_UNIFORMS` +#### `activeUniforms` ``` purescript -_ACTIVE_UNIFORMS :: GLenum +activeUniforms :: GLenum ``` -#### `_ACTIVE_UNIFORM_MAX_LENGTH` +#### `activeUniformMaxLength` ``` purescript -_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum +activeUniformMaxLength :: GLenum ``` -#### `_ACTIVE_ATTRIBUTES` +#### `activeAttributes` ``` purescript -_ACTIVE_ATTRIBUTES :: GLenum +activeAttributes :: GLenum ``` -#### `_ACTIVE_ATTRIBUTE_MAX_LENGTH` +#### `activeAttributeMaxLength` ``` purescript -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum +activeAttributeMaxLength :: GLenum ``` -#### `_SHADING_LANGUAGE_VERSION` +#### `shadingLanguageVersion` ``` purescript -_SHADING_LANGUAGE_VERSION :: GLenum +shadingLanguageVersion :: GLenum ``` -#### `_CURRENT_PROGRAM` +#### `currentProgram` ``` purescript -_CURRENT_PROGRAM :: GLenum +currentProgram :: GLenum ``` -#### `_NEVER` +#### `never` ``` purescript -_NEVER :: GLenum +never :: GLenum ``` -#### `_LESS` +#### `less` ``` purescript -_LESS :: GLenum +less :: GLenum ``` -#### `_EQUAL` +#### `equal` ``` purescript -_EQUAL :: GLenum +equal :: GLenum ``` -#### `_LEQUAL` +#### `lequal` ``` purescript -_LEQUAL :: GLenum +lequal :: GLenum ``` -#### `_GREATER` +#### `greater` ``` purescript -_GREATER :: GLenum +greater :: GLenum ``` -#### `_NOTEQUAL` +#### `notequal` ``` purescript -_NOTEQUAL :: GLenum +notequal :: GLenum ``` -#### `_GEQUAL` +#### `gequal` ``` purescript -_GEQUAL :: GLenum +gequal :: GLenum ``` -#### `_ALWAYS` +#### `always` ``` purescript -_ALWAYS :: GLenum +always :: GLenum ``` -#### `_KEEP` +#### `keep` ``` purescript -_KEEP :: GLenum +keep :: GLenum ``` -#### `_REPLACE` +#### `replace` ``` purescript -_REPLACE :: GLenum +replace :: GLenum ``` -#### `_INCR` +#### `incr` ``` purescript -_INCR :: GLenum +incr :: GLenum ``` -#### `_DECR` +#### `decr` ``` purescript -_DECR :: GLenum +decr :: GLenum ``` -#### `_INVERT` +#### `invert` ``` purescript -_INVERT :: GLenum +invert :: GLenum ``` -#### `_INCR_WRAP` +#### `incrWrap` ``` purescript -_INCR_WRAP :: GLenum +incrWrap :: GLenum ``` -#### `_DECR_WRAP` +#### `decrWrap` ``` purescript -_DECR_WRAP :: GLenum +decrWrap :: GLenum ``` -#### `_VENDOR` +#### `vendor` ``` purescript -_VENDOR :: GLenum +vendor :: GLenum ``` -#### `_RENDERER` +#### `renderer` ``` purescript -_RENDERER :: GLenum +renderer :: GLenum ``` -#### `_VERSION` +#### `version` ``` purescript -_VERSION :: GLenum +version :: GLenum ``` -#### `_NEAREST` +#### `nearest` ``` purescript -_NEAREST :: GLenum +nearest :: GLenum ``` -#### `_LINEAR` +#### `linear` ``` purescript -_LINEAR :: GLenum +linear :: GLenum ``` -#### `_NEAREST_MIPMAP_NEAREST` +#### `nearestMipmapNearest` ``` purescript -_NEAREST_MIPMAP_NEAREST :: GLenum +nearestMipmapNearest :: GLenum ``` -#### `_LINEAR_MIPMAP_NEAREST` +#### `linearMipmapNearest` ``` purescript -_LINEAR_MIPMAP_NEAREST :: GLenum +linearMipmapNearest :: GLenum ``` -#### `_NEAREST_MIPMAP_LINEAR` +#### `nearestMipmapLinear` ``` purescript -_NEAREST_MIPMAP_LINEAR :: GLenum +nearestMipmapLinear :: GLenum ``` -#### `_LINEAR_MIPMAP_LINEAR` +#### `linearMipmapLinear` ``` purescript -_LINEAR_MIPMAP_LINEAR :: GLenum +linearMipmapLinear :: GLenum ``` -#### `_TEXTURE_MAG_FILTER` +#### `textureMagFilter` ``` purescript -_TEXTURE_MAG_FILTER :: GLenum +textureMagFilter :: GLenum ``` -#### `_TEXTURE_MIN_FILTER` +#### `textureMinFilter` ``` purescript -_TEXTURE_MIN_FILTER :: GLenum +textureMinFilter :: GLenum ``` -#### `_TEXTURE_WRAP_S` +#### `textureWrapS` ``` purescript -_TEXTURE_WRAP_S :: GLenum +textureWrapS :: GLenum ``` -#### `_TEXTURE_WRAP_T` +#### `textureWrapT` ``` purescript -_TEXTURE_WRAP_T :: GLenum +textureWrapT :: GLenum ``` -#### `_TEXTURE` +#### `texture` ``` purescript -_TEXTURE :: GLenum +texture :: GLenum ``` -#### `_TEXTURE_CUBE_MAP` +#### `textureCubeMap` ``` purescript -_TEXTURE_CUBE_MAP :: GLenum +textureCubeMap :: GLenum ``` -#### `_TEXTURE_BINDING_CUBE_MAP` +#### `textureBindingCubeMap` ``` purescript -_TEXTURE_BINDING_CUBE_MAP :: GLenum +textureBindingCubeMap :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_X` +#### `textureCubeMapPositiveX` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum +textureCubeMapPositiveX :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_X` +#### `textureCubeMapNegativeX` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum +textureCubeMapNegativeX :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_Y` +#### `textureCubeMapPositiveY` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum +textureCubeMapPositiveY :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_Y` +#### `textureCubeMapNegativeY` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum +textureCubeMapNegativeY :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_POSITIVE_Z` +#### `textureCubeMapPositiveZ` ``` purescript -_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum +textureCubeMapPositiveZ :: GLenum ``` -#### `_TEXTURE_CUBE_MAP_NEGATIVE_Z` +#### `textureCubeMapNegativeZ` ``` purescript -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum +textureCubeMapNegativeZ :: GLenum ``` -#### `_MAX_CUBE_MAP_TEXTURE_SIZE` +#### `maxCubeMapTextureSize` ``` purescript -_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum +maxCubeMapTextureSize :: GLenum ``` -#### `_TEXTURE0` +#### `texture0` ``` purescript -_TEXTURE0 :: GLenum +texture0 :: GLenum ``` -#### `_TEXTURE1` +#### `texture1` ``` purescript -_TEXTURE1 :: GLenum +texture1 :: GLenum ``` -#### `_TEXTURE2` +#### `texture2` ``` purescript -_TEXTURE2 :: GLenum +texture2 :: GLenum ``` -#### `_TEXTURE3` +#### `texture3` ``` purescript -_TEXTURE3 :: GLenum +texture3 :: GLenum ``` -#### `_TEXTURE4` +#### `texture4` ``` purescript -_TEXTURE4 :: GLenum +texture4 :: GLenum ``` -#### `_TEXTURE5` +#### `texture5` ``` purescript -_TEXTURE5 :: GLenum +texture5 :: GLenum ``` -#### `_TEXTURE6` +#### `texture6` ``` purescript -_TEXTURE6 :: GLenum +texture6 :: GLenum ``` -#### `_TEXTURE7` +#### `texture7` ``` purescript -_TEXTURE7 :: GLenum +texture7 :: GLenum ``` -#### `_TEXTURE8` +#### `texture8` ``` purescript -_TEXTURE8 :: GLenum +texture8 :: GLenum ``` -#### `_TEXTURE9` +#### `texture9` ``` purescript -_TEXTURE9 :: GLenum +texture9 :: GLenum ``` -#### `_TEXTURE10` +#### `texture10` ``` purescript -_TEXTURE10 :: GLenum +texture10 :: GLenum ``` -#### `_TEXTURE11` +#### `texture11` ``` purescript -_TEXTURE11 :: GLenum +texture11 :: GLenum ``` -#### `_TEXTURE12` +#### `texture12` ``` purescript -_TEXTURE12 :: GLenum +texture12 :: GLenum ``` -#### `_TEXTURE13` +#### `texture13` ``` purescript -_TEXTURE13 :: GLenum +texture13 :: GLenum ``` -#### `_TEXTURE14` +#### `texture14` ``` purescript -_TEXTURE14 :: GLenum +texture14 :: GLenum ``` -#### `_TEXTURE15` +#### `texture15` ``` purescript -_TEXTURE15 :: GLenum +texture15 :: GLenum ``` -#### `_TEXTURE16` +#### `texture16` ``` purescript -_TEXTURE16 :: GLenum +texture16 :: GLenum ``` -#### `_TEXTURE17` +#### `texture17` ``` purescript -_TEXTURE17 :: GLenum +texture17 :: GLenum ``` -#### `_TEXTURE18` +#### `texture18` ``` purescript -_TEXTURE18 :: GLenum +texture18 :: GLenum ``` -#### `_TEXTURE19` +#### `texture19` ``` purescript -_TEXTURE19 :: GLenum +texture19 :: GLenum ``` -#### `_TEXTURE20` +#### `texture20` ``` purescript -_TEXTURE20 :: GLenum +texture20 :: GLenum ``` -#### `_TEXTURE21` +#### `texture21` ``` purescript -_TEXTURE21 :: GLenum +texture21 :: GLenum ``` -#### `_TEXTURE22` +#### `texture22` ``` purescript -_TEXTURE22 :: GLenum +texture22 :: GLenum ``` -#### `_TEXTURE23` +#### `texture23` ``` purescript -_TEXTURE23 :: GLenum +texture23 :: GLenum ``` -#### `_TEXTURE24` +#### `texture24` ``` purescript -_TEXTURE24 :: GLenum +texture24 :: GLenum ``` -#### `_TEXTURE25` +#### `texture25` ``` purescript -_TEXTURE25 :: GLenum +texture25 :: GLenum ``` -#### `_TEXTURE26` +#### `texture26` ``` purescript -_TEXTURE26 :: GLenum +texture26 :: GLenum ``` -#### `_TEXTURE27` +#### `texture27` ``` purescript -_TEXTURE27 :: GLenum +texture27 :: GLenum ``` -#### `_TEXTURE28` +#### `texture28` ``` purescript -_TEXTURE28 :: GLenum +texture28 :: GLenum ``` -#### `_TEXTURE29` +#### `texture29` ``` purescript -_TEXTURE29 :: GLenum +texture29 :: GLenum ``` -#### `_TEXTURE30` +#### `texture30` ``` purescript -_TEXTURE30 :: GLenum +texture30 :: GLenum ``` -#### `_TEXTURE31` +#### `texture31` ``` purescript -_TEXTURE31 :: GLenum +texture31 :: GLenum ``` -#### `_ACTIVE_TEXTURE` +#### `activeTexture` ``` purescript -_ACTIVE_TEXTURE :: GLenum +activeTexture :: GLenum ``` -#### `_REPEAT` +#### `repeat` ``` purescript -_REPEAT :: GLenum +repeat :: GLenum ``` -#### `_CLAMP_TO_EDGE` +#### `clampToEdge` ``` purescript -_CLAMP_TO_EDGE :: GLenum +clampToEdge :: GLenum ``` -#### `_MIRRORED_REPEAT` +#### `mirroredRepeat` ``` purescript -_MIRRORED_REPEAT :: GLenum +mirroredRepeat :: GLenum ``` -#### `_FLOAT_VEC2` +#### `floatVec2` ``` purescript -_FLOAT_VEC2 :: GLenum +floatVec2 :: GLenum ``` -#### `_FLOAT_VEC3` +#### `floatVec3` ``` purescript -_FLOAT_VEC3 :: GLenum +floatVec3 :: GLenum ``` -#### `_FLOAT_VEC4` +#### `floatVec4` ``` purescript -_FLOAT_VEC4 :: GLenum +floatVec4 :: GLenum ``` -#### `_INT_VEC2` +#### `intVec2` ``` purescript -_INT_VEC2 :: GLenum +intVec2 :: GLenum ``` -#### `_INT_VEC3` +#### `intVec3` ``` purescript -_INT_VEC3 :: GLenum +intVec3 :: GLenum ``` -#### `_INT_VEC4` +#### `intVec4` ``` purescript -_INT_VEC4 :: GLenum +intVec4 :: GLenum ``` -#### `_BOOL` +#### `bool` ``` purescript -_BOOL :: GLenum +bool :: GLenum ``` -#### `_BOOL_VEC2` +#### `boolVec2` ``` purescript -_BOOL_VEC2 :: GLenum +boolVec2 :: GLenum ``` -#### `_BOOL_VEC3` +#### `boolVec3` ``` purescript -_BOOL_VEC3 :: GLenum +boolVec3 :: GLenum ``` -#### `_BOOL_VEC4` +#### `boolVec4` ``` purescript -_BOOL_VEC4 :: GLenum +boolVec4 :: GLenum ``` -#### `_FLOAT_MAT2` +#### `floatMat2` ``` purescript -_FLOAT_MAT2 :: GLenum +floatMat2 :: GLenum ``` -#### `_FLOAT_MAT3` +#### `floatMat3` ``` purescript -_FLOAT_MAT3 :: GLenum +floatMat3 :: GLenum ``` -#### `_FLOAT_MAT4` +#### `floatMat4` ``` purescript -_FLOAT_MAT4 :: GLenum +floatMat4 :: GLenum ``` -#### `_SAMPLER_2D` +#### `sampler2d` ``` purescript -_SAMPLER_2D :: GLenum +sampler2d :: GLenum ``` -#### `_SAMPLER_CUBE` +#### `samplerCube` ``` purescript -_SAMPLER_CUBE :: GLenum +samplerCube :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_ENABLED` +#### `vertexAttribArrayEnabled` ``` purescript -_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum +vertexAttribArrayEnabled :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_SIZE` +#### `vertexAttribArraySize` ``` purescript -_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum +vertexAttribArraySize :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_STRIDE` +#### `vertexAttribArrayStride` ``` purescript -_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum +vertexAttribArrayStride :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_TYPE` +#### `vertexAttribArrayType` ``` purescript -_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum +vertexAttribArrayType :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_NORMALIZED` +#### `vertexAttribArrayNormalized` ``` purescript -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum +vertexAttribArrayNormalized :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_POINTER` +#### `vertexAttribArrayPointer` ``` purescript -_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum +vertexAttribArrayPointer :: GLenum ``` -#### `_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING` +#### `vertexAttribArrayBufferBinding` ``` purescript -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum +vertexAttribArrayBufferBinding :: GLenum ``` -#### `_COMPILE_STATUS` +#### `compileStatus` ``` purescript -_COMPILE_STATUS :: GLenum +compileStatus :: GLenum ``` -#### `_INFO_LOG_LENGTH` +#### `infoLogLength` ``` purescript -_INFO_LOG_LENGTH :: GLenum +infoLogLength :: GLenum ``` -#### `_SHADER_SOURCE_LENGTH` +#### `shaderSourceLength` ``` purescript -_SHADER_SOURCE_LENGTH :: GLenum +shaderSourceLength :: GLenum ``` -#### `_LOW_FLOAT` +#### `lowFloat` ``` purescript -_LOW_FLOAT :: GLenum +lowFloat :: GLenum ``` -#### `_MEDIUM_FLOAT` +#### `mediumFloat` ``` purescript -_MEDIUM_FLOAT :: GLenum +mediumFloat :: GLenum ``` -#### `_HIGH_FLOAT` +#### `highFloat` ``` purescript -_HIGH_FLOAT :: GLenum +highFloat :: GLenum ``` -#### `_LOW_INT` +#### `lowInt` ``` purescript -_LOW_INT :: GLenum +lowInt :: GLenum ``` -#### `_MEDIUM_INT` +#### `mediumInt` ``` purescript -_MEDIUM_INT :: GLenum +mediumInt :: GLenum ``` -#### `_HIGH_INT` +#### `highInt` ``` purescript -_HIGH_INT :: GLenum +highInt :: GLenum ``` -#### `_FRAMEBUFFER` +#### `framebuffer` ``` purescript -_FRAMEBUFFER :: GLenum +framebuffer :: GLenum ``` -#### `_RENDERBUFFER` +#### `renderbuffer` ``` purescript -_RENDERBUFFER :: GLenum +renderbuffer :: GLenum ``` -#### `_RGBA4` +#### `rgba4` ``` purescript -_RGBA4 :: GLenum +rgba4 :: GLenum ``` -#### `_RGB5_A1` +#### `rgb5A1` ``` purescript -_RGB5_A1 :: GLenum +rgb5A1 :: GLenum ``` -#### `_RGB565` +#### `rgb565` ``` purescript -_RGB565 :: GLenum +rgb565 :: GLenum ``` -#### `_DEPTH_COMPONENT16` +#### `depthComponent16` ``` purescript -_DEPTH_COMPONENT16 :: GLenum +depthComponent16 :: GLenum ``` -#### `_STENCIL_INDEX` +#### `stencilIndex` ``` purescript -_STENCIL_INDEX :: GLenum +stencilIndex :: GLenum ``` -#### `_STENCIL_INDEX8` +#### `stencilIndex8` ``` purescript -_STENCIL_INDEX8 :: GLenum +stencilIndex8 :: GLenum ``` -#### `_DEPTH_STENCIL` +#### `depthStencil` ``` purescript -_DEPTH_STENCIL :: GLenum +depthStencil :: GLenum ``` -#### `_RENDERBUFFER_WIDTH` +#### `renderbufferWidth` ``` purescript -_RENDERBUFFER_WIDTH :: GLenum +renderbufferWidth :: GLenum ``` -#### `_RENDERBUFFER_HEIGHT` +#### `renderbufferHeight` ``` purescript -_RENDERBUFFER_HEIGHT :: GLenum +renderbufferHeight :: GLenum ``` -#### `_RENDERBUFFER_INTERNAL_FORMAT` +#### `renderbufferInternalFormat` ``` purescript -_RENDERBUFFER_INTERNAL_FORMAT :: GLenum +renderbufferInternalFormat :: GLenum ``` -#### `_RENDERBUFFER_RED_SIZE` +#### `renderbufferRedSize` ``` purescript -_RENDERBUFFER_RED_SIZE :: GLenum +renderbufferRedSize :: GLenum ``` -#### `_RENDERBUFFER_GREEN_SIZE` +#### `renderbufferGreenSize` ``` purescript -_RENDERBUFFER_GREEN_SIZE :: GLenum +renderbufferGreenSize :: GLenum ``` -#### `_RENDERBUFFER_BLUE_SIZE` +#### `renderbufferBlueSize` ``` purescript -_RENDERBUFFER_BLUE_SIZE :: GLenum +renderbufferBlueSize :: GLenum ``` -#### `_RENDERBUFFER_ALPHA_SIZE` +#### `renderbufferAlphaSize` ``` purescript -_RENDERBUFFER_ALPHA_SIZE :: GLenum +renderbufferAlphaSize :: GLenum ``` -#### `_RENDERBUFFER_DEPTH_SIZE` +#### `renderbufferDepthSize` ``` purescript -_RENDERBUFFER_DEPTH_SIZE :: GLenum +renderbufferDepthSize :: GLenum ``` -#### `_RENDERBUFFER_STENCIL_SIZE` +#### `renderbufferStencilSize` ``` purescript -_RENDERBUFFER_STENCIL_SIZE :: GLenum +renderbufferStencilSize :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE` +#### `framebufferAttachmentObjectType` ``` purescript -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum +framebufferAttachmentObjectType :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME` +#### `framebufferAttachmentObjectName` ``` purescript -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum +framebufferAttachmentObjectName :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL` +#### `framebufferAttachmentTextureLevel` ``` purescript -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum +framebufferAttachmentTextureLevel :: GLenum ``` -#### `_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE` +#### `framebufferAttachmentTextureCubeMapFace` ``` purescript -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum +framebufferAttachmentTextureCubeMapFace :: GLenum ``` -#### `_COLOR_ATTACHMENT0` +#### `colorAttachment0` ``` purescript -_COLOR_ATTACHMENT0 :: GLenum +colorAttachment0 :: GLenum ``` -#### `_DEPTH_ATTACHMENT` +#### `depthAttachment` ``` purescript -_DEPTH_ATTACHMENT :: GLenum +depthAttachment :: GLenum ``` -#### `_STENCIL_ATTACHMENT` +#### `stencilAttachment` ``` purescript -_STENCIL_ATTACHMENT :: GLenum +stencilAttachment :: GLenum ``` -#### `_DEPTH_STENCIL_ATTACHMENT` +#### `depthStencilAttachment` ``` purescript -_DEPTH_STENCIL_ATTACHMENT :: GLenum +depthStencilAttachment :: GLenum ``` -#### `_NONE` +#### `none` ``` purescript -_NONE :: GLenum +none :: GLenum ``` -#### `_FRAMEBUFFER_COMPLETE` +#### `framebufferComplete` ``` purescript -_FRAMEBUFFER_COMPLETE :: GLenum +framebufferComplete :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_ATTACHMENT` +#### `framebufferIncompleteAttachment` ``` purescript -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum +framebufferIncompleteAttachment :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT` +#### `framebufferIncompleteMissingAttachment` ``` purescript -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum +framebufferIncompleteMissingAttachment :: GLenum ``` -#### `_FRAMEBUFFER_INCOMPLETE_DIMENSIONS` +#### `framebufferIncompleteDimensions` ``` purescript -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum +framebufferIncompleteDimensions :: GLenum ``` -#### `_FRAMEBUFFER_UNSUPPORTED` +#### `framebufferUnsupported` ``` purescript -_FRAMEBUFFER_UNSUPPORTED :: GLenum +framebufferUnsupported :: GLenum ``` -#### `_FRAMEBUFFER_BINDING` +#### `framebufferBinding` ``` purescript -_FRAMEBUFFER_BINDING :: GLenum +framebufferBinding :: GLenum ``` -#### `_RENDERBUFFER_BINDING` +#### `renderbufferBinding` ``` purescript -_RENDERBUFFER_BINDING :: GLenum +renderbufferBinding :: GLenum ``` -#### `_MAX_RENDERBUFFER_SIZE` +#### `maxRenderbufferSize` ``` purescript -_MAX_RENDERBUFFER_SIZE :: GLenum +maxRenderbufferSize :: GLenum ``` -#### `_INVALID_FRAMEBUFFER_OPERATION` +#### `invalidFramebufferOperation` ``` purescript -_INVALID_FRAMEBUFFER_OPERATION :: GLenum +invalidFramebufferOperation :: GLenum ``` -#### `_UNPACK_FLIP_Y_WEBGL` +#### `unpackFlipYWebgl` ``` purescript -_UNPACK_FLIP_Y_WEBGL :: GLenum +unpackFlipYWebgl :: GLenum ``` -#### `_UNPACK_PREMULTIPLY_ALPHA_WEBGL` +#### `unpackPremultiplyAlphaWebgl` ``` purescript -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum +unpackPremultiplyAlphaWebgl :: GLenum ``` -#### `_CONTEXT_LOST_WEBGL` +#### `contextLostWebgl` ``` purescript -_CONTEXT_LOST_WEBGL :: GLenum +contextLostWebgl :: GLenum ``` -#### `_UNPACK_COLORSPACE_CONVERSION_WEBGL` +#### `unpackColorspaceConversionWebgl` ``` purescript -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum +unpackColorspaceConversionWebgl :: GLenum ``` -#### `_BROWSER_DEFAULT_WEBGL` +#### `browserDefaultWebgl` ``` purescript -_BROWSER_DEFAULT_WEBGL :: GLenum +browserDefaultWebgl :: GLenum ``` @@ -3049,6 +3042,13 @@ _BROWSER_DEFAULT_WEBGL :: GLenum ## Module Graphics.WebGL.Raw.Types +#### `WebGL` + +``` purescript +data WebGL :: ! +``` + + #### `DOMString` ``` purescript diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index e559693..2b33df9 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -6,6 +6,7 @@ module IDL.Printer , funcsFFI ) where +import Data.Char (toLower, toUpper) import Data.List (sort) import Data.Maybe (isNothing) import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, @@ -24,7 +25,7 @@ typesFFI idl = header = vcat [ "module Graphics.WebGL.Raw.Types where" , "" - , "import Data.ArrayBuffer.Types (Float32Array ())" + , "import Data.ArrayBuffer.Types" , "" , "foreign import data WebGL :: !" ] @@ -39,7 +40,8 @@ enumsFFI idl = header = vcat [ "module Graphics.WebGL.Raw.Enums where" , "" - , "import Graphics.WebGL.Raw.Types (GLenum ())" + , "import Graphics.WebGL.Raw.Types" + , "import qualified Prelude as Pre" ] funcsFFI :: IDL -> Doc @@ -57,9 +59,7 @@ funcsFFI idl = imports = vcat [ "import Control.Monad.Eff" , "import Data.ArrayBuffer.Types" - , "import Data.TypedArray" , "import Data.Function" - , "import Graphics.WebGL.Raw.Enums" , "import Graphics.WebGL.Raw.Types" ] @@ -99,7 +99,7 @@ ppConstant Enum { enumName = n, enumValue = v } = constName <+> "=" <+> (integer v) $$ blank where - constName = text $ '_' : n + constName = toCamelCase n ppImplTypeSig :: Decl -> Doc ppImplTypeSig f@Function{} = @@ -194,9 +194,15 @@ sigReturnType Function{ methodRetType = ret } = blank :: Doc blank = "" +genericType :: Doc +genericType = char 'a' + implName :: Decl -> Doc implName f@Function{} = text (methodName f) <> "Impl" +int :: Int -> Doc +int = integer . fromIntegral + prefixWebgl :: Doc prefixWebgl = text (argName webglContext) <> "." @@ -207,8 +213,8 @@ prePunct p (x:x':xs) = x : go x' xs go y (z:zs) = (p <> y) : go z zs prePunct _ xs = xs -genericType :: Doc -genericType = char 'a' - -int :: Int -> Doc -int = integer . fromIntegral +toCamelCase :: String -> Doc +toCamelCase = text . foldr go "" + where + go '_' (l:ls) = toUpper l : ls + go l ls = toLower l : ls diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index a3577ba..415b105 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -139,9 +139,7 @@ module Graphics.WebGL.Raw import Control.Monad.Eff import Data.ArrayBuffer.Types -import Data.TypedArray import Data.Function -import Graphics.WebGL.Raw.Enums import Graphics.WebGL.Raw.Types foreign import getContextAttributesImpl """ diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 00c369d..0cad46f 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -3,905 +3,906 @@ module Graphics.WebGL.Raw.Enums where -import Graphics.WebGL.Raw.Types (GLenum ()) +import Graphics.WebGL.Raw.Types +import qualified Prelude as Pre -_DEPTH_BUFFER_BIT :: GLenum -_DEPTH_BUFFER_BIT = 256 +depthBufferBit :: GLenum +depthBufferBit = 256 -_STENCIL_BUFFER_BIT :: GLenum -_STENCIL_BUFFER_BIT = 1024 +stencilBufferBit :: GLenum +stencilBufferBit = 1024 -_COLOR_BUFFER_BIT :: GLenum -_COLOR_BUFFER_BIT = 16384 +colorBufferBit :: GLenum +colorBufferBit = 16384 -_POINTS :: GLenum -_POINTS = 0 +points :: GLenum +points = 0 -_LINES :: GLenum -_LINES = 1 +lines :: GLenum +lines = 1 -_LINE_LOOP :: GLenum -_LINE_LOOP = 2 +lineLoop :: GLenum +lineLoop = 2 -_LINE_STRIP :: GLenum -_LINE_STRIP = 3 +lineStrip :: GLenum +lineStrip = 3 -_TRIANGLES :: GLenum -_TRIANGLES = 4 +triangles :: GLenum +triangles = 4 -_TRIANGLE_STRIP :: GLenum -_TRIANGLE_STRIP = 5 +triangleStrip :: GLenum +triangleStrip = 5 -_TRIANGLE_FAN :: GLenum -_TRIANGLE_FAN = 6 +triangleFan :: GLenum +triangleFan = 6 -_ZERO :: GLenum -_ZERO = 0 +zero :: GLenum +zero = 0 -_ONE :: GLenum -_ONE = 1 +one :: GLenum +one = 1 -_SRC_COLOR :: GLenum -_SRC_COLOR = 768 +srcColor :: GLenum +srcColor = 768 -_ONE_MINUS_SRC_COLOR :: GLenum -_ONE_MINUS_SRC_COLOR = 769 +oneMinusSrcColor :: GLenum +oneMinusSrcColor = 769 -_SRC_ALPHA :: GLenum -_SRC_ALPHA = 770 +srcAlpha :: GLenum +srcAlpha = 770 -_ONE_MINUS_SRC_ALPHA :: GLenum -_ONE_MINUS_SRC_ALPHA = 771 +oneMinusSrcAlpha :: GLenum +oneMinusSrcAlpha = 771 -_DST_ALPHA :: GLenum -_DST_ALPHA = 772 +dstAlpha :: GLenum +dstAlpha = 772 -_ONE_MINUS_DST_ALPHA :: GLenum -_ONE_MINUS_DST_ALPHA = 773 +oneMinusDstAlpha :: GLenum +oneMinusDstAlpha = 773 -_DST_COLOR :: GLenum -_DST_COLOR = 774 +dstColor :: GLenum +dstColor = 774 -_ONE_MINUS_DST_COLOR :: GLenum -_ONE_MINUS_DST_COLOR = 775 +oneMinusDstColor :: GLenum +oneMinusDstColor = 775 -_SRC_ALPHA_SATURATE :: GLenum -_SRC_ALPHA_SATURATE = 776 +srcAlphaSaturate :: GLenum +srcAlphaSaturate = 776 -_FUNC_ADD :: GLenum -_FUNC_ADD = 32774 +funcAdd :: GLenum +funcAdd = 32774 -_BLEND_EQUATION :: GLenum -_BLEND_EQUATION = 32777 +blendEquation :: GLenum +blendEquation = 32777 -_BLEND_EQUATION_RGB :: GLenum -_BLEND_EQUATION_RGB = 32777 +blendEquationRgb :: GLenum +blendEquationRgb = 32777 -_BLEND_EQUATION_ALPHA :: GLenum -_BLEND_EQUATION_ALPHA = 34877 +blendEquationAlpha :: GLenum +blendEquationAlpha = 34877 -_FUNC_SUBTRACT :: GLenum -_FUNC_SUBTRACT = 32778 +funcSubtract :: GLenum +funcSubtract = 32778 -_FUNC_REVERSE_SUBTRACT :: GLenum -_FUNC_REVERSE_SUBTRACT = 32779 +funcReverseSubtract :: GLenum +funcReverseSubtract = 32779 -_BLEND_DST_RGB :: GLenum -_BLEND_DST_RGB = 32968 +blendDstRgb :: GLenum +blendDstRgb = 32968 -_BLEND_SRC_RGB :: GLenum -_BLEND_SRC_RGB = 32969 +blendSrcRgb :: GLenum +blendSrcRgb = 32969 -_BLEND_DST_ALPHA :: GLenum -_BLEND_DST_ALPHA = 32970 +blendDstAlpha :: GLenum +blendDstAlpha = 32970 -_BLEND_SRC_ALPHA :: GLenum -_BLEND_SRC_ALPHA = 32971 +blendSrcAlpha :: GLenum +blendSrcAlpha = 32971 -_CONSTANT_COLOR :: GLenum -_CONSTANT_COLOR = 32769 +constantColor :: GLenum +constantColor = 32769 -_ONE_MINUS_CONSTANT_COLOR :: GLenum -_ONE_MINUS_CONSTANT_COLOR = 32770 +oneMinusConstantColor :: GLenum +oneMinusConstantColor = 32770 -_CONSTANT_ALPHA :: GLenum -_CONSTANT_ALPHA = 32771 +constantAlpha :: GLenum +constantAlpha = 32771 -_ONE_MINUS_CONSTANT_ALPHA :: GLenum -_ONE_MINUS_CONSTANT_ALPHA = 32772 +oneMinusConstantAlpha :: GLenum +oneMinusConstantAlpha = 32772 -_BLEND_COLOR :: GLenum -_BLEND_COLOR = 32773 +blendColor :: GLenum +blendColor = 32773 -_ARRAY_BUFFER :: GLenum -_ARRAY_BUFFER = 34962 +arrayBuffer :: GLenum +arrayBuffer = 34962 -_ELEMENT_ARRAY_BUFFER :: GLenum -_ELEMENT_ARRAY_BUFFER = 34963 +elementArrayBuffer :: GLenum +elementArrayBuffer = 34963 -_ARRAY_BUFFER_BINDING :: GLenum -_ARRAY_BUFFER_BINDING = 34964 +arrayBufferBinding :: GLenum +arrayBufferBinding = 34964 -_ELEMENT_ARRAY_BUFFER_BINDING :: GLenum -_ELEMENT_ARRAY_BUFFER_BINDING = 34965 +elementArrayBufferBinding :: GLenum +elementArrayBufferBinding = 34965 -_STREAM_DRAW :: GLenum -_STREAM_DRAW = 35040 +streamDraw :: GLenum +streamDraw = 35040 -_STATIC_DRAW :: GLenum -_STATIC_DRAW = 35044 +staticDraw :: GLenum +staticDraw = 35044 -_DYNAMIC_DRAW :: GLenum -_DYNAMIC_DRAW = 35048 +dynamicDraw :: GLenum +dynamicDraw = 35048 -_BUFFER_SIZE :: GLenum -_BUFFER_SIZE = 34660 +bufferSize :: GLenum +bufferSize = 34660 -_BUFFER_USAGE :: GLenum -_BUFFER_USAGE = 34661 +bufferUsage :: GLenum +bufferUsage = 34661 -_CURRENT_VERTEX_ATTRIB :: GLenum -_CURRENT_VERTEX_ATTRIB = 34342 +currentVertexAttrib :: GLenum +currentVertexAttrib = 34342 -_FRONT :: GLenum -_FRONT = 1028 +front :: GLenum +front = 1028 -_BACK :: GLenum -_BACK = 1029 +back :: GLenum +back = 1029 -_FRONT_AND_BACK :: GLenum -_FRONT_AND_BACK = 1032 +frontAndBack :: GLenum +frontAndBack = 1032 -_TEXTURE_2D :: GLenum -_TEXTURE_2D = 3553 +texture2d :: GLenum +texture2d = 3553 -_CULL_FACE :: GLenum -_CULL_FACE = 2884 +cullFace :: GLenum +cullFace = 2884 -_BLEND :: GLenum -_BLEND = 3042 +blend :: GLenum +blend = 3042 -_DITHER :: GLenum -_DITHER = 3024 +dither :: GLenum +dither = 3024 -_STENCIL_TEST :: GLenum -_STENCIL_TEST = 2960 +stencilTest :: GLenum +stencilTest = 2960 -_DEPTH_TEST :: GLenum -_DEPTH_TEST = 2929 +depthTest :: GLenum +depthTest = 2929 -_SCISSOR_TEST :: GLenum -_SCISSOR_TEST = 3089 +scissorTest :: GLenum +scissorTest = 3089 -_POLYGON_OFFSET_FILL :: GLenum -_POLYGON_OFFSET_FILL = 32823 +polygonOffsetFill :: GLenum +polygonOffsetFill = 32823 -_SAMPLE_ALPHA_TO_COVERAGE :: GLenum -_SAMPLE_ALPHA_TO_COVERAGE = 32926 +sampleAlphaToCoverage :: GLenum +sampleAlphaToCoverage = 32926 -_SAMPLE_COVERAGE :: GLenum -_SAMPLE_COVERAGE = 32928 +sampleCoverage :: GLenum +sampleCoverage = 32928 -_NO_ERROR :: GLenum -_NO_ERROR = 0 +noError :: GLenum +noError = 0 -_INVALID_ENUM :: GLenum -_INVALID_ENUM = 1280 +invalidEnum :: GLenum +invalidEnum = 1280 -_INVALID_VALUE :: GLenum -_INVALID_VALUE = 1281 +invalidValue :: GLenum +invalidValue = 1281 -_INVALID_OPERATION :: GLenum -_INVALID_OPERATION = 1282 +invalidOperation :: GLenum +invalidOperation = 1282 -_OUT_OF_MEMORY :: GLenum -_OUT_OF_MEMORY = 1285 +outOfMemory :: GLenum +outOfMemory = 1285 -_CW :: GLenum -_CW = 2304 +cw :: GLenum +cw = 2304 -_CCW :: GLenum -_CCW = 2305 +ccw :: GLenum +ccw = 2305 -_LINE_WIDTH :: GLenum -_LINE_WIDTH = 2849 +lineWidth :: GLenum +lineWidth = 2849 -_ALIASED_POINT_SIZE_RANGE :: GLenum -_ALIASED_POINT_SIZE_RANGE = 33901 +aliasedPointSizeRange :: GLenum +aliasedPointSizeRange = 33901 -_ALIASED_LINE_WIDTH_RANGE :: GLenum -_ALIASED_LINE_WIDTH_RANGE = 33902 +aliasedLineWidthRange :: GLenum +aliasedLineWidthRange = 33902 -_CULL_FACE_MODE :: GLenum -_CULL_FACE_MODE = 2885 +cullFaceMode :: GLenum +cullFaceMode = 2885 -_FRONT_FACE :: GLenum -_FRONT_FACE = 2886 +frontFace :: GLenum +frontFace = 2886 -_DEPTH_RANGE :: GLenum -_DEPTH_RANGE = 2928 +depthRange :: GLenum +depthRange = 2928 -_DEPTH_WRITEMASK :: GLenum -_DEPTH_WRITEMASK = 2930 +depthWritemask :: GLenum +depthWritemask = 2930 -_DEPTH_CLEAR_VALUE :: GLenum -_DEPTH_CLEAR_VALUE = 2931 +depthClearValue :: GLenum +depthClearValue = 2931 -_DEPTH_FUNC :: GLenum -_DEPTH_FUNC = 2932 +depthFunc :: GLenum +depthFunc = 2932 -_STENCIL_CLEAR_VALUE :: GLenum -_STENCIL_CLEAR_VALUE = 2961 +stencilClearValue :: GLenum +stencilClearValue = 2961 -_STENCIL_FUNC :: GLenum -_STENCIL_FUNC = 2962 +stencilFunc :: GLenum +stencilFunc = 2962 -_STENCIL_FAIL :: GLenum -_STENCIL_FAIL = 2964 +stencilFail :: GLenum +stencilFail = 2964 -_STENCIL_PASS_DEPTH_FAIL :: GLenum -_STENCIL_PASS_DEPTH_FAIL = 2965 +stencilPassDepthFail :: GLenum +stencilPassDepthFail = 2965 -_STENCIL_PASS_DEPTH_PASS :: GLenum -_STENCIL_PASS_DEPTH_PASS = 2966 +stencilPassDepthPass :: GLenum +stencilPassDepthPass = 2966 -_STENCIL_REF :: GLenum -_STENCIL_REF = 2967 +stencilRef :: GLenum +stencilRef = 2967 -_STENCIL_VALUE_MASK :: GLenum -_STENCIL_VALUE_MASK = 2963 +stencilValueMask :: GLenum +stencilValueMask = 2963 -_STENCIL_WRITEMASK :: GLenum -_STENCIL_WRITEMASK = 2968 +stencilWritemask :: GLenum +stencilWritemask = 2968 -_STENCIL_BACK_FUNC :: GLenum -_STENCIL_BACK_FUNC = 34816 +stencilBackFunc :: GLenum +stencilBackFunc = 34816 -_STENCIL_BACK_FAIL :: GLenum -_STENCIL_BACK_FAIL = 34817 +stencilBackFail :: GLenum +stencilBackFail = 34817 -_STENCIL_BACK_PASS_DEPTH_FAIL :: GLenum -_STENCIL_BACK_PASS_DEPTH_FAIL = 34818 +stencilBackPassDepthFail :: GLenum +stencilBackPassDepthFail = 34818 -_STENCIL_BACK_PASS_DEPTH_PASS :: GLenum -_STENCIL_BACK_PASS_DEPTH_PASS = 34819 +stencilBackPassDepthPass :: GLenum +stencilBackPassDepthPass = 34819 -_STENCIL_BACK_REF :: GLenum -_STENCIL_BACK_REF = 36003 +stencilBackRef :: GLenum +stencilBackRef = 36003 -_STENCIL_BACK_VALUE_MASK :: GLenum -_STENCIL_BACK_VALUE_MASK = 36004 +stencilBackValueMask :: GLenum +stencilBackValueMask = 36004 -_STENCIL_BACK_WRITEMASK :: GLenum -_STENCIL_BACK_WRITEMASK = 36005 +stencilBackWritemask :: GLenum +stencilBackWritemask = 36005 -_VIEWPORT :: GLenum -_VIEWPORT = 2978 +viewport :: GLenum +viewport = 2978 -_SCISSOR_BOX :: GLenum -_SCISSOR_BOX = 3088 +scissorBox :: GLenum +scissorBox = 3088 -_COLOR_CLEAR_VALUE :: GLenum -_COLOR_CLEAR_VALUE = 3106 +colorClearValue :: GLenum +colorClearValue = 3106 -_COLOR_WRITEMASK :: GLenum -_COLOR_WRITEMASK = 3107 +colorWritemask :: GLenum +colorWritemask = 3107 -_UNPACK_ALIGNMENT :: GLenum -_UNPACK_ALIGNMENT = 3317 +unpackAlignment :: GLenum +unpackAlignment = 3317 -_PACK_ALIGNMENT :: GLenum -_PACK_ALIGNMENT = 3333 +packAlignment :: GLenum +packAlignment = 3333 -_MAX_TEXTURE_SIZE :: GLenum -_MAX_TEXTURE_SIZE = 3379 +maxTextureSize :: GLenum +maxTextureSize = 3379 -_MAX_VIEWPORT_DIMS :: GLenum -_MAX_VIEWPORT_DIMS = 3386 +maxViewportDims :: GLenum +maxViewportDims = 3386 -_SUBPIXEL_BITS :: GLenum -_SUBPIXEL_BITS = 3408 +subpixelBits :: GLenum +subpixelBits = 3408 -_RED_BITS :: GLenum -_RED_BITS = 3410 +redBits :: GLenum +redBits = 3410 -_GREEN_BITS :: GLenum -_GREEN_BITS = 3411 +greenBits :: GLenum +greenBits = 3411 -_BLUE_BITS :: GLenum -_BLUE_BITS = 3412 +blueBits :: GLenum +blueBits = 3412 -_ALPHA_BITS :: GLenum -_ALPHA_BITS = 3413 +alphaBits :: GLenum +alphaBits = 3413 -_DEPTH_BITS :: GLenum -_DEPTH_BITS = 3414 +depthBits :: GLenum +depthBits = 3414 -_STENCIL_BITS :: GLenum -_STENCIL_BITS = 3415 +stencilBits :: GLenum +stencilBits = 3415 -_POLYGON_OFFSET_UNITS :: GLenum -_POLYGON_OFFSET_UNITS = 10752 +polygonOffsetUnits :: GLenum +polygonOffsetUnits = 10752 -_POLYGON_OFFSET_FACTOR :: GLenum -_POLYGON_OFFSET_FACTOR = 32824 +polygonOffsetFactor :: GLenum +polygonOffsetFactor = 32824 -_TEXTURE_BINDING_2D :: GLenum -_TEXTURE_BINDING_2D = 32873 +textureBinding2d :: GLenum +textureBinding2d = 32873 -_SAMPLE_BUFFERS :: GLenum -_SAMPLE_BUFFERS = 32936 +sampleBuffers :: GLenum +sampleBuffers = 32936 -_SAMPLES :: GLenum -_SAMPLES = 32937 +samples :: GLenum +samples = 32937 -_SAMPLE_COVERAGE_VALUE :: GLenum -_SAMPLE_COVERAGE_VALUE = 32938 +sampleCoverageValue :: GLenum +sampleCoverageValue = 32938 -_SAMPLE_COVERAGE_INVERT :: GLenum -_SAMPLE_COVERAGE_INVERT = 32939 +sampleCoverageInvert :: GLenum +sampleCoverageInvert = 32939 -_NUM_COMPRESSED_TEXTURE_FORMATS :: GLenum -_NUM_COMPRESSED_TEXTURE_FORMATS = 34466 +numCompressedTextureFormats :: GLenum +numCompressedTextureFormats = 34466 -_COMPRESSED_TEXTURE_FORMATS :: GLenum -_COMPRESSED_TEXTURE_FORMATS = 34467 +compressedTextureFormats :: GLenum +compressedTextureFormats = 34467 -_DONT_CARE :: GLenum -_DONT_CARE = 4352 +dontCare :: GLenum +dontCare = 4352 -_FASTEST :: GLenum -_FASTEST = 4353 +fastest :: GLenum +fastest = 4353 -_NICEST :: GLenum -_NICEST = 4354 +nicest :: GLenum +nicest = 4354 -_GENERATE_MIPMAP_HINT :: GLenum -_GENERATE_MIPMAP_HINT = 33170 +generateMipmapHint :: GLenum +generateMipmapHint = 33170 -_BYTE :: GLenum -_BYTE = 5120 +byte :: GLenum +byte = 5120 -_UNSIGNED_BYTE :: GLenum -_UNSIGNED_BYTE = 5121 +unsignedByte :: GLenum +unsignedByte = 5121 -_SHORT :: GLenum -_SHORT = 5122 +short :: GLenum +short = 5122 -_UNSIGNED_SHORT :: GLenum -_UNSIGNED_SHORT = 5123 +unsignedShort :: GLenum +unsignedShort = 5123 -_INT :: GLenum -_INT = 5124 +int :: GLenum +int = 5124 -_UNSIGNED_INT :: GLenum -_UNSIGNED_INT = 5125 +unsignedInt :: GLenum +unsignedInt = 5125 -_FLOAT :: GLenum -_FLOAT = 5126 +float :: GLenum +float = 5126 -_DEPTH_COMPONENT :: GLenum -_DEPTH_COMPONENT = 6402 +depthComponent :: GLenum +depthComponent = 6402 -_ALPHA :: GLenum -_ALPHA = 6406 +alpha :: GLenum +alpha = 6406 -_RGB :: GLenum -_RGB = 6407 +rgb :: GLenum +rgb = 6407 -_RGBA :: GLenum -_RGBA = 6408 +rgba :: GLenum +rgba = 6408 -_LUMINANCE :: GLenum -_LUMINANCE = 6409 +luminance :: GLenum +luminance = 6409 -_LUMINANCE_ALPHA :: GLenum -_LUMINANCE_ALPHA = 6410 +luminanceAlpha :: GLenum +luminanceAlpha = 6410 -_UNSIGNED_SHORT_4_4_4_4 :: GLenum -_UNSIGNED_SHORT_4_4_4_4 = 32819 +unsignedShort4444 :: GLenum +unsignedShort4444 = 32819 -_UNSIGNED_SHORT_5_5_5_1 :: GLenum -_UNSIGNED_SHORT_5_5_5_1 = 32820 +unsignedShort5551 :: GLenum +unsignedShort5551 = 32820 -_UNSIGNED_SHORT_5_6_5 :: GLenum -_UNSIGNED_SHORT_5_6_5 = 33635 +unsignedShort565 :: GLenum +unsignedShort565 = 33635 -_FRAGMENT_SHADER :: GLenum -_FRAGMENT_SHADER = 35632 +fragmentShader :: GLenum +fragmentShader = 35632 -_VERTEX_SHADER :: GLenum -_VERTEX_SHADER = 35633 +vertexShader :: GLenum +vertexShader = 35633 -_MAX_VERTEX_ATTRIBS :: GLenum -_MAX_VERTEX_ATTRIBS = 34921 +maxVertexAttribs :: GLenum +maxVertexAttribs = 34921 -_MAX_VERTEX_UNIFORM_VECTORS :: GLenum -_MAX_VERTEX_UNIFORM_VECTORS = 36347 +maxVertexUniformVectors :: GLenum +maxVertexUniformVectors = 36347 -_MAX_VARYING_VECTORS :: GLenum -_MAX_VARYING_VECTORS = 36348 +maxVaryingVectors :: GLenum +maxVaryingVectors = 36348 -_MAX_COMBINED_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 35661 +maxCombinedTextureImageUnits :: GLenum +maxCombinedTextureImageUnits = 35661 -_MAX_VERTEX_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 35660 +maxVertexTextureImageUnits :: GLenum +maxVertexTextureImageUnits = 35660 -_MAX_TEXTURE_IMAGE_UNITS :: GLenum -_MAX_TEXTURE_IMAGE_UNITS = 34930 +maxTextureImageUnits :: GLenum +maxTextureImageUnits = 34930 -_MAX_FRAGMENT_UNIFORM_VECTORS :: GLenum -_MAX_FRAGMENT_UNIFORM_VECTORS = 36349 +maxFragmentUniformVectors :: GLenum +maxFragmentUniformVectors = 36349 -_SHADER_TYPE :: GLenum -_SHADER_TYPE = 35663 +shaderType :: GLenum +shaderType = 35663 -_DELETE_STATUS :: GLenum -_DELETE_STATUS = 35712 +deleteStatus :: GLenum +deleteStatus = 35712 -_LINK_STATUS :: GLenum -_LINK_STATUS = 35714 +linkStatus :: GLenum +linkStatus = 35714 -_VALIDATE_STATUS :: GLenum -_VALIDATE_STATUS = 35715 +validateStatus :: GLenum +validateStatus = 35715 -_ATTACHED_SHADERS :: GLenum -_ATTACHED_SHADERS = 35717 +attachedShaders :: GLenum +attachedShaders = 35717 -_ACTIVE_UNIFORMS :: GLenum -_ACTIVE_UNIFORMS = 35718 +activeUniforms :: GLenum +activeUniforms = 35718 -_ACTIVE_UNIFORM_MAX_LENGTH :: GLenum -_ACTIVE_UNIFORM_MAX_LENGTH = 35719 +activeUniformMaxLength :: GLenum +activeUniformMaxLength = 35719 -_ACTIVE_ATTRIBUTES :: GLenum -_ACTIVE_ATTRIBUTES = 35721 +activeAttributes :: GLenum +activeAttributes = 35721 -_ACTIVE_ATTRIBUTE_MAX_LENGTH :: GLenum -_ACTIVE_ATTRIBUTE_MAX_LENGTH = 35722 +activeAttributeMaxLength :: GLenum +activeAttributeMaxLength = 35722 -_SHADING_LANGUAGE_VERSION :: GLenum -_SHADING_LANGUAGE_VERSION = 35724 +shadingLanguageVersion :: GLenum +shadingLanguageVersion = 35724 -_CURRENT_PROGRAM :: GLenum -_CURRENT_PROGRAM = 35725 +currentProgram :: GLenum +currentProgram = 35725 -_NEVER :: GLenum -_NEVER = 512 +never :: GLenum +never = 512 -_LESS :: GLenum -_LESS = 513 +less :: GLenum +less = 513 -_EQUAL :: GLenum -_EQUAL = 514 +equal :: GLenum +equal = 514 -_LEQUAL :: GLenum -_LEQUAL = 515 +lequal :: GLenum +lequal = 515 -_GREATER :: GLenum -_GREATER = 516 +greater :: GLenum +greater = 516 -_NOTEQUAL :: GLenum -_NOTEQUAL = 517 +notequal :: GLenum +notequal = 517 -_GEQUAL :: GLenum -_GEQUAL = 518 +gequal :: GLenum +gequal = 518 -_ALWAYS :: GLenum -_ALWAYS = 519 +always :: GLenum +always = 519 -_KEEP :: GLenum -_KEEP = 7680 +keep :: GLenum +keep = 7680 -_REPLACE :: GLenum -_REPLACE = 7681 +replace :: GLenum +replace = 7681 -_INCR :: GLenum -_INCR = 7682 +incr :: GLenum +incr = 7682 -_DECR :: GLenum -_DECR = 7683 +decr :: GLenum +decr = 7683 -_INVERT :: GLenum -_INVERT = 5386 +invert :: GLenum +invert = 5386 -_INCR_WRAP :: GLenum -_INCR_WRAP = 34055 +incrWrap :: GLenum +incrWrap = 34055 -_DECR_WRAP :: GLenum -_DECR_WRAP = 34056 +decrWrap :: GLenum +decrWrap = 34056 -_VENDOR :: GLenum -_VENDOR = 7936 +vendor :: GLenum +vendor = 7936 -_RENDERER :: GLenum -_RENDERER = 7937 +renderer :: GLenum +renderer = 7937 -_VERSION :: GLenum -_VERSION = 7938 +version :: GLenum +version = 7938 -_NEAREST :: GLenum -_NEAREST = 9728 +nearest :: GLenum +nearest = 9728 -_LINEAR :: GLenum -_LINEAR = 9729 +linear :: GLenum +linear = 9729 -_NEAREST_MIPMAP_NEAREST :: GLenum -_NEAREST_MIPMAP_NEAREST = 9984 +nearestMipmapNearest :: GLenum +nearestMipmapNearest = 9984 -_LINEAR_MIPMAP_NEAREST :: GLenum -_LINEAR_MIPMAP_NEAREST = 9985 +linearMipmapNearest :: GLenum +linearMipmapNearest = 9985 -_NEAREST_MIPMAP_LINEAR :: GLenum -_NEAREST_MIPMAP_LINEAR = 9986 +nearestMipmapLinear :: GLenum +nearestMipmapLinear = 9986 -_LINEAR_MIPMAP_LINEAR :: GLenum -_LINEAR_MIPMAP_LINEAR = 9987 +linearMipmapLinear :: GLenum +linearMipmapLinear = 9987 -_TEXTURE_MAG_FILTER :: GLenum -_TEXTURE_MAG_FILTER = 10240 +textureMagFilter :: GLenum +textureMagFilter = 10240 -_TEXTURE_MIN_FILTER :: GLenum -_TEXTURE_MIN_FILTER = 10241 +textureMinFilter :: GLenum +textureMinFilter = 10241 -_TEXTURE_WRAP_S :: GLenum -_TEXTURE_WRAP_S = 10242 +textureWrapS :: GLenum +textureWrapS = 10242 -_TEXTURE_WRAP_T :: GLenum -_TEXTURE_WRAP_T = 10243 +textureWrapT :: GLenum +textureWrapT = 10243 -_TEXTURE :: GLenum -_TEXTURE = 5890 +texture :: GLenum +texture = 5890 -_TEXTURE_CUBE_MAP :: GLenum -_TEXTURE_CUBE_MAP = 34067 +textureCubeMap :: GLenum +textureCubeMap = 34067 -_TEXTURE_BINDING_CUBE_MAP :: GLenum -_TEXTURE_BINDING_CUBE_MAP = 34068 +textureBindingCubeMap :: GLenum +textureBindingCubeMap = 34068 -_TEXTURE_CUBE_MAP_POSITIVE_X :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_X = 34069 +textureCubeMapPositiveX :: GLenum +textureCubeMapPositiveX = 34069 -_TEXTURE_CUBE_MAP_NEGATIVE_X :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_X = 34070 +textureCubeMapNegativeX :: GLenum +textureCubeMapNegativeX = 34070 -_TEXTURE_CUBE_MAP_POSITIVE_Y :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_Y = 34071 +textureCubeMapPositiveY :: GLenum +textureCubeMapPositiveY = 34071 -_TEXTURE_CUBE_MAP_NEGATIVE_Y :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_Y = 34072 +textureCubeMapNegativeY :: GLenum +textureCubeMapNegativeY = 34072 -_TEXTURE_CUBE_MAP_POSITIVE_Z :: GLenum -_TEXTURE_CUBE_MAP_POSITIVE_Z = 34073 +textureCubeMapPositiveZ :: GLenum +textureCubeMapPositiveZ = 34073 -_TEXTURE_CUBE_MAP_NEGATIVE_Z :: GLenum -_TEXTURE_CUBE_MAP_NEGATIVE_Z = 34074 +textureCubeMapNegativeZ :: GLenum +textureCubeMapNegativeZ = 34074 -_MAX_CUBE_MAP_TEXTURE_SIZE :: GLenum -_MAX_CUBE_MAP_TEXTURE_SIZE = 34076 +maxCubeMapTextureSize :: GLenum +maxCubeMapTextureSize = 34076 -_TEXTURE0 :: GLenum -_TEXTURE0 = 33984 +texture0 :: GLenum +texture0 = 33984 -_TEXTURE1 :: GLenum -_TEXTURE1 = 33985 +texture1 :: GLenum +texture1 = 33985 -_TEXTURE2 :: GLenum -_TEXTURE2 = 33986 +texture2 :: GLenum +texture2 = 33986 -_TEXTURE3 :: GLenum -_TEXTURE3 = 33987 +texture3 :: GLenum +texture3 = 33987 -_TEXTURE4 :: GLenum -_TEXTURE4 = 33988 +texture4 :: GLenum +texture4 = 33988 -_TEXTURE5 :: GLenum -_TEXTURE5 = 33989 +texture5 :: GLenum +texture5 = 33989 -_TEXTURE6 :: GLenum -_TEXTURE6 = 33990 +texture6 :: GLenum +texture6 = 33990 -_TEXTURE7 :: GLenum -_TEXTURE7 = 33991 +texture7 :: GLenum +texture7 = 33991 -_TEXTURE8 :: GLenum -_TEXTURE8 = 33992 +texture8 :: GLenum +texture8 = 33992 -_TEXTURE9 :: GLenum -_TEXTURE9 = 33993 +texture9 :: GLenum +texture9 = 33993 -_TEXTURE10 :: GLenum -_TEXTURE10 = 33994 +texture10 :: GLenum +texture10 = 33994 -_TEXTURE11 :: GLenum -_TEXTURE11 = 33995 +texture11 :: GLenum +texture11 = 33995 -_TEXTURE12 :: GLenum -_TEXTURE12 = 33996 +texture12 :: GLenum +texture12 = 33996 -_TEXTURE13 :: GLenum -_TEXTURE13 = 33997 +texture13 :: GLenum +texture13 = 33997 -_TEXTURE14 :: GLenum -_TEXTURE14 = 33998 +texture14 :: GLenum +texture14 = 33998 -_TEXTURE15 :: GLenum -_TEXTURE15 = 33999 +texture15 :: GLenum +texture15 = 33999 -_TEXTURE16 :: GLenum -_TEXTURE16 = 34000 +texture16 :: GLenum +texture16 = 34000 -_TEXTURE17 :: GLenum -_TEXTURE17 = 34001 +texture17 :: GLenum +texture17 = 34001 -_TEXTURE18 :: GLenum -_TEXTURE18 = 34002 +texture18 :: GLenum +texture18 = 34002 -_TEXTURE19 :: GLenum -_TEXTURE19 = 34003 +texture19 :: GLenum +texture19 = 34003 -_TEXTURE20 :: GLenum -_TEXTURE20 = 34004 +texture20 :: GLenum +texture20 = 34004 -_TEXTURE21 :: GLenum -_TEXTURE21 = 34005 +texture21 :: GLenum +texture21 = 34005 -_TEXTURE22 :: GLenum -_TEXTURE22 = 34006 +texture22 :: GLenum +texture22 = 34006 -_TEXTURE23 :: GLenum -_TEXTURE23 = 34007 +texture23 :: GLenum +texture23 = 34007 -_TEXTURE24 :: GLenum -_TEXTURE24 = 34008 +texture24 :: GLenum +texture24 = 34008 -_TEXTURE25 :: GLenum -_TEXTURE25 = 34009 +texture25 :: GLenum +texture25 = 34009 -_TEXTURE26 :: GLenum -_TEXTURE26 = 34010 +texture26 :: GLenum +texture26 = 34010 -_TEXTURE27 :: GLenum -_TEXTURE27 = 34011 +texture27 :: GLenum +texture27 = 34011 -_TEXTURE28 :: GLenum -_TEXTURE28 = 34012 +texture28 :: GLenum +texture28 = 34012 -_TEXTURE29 :: GLenum -_TEXTURE29 = 34013 +texture29 :: GLenum +texture29 = 34013 -_TEXTURE30 :: GLenum -_TEXTURE30 = 34014 +texture30 :: GLenum +texture30 = 34014 -_TEXTURE31 :: GLenum -_TEXTURE31 = 34015 +texture31 :: GLenum +texture31 = 34015 -_ACTIVE_TEXTURE :: GLenum -_ACTIVE_TEXTURE = 34016 +activeTexture :: GLenum +activeTexture = 34016 -_REPEAT :: GLenum -_REPEAT = 10497 +repeat :: GLenum +repeat = 10497 -_CLAMP_TO_EDGE :: GLenum -_CLAMP_TO_EDGE = 33071 +clampToEdge :: GLenum +clampToEdge = 33071 -_MIRRORED_REPEAT :: GLenum -_MIRRORED_REPEAT = 33648 +mirroredRepeat :: GLenum +mirroredRepeat = 33648 -_FLOAT_VEC2 :: GLenum -_FLOAT_VEC2 = 35664 +floatVec2 :: GLenum +floatVec2 = 35664 -_FLOAT_VEC3 :: GLenum -_FLOAT_VEC3 = 35665 +floatVec3 :: GLenum +floatVec3 = 35665 -_FLOAT_VEC4 :: GLenum -_FLOAT_VEC4 = 35666 +floatVec4 :: GLenum +floatVec4 = 35666 -_INT_VEC2 :: GLenum -_INT_VEC2 = 35667 +intVec2 :: GLenum +intVec2 = 35667 -_INT_VEC3 :: GLenum -_INT_VEC3 = 35668 +intVec3 :: GLenum +intVec3 = 35668 -_INT_VEC4 :: GLenum -_INT_VEC4 = 35669 +intVec4 :: GLenum +intVec4 = 35669 -_BOOL :: GLenum -_BOOL = 35670 +bool :: GLenum +bool = 35670 -_BOOL_VEC2 :: GLenum -_BOOL_VEC2 = 35671 +boolVec2 :: GLenum +boolVec2 = 35671 -_BOOL_VEC3 :: GLenum -_BOOL_VEC3 = 35672 +boolVec3 :: GLenum +boolVec3 = 35672 -_BOOL_VEC4 :: GLenum -_BOOL_VEC4 = 35673 +boolVec4 :: GLenum +boolVec4 = 35673 -_FLOAT_MAT2 :: GLenum -_FLOAT_MAT2 = 35674 +floatMat2 :: GLenum +floatMat2 = 35674 -_FLOAT_MAT3 :: GLenum -_FLOAT_MAT3 = 35675 +floatMat3 :: GLenum +floatMat3 = 35675 -_FLOAT_MAT4 :: GLenum -_FLOAT_MAT4 = 35676 +floatMat4 :: GLenum +floatMat4 = 35676 -_SAMPLER_2D :: GLenum -_SAMPLER_2D = 35678 +sampler2d :: GLenum +sampler2d = 35678 -_SAMPLER_CUBE :: GLenum -_SAMPLER_CUBE = 35680 +samplerCube :: GLenum +samplerCube = 35680 -_VERTEX_ATTRIB_ARRAY_ENABLED :: GLenum -_VERTEX_ATTRIB_ARRAY_ENABLED = 34338 +vertexAttribArrayEnabled :: GLenum +vertexAttribArrayEnabled = 34338 -_VERTEX_ATTRIB_ARRAY_SIZE :: GLenum -_VERTEX_ATTRIB_ARRAY_SIZE = 34339 +vertexAttribArraySize :: GLenum +vertexAttribArraySize = 34339 -_VERTEX_ATTRIB_ARRAY_STRIDE :: GLenum -_VERTEX_ATTRIB_ARRAY_STRIDE = 34340 +vertexAttribArrayStride :: GLenum +vertexAttribArrayStride = 34340 -_VERTEX_ATTRIB_ARRAY_TYPE :: GLenum -_VERTEX_ATTRIB_ARRAY_TYPE = 34341 +vertexAttribArrayType :: GLenum +vertexAttribArrayType = 34341 -_VERTEX_ATTRIB_ARRAY_NORMALIZED :: GLenum -_VERTEX_ATTRIB_ARRAY_NORMALIZED = 34922 +vertexAttribArrayNormalized :: GLenum +vertexAttribArrayNormalized = 34922 -_VERTEX_ATTRIB_ARRAY_POINTER :: GLenum -_VERTEX_ATTRIB_ARRAY_POINTER = 34373 +vertexAttribArrayPointer :: GLenum +vertexAttribArrayPointer = 34373 -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING :: GLenum -_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 34975 +vertexAttribArrayBufferBinding :: GLenum +vertexAttribArrayBufferBinding = 34975 -_COMPILE_STATUS :: GLenum -_COMPILE_STATUS = 35713 +compileStatus :: GLenum +compileStatus = 35713 -_INFO_LOG_LENGTH :: GLenum -_INFO_LOG_LENGTH = 35716 +infoLogLength :: GLenum +infoLogLength = 35716 -_SHADER_SOURCE_LENGTH :: GLenum -_SHADER_SOURCE_LENGTH = 35720 +shaderSourceLength :: GLenum +shaderSourceLength = 35720 -_LOW_FLOAT :: GLenum -_LOW_FLOAT = 36336 +lowFloat :: GLenum +lowFloat = 36336 -_MEDIUM_FLOAT :: GLenum -_MEDIUM_FLOAT = 36337 +mediumFloat :: GLenum +mediumFloat = 36337 -_HIGH_FLOAT :: GLenum -_HIGH_FLOAT = 36338 +highFloat :: GLenum +highFloat = 36338 -_LOW_INT :: GLenum -_LOW_INT = 36339 +lowInt :: GLenum +lowInt = 36339 -_MEDIUM_INT :: GLenum -_MEDIUM_INT = 36340 +mediumInt :: GLenum +mediumInt = 36340 -_HIGH_INT :: GLenum -_HIGH_INT = 36341 +highInt :: GLenum +highInt = 36341 -_FRAMEBUFFER :: GLenum -_FRAMEBUFFER = 36160 +framebuffer :: GLenum +framebuffer = 36160 -_RENDERBUFFER :: GLenum -_RENDERBUFFER = 36161 +renderbuffer :: GLenum +renderbuffer = 36161 -_RGBA4 :: GLenum -_RGBA4 = 32854 +rgba4 :: GLenum +rgba4 = 32854 -_RGB5_A1 :: GLenum -_RGB5_A1 = 32855 +rgb5A1 :: GLenum +rgb5A1 = 32855 -_RGB565 :: GLenum -_RGB565 = 36194 +rgb565 :: GLenum +rgb565 = 36194 -_DEPTH_COMPONENT16 :: GLenum -_DEPTH_COMPONENT16 = 33189 +depthComponent16 :: GLenum +depthComponent16 = 33189 -_STENCIL_INDEX :: GLenum -_STENCIL_INDEX = 6401 +stencilIndex :: GLenum +stencilIndex = 6401 -_STENCIL_INDEX8 :: GLenum -_STENCIL_INDEX8 = 36168 +stencilIndex8 :: GLenum +stencilIndex8 = 36168 -_DEPTH_STENCIL :: GLenum -_DEPTH_STENCIL = 34041 +depthStencil :: GLenum +depthStencil = 34041 -_RENDERBUFFER_WIDTH :: GLenum -_RENDERBUFFER_WIDTH = 36162 +renderbufferWidth :: GLenum +renderbufferWidth = 36162 -_RENDERBUFFER_HEIGHT :: GLenum -_RENDERBUFFER_HEIGHT = 36163 +renderbufferHeight :: GLenum +renderbufferHeight = 36163 -_RENDERBUFFER_INTERNAL_FORMAT :: GLenum -_RENDERBUFFER_INTERNAL_FORMAT = 36164 +renderbufferInternalFormat :: GLenum +renderbufferInternalFormat = 36164 -_RENDERBUFFER_RED_SIZE :: GLenum -_RENDERBUFFER_RED_SIZE = 36176 +renderbufferRedSize :: GLenum +renderbufferRedSize = 36176 -_RENDERBUFFER_GREEN_SIZE :: GLenum -_RENDERBUFFER_GREEN_SIZE = 36177 +renderbufferGreenSize :: GLenum +renderbufferGreenSize = 36177 -_RENDERBUFFER_BLUE_SIZE :: GLenum -_RENDERBUFFER_BLUE_SIZE = 36178 +renderbufferBlueSize :: GLenum +renderbufferBlueSize = 36178 -_RENDERBUFFER_ALPHA_SIZE :: GLenum -_RENDERBUFFER_ALPHA_SIZE = 36179 +renderbufferAlphaSize :: GLenum +renderbufferAlphaSize = 36179 -_RENDERBUFFER_DEPTH_SIZE :: GLenum -_RENDERBUFFER_DEPTH_SIZE = 36180 +renderbufferDepthSize :: GLenum +renderbufferDepthSize = 36180 -_RENDERBUFFER_STENCIL_SIZE :: GLenum -_RENDERBUFFER_STENCIL_SIZE = 36181 +renderbufferStencilSize :: GLenum +renderbufferStencilSize = 36181 -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE :: GLenum -_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 36048 +framebufferAttachmentObjectType :: GLenum +framebufferAttachmentObjectType = 36048 -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME :: GLenum -_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 36049 +framebufferAttachmentObjectName :: GLenum +framebufferAttachmentObjectName = 36049 -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL :: GLenum -_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 36050 +framebufferAttachmentTextureLevel :: GLenum +framebufferAttachmentTextureLevel = 36050 -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE :: GLenum -_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 36051 +framebufferAttachmentTextureCubeMapFace :: GLenum +framebufferAttachmentTextureCubeMapFace = 36051 -_COLOR_ATTACHMENT0 :: GLenum -_COLOR_ATTACHMENT0 = 36064 +colorAttachment0 :: GLenum +colorAttachment0 = 36064 -_DEPTH_ATTACHMENT :: GLenum -_DEPTH_ATTACHMENT = 36096 +depthAttachment :: GLenum +depthAttachment = 36096 -_STENCIL_ATTACHMENT :: GLenum -_STENCIL_ATTACHMENT = 36128 +stencilAttachment :: GLenum +stencilAttachment = 36128 -_DEPTH_STENCIL_ATTACHMENT :: GLenum -_DEPTH_STENCIL_ATTACHMENT = 33306 +depthStencilAttachment :: GLenum +depthStencilAttachment = 33306 -_NONE :: GLenum -_NONE = 0 +none :: GLenum +none = 0 -_FRAMEBUFFER_COMPLETE :: GLenum -_FRAMEBUFFER_COMPLETE = 36053 +framebufferComplete :: GLenum +framebufferComplete = 36053 -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT :: GLenum -_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 36054 +framebufferIncompleteAttachment :: GLenum +framebufferIncompleteAttachment = 36054 -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT :: GLenum -_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 36055 +framebufferIncompleteMissingAttachment :: GLenum +framebufferIncompleteMissingAttachment = 36055 -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS :: GLenum -_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 36057 +framebufferIncompleteDimensions :: GLenum +framebufferIncompleteDimensions = 36057 -_FRAMEBUFFER_UNSUPPORTED :: GLenum -_FRAMEBUFFER_UNSUPPORTED = 36061 +framebufferUnsupported :: GLenum +framebufferUnsupported = 36061 -_FRAMEBUFFER_BINDING :: GLenum -_FRAMEBUFFER_BINDING = 36006 +framebufferBinding :: GLenum +framebufferBinding = 36006 -_RENDERBUFFER_BINDING :: GLenum -_RENDERBUFFER_BINDING = 36007 +renderbufferBinding :: GLenum +renderbufferBinding = 36007 -_MAX_RENDERBUFFER_SIZE :: GLenum -_MAX_RENDERBUFFER_SIZE = 34024 +maxRenderbufferSize :: GLenum +maxRenderbufferSize = 34024 -_INVALID_FRAMEBUFFER_OPERATION :: GLenum -_INVALID_FRAMEBUFFER_OPERATION = 1286 +invalidFramebufferOperation :: GLenum +invalidFramebufferOperation = 1286 -_UNPACK_FLIP_Y_WEBGL :: GLenum -_UNPACK_FLIP_Y_WEBGL = 37440 +unpackFlipYWebgl :: GLenum +unpackFlipYWebgl = 37440 -_UNPACK_PREMULTIPLY_ALPHA_WEBGL :: GLenum -_UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441 +unpackPremultiplyAlphaWebgl :: GLenum +unpackPremultiplyAlphaWebgl = 37441 -_CONTEXT_LOST_WEBGL :: GLenum -_CONTEXT_LOST_WEBGL = 37442 +contextLostWebgl :: GLenum +contextLostWebgl = 37442 -_UNPACK_COLORSPACE_CONVERSION_WEBGL :: GLenum -_UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443 +unpackColorspaceConversionWebgl :: GLenum +unpackColorspaceConversionWebgl = 37443 -_BROWSER_DEFAULT_WEBGL :: GLenum -_BROWSER_DEFAULT_WEBGL = 37444 +browserDefaultWebgl :: GLenum +browserDefaultWebgl = 37444 diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 1773d37..232e207 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -3,7 +3,7 @@ module Graphics.WebGL.Raw.Types where -import Data.ArrayBuffer.Types (Float32Array ()) +import Data.ArrayBuffer.Types foreign import data WebGL :: ! From 2654096c9f4657c44d604180d2ff2d3d4c3c76ce Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 27 May 2015 14:26:25 -0500 Subject: [PATCH 27/51] significant README edits --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index cdbd328..a5478cb 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,24 @@ -# purescript-webgl-raw +## Graphics.WebGL.Raw + +See the [module documentation][1] for all exported functions, constants, and +types. -This package consists of two pieces: + [1]: docs/README.md -1. a Haskell generator, which parses the Khronos WebGL specification to create... -2. the PureScript wrapper of the WebGL methods +This library is the thinnest possible PureScript wrapper for JavaScript WebGL +methods, and is generated by parsing the [Khronos IDL][2] for the WebGL +specification. The library should not be altered manually but by modifying the +generator. -The files in `src` should only be edited by modifying the generator. + [2]: https://www.khronos.org/registry/webgl/specs/1.0.3/ -## Generator +This library is not intended for production use, but instead to be wrapped by +additional libraries providing type-safety and automatic error checking and +handling. -To build the generator, ensure you have a recent version of Haskell and +## Khronos IDL Parser and PureScript Generator + +To build the parser/generator, ensure you have a recent version of Haskell and `cabal-install` installed, and then: ```sh @@ -18,25 +27,16 @@ To build the generator, ensure you have a recent version of Haskell and > cabal build ``` -To run the generator on the included [Khronos IDL][1] and output the contents -into the PureScript module: - - [1]: https://www.khronos.org/registry/webgl/specs/1.0.3/ +To run the generator on the included IDL and output the contents into the +correct PureScript modules: ```sh -> dist/build/purescript-webgl-raw/purescript-webgl-raw \ -> docs/WebGL-1.0.3.idl > src/Graphics/WebGL/Raw.purs +> cabal run docs/WebGL-1.0.3.idl ``` -## Graphics.WebGL.Raw - -The generated library is intended as the lowest-possible-level wrapping of -the WebGL API for PureScript. It is not intended for use outside of the -`purescript-webgl-unsafe` package, which provides a type-safe (but not -error-checked) wrapper around the raw methods. - -To build `Graphics.WebGL.Raw`, ensure you have a recent version of Node -and `npm` installed, and then: +If modifying the parser, be sure to regenerate the module documentation by +running the default Grunt task. Ensure you have a recent version of Node and +`npm` installed, and then: ```sh > npm install @@ -47,6 +47,6 @@ and `npm` installed, and then: ## Credits This package is built upon the amazing amounts of hard work done by [Jurgen -Nicklisch-Franken][2], from whom this package is forked. +Nicklisch-Franken][3], from whom this was forked. - [2]: https://github.com/jutaro + [3]: https://github.com/jutaro From 5148c51528ba7e8de98c3836081c49a3ba90d42d Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 27 May 2015 14:39:09 -0500 Subject: [PATCH 28/51] bump version to 0.2.0 --- bower.json | 2 +- package.json | 2 +- purescript-webgl-raw.cabal | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 82535ef..f0810db 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "purescript-webgl-raw", "description": "a generated low-level PureScript wrapper of WebGL methods", - "version": "0.0.1", + "version": "0.2.0", "license": "GPL-2", "ignore": [ diff --git a/package.json b/package.json index 1d12c10..c84bb53 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "purescript-webgl-raw", "description": "a generated low-level PureScript wrapper of WebGL methods", - "version": "0.0.1", + "version": "0.2.0", "license": "CPL-2", "repository": { diff --git a/purescript-webgl-raw.cabal b/purescript-webgl-raw.cabal index 3f3ea9c..14e1235 100644 --- a/purescript-webgl-raw.cabal +++ b/purescript-webgl-raw.cabal @@ -1,5 +1,5 @@ name: purescript-webgl-raw -version: 0.0.1.0 +version: 0.2.0 cabal-version: >= 1.10 build-type: Simple license: GPL-2 From df4cfd5c2e4e002085847e4df918e8b37e64d69e Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sat, 30 May 2015 14:23:35 -0500 Subject: [PATCH 29/51] use Canvas effect from Graphics.Canvas rather than WebGL effect --- generator/IDL/Printer.hs | 8 ++++---- src/Graphics/WebGL/Raw/Types.purs | 2 -- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 2b33df9..1c0cd9a 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -26,8 +26,6 @@ typesFFI idl = [ "module Graphics.WebGL.Raw.Types where" , "" , "import Data.ArrayBuffer.Types" - , "" - , "foreign import data WebGL :: !" ] enumsFFI :: IDL -> Doc @@ -57,7 +55,9 @@ funcsFFI idl = , ppExportList (functions idl) $+$ ") where" ] imports = vcat - [ "import Control.Monad.Eff" + [ "import Graphics.Canvas (Canvas ())" + , "" + , "import Control.Monad.Eff" , "import Data.ArrayBuffer.Types" , "import Data.Function" , "import Graphics.WebGL.Raw.Types" @@ -187,7 +187,7 @@ sigReturnType Function{ methodRetType = ret } = t@Concrete{} -> effMonad <+> ppConvertType t _ -> effMonad <+> genericType where - effMonad = "Eff (webgl :: WebGL | eff)" + effMonad = "Eff (canvas :: Canvas | eff)" -- helpers diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 232e207..e81becd 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -5,8 +5,6 @@ module Graphics.WebGL.Raw.Types where import Data.ArrayBuffer.Types -foreign import data WebGL :: ! - type DOMString = String type FloatArray = Float32Array type GLbitfield = Number From 82a972cbc742decb36f8352405153360d2c7667a Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Mon, 1 Jun 2015 09:47:51 -0500 Subject: [PATCH 30/51] put Haskell and PureScript output in the same dir --- gruntfile.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gruntfile.js b/gruntfile.js index 07b0405..a5d7784 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -9,12 +9,12 @@ module.exports = function(grunt) { ], dotPsci: ["<%=srcFiles%>"], - pscMake: ["<%=srcFiles%>"], psc: { options: { modules: 'Graphics.WebGL.Raw', - main: 'Graphics.WebGL.Raw' + main: 'Graphics.WebGL.Raw', + dest: 'dist' } }, @@ -25,6 +25,12 @@ module.exports = function(grunt) { } }, + pscMake: { + all: { + src: ["<%=srcFiles%>"], + dest: "dist/purescript" + } + } }); grunt.loadNpmTasks("grunt-purescript"); From 8b201b6277a9c454bde918d1fa93e36d1d44a0a7 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 09:19:05 -0500 Subject: [PATCH 31/51] use general "canvas" effect rather than specific "webgl" effect --- docs/README.md | 287 ++++++++-------- generator/IDL/Parser.hs | 1 + generator/IDL/Printer.hs | 17 +- src/Graphics/WebGL/Raw.purs | 534 +++++++++++++++--------------- src/Graphics/WebGL/Raw/Types.purs | 12 +- 5 files changed, 436 insertions(+), 415 deletions(-) diff --git a/docs/README.md b/docs/README.md index 1ed2f19..df031c8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,931 +6,931 @@ #### `getContextAttributes` ``` purescript -getContextAttributes :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLContextAttributes +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLContextAttributes ``` #### `isContextLost` ``` purescript -isContextLost :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Boolean +isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean ``` #### `getSupportedExtensions` ``` purescript -getSupportedExtensions :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) [DOMString] +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] ``` #### `getExtension` ``` purescript -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (webgl :: WebGL | eff) a +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) a ``` #### `activeTexture` ``` purescript -activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `attachShader` ``` purescript -attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit ``` #### `bindAttribLocation` ``` purescript -bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (webgl :: WebGL | eff) Unit +bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (canvas :: Canvas | eff) Unit ``` #### `bindBuffer` ``` purescript -bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `bindFramebuffer` ``` purescript -bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `bindRenderbuffer` ``` purescript -bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `bindTexture` ``` purescript -bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit ``` #### `blendColor` ``` purescript -blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit ``` #### `blendEquation` ``` purescript -blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `blendEquationSeparate` ``` purescript -blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `blendFunc` ``` purescript -blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `blendFuncSeparate` ``` purescript -blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `bufferData` ``` purescript -bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (webgl :: WebGL | eff) Unit +bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `bufferSubData` ``` purescript -bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` #### `checkFramebufferStatus` ``` purescript -checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLenum +checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLenum ``` #### `clear` ``` purescript -clear :: forall eff. WebGLContext -> GLbitfield -> Eff (webgl :: WebGL | eff) Unit +clear :: forall eff. WebGLContext -> GLbitfield -> Eff (canvas :: Canvas | eff) Unit ``` #### `clearColor` ``` purescript -clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit ``` #### `clearDepth` ``` purescript -clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (canvas :: Canvas | eff) Unit ``` #### `clearStencil` ``` purescript -clearStencil :: forall eff. WebGLContext -> GLint -> Eff (webgl :: WebGL | eff) Unit +clearStencil :: forall eff. WebGLContext -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `colorMask` ``` purescript -colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (canvas :: Canvas | eff) Unit ``` #### `compileShader` ``` purescript -compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit ``` #### `copyTexImage2D` ``` purescript -copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (webgl :: WebGL | eff) Unit +copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `copyTexSubImage2D` ``` purescript -copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit ``` #### `createBuffer` ``` purescript -createBuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLBuffer +createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLBuffer ``` #### `createFramebuffer` ``` purescript -createFramebuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLFramebuffer +createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLFramebuffer ``` #### `createProgram` ``` purescript -createProgram :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLProgram +createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLProgram ``` #### `createRenderbuffer` ``` purescript -createRenderbuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLRenderbuffer +createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLRenderbuffer ``` #### `createShader` ``` purescript -createShader :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) WebGLShader +createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) WebGLShader ``` #### `createTexture` ``` purescript -createTexture :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLTexture +createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLTexture ``` #### `cullFace` ``` purescript -cullFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +cullFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteBuffer` ``` purescript -deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteFramebuffer` ``` purescript -deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteProgram` ``` purescript -deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteRenderbuffer` ``` purescript -deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteShader` ``` purescript -deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit ``` #### `deleteTexture` ``` purescript -deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit ``` #### `depthFunc` ``` purescript -depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `depthMask` ``` purescript -depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (canvas :: Canvas | eff) Unit ``` #### `depthRange` ``` purescript -depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit ``` #### `detachShader` ``` purescript -detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit ``` #### `disable` ``` purescript -disable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +disable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `disableVertexAttribArray` ``` purescript -disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `drawArrays` ``` purescript -drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (canvas :: Canvas | eff) Unit ``` #### `drawElements` ``` purescript -drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit ``` #### `enable` ``` purescript -enable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +enable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `enableVertexAttribArray` ``` purescript -enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `finish` ``` purescript -finish :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +finish :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit ``` #### `flush` ``` purescript -flush :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +flush :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit ``` #### `framebufferRenderbuffer` ``` purescript -framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit ``` #### `framebufferTexture2D` ``` purescript -framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (webgl :: WebGL | eff) Unit +framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `frontFace` ``` purescript -frontFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +frontFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `generateMipmap` ``` purescript -generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `getActiveAttrib` ``` purescript -getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo ``` #### `getActiveUniform` ``` purescript -getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo ``` #### `getAttachedShaders` ``` purescript -getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) [WebGLShader] +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] ``` #### `getAttribLocation` ``` purescript -getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) GLint +getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) GLint ``` #### `getParameter` ``` purescript -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) a +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getBufferParameter` ``` purescript -getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getError` ``` purescript -getError :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) GLenum +getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum ``` #### `getFramebufferAttachmentParameter` ``` purescript -getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getProgramParameter` ``` purescript -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (webgl :: WebGL | eff) a +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getProgramInfoLog` ``` purescript -getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) DOMString +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) DOMString ``` #### `getRenderbufferParameter` ``` purescript -getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getShaderParameter` ``` purescript -getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (webgl :: WebGL | eff) a +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getShaderInfoLog` ``` purescript -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString ``` #### `getShaderSource` ``` purescript -getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString ``` #### `getTexParameter` ``` purescript -getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getUniform` ``` purescript -getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (webgl :: WebGL | eff) a +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) a ``` #### `getUniformLocation` ``` purescript -getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) WebGLUniformLocation +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) WebGLUniformLocation ``` #### `getVertexAttrib` ``` purescript -getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) a +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) a ``` #### `getVertexAttribOffset` ``` purescript -getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) GLsizeiptr +getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) GLsizeiptr ``` #### `hint` ``` purescript -hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `isBuffer` ``` purescript -isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) GLboolean +isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isEnabled` ``` purescript -isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLboolean +isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isFramebuffer` ``` purescript -isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) GLboolean +isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isProgram` ``` purescript -isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) GLboolean +isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isRenderbuffer` ``` purescript -isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) GLboolean +isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isShader` ``` purescript -isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) GLboolean +isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `isTexture` ``` purescript -isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) GLboolean +isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) GLboolean ``` #### `lineWidth` ``` purescript -lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `linkProgram` ``` purescript -linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit ``` #### `pixelStorei` ``` purescript -pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `polygonOffset` ``` purescript -polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `readPixels` ``` purescript -readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` #### `renderbufferStorage` ``` purescript -renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit ``` #### `sampleCoverage` ``` purescript -sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (canvas :: Canvas | eff) Unit ``` #### `scissor` ``` purescript -scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit ``` #### `shaderSource` ``` purescript -shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (webgl :: WebGL | eff) Unit +shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilFunc` ``` purescript -stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilFuncSeparate` ``` purescript -stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilMask` ``` purescript -stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilMaskSeparate` ``` purescript -stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilOp` ``` purescript -stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `stencilOpSeparate` ``` purescript -stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `texImage2D` ``` purescript -texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` #### `texParameterf` ``` purescript -texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `texParameteri` ``` purescript -texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `texSubImage2D` ``` purescript -texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform1f` ``` purescript -uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform1fv` ``` purescript -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform1i` ``` purescript -uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform1iv` ``` purescript -uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform2f` ``` purescript -uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform2fv` ``` purescript -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform2i` ``` purescript -uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform2iv` ``` purescript -uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform3f` ``` purescript -uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform3fv` ``` purescript -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform3i` ``` purescript -uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform3iv` ``` purescript -uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform4f` ``` purescript -uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform4fv` ``` purescript -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform4i` ``` purescript -uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniform4iv` ``` purescript -uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix2fv` ``` purescript -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix3fv` ``` purescript -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix4fv` ``` purescript -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `useProgram` ``` purescript -useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit ``` #### `validateProgram` ``` purescript -validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib1f` ``` purescript -vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib1fv` ``` purescript -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib2f` ``` purescript -vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib2fv` ``` purescript -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib3f` ``` purescript -vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib3fv` ``` purescript -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib4f` ``` purescript -vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttrib4fv` ``` purescript -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit ``` #### `vertexAttribPointer` ``` purescript -vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit ``` #### `viewport` ``` purescript -viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit ``` @@ -3042,13 +3042,6 @@ browserDefaultWebgl :: GLenum ## Module Graphics.WebGL.Raw.Types -#### `WebGL` - -``` purescript -data WebGL :: ! -``` - - #### `DOMString` ``` purescript @@ -3210,13 +3203,6 @@ data WebGLContext :: * ``` -#### `WebGLContextAttributes` - -``` purescript -data WebGLContextAttributes :: * -``` - - #### `WebGLFramebuffer` ``` purescript @@ -3256,4 +3242,11 @@ data WebGLTexture :: * ``` purescript data WebGLUniformLocation :: * +``` + + +#### `WebGLContextAttributes` + +``` purescript +type WebGLContextAttributes = { failIfMajorPerformanceCaveat :: Boolean, preferLowPowerToHighPerformance :: Boolean, preserveDrawingBuffer :: Boolean, premultipliedAlpha :: Boolean, antialias :: Boolean, stencil :: Boolean, depth :: Boolean, alpha :: Boolean } ``` \ No newline at end of file diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index 33f48f5..df133e9 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -45,6 +45,7 @@ excludedTypes = , "GLushort" , "HTMLCanvasElement" , "Int32Array" + , "WebGLContextAttributes" , "any" , "boolean" , "object" diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 1c0cd9a..a1bdf23 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -19,7 +19,8 @@ typesFFI idl = generatedWarning $+$ blank $+$ header $+$ blank $+$ typeDefs $+$ blank $+$ - typeDecls $+$ blank + typeDecls $+$ blank $+$ + contextAttrs $+$ blank where typeDecls = vcat . map ppTypeDecl . sort $ types idl header = vcat @@ -91,6 +92,20 @@ typeDefs = vcat , "type GLushort = Number" ] +contextAttrs :: Doc +contextAttrs = vcat + [ "type WebGLContextAttributes =" + , " { alpha :: Boolean" + , " , depth :: Boolean" + , " , stencil :: Boolean" + , " , antialias :: Boolean" + , " , premultipliedAlpha :: Boolean" + , " , preserveDrawingBuffer :: Boolean" + , " , preferLowPowerToHighPerformance :: Boolean" + , " , failIfMajorPerformanceCaveat :: Boolean" + , " }" + ] + -- component pretty-printers ppConstant :: Decl -> Doc diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index 415b105..b52c28a 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -137,6 +137,8 @@ module Graphics.WebGL.Raw , viewport ) where +import Graphics.Canvas (Canvas ()) + import Control.Monad.Eff import Data.ArrayBuffer.Types import Data.Function @@ -148,9 +150,9 @@ foreign import getContextAttributesImpl """ return webgl.getContextAttributes(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLContextAttributes) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) -getContextAttributes :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLContextAttributes +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLContextAttributes getContextAttributes = runFn1 getContextAttributesImpl foreign import isContextLostImpl """ @@ -159,9 +161,9 @@ foreign import isContextLostImpl """ return webgl.isContextLost(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Boolean) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) -isContextLost :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Boolean +isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean isContextLost = runFn1 isContextLostImpl foreign import getSupportedExtensionsImpl """ @@ -170,9 +172,9 @@ foreign import getSupportedExtensionsImpl """ return webgl.getSupportedExtensions(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) [DOMString]) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) -getSupportedExtensions :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) [DOMString] +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] getSupportedExtensions = runFn1 getSupportedExtensionsImpl foreign import getExtensionImpl """ @@ -181,9 +183,9 @@ foreign import getExtensionImpl """ return webgl.getExtension(name); }; } -""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (webgl :: WebGL | eff) a +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) a getExtension = runFn2 getExtensionImpl foreign import activeTextureImpl """ @@ -192,9 +194,9 @@ foreign import activeTextureImpl """ return webgl.activeTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit activeTexture = runFn2 activeTextureImpl foreign import attachShaderImpl """ @@ -203,9 +205,9 @@ foreign import attachShaderImpl """ return webgl.attachShader(program, shader); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) -attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit attachShader = runFn3 attachShaderImpl foreign import bindAttribLocationImpl """ @@ -214,9 +216,9 @@ foreign import bindAttribLocationImpl """ return webgl.bindAttribLocation(program, index, name); }; } -""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (canvas :: Canvas | eff) Unit) -bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (webgl :: WebGL | eff) Unit +bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (canvas :: Canvas | eff) Unit bindAttribLocation = runFn4 bindAttribLocationImpl foreign import bindBufferImpl """ @@ -225,9 +227,9 @@ foreign import bindBufferImpl """ return webgl.bindBuffer(target, buffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) -bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit bindBuffer = runFn3 bindBufferImpl foreign import bindFramebufferImpl """ @@ -236,9 +238,9 @@ foreign import bindFramebufferImpl """ return webgl.bindFramebuffer(target, framebuffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) -bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit bindFramebuffer = runFn3 bindFramebufferImpl foreign import bindRenderbufferImpl """ @@ -247,9 +249,9 @@ foreign import bindRenderbufferImpl """ return webgl.bindRenderbuffer(target, renderbuffer); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) -bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit bindRenderbuffer = runFn3 bindRenderbufferImpl foreign import bindTextureImpl """ @@ -258,9 +260,9 @@ foreign import bindTextureImpl """ return webgl.bindTexture(target, texture); }; } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) -bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit bindTexture = runFn3 bindTextureImpl foreign import blendColorImpl """ @@ -269,9 +271,9 @@ foreign import blendColorImpl """ return webgl.blendColor(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) -blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit blendColor = runFn5 blendColorImpl foreign import blendEquationImpl """ @@ -280,9 +282,9 @@ foreign import blendEquationImpl """ return webgl.blendEquation(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendEquation = runFn2 blendEquationImpl foreign import blendEquationSeparateImpl """ @@ -291,9 +293,9 @@ foreign import blendEquationSeparateImpl """ return webgl.blendEquationSeparate(modeRGB, modeAlpha); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendEquationSeparate = runFn3 blendEquationSeparateImpl foreign import blendFuncImpl """ @@ -302,9 +304,9 @@ foreign import blendFuncImpl """ return webgl.blendFunc(sfactor, dfactor); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendFunc = runFn3 blendFuncImpl foreign import blendFuncSeparateImpl """ @@ -313,9 +315,9 @@ foreign import blendFuncSeparateImpl """ return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendFuncSeparate = runFn5 blendFuncSeparateImpl foreign import bufferDataImpl """ @@ -324,9 +326,9 @@ foreign import bufferDataImpl """ return webgl.bufferData(target, data, usage); }; } -""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (canvas :: Canvas | eff) Unit) -bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (webgl :: WebGL | eff) Unit +bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (canvas :: Canvas | eff) Unit bufferData = runFn4 bufferDataImpl foreign import bufferSubDataImpl """ @@ -335,9 +337,9 @@ foreign import bufferSubDataImpl """ return webgl.bufferSubData(target, offset, data); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit bufferSubData = runFn4 bufferSubDataImpl foreign import checkFramebufferStatusImpl """ @@ -346,9 +348,9 @@ foreign import checkFramebufferStatusImpl """ return webgl.checkFramebufferStatus(target); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLenum) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) -checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLenum +checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLenum checkFramebufferStatus = runFn2 checkFramebufferStatusImpl foreign import clearImpl """ @@ -357,9 +359,9 @@ foreign import clearImpl """ return webgl.clear(mask); }; } -""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) -clear :: forall eff. WebGLContext -> GLbitfield -> Eff (webgl :: WebGL | eff) Unit +clear :: forall eff. WebGLContext -> GLbitfield -> Eff (canvas :: Canvas | eff) Unit clear = runFn2 clearImpl foreign import clearColorImpl """ @@ -368,9 +370,9 @@ foreign import clearColorImpl """ return webgl.clearColor(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) -clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit clearColor = runFn5 clearColorImpl foreign import clearDepthImpl """ @@ -379,9 +381,9 @@ foreign import clearDepthImpl """ return webgl.clearDepth(depth); }; } -""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) -clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (canvas :: Canvas | eff) Unit clearDepth = runFn2 clearDepthImpl foreign import clearStencilImpl """ @@ -390,9 +392,9 @@ foreign import clearStencilImpl """ return webgl.clearStencil(s); }; } -""" :: forall eff. Fn2 WebGLContext GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) -clearStencil :: forall eff. WebGLContext -> GLint -> Eff (webgl :: WebGL | eff) Unit +clearStencil :: forall eff. WebGLContext -> GLint -> Eff (canvas :: Canvas | eff) Unit clearStencil = runFn2 clearStencilImpl foreign import colorMaskImpl """ @@ -401,9 +403,9 @@ foreign import colorMaskImpl """ return webgl.colorMask(red, green, blue, alpha); }; } -""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) -colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (canvas :: Canvas | eff) Unit colorMask = runFn5 colorMaskImpl foreign import compileShaderImpl """ @@ -412,9 +414,9 @@ foreign import compileShaderImpl """ return webgl.compileShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) -compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit compileShader = runFn2 compileShaderImpl foreign import copyTexImage2DImpl """ @@ -423,9 +425,9 @@ foreign import copyTexImage2DImpl """ return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); }; } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) -copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (webgl :: WebGL | eff) Unit +copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (canvas :: Canvas | eff) Unit copyTexImage2D = runFn9 copyTexImage2DImpl foreign import copyTexSubImage2DImpl """ @@ -434,9 +436,9 @@ foreign import copyTexSubImage2DImpl """ return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); }; } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) -copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit copyTexSubImage2D = runFn9 copyTexSubImage2DImpl foreign import createBufferImpl """ @@ -445,9 +447,9 @@ foreign import createBufferImpl """ return webgl.createBuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLBuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) -createBuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLBuffer +createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLBuffer createBuffer = runFn1 createBufferImpl foreign import createFramebufferImpl """ @@ -456,9 +458,9 @@ foreign import createFramebufferImpl """ return webgl.createFramebuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLFramebuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) -createFramebuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLFramebuffer +createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLFramebuffer createFramebuffer = runFn1 createFramebufferImpl foreign import createProgramImpl """ @@ -467,9 +469,9 @@ foreign import createProgramImpl """ return webgl.createProgram(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLProgram) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) -createProgram :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLProgram +createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLProgram createProgram = runFn1 createProgramImpl foreign import createRenderbufferImpl """ @@ -478,9 +480,9 @@ foreign import createRenderbufferImpl """ return webgl.createRenderbuffer(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLRenderbuffer) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) -createRenderbuffer :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLRenderbuffer +createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLRenderbuffer createRenderbuffer = runFn1 createRenderbufferImpl foreign import createShaderImpl """ @@ -489,9 +491,9 @@ foreign import createShaderImpl """ return webgl.createShader(type); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) WebGLShader) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) -createShader :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) WebGLShader +createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) WebGLShader createShader = runFn2 createShaderImpl foreign import createTextureImpl """ @@ -500,9 +502,9 @@ foreign import createTextureImpl """ return webgl.createTexture(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) WebGLTexture) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) -createTexture :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) WebGLTexture +createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLTexture createTexture = runFn1 createTextureImpl foreign import cullFaceImpl """ @@ -511,9 +513,9 @@ foreign import cullFaceImpl """ return webgl.cullFace(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -cullFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +cullFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit cullFace = runFn2 cullFaceImpl foreign import deleteBufferImpl """ @@ -522,9 +524,9 @@ foreign import deleteBufferImpl """ return webgl.deleteBuffer(buffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) -deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) Unit +deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit deleteBuffer = runFn2 deleteBufferImpl foreign import deleteFramebufferImpl """ @@ -533,9 +535,9 @@ foreign import deleteFramebufferImpl """ return webgl.deleteFramebuffer(framebuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) -deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) Unit +deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit deleteFramebuffer = runFn2 deleteFramebufferImpl foreign import deleteProgramImpl """ @@ -544,9 +546,9 @@ foreign import deleteProgramImpl """ return webgl.deleteProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) -deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit deleteProgram = runFn2 deleteProgramImpl foreign import deleteRenderbufferImpl """ @@ -555,9 +557,9 @@ foreign import deleteRenderbufferImpl """ return webgl.deleteRenderbuffer(renderbuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) -deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit deleteRenderbuffer = runFn2 deleteRenderbufferImpl foreign import deleteShaderImpl """ @@ -566,9 +568,9 @@ foreign import deleteShaderImpl """ return webgl.deleteShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) -deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit deleteShader = runFn2 deleteShaderImpl foreign import deleteTextureImpl """ @@ -577,9 +579,9 @@ foreign import deleteTextureImpl """ return webgl.deleteTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) -deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) Unit +deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit deleteTexture = runFn2 deleteTextureImpl foreign import depthFuncImpl """ @@ -588,9 +590,9 @@ foreign import depthFuncImpl """ return webgl.depthFunc(func); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit depthFunc = runFn2 depthFuncImpl foreign import depthMaskImpl """ @@ -599,9 +601,9 @@ foreign import depthMaskImpl """ return webgl.depthMask(flag); }; } -""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) -depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (canvas :: Canvas | eff) Unit depthMask = runFn2 depthMaskImpl foreign import depthRangeImpl """ @@ -610,9 +612,9 @@ foreign import depthRangeImpl """ return webgl.depthRange(zNear, zFar); }; } -""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) -depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (webgl :: WebGL | eff) Unit +depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit depthRange = runFn3 depthRangeImpl foreign import detachShaderImpl """ @@ -621,9 +623,9 @@ foreign import detachShaderImpl """ return webgl.detachShader(program, shader); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) -detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (webgl :: WebGL | eff) Unit +detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit detachShader = runFn3 detachShaderImpl foreign import disableImpl """ @@ -632,9 +634,9 @@ foreign import disableImpl """ return webgl.disable(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -disable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +disable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit disable = runFn2 disableImpl foreign import disableVertexAttribArrayImpl """ @@ -643,9 +645,9 @@ foreign import disableVertexAttribArrayImpl """ return webgl.disableVertexAttribArray(index); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) -disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit disableVertexAttribArray = runFn2 disableVertexAttribArrayImpl foreign import drawArraysImpl """ @@ -654,9 +656,9 @@ foreign import drawArraysImpl """ return webgl.drawArrays(mode, first, count); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) -drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (canvas :: Canvas | eff) Unit drawArrays = runFn4 drawArraysImpl foreign import drawElementsImpl """ @@ -665,9 +667,9 @@ foreign import drawElementsImpl """ return webgl.drawElements(mode, count, type, offset); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) -drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit drawElements = runFn5 drawElementsImpl foreign import enableImpl """ @@ -676,9 +678,9 @@ foreign import enableImpl """ return webgl.enable(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -enable :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +enable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit enable = runFn2 enableImpl foreign import enableVertexAttribArrayImpl """ @@ -687,9 +689,9 @@ foreign import enableVertexAttribArrayImpl """ return webgl.enableVertexAttribArray(index); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) -enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit enableVertexAttribArray = runFn2 enableVertexAttribArrayImpl foreign import finishImpl """ @@ -698,9 +700,9 @@ foreign import finishImpl """ return webgl.finish(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) -finish :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +finish :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit finish = runFn1 finishImpl foreign import flushImpl """ @@ -709,9 +711,9 @@ foreign import flushImpl """ return webgl.flush(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) -flush :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) Unit +flush :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit flush = runFn1 flushImpl foreign import framebufferRenderbufferImpl """ @@ -720,9 +722,9 @@ foreign import framebufferRenderbufferImpl """ return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) -framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) Unit +framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit framebufferRenderbuffer = runFn5 framebufferRenderbufferImpl foreign import framebufferTexture2DImpl """ @@ -731,9 +733,9 @@ foreign import framebufferTexture2DImpl """ return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); }; } -""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) -framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (webgl :: WebGL | eff) Unit +framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (canvas :: Canvas | eff) Unit framebufferTexture2D = runFn6 framebufferTexture2DImpl foreign import frontFaceImpl """ @@ -742,9 +744,9 @@ foreign import frontFaceImpl """ return webgl.frontFace(mode); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -frontFace :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +frontFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit frontFace = runFn2 frontFaceImpl foreign import generateMipmapImpl """ @@ -753,9 +755,9 @@ foreign import generateMipmapImpl """ return webgl.generateMipmap(target); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) -generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) Unit +generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit generateMipmap = runFn2 generateMipmapImpl foreign import getActiveAttribImpl """ @@ -764,9 +766,9 @@ foreign import getActiveAttribImpl """ return webgl.getActiveAttrib(program, index); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) -getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo getActiveAttrib = runFn3 getActiveAttribImpl foreign import getActiveUniformImpl """ @@ -775,9 +777,9 @@ foreign import getActiveUniformImpl """ return webgl.getActiveUniform(program, index); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (webgl :: WebGL | eff) WebGLActiveInfo) +""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) -getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (webgl :: WebGL | eff) WebGLActiveInfo +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo getActiveUniform = runFn3 getActiveUniformImpl foreign import getAttachedShadersImpl """ @@ -786,9 +788,9 @@ foreign import getAttachedShadersImpl """ return webgl.getAttachedShaders(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) [WebGLShader]) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) -getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) [WebGLShader] +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] getAttachedShaders = runFn2 getAttachedShadersImpl foreign import getAttribLocationImpl """ @@ -797,9 +799,9 @@ foreign import getAttribLocationImpl """ return webgl.getAttribLocation(program, name); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) GLint) +""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) GLint) -getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) GLint +getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) GLint getAttribLocation = runFn3 getAttribLocationImpl foreign import getParameterImpl """ @@ -808,9 +810,9 @@ foreign import getParameterImpl """ return webgl.getParameter(pname); }; } -""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) a +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a getParameter = runFn2 getParameterImpl foreign import getBufferParameterImpl """ @@ -819,9 +821,9 @@ foreign import getBufferParameterImpl """ return webgl.getBufferParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a getBufferParameter = runFn3 getBufferParameterImpl foreign import getErrorImpl """ @@ -830,9 +832,9 @@ foreign import getErrorImpl """ return webgl.getError(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (webgl :: WebGL | eff) GLenum) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) -getError :: forall eff. WebGLContext -> Eff (webgl :: WebGL | eff) GLenum +getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum getError = runFn1 getErrorImpl foreign import getFramebufferAttachmentParameterImpl """ @@ -841,9 +843,9 @@ foreign import getFramebufferAttachmentParameterImpl """ return webgl.getFramebufferAttachmentParameter(target, attachment, pname); }; } -""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a getFramebufferAttachmentParameter = runFn4 getFramebufferAttachmentParameterImpl foreign import getProgramParameterImpl """ @@ -852,9 +854,9 @@ foreign import getProgramParameterImpl """ return webgl.getProgramParameter(program, pname); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (webgl :: WebGL | eff) a +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) a getProgramParameter = runFn3 getProgramParameterImpl foreign import getProgramInfoLogImpl """ @@ -863,9 +865,9 @@ foreign import getProgramInfoLogImpl """ return webgl.getProgramInfoLog(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) DOMString) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) DOMString) -getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) DOMString +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) DOMString getProgramInfoLog = runFn2 getProgramInfoLogImpl foreign import getRenderbufferParameterImpl """ @@ -874,9 +876,9 @@ foreign import getRenderbufferParameterImpl """ return webgl.getRenderbufferParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a getRenderbufferParameter = runFn3 getRenderbufferParameterImpl foreign import getShaderParameterImpl """ @@ -885,9 +887,9 @@ foreign import getShaderParameterImpl """ return webgl.getShaderParameter(shader, pname); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) -getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (webgl :: WebGL | eff) a +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) a getShaderParameter = runFn3 getShaderParameterImpl foreign import getShaderInfoLogImpl """ @@ -896,9 +898,9 @@ foreign import getShaderInfoLogImpl """ return webgl.getShaderInfoLog(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString getShaderInfoLog = runFn2 getShaderInfoLogImpl foreign import getShaderSourceImpl """ @@ -907,9 +909,9 @@ foreign import getShaderSourceImpl """ return webgl.getShaderSource(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) DOMString) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) -getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) DOMString +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString getShaderSource = runFn2 getShaderSourceImpl foreign import getTexParameterImpl """ @@ -918,9 +920,9 @@ foreign import getTexParameterImpl """ return webgl.getTexParameter(target, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) a +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a getTexParameter = runFn3 getTexParameterImpl foreign import getUniformImpl """ @@ -929,9 +931,9 @@ foreign import getUniformImpl """ return webgl.getUniform(program, location); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) -getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (webgl :: WebGL | eff) a +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) a getUniform = runFn3 getUniformImpl foreign import getUniformLocationImpl """ @@ -940,9 +942,9 @@ foreign import getUniformLocationImpl """ return webgl.getUniformLocation(program, name); }; } -""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (webgl :: WebGL | eff) WebGLUniformLocation) +""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) WebGLUniformLocation) -getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (webgl :: WebGL | eff) WebGLUniformLocation +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) WebGLUniformLocation getUniformLocation = runFn3 getUniformLocationImpl foreign import getVertexAttribImpl """ @@ -951,9 +953,9 @@ foreign import getVertexAttribImpl """ return webgl.getVertexAttrib(index, pname); }; } -""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) a) +""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) -getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) a +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) a getVertexAttrib = runFn3 getVertexAttribImpl foreign import getVertexAttribOffsetImpl """ @@ -962,9 +964,9 @@ foreign import getVertexAttribOffsetImpl """ return webgl.getVertexAttribOffset(index, pname); }; } -""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (webgl :: WebGL | eff) GLsizeiptr) +""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) -getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (webgl :: WebGL | eff) GLsizeiptr +getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) GLsizeiptr getVertexAttribOffset = runFn3 getVertexAttribOffsetImpl foreign import hintImpl """ @@ -973,9 +975,9 @@ foreign import hintImpl """ return webgl.hint(target, mode); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit hint = runFn3 hintImpl foreign import isBufferImpl """ @@ -984,9 +986,9 @@ foreign import isBufferImpl """ return webgl.isBuffer(buffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) -isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (webgl :: WebGL | eff) GLboolean +isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean isBuffer = runFn2 isBufferImpl foreign import isEnabledImpl """ @@ -995,9 +997,9 @@ foreign import isEnabledImpl """ return webgl.isEnabled(cap); }; } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) -isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (webgl :: WebGL | eff) GLboolean +isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLboolean isEnabled = runFn2 isEnabledImpl foreign import isFramebufferImpl """ @@ -1006,9 +1008,9 @@ foreign import isFramebufferImpl """ return webgl.isFramebuffer(framebuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) -isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (webgl :: WebGL | eff) GLboolean +isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) GLboolean isFramebuffer = runFn2 isFramebufferImpl foreign import isProgramImpl """ @@ -1017,9 +1019,9 @@ foreign import isProgramImpl """ return webgl.isProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) -isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) GLboolean +isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) GLboolean isProgram = runFn2 isProgramImpl foreign import isRenderbufferImpl """ @@ -1028,9 +1030,9 @@ foreign import isRenderbufferImpl """ return webgl.isRenderbuffer(renderbuffer); }; } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) -isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (webgl :: WebGL | eff) GLboolean +isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) GLboolean isRenderbuffer = runFn2 isRenderbufferImpl foreign import isShaderImpl """ @@ -1039,9 +1041,9 @@ foreign import isShaderImpl """ return webgl.isShader(shader); }; } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) -isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (webgl :: WebGL | eff) GLboolean +isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) GLboolean isShader = runFn2 isShaderImpl foreign import isTextureImpl """ @@ -1050,9 +1052,9 @@ foreign import isTextureImpl """ return webgl.isTexture(texture); }; } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (webgl :: WebGL | eff) GLboolean) +""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) -isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (webgl :: WebGL | eff) GLboolean +isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) GLboolean isTexture = runFn2 isTextureImpl foreign import lineWidthImpl """ @@ -1061,9 +1063,9 @@ foreign import lineWidthImpl """ return webgl.lineWidth(width); }; } -""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) -lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (canvas :: Canvas | eff) Unit lineWidth = runFn2 lineWidthImpl foreign import linkProgramImpl """ @@ -1072,9 +1074,9 @@ foreign import linkProgramImpl """ return webgl.linkProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) -linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit linkProgram = runFn2 linkProgramImpl foreign import pixelStoreiImpl """ @@ -1083,9 +1085,9 @@ foreign import pixelStoreiImpl """ return webgl.pixelStorei(pname, param); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) -pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit pixelStorei = runFn3 pixelStoreiImpl foreign import polygonOffsetImpl """ @@ -1094,9 +1096,9 @@ foreign import polygonOffsetImpl """ return webgl.polygonOffset(factor, units); }; } -""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit polygonOffset = runFn3 polygonOffsetImpl foreign import readPixelsImpl """ @@ -1105,9 +1107,9 @@ foreign import readPixelsImpl """ return webgl.readPixels(x, y, width, height, format, type, pixels); }; } -""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit readPixels = runFn8 readPixelsImpl foreign import renderbufferStorageImpl """ @@ -1116,9 +1118,9 @@ foreign import renderbufferStorageImpl """ return webgl.renderbufferStorage(target, internalformat, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) -renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit renderbufferStorage = runFn5 renderbufferStorageImpl foreign import sampleCoverageImpl """ @@ -1127,9 +1129,9 @@ foreign import sampleCoverageImpl """ return webgl.sampleCoverage(value, invert); }; } -""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) -sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (webgl :: WebGL | eff) Unit +sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (canvas :: Canvas | eff) Unit sampleCoverage = runFn3 sampleCoverageImpl foreign import scissorImpl """ @@ -1138,9 +1140,9 @@ foreign import scissorImpl """ return webgl.scissor(x, y, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) -scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit scissor = runFn5 scissorImpl foreign import shaderSourceImpl """ @@ -1149,9 +1151,9 @@ foreign import shaderSourceImpl """ return webgl.shaderSource(shader, source); }; } -""" :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (canvas :: Canvas | eff) Unit) -shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (webgl :: WebGL | eff) Unit +shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (canvas :: Canvas | eff) Unit shaderSource = runFn3 shaderSourceImpl foreign import stencilFuncImpl """ @@ -1160,9 +1162,9 @@ foreign import stencilFuncImpl """ return webgl.stencilFunc(func, ref, mask); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) -stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilFunc = runFn4 stencilFuncImpl foreign import stencilFuncSeparateImpl """ @@ -1171,9 +1173,9 @@ foreign import stencilFuncSeparateImpl """ return webgl.stencilFuncSeparate(face, func, ref, mask); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) -stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilFuncSeparate = runFn5 stencilFuncSeparateImpl foreign import stencilMaskImpl """ @@ -1182,9 +1184,9 @@ foreign import stencilMaskImpl """ return webgl.stencilMask(mask); }; } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) -stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilMask = runFn2 stencilMaskImpl foreign import stencilMaskSeparateImpl """ @@ -1193,9 +1195,9 @@ foreign import stencilMaskSeparateImpl """ return webgl.stencilMaskSeparate(face, mask); }; } -""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) -stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (webgl :: WebGL | eff) Unit +stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilMaskSeparate = runFn3 stencilMaskSeparateImpl foreign import stencilOpImpl """ @@ -1204,9 +1206,9 @@ foreign import stencilOpImpl """ return webgl.stencilOp(fail, zfail, zpass); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit stencilOp = runFn4 stencilOpImpl foreign import stencilOpSeparateImpl """ @@ -1215,9 +1217,9 @@ foreign import stencilOpSeparateImpl """ return webgl.stencilOpSeparate(face, fail, zfail, zpass); }; } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) -stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (webgl :: WebGL | eff) Unit +stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit stencilOpSeparate = runFn5 stencilOpSeparateImpl foreign import texImage2DImpl """ @@ -1226,9 +1228,9 @@ foreign import texImage2DImpl """ return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); }; } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit texImage2D = runFn10 texImage2DImpl foreign import texParameterfImpl """ @@ -1237,9 +1239,9 @@ foreign import texParameterfImpl """ return webgl.texParameterf(target, pname, param); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) -texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (canvas :: Canvas | eff) Unit texParameterf = runFn4 texParameterfImpl foreign import texParameteriImpl """ @@ -1248,9 +1250,9 @@ foreign import texParameteriImpl """ return webgl.texParameteri(target, pname, param); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) -texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (webgl :: WebGL | eff) Unit +texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit texParameteri = runFn4 texParameteriImpl foreign import texSubImage2DImpl """ @@ -1259,9 +1261,9 @@ foreign import texSubImage2DImpl """ return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); }; } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (webgl :: WebGL | eff) Unit +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit texSubImage2D = runFn10 texSubImage2DImpl foreign import uniform1fImpl """ @@ -1270,9 +1272,9 @@ foreign import uniform1fImpl """ return webgl.uniform1f(location, x); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) -uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform1f = runFn3 uniform1fImpl foreign import uniform1fvImpl """ @@ -1281,9 +1283,9 @@ foreign import uniform1fvImpl """ return webgl.uniform1fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniform1fv = runFn3 uniform1fvImpl foreign import uniform1iImpl """ @@ -1292,9 +1294,9 @@ foreign import uniform1iImpl """ return webgl.uniform1i(location, x); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) -uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform1i = runFn3 uniform1iImpl foreign import uniform1ivImpl """ @@ -1303,9 +1305,9 @@ foreign import uniform1ivImpl """ return webgl.uniform1iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) -uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform1iv = runFn3 uniform1ivImpl foreign import uniform2fImpl """ @@ -1314,9 +1316,9 @@ foreign import uniform2fImpl """ return webgl.uniform2f(location, x, y); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform2f = runFn4 uniform2fImpl foreign import uniform2fvImpl """ @@ -1325,9 +1327,9 @@ foreign import uniform2fvImpl """ return webgl.uniform2fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniform2fv = runFn3 uniform2fvImpl foreign import uniform2iImpl """ @@ -1336,9 +1338,9 @@ foreign import uniform2iImpl """ return webgl.uniform2i(location, x, y); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) -uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform2i = runFn4 uniform2iImpl foreign import uniform2ivImpl """ @@ -1347,9 +1349,9 @@ foreign import uniform2ivImpl """ return webgl.uniform2iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) -uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform2iv = runFn3 uniform2ivImpl foreign import uniform3fImpl """ @@ -1358,9 +1360,9 @@ foreign import uniform3fImpl """ return webgl.uniform3f(location, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform3f = runFn5 uniform3fImpl foreign import uniform3fvImpl """ @@ -1369,9 +1371,9 @@ foreign import uniform3fvImpl """ return webgl.uniform3fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniform3fv = runFn3 uniform3fvImpl foreign import uniform3iImpl """ @@ -1380,9 +1382,9 @@ foreign import uniform3iImpl """ return webgl.uniform3i(location, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) -uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform3i = runFn5 uniform3iImpl foreign import uniform3ivImpl """ @@ -1391,9 +1393,9 @@ foreign import uniform3ivImpl """ return webgl.uniform3iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) -uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform3iv = runFn3 uniform3ivImpl foreign import uniform4fImpl """ @@ -1402,9 +1404,9 @@ foreign import uniform4fImpl """ return webgl.uniform4f(location, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform4f = runFn6 uniform4fImpl foreign import uniform4fvImpl """ @@ -1413,9 +1415,9 @@ foreign import uniform4fvImpl """ return webgl.uniform4fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniform4fv = runFn3 uniform4fvImpl foreign import uniform4iImpl """ @@ -1424,9 +1426,9 @@ foreign import uniform4iImpl """ return webgl.uniform4i(location, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) -uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (webgl :: WebGL | eff) Unit +uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform4i = runFn6 uniform4iImpl foreign import uniform4ivImpl """ @@ -1435,9 +1437,9 @@ foreign import uniform4ivImpl """ return webgl.uniform4iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) -uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (webgl :: WebGL | eff) Unit +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform4iv = runFn3 uniform4ivImpl foreign import uniformMatrix2fvImpl """ @@ -1446,9 +1448,9 @@ foreign import uniformMatrix2fvImpl """ return webgl.uniformMatrix2fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniformMatrix2fv = runFn4 uniformMatrix2fvImpl foreign import uniformMatrix3fvImpl """ @@ -1457,9 +1459,9 @@ foreign import uniformMatrix3fvImpl """ return webgl.uniformMatrix3fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniformMatrix3fv = runFn4 uniformMatrix3fvImpl foreign import uniformMatrix4fvImpl """ @@ -1468,9 +1470,9 @@ foreign import uniformMatrix4fvImpl """ return webgl.uniformMatrix4fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit uniformMatrix4fv = runFn4 uniformMatrix4fvImpl foreign import useProgramImpl """ @@ -1479,9 +1481,9 @@ foreign import useProgramImpl """ return webgl.useProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) -useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit useProgram = runFn2 useProgramImpl foreign import validateProgramImpl """ @@ -1490,9 +1492,9 @@ foreign import validateProgramImpl """ return webgl.validateProgram(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) -validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (webgl :: WebGL | eff) Unit +validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit validateProgram = runFn2 validateProgramImpl foreign import vertexAttrib1fImpl """ @@ -1501,9 +1503,9 @@ foreign import vertexAttrib1fImpl """ return webgl.vertexAttrib1f(indx, x); }; } -""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1f = runFn3 vertexAttrib1fImpl foreign import vertexAttrib1fvImpl """ @@ -1512,9 +1514,9 @@ foreign import vertexAttrib1fvImpl """ return webgl.vertexAttrib1fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1fv = runFn3 vertexAttrib1fvImpl foreign import vertexAttrib2fImpl """ @@ -1523,9 +1525,9 @@ foreign import vertexAttrib2fImpl """ return webgl.vertexAttrib2f(indx, x, y); }; } -""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2f = runFn4 vertexAttrib2fImpl foreign import vertexAttrib2fvImpl """ @@ -1534,9 +1536,9 @@ foreign import vertexAttrib2fvImpl """ return webgl.vertexAttrib2fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2fv = runFn3 vertexAttrib2fvImpl foreign import vertexAttrib3fImpl """ @@ -1545,9 +1547,9 @@ foreign import vertexAttrib3fImpl """ return webgl.vertexAttrib3f(indx, x, y, z); }; } -""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3f = runFn5 vertexAttrib3fImpl foreign import vertexAttrib3fvImpl """ @@ -1556,9 +1558,9 @@ foreign import vertexAttrib3fvImpl """ return webgl.vertexAttrib3fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3fv = runFn3 vertexAttrib3fvImpl foreign import vertexAttrib4fImpl """ @@ -1567,9 +1569,9 @@ foreign import vertexAttrib4fImpl """ return webgl.vertexAttrib4f(indx, x, y, z, w); }; } -""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4f = runFn6 vertexAttrib4fImpl foreign import vertexAttrib4fvImpl """ @@ -1578,9 +1580,9 @@ foreign import vertexAttrib4fvImpl """ return webgl.vertexAttrib4fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (webgl :: WebGL | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4fv = runFn3 vertexAttrib4fvImpl foreign import vertexAttribPointerImpl """ @@ -1589,9 +1591,9 @@ foreign import vertexAttribPointerImpl """ return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); }; } -""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) -vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (webgl :: WebGL | eff) Unit +vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit vertexAttribPointer = runFn7 vertexAttribPointerImpl foreign import viewportImpl """ @@ -1600,8 +1602,8 @@ foreign import viewportImpl """ return webgl.viewport(x, y, width, height); }; } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (webgl :: WebGL | eff) Unit) +""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) -viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (webgl :: WebGL | eff) Unit +viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit viewport = runFn5 viewportImpl diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index e81becd..3455101 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -29,10 +29,20 @@ foreign import data ImageData :: * foreign import data WebGLActiveInfo :: * foreign import data WebGLBuffer :: * foreign import data WebGLContext :: * -foreign import data WebGLContextAttributes :: * foreign import data WebGLFramebuffer :: * foreign import data WebGLProgram :: * foreign import data WebGLRenderbuffer :: * foreign import data WebGLShader :: * foreign import data WebGLTexture :: * foreign import data WebGLUniformLocation :: * + +type WebGLContextAttributes = + { alpha :: Boolean + , depth :: Boolean + , stencil :: Boolean + , antialias :: Boolean + , premultipliedAlpha :: Boolean + , preserveDrawingBuffer :: Boolean + , preferLowPowerToHighPerformance :: Boolean + , failIfMajorPerformanceCaveat :: Boolean + } From e65c2c2b9cc83f6911f44b6df6e1a2340be09fef Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 10:34:44 -0500 Subject: [PATCH 32/51] remove unused typeCondParam from AST --- generator/IDL/AST.hs | 3 +-- generator/IDL/Parser.hs | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 27e2b0b..6bb8576 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -42,7 +42,6 @@ data Type | Concrete { typeName :: String , typeIsArray :: Bool - , typeCondPara :: Maybe String } deriving Show @@ -62,7 +61,7 @@ emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] webglContext :: Arg -webglContext = Arg (Concrete "WebGLContext" False Nothing) "webgl" +webglContext = Arg (Concrete "WebGLContext" False) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index df133e9..8b11549 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -160,17 +160,12 @@ parseType = typ PP. "expecting type" typ = do ident <- identifier' isArray <- PP.option False $ brackets' whiteSpace' >> return True - condPara <- - if ident == "sequence" - then angles' identifier' >>= return . Just - else return Nothing return $ if ident `elem` ["any", "object"] then Generic else Concrete { typeName = ident , typeIsArray = isArray - , typeCondPara = condPara } parseArg :: Parse Arg From b511235ee3405943666e2914fa7dfc51ccfd88c6 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 12:07:36 -0500 Subject: [PATCH 33/51] Revert "remove unused typeCondParam from AST" This reverts commit e65c2c2b9cc83f6911f44b6df6e1a2340be09fef. --- generator/IDL/AST.hs | 3 ++- generator/IDL/Parser.hs | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 6bb8576..27e2b0b 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -42,6 +42,7 @@ data Type | Concrete { typeName :: String , typeIsArray :: Bool + , typeCondPara :: Maybe String } deriving Show @@ -61,7 +62,7 @@ emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] webglContext :: Arg -webglContext = Arg (Concrete "WebGLContext" False) "webgl" +webglContext = Arg (Concrete "WebGLContext" False Nothing) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index 8b11549..df133e9 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -160,12 +160,17 @@ parseType = typ PP. "expecting type" typ = do ident <- identifier' isArray <- PP.option False $ brackets' whiteSpace' >> return True + condPara <- + if ident == "sequence" + then angles' identifier' >>= return . Just + else return Nothing return $ if ident `elem` ["any", "object"] then Generic else Concrete { typeName = ident , typeIsArray = isArray + , typeCondPara = condPara } parseArg :: Parse Arg From 524941589192acf5b96f376c2abad493b170574c Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 18:15:14 -0500 Subject: [PATCH 34/51] parser and printer improvements but lost correct types on arrays --- bower.json | 5 +- docs/README.md | 10 + docs/WebGL-1.0.3.idl | 259 +++++++++---------- generator/IDL/AST.hs | 4 +- generator/IDL/Parser.hs | 31 ++- generator/IDL/Printer.hs | 58 +++-- src/Graphics/WebGL/Raw.purs | 415 ++++++++++++++++-------------- src/Graphics/WebGL/Raw/Enums.purs | 27 +- src/Graphics/WebGL/Raw/Types.purs | 6 +- 9 files changed, 448 insertions(+), 367 deletions(-) diff --git a/bower.json b/bower.json index f0810db..69958ee 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,8 @@ ], "dependencies": { - "purescript-typedarray": "0.3.*", - "purescript-arraybuffer-types": "0.1.*" + "purescript-arraybuffer-types": "0.1.*", + "purescript-maybe": "0.2.*", + "purescript-typedarray": "0.3.*" } } diff --git a/docs/README.md b/docs/README.md index df031c8..7a9e77e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3249,4 +3249,14 @@ data WebGLUniformLocation :: * ``` purescript type WebGLContextAttributes = { failIfMajorPerformanceCaveat :: Boolean, preferLowPowerToHighPerformance :: Boolean, preserveDrawingBuffer :: Boolean, premultipliedAlpha :: Boolean, antialias :: Boolean, stencil :: Boolean, depth :: Boolean, alpha :: Boolean } +``` + + + +## Module Graphics.WebGL.Raw.Util + +#### `toMaybe` + +``` purescript +toMaybe :: forall a. a -> Maybe a ``` \ No newline at end of file diff --git a/docs/WebGL-1.0.3.idl b/docs/WebGL-1.0.3.idl index d0ec96b..cad6844 100644 --- a/docs/WebGL-1.0.3.idl +++ b/docs/WebGL-1.0.3.idl @@ -96,7 +96,7 @@ /* ALWAYS */ /* EnableCap */ - const GLenum TEXTURE_2D = 0x0DE1; + /* TEXTURE_2D */ const GLenum CULL_FACE = 0x0B44; const GLenum BLEND = 0x0BE2; const GLenum DITHER = 0x0BD0; @@ -174,7 +174,6 @@ /* TEXTURE_WRAP_S */ /* TEXTURE_WRAP_T */ - const GLenum NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; const GLenum COMPRESSED_TEXTURE_FORMATS = 0x86A3; /* HintMode */ @@ -224,9 +223,7 @@ const GLenum VALIDATE_STATUS = 0x8B83; const GLenum ATTACHED_SHADERS = 0x8B85; const GLenum ACTIVE_UNIFORMS = 0x8B86; - const GLenum ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87; const GLenum ACTIVE_ATTRIBUTES = 0x8B89; - const GLenum ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A; const GLenum SHADING_LANGUAGE_VERSION = 0x8B8C; const GLenum CURRENT_PROGRAM = 0x8B8D; @@ -274,7 +271,7 @@ const GLenum TEXTURE_WRAP_T = 0x2803; /* TextureTarget */ - /* TEXTURE_2D */ + const GLenum TEXTURE_2D = 0x0DE1; const GLenum TEXTURE = 0x1702; const GLenum TEXTURE_CUBE_MAP = 0x8513; @@ -353,10 +350,12 @@ const GLenum VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; const GLenum VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + /* Read Format */ + const GLenum IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A; + const GLenum IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + /* Shader Source */ const GLenum COMPILE_STATUS = 0x8B81; - const GLenum INFO_LOG_LENGTH = 0x8B84; - const GLenum SHADER_SOURCE_LENGTH = 0x8B88; /* Shader Precision-Specified Types */ const GLenum LOW_FLOAT = 0x8DF0; @@ -420,21 +419,22 @@ const GLenum BROWSER_DEFAULT_WEBGL = 0x9244; readonly attribute HTMLCanvasElement canvas; + readonly attribute GLsizei drawingBufferWidth; + readonly attribute GLsizei drawingBufferHeight; - WebGLContextAttributes getContextAttributes(); - - boolean isContextLost(); + [WebGLHandlesContextLoss] WebGLContextAttributes? getContextAttributes(); + [WebGLHandlesContextLoss] boolean isContextLost(); - DOMString[ ] getSupportedExtensions(); - object getExtension(DOMString name); + sequence? getSupportedExtensions(); + object? getExtension(DOMString name); void activeTexture(GLenum texture); - void attachShader(WebGLProgram program, WebGLShader shader); - void bindAttribLocation(WebGLProgram program, GLuint index, DOMString name); - void bindBuffer(GLenum target, WebGLBuffer buffer); - void bindFramebuffer(GLenum target, WebGLFramebuffer framebuffer); - void bindRenderbuffer(GLenum target, WebGLRenderbuffer renderbuffer); - void bindTexture(GLenum target, WebGLTexture texture); + void attachShader(WebGLProgram? program, WebGLShader? shader); + void bindAttribLocation(WebGLProgram? program, GLuint index, DOMString name); + void bindBuffer(GLenum target, WebGLBuffer? buffer); + void bindFramebuffer(GLenum target, WebGLFramebuffer? framebuffer); + void bindRenderbuffer(GLenum target, WebGLRenderbuffer? renderbuffer); + void bindTexture(GLenum target, WebGLTexture? texture); void blendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void blendEquation(GLenum mode); void blendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); @@ -442,19 +442,26 @@ void blendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -/* void bufferData(GLenum target, GLsizeiptr size, GLenum usage); - void bufferData(GLenum target, ArrayBufferView data, GLenum usage);*/ - void bufferData(GLenum target, ArrayBuffer data, GLenum usage); - void bufferSubData(GLenum target, GLintptr offset, ArrayBufferView data); - void bufferSubData(GLenum target, GLintptr offset, ArrayBuffer data); + typedef (ArrayBuffer or ArrayBufferView) BufferDataSource; + void bufferData(GLenum target, GLsizeiptr size, GLenum usage); + void bufferData(GLenum target, BufferDataSource? data, GLenum usage); + void bufferSubData(GLenum target, GLintptr offset, BufferDataSource? data); - GLenum checkFramebufferStatus(GLenum target); + [WebGLHandlesContextLoss] GLenum checkFramebufferStatus(GLenum target); void clear(GLbitfield mask); void clearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); void clearDepth(GLclampf depth); void clearStencil(GLint s); void colorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void compileShader(WebGLShader shader); + void compileShader(WebGLShader? shader); + + void compressedTexImage2D(GLenum target, GLint level, GLenum internalformat, + GLsizei width, GLsizei height, GLint border, + ArrayBufferView data); + void compressedTexSubImage2D(GLenum target, GLint level, + GLint xoffset, GLint yoffset, + GLsizei width, GLsizei height, GLenum format, + ArrayBufferView data); void copyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, @@ -462,26 +469,26 @@ void copyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); - WebGLBuffer createBuffer(); - WebGLFramebuffer createFramebuffer(); - WebGLProgram createProgram(); - WebGLRenderbuffer createRenderbuffer(); - WebGLShader createShader(GLenum type); - WebGLTexture createTexture(); + WebGLBuffer? createBuffer(); + WebGLFramebuffer? createFramebuffer(); + WebGLProgram? createProgram(); + WebGLRenderbuffer? createRenderbuffer(); + WebGLShader? createShader(GLenum type); + WebGLTexture? createTexture(); void cullFace(GLenum mode); - void deleteBuffer(WebGLBuffer buffer); - void deleteFramebuffer(WebGLFramebuffer framebuffer); - void deleteProgram(WebGLProgram program); - void deleteRenderbuffer(WebGLRenderbuffer renderbuffer); - void deleteShader(WebGLShader shader); - void deleteTexture(WebGLTexture texture); + void deleteBuffer(WebGLBuffer? buffer); + void deleteFramebuffer(WebGLFramebuffer? framebuffer); + void deleteProgram(WebGLProgram? program); + void deleteRenderbuffer(WebGLRenderbuffer? renderbuffer); + void deleteShader(WebGLShader? shader); + void deleteTexture(WebGLTexture? texture); void depthFunc(GLenum func); void depthMask(GLboolean flag); void depthRange(GLclampf zNear, GLclampf zFar); - void detachShader(WebGLProgram program, WebGLShader shader); + void detachShader(WebGLProgram? program, WebGLShader? shader); void disable(GLenum cap); void disableVertexAttribArray(GLuint index); void drawArrays(GLenum mode, GLint first, GLsizei count); @@ -493,66 +500,67 @@ void flush(); void framebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, - WebGLRenderbuffer renderbuffer); + WebGLRenderbuffer? renderbuffer); void framebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, - WebGLTexture texture, GLint level); + WebGLTexture? texture, GLint level); void frontFace(GLenum mode); void generateMipmap(GLenum target); - WebGLActiveInfo getActiveAttrib(WebGLProgram program, GLuint index); - WebGLActiveInfo getActiveUniform(WebGLProgram program, GLuint index); - WebGLShader[ ] getAttachedShaders(WebGLProgram program); + WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index); + WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index); + sequence? getAttachedShaders(WebGLProgram? program); - GLint getAttribLocation(WebGLProgram program, DOMString name); + [WebGLHandlesContextLoss] GLint getAttribLocation(WebGLProgram? program, DOMString name); - any getParameter(GLenum pname); any getBufferParameter(GLenum target, GLenum pname); + any getParameter(GLenum pname); - GLenum getError(); + [WebGLHandlesContextLoss] GLenum getError(); any getFramebufferAttachmentParameter(GLenum target, GLenum attachment, GLenum pname); - any getProgramParameter(WebGLProgram program, GLenum pname); - DOMString getProgramInfoLog(WebGLProgram program); + any getProgramParameter(WebGLProgram? program, GLenum pname); + DOMString? getProgramInfoLog(WebGLProgram? program); any getRenderbufferParameter(GLenum target, GLenum pname); - any getShaderParameter(WebGLShader shader, GLenum pname); - DOMString getShaderInfoLog(WebGLShader shader); + any getShaderParameter(WebGLShader? shader, GLenum pname); + WebGLShaderPrecisionFormat? getShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype); + DOMString? getShaderInfoLog(WebGLShader? shader); - DOMString getShaderSource(WebGLShader shader); + DOMString? getShaderSource(WebGLShader? shader); any getTexParameter(GLenum target, GLenum pname); - any getUniform(WebGLProgram program, WebGLUniformLocation location); + any getUniform(WebGLProgram? program, WebGLUniformLocation? location); - WebGLUniformLocation getUniformLocation(WebGLProgram program, DOMString name); + WebGLUniformLocation? getUniformLocation(WebGLProgram? program, DOMString name); any getVertexAttrib(GLuint index, GLenum pname); - GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); + [WebGLHandlesContextLoss] GLsizeiptr getVertexAttribOffset(GLuint index, GLenum pname); void hint(GLenum target, GLenum mode); - GLboolean isBuffer(WebGLBuffer buffer); - GLboolean isEnabled(GLenum cap); - GLboolean isFramebuffer(WebGLFramebuffer framebuffer); - GLboolean isProgram(WebGLProgram program); - GLboolean isRenderbuffer(WebGLRenderbuffer renderbuffer); - GLboolean isShader(WebGLShader shader); - GLboolean isTexture(WebGLTexture texture); + [WebGLHandlesContextLoss] GLboolean isBuffer(WebGLBuffer? buffer); + [WebGLHandlesContextLoss] GLboolean isEnabled(GLenum cap); + [WebGLHandlesContextLoss] GLboolean isFramebuffer(WebGLFramebuffer? framebuffer); + [WebGLHandlesContextLoss] GLboolean isProgram(WebGLProgram? program); + [WebGLHandlesContextLoss] GLboolean isRenderbuffer(WebGLRenderbuffer? renderbuffer); + [WebGLHandlesContextLoss] GLboolean isShader(WebGLShader? shader); + [WebGLHandlesContextLoss] GLboolean isTexture(WebGLTexture? texture); void lineWidth(GLfloat width); - void linkProgram(WebGLProgram program); + void linkProgram(WebGLProgram? program); void pixelStorei(GLenum pname, GLint param); void polygonOffset(GLfloat factor, GLfloat units); void readPixels(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, ArrayBufferView pixels); + GLenum format, GLenum type, ArrayBufferView? pixels); void renderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); void sampleCoverage(GLclampf value, GLboolean invert); void scissor(GLint x, GLint y, GLsizei width, GLsizei height); - void shaderSource(WebGLShader shader, DOMString source); + void shaderSource(WebGLShader? shader, DOMString source); void stencilFunc(GLenum func, GLint ref, GLuint mask); void stencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); @@ -561,87 +569,80 @@ void stencilOp(GLenum fail, GLenum zfail, GLenum zpass); void stencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); + typedef (ImageData or + HTMLImageElement or + HTMLCanvasElement or + HTMLVideoElement) TexImageSource; void texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, - GLenum type, ArrayBufferView pixels); + GLenum type, ArrayBufferView? pixels); void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, ImageData pixels); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLImageElement image) raises (DOMException); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLCanvasElement canvas) raises (DOMException); - void texImage2D(GLenum target, GLint level, GLenum internalformat, - GLenum format, GLenum type, HTMLVideoElement video) raises (DOMException); + GLenum format, GLenum type, TexImageSource? source); // May throw DOMException void texParameterf(GLenum target, GLenum pname, GLfloat param); void texParameteri(GLenum target, GLenum pname, GLint param); void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, - GLenum format, GLenum type, ArrayBufferView pixels); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, ImageData pixels); + GLenum format, GLenum type, ArrayBufferView? pixels); void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLImageElement image) raises (DOMException); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLCanvasElement canvas) raises (DOMException); - void texSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, - GLenum format, GLenum type, HTMLVideoElement video) raises (DOMException); - - void uniform1f(WebGLUniformLocation location, GLfloat x); - void uniform1fv(WebGLUniformLocation location, FloatArray v); - void uniform1fv(WebGLUniformLocation location, sequence v); - void uniform1i(WebGLUniformLocation location, GLint x); - void uniform1iv(WebGLUniformLocation location, Int32Array v); - void uniform1iv(WebGLUniformLocation location, sequence v); - void uniform2f(WebGLUniformLocation location, GLfloat x, GLfloat y); - void uniform2fv(WebGLUniformLocation location, FloatArray v); - void uniform2fv(WebGLUniformLocation location, sequence v); - void uniform2i(WebGLUniformLocation location, GLint x, GLint y); - void uniform2iv(WebGLUniformLocation location, Int32Array v); - void uniform2iv(WebGLUniformLocation location, sequence v); - void uniform3f(WebGLUniformLocation location, GLfloat x, GLfloat y, GLfloat z); - void uniform3fv(WebGLUniformLocation location, FloatArray v); - void uniform3fv(WebGLUniformLocation location, sequence v); - void uniform3i(WebGLUniformLocation location, GLint x, GLint y, GLint z); - void uniform3iv(WebGLUniformLocation location, Int32Array v); - void uniform3iv(WebGLUniformLocation location, sequence v); - void uniform4f(WebGLUniformLocation location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void uniform4fv(WebGLUniformLocation location, FloatArray v); - void uniform4fv(WebGLUniformLocation location, sequence v); - void uniform4i(WebGLUniformLocation location, GLint x, GLint y, GLint z, GLint w); - void uniform4iv(WebGLUniformLocation location, Int32Array v); - void uniform4iv(WebGLUniformLocation location, sequence v); - - void uniformMatrix2fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix2fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - void uniformMatrix3fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix3fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - void uniformMatrix4fv(WebGLUniformLocation location, GLboolean transpose, - FloatArray value); - void uniformMatrix4fv(WebGLUniformLocation location, GLboolean transpose, - sequence value); - - void useProgram(WebGLProgram program); - void validateProgram(WebGLProgram program); + GLenum format, GLenum type, TexImageSource? source); // May throw DOMException + + void uniform1f(WebGLUniformLocation? location, GLfloat x); + void uniform1fv(WebGLUniformLocation? location, Float32Array v); + void uniform1fv(WebGLUniformLocation? location, sequence v); + void uniform1i(WebGLUniformLocation? location, GLint x); + void uniform1iv(WebGLUniformLocation? location, Int32Array v); + void uniform1iv(WebGLUniformLocation? location, sequence v); + void uniform2f(WebGLUniformLocation? location, GLfloat x, GLfloat y); + void uniform2fv(WebGLUniformLocation? location, Float32Array v); + void uniform2fv(WebGLUniformLocation? location, sequence v); + void uniform2i(WebGLUniformLocation? location, GLint x, GLint y); + void uniform2iv(WebGLUniformLocation? location, Int32Array v); + void uniform2iv(WebGLUniformLocation? location, sequence v); + void uniform3f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z); + void uniform3fv(WebGLUniformLocation? location, Float32Array v); + void uniform3fv(WebGLUniformLocation? location, sequence v); + void uniform3i(WebGLUniformLocation? location, GLint x, GLint y, GLint z); + void uniform3iv(WebGLUniformLocation? location, Int32Array v); + void uniform3iv(WebGLUniformLocation? location, sequence v); + void uniform4f(WebGLUniformLocation? location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); + void uniform4fv(WebGLUniformLocation? location, Float32Array v); + void uniform4fv(WebGLUniformLocation? location, sequence v); + void uniform4i(WebGLUniformLocation? location, GLint x, GLint y, GLint z, GLint w); + void uniform4iv(WebGLUniformLocation? location, Int32Array v); + void uniform4iv(WebGLUniformLocation? location, sequence v); + + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, + Float32Array value); + void uniformMatrix2fv(WebGLUniformLocation? location, GLboolean transpose, + sequence value); + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, + Float32Array value); + void uniformMatrix3fv(WebGLUniformLocation? location, GLboolean transpose, + sequence value); + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, + Float32Array value); + void uniformMatrix4fv(WebGLUniformLocation? location, GLboolean transpose, + sequence value); + + void useProgram(WebGLProgram? program); + void validateProgram(WebGLProgram? program); void vertexAttrib1f(GLuint indx, GLfloat x); - void vertexAttrib1fv(GLuint indx, FloatArray values); - void vertexAttrib1fv(GLuint indx, sequence values); + void vertexAttrib1fv(GLuint indx, Float32Array values); + void vertexAttrib1fv(GLuint indx, sequence values); void vertexAttrib2f(GLuint indx, GLfloat x, GLfloat y); - void vertexAttrib2fv(GLuint indx, FloatArray values); - void vertexAttrib2fv(GLuint indx, sequence values); + void vertexAttrib2fv(GLuint indx, Float32Array values); + void vertexAttrib2fv(GLuint indx, sequence values); void vertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z); - void vertexAttrib3fv(GLuint indx, FloatArray values); - void vertexAttrib3fv(GLuint indx, sequence values); + void vertexAttrib3fv(GLuint indx, Float32Array values); + void vertexAttrib3fv(GLuint indx, sequence values); void vertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void vertexAttrib4fv(GLuint indx, FloatArray values); - void vertexAttrib4fv(GLuint indx, sequence values); + void vertexAttrib4fv(GLuint indx, Float32Array values); + void vertexAttrib4fv(GLuint indx, sequence values); void vertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); void viewport(GLint x, GLint y, GLsizei width, GLsizei height); + diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 27e2b0b..6e360a1 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -28,6 +28,7 @@ data Decl , attrType :: Type , attrName :: String } + | Typedef deriving Show instance Eq Decl where @@ -43,6 +44,7 @@ data Type { typeName :: String , typeIsArray :: Bool , typeCondPara :: Maybe String + , typeIsMaybe :: Bool } deriving Show @@ -62,7 +64,7 @@ emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] webglContext :: Arg -webglContext = Arg (Concrete "WebGLContext" False Nothing) "webgl" +webglContext = Arg (Concrete "WebGLContext" False Nothing False) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index df133e9..221551d 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -79,6 +79,7 @@ partition a@Attribute{} idl = idl { attributes = a : attributes idl , types = attrType a : types idl } +partition _ idl = idl cleanup :: IDL -> IDL cleanup idl = IDL @@ -104,7 +105,8 @@ parseDecl = decl PP. "expecting decl" decl = PP.try parseConst PP.<|> PP.try parseComment PP.<|> PP.try parseMethod PP.<|> - PP.try parseAttr + PP.try parseAttr PP.<|> + PP.try parseTypedef parseConst :: Parse Decl parseConst = do @@ -120,15 +122,21 @@ parseConst = do } parseComment :: Parse Decl -parseComment = do - symbol' "/*" - comment <- PP.manyTill PP.anyChar $ symbol' "*/" - return Comment - { comment = comment - } +parseComment = inlineComment PP.<|> blockComment + where + inlineComment = PP.try $ do + symbol' "//" + comment <- PP.manyTill PP.anyChar PP.newline + PP.optional whiteSpace' + return Comment { comment = comment } + blockComment = do + symbol' "/*" + comment <- PP.manyTill PP.anyChar $ symbol' "*/" + return Comment { comment = comment } parseMethod :: Parse Decl parseMethod = do + PP.optional $ symbol' "[WebGLHandlesContextLoss]" returnType <- parseType methodName <- identifier' args <- parens' . PP.sepBy parseArg $ symbol' "," @@ -154,6 +162,13 @@ parseAttr = do , attrName = name } +parseTypedef :: Parse Decl +parseTypedef = do + symbol' "typedef" + PP.manyTill PP.anyChar semi' + return Typedef + + parseType :: Parse Type parseType = typ PP. "expecting type" where @@ -164,6 +179,7 @@ parseType = typ PP. "expecting type" if ident == "sequence" then angles' identifier' >>= return . Just else return Nothing + isMaybe <- PP.option False $ symbol' "?" >> return True return $ if ident `elem` ["any", "object"] then Generic @@ -171,6 +187,7 @@ parseType = typ PP. "expecting type" { typeName = ident , typeIsArray = isArray , typeCondPara = condPara + , typeIsMaybe = isMaybe } parseArg :: Parse Arg diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index a1bdf23..191eab1 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -10,7 +10,7 @@ import Data.Char (toLower, toUpper) import Data.List (sort) import Data.Maybe (isNothing) import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, - hcat, integer, nest, parens, punctuate, text, vcat) + hcat, int, integer, nest, parens, punctuate, text, vcat) import IDL.AST @@ -62,6 +62,7 @@ funcsFFI idl = , "import Data.ArrayBuffer.Types" , "import Data.Function" , "import Graphics.WebGL.Raw.Types" + , "import Graphics.WebGL.Raw.Util" ] -- predefined text @@ -118,7 +119,7 @@ ppConstant Enum { enumName = n, enumValue = v } = ppImplTypeSig :: Decl -> Doc ppImplTypeSig f@Function{} = - sigForall f <+> funcType <+> argList <+> parens (sigReturnType f) + sigForall f <+> funcType <+> argList <+> parens (implReturnType f) where args = funcArgs f funcType = "Fn" <> int (length args) @@ -128,7 +129,7 @@ ppRunTypeSig :: Decl -> Doc ppRunTypeSig f@Function{ methodName = name } = text name <+> sigForall f <+> argList where - types = map (ppConvertType . argType) (funcArgs f) ++ [sigReturnType f] + types = map (ppConvertType . argType) (funcArgs f) ++ [runReturnType f] argList = hcat $ punctuate " -> " types ppFunc :: Decl -> Doc @@ -138,10 +139,16 @@ ppRunFunc :: Decl -> Doc ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f ppRunFuncBody :: Decl -> Doc -ppRunFuncBody f@Function { methodName = name } = - text name <+> "=" <+> +ppRunFuncBody f@Function { methodName = name, methodRetType = retType } = + text name <+> args <+> "=" <+> + (if isMaybe then "toMaybe $" else empty) <+> "runFn" <> int (length $ funcArgs f) <+> - implName f + implName f <+> args + where + args = ppPsArgs f + isMaybe = case retType of + c@Concrete{} -> typeIsMaybe c + _ -> False ppFuncImpl :: Decl -> Doc ppFuncImpl f@Function{} = @@ -153,7 +160,7 @@ ppFuncImpl f@Function{} = ppFuncImplBody :: Decl -> Doc ppFuncImplBody f = - func <+> implName f <> parens (ppArgs funcArgs f) <+> "{" $+$ + func <+> implName f <> parens (ppJsArgs funcArgs f) <+> "{" $+$ nest 2 (ret <+> func <+> "() {") $+$ nest 4 (ret <+> ppMethod f) $+$ nest 2 "};" $+$ @@ -164,10 +171,13 @@ ppFuncImplBody f = ppMethod :: Decl -> Doc ppMethod f@Function{} = - prefixWebgl <> text (methodName f) <> parens (ppArgs methodArgs f) <> ";" + prefixWebgl <> text (methodName f) <> parens (ppJsArgs methodArgs f) <> ";" + +ppJsArgs :: (Decl -> [Arg]) -> Decl -> Doc +ppJsArgs f = hcat . punctuate ", " . map (text . argName) . f -ppArgs :: (Decl -> [Arg]) -> Decl -> Doc -ppArgs f = hcat . punctuate ", " . map (text . argName) . f +ppPsArgs :: Decl -> Doc +ppPsArgs = hcat . punctuate " " . map (text . argName) . funcArgs ppTypeDecl :: Type -> Doc ppTypeDecl Concrete{ typeName = name } = @@ -181,9 +191,17 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } | name == "ArrayBuffer" = toType "Float32Array" | otherwise = toType name where - toType = if isArray then brackets . text else text + toType = wrapArray . text + wrapArray t = if isArray then brackets t else t ppConvertType _ = empty +ppConvertMaybeType :: Type -> Doc +ppConvertMaybeType t@Concrete{ typeIsMaybe = isMaybe } = + wrapMaybe $ ppConvertType t + where + wrapMaybe t = if isMaybe then parens ("Maybe" <+> t) else t +ppConvertMaybeType _ = empty + ppExportList :: [Decl] -> Doc ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) where @@ -196,28 +214,32 @@ sigForall Function{ methodRetType = ret } = Generic -> ":: forall eff" <+> genericType <> "." _ -> ":: forall eff." -sigReturnType :: Decl -> Doc -sigReturnType Function{ methodRetType = ret } = +runReturnType :: Decl -> Doc +runReturnType Function{ methodRetType = ret } = + case ret of + t@Concrete{} -> effMonad <+> ppConvertMaybeType t + _ -> effMonad <+> genericType + +implReturnType :: Decl -> Doc +implReturnType Function{ methodRetType = ret } = case ret of t@Concrete{} -> effMonad <+> ppConvertType t _ -> effMonad <+> genericType - where - effMonad = "Eff (canvas :: Canvas | eff)" -- helpers blank :: Doc blank = "" +effMonad :: Doc +effMonad = "Eff (canvas :: Canvas | eff)" + genericType :: Doc genericType = char 'a' implName :: Decl -> Doc implName f@Function{} = text (methodName f) <> "Impl" -int :: Int -> Doc -int = integer . fromIntegral - prefixWebgl :: Doc prefixWebgl = text (argName webglContext) <> "." diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index b52c28a..19b8882 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -27,6 +27,8 @@ module Graphics.WebGL.Raw , clearStencil , colorMask , compileShader +, compressedTexImage2D +, compressedTexSubImage2D , copyTexImage2D , copyTexSubImage2D , createBuffer @@ -62,14 +64,15 @@ module Graphics.WebGL.Raw , getActiveUniform , getAttachedShaders , getAttribLocation -, getParameter , getBufferParameter +, getParameter , getError , getFramebufferAttachmentParameter , getProgramParameter , getProgramInfoLog , getRenderbufferParameter , getShaderParameter +, getShaderPrecisionFormat , getShaderInfoLog , getShaderSource , getTexParameter @@ -143,6 +146,7 @@ import Control.Monad.Eff import Data.ArrayBuffer.Types import Data.Function import Graphics.WebGL.Raw.Types +import Graphics.WebGL.Raw.Util foreign import getContextAttributesImpl """ function getContextAttributesImpl(webgl) { @@ -152,8 +156,8 @@ foreign import getContextAttributesImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) -getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLContextAttributes -getContextAttributes = runFn1 getContextAttributesImpl +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) +getContextAttributes webgl = toMaybe $ runFn1 getContextAttributesImpl webgl foreign import isContextLostImpl """ function isContextLostImpl(webgl) { @@ -164,7 +168,7 @@ foreign import isContextLostImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean -isContextLost = runFn1 isContextLostImpl +isContextLost webgl = runFn1 isContextLostImpl webgl foreign import getSupportedExtensionsImpl """ function getSupportedExtensionsImpl(webgl) { @@ -172,10 +176,10 @@ foreign import getSupportedExtensionsImpl """ return webgl.getSupportedExtensions(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) sequence) -getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] -getSupportedExtensions = runFn1 getSupportedExtensionsImpl +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe sequence) +getSupportedExtensions webgl = toMaybe $ runFn1 getSupportedExtensionsImpl webgl foreign import getExtensionImpl """ function getExtensionImpl(webgl, name) { @@ -186,7 +190,7 @@ foreign import getExtensionImpl """ """ :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) a -getExtension = runFn2 getExtensionImpl +getExtension webgl name = runFn2 getExtensionImpl webgl name foreign import activeTextureImpl """ function activeTextureImpl(webgl, texture) { @@ -197,7 +201,7 @@ foreign import activeTextureImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -activeTexture = runFn2 activeTextureImpl +activeTexture webgl texture = runFn2 activeTextureImpl webgl texture foreign import attachShaderImpl """ function attachShaderImpl(webgl, program, shader) { @@ -208,7 +212,7 @@ foreign import attachShaderImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit -attachShader = runFn3 attachShaderImpl +attachShader webgl program shader = runFn3 attachShaderImpl webgl program shader foreign import bindAttribLocationImpl """ function bindAttribLocationImpl(webgl, program, index, name) { @@ -219,7 +223,7 @@ foreign import bindAttribLocationImpl """ """ :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (canvas :: Canvas | eff) Unit) bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (canvas :: Canvas | eff) Unit -bindAttribLocation = runFn4 bindAttribLocationImpl +bindAttribLocation webgl program index name = runFn4 bindAttribLocationImpl webgl program index name foreign import bindBufferImpl """ function bindBufferImpl(webgl, target, buffer) { @@ -230,7 +234,7 @@ foreign import bindBufferImpl """ """ :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit -bindBuffer = runFn3 bindBufferImpl +bindBuffer webgl target buffer = runFn3 bindBufferImpl webgl target buffer foreign import bindFramebufferImpl """ function bindFramebufferImpl(webgl, target, framebuffer) { @@ -241,7 +245,7 @@ foreign import bindFramebufferImpl """ """ :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit -bindFramebuffer = runFn3 bindFramebufferImpl +bindFramebuffer webgl target framebuffer = runFn3 bindFramebufferImpl webgl target framebuffer foreign import bindRenderbufferImpl """ function bindRenderbufferImpl(webgl, target, renderbuffer) { @@ -252,7 +256,7 @@ foreign import bindRenderbufferImpl """ """ :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit -bindRenderbuffer = runFn3 bindRenderbufferImpl +bindRenderbuffer webgl target renderbuffer = runFn3 bindRenderbufferImpl webgl target renderbuffer foreign import bindTextureImpl """ function bindTextureImpl(webgl, target, texture) { @@ -263,7 +267,7 @@ foreign import bindTextureImpl """ """ :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit -bindTexture = runFn3 bindTextureImpl +bindTexture webgl target texture = runFn3 bindTextureImpl webgl target texture foreign import blendColorImpl """ function blendColorImpl(webgl, red, green, blue, alpha) { @@ -274,7 +278,7 @@ foreign import blendColorImpl """ """ :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit -blendColor = runFn5 blendColorImpl +blendColor webgl red green blue alpha = runFn5 blendColorImpl webgl red green blue alpha foreign import blendEquationImpl """ function blendEquationImpl(webgl, mode) { @@ -285,7 +289,7 @@ foreign import blendEquationImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -blendEquation = runFn2 blendEquationImpl +blendEquation webgl mode = runFn2 blendEquationImpl webgl mode foreign import blendEquationSeparateImpl """ function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { @@ -296,7 +300,7 @@ foreign import blendEquationSeparateImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -blendEquationSeparate = runFn3 blendEquationSeparateImpl +blendEquationSeparate webgl modeRGB modeAlpha = runFn3 blendEquationSeparateImpl webgl modeRGB modeAlpha foreign import blendFuncImpl """ function blendFuncImpl(webgl, sfactor, dfactor) { @@ -307,7 +311,7 @@ foreign import blendFuncImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -blendFunc = runFn3 blendFuncImpl +blendFunc webgl sfactor dfactor = runFn3 blendFuncImpl webgl sfactor dfactor foreign import blendFuncSeparateImpl """ function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { @@ -318,18 +322,18 @@ foreign import blendFuncSeparateImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -blendFuncSeparate = runFn5 blendFuncSeparateImpl +blendFuncSeparate webgl srcRGB dstRGB srcAlpha dstAlpha = runFn5 blendFuncSeparateImpl webgl srcRGB dstRGB srcAlpha dstAlpha foreign import bufferDataImpl """ - function bufferDataImpl(webgl, target, data, usage) { + function bufferDataImpl(webgl, target, size, usage) { return function () { - return webgl.bufferData(target, data, usage); + return webgl.bufferData(target, size, usage); }; } -""" :: forall eff. Fn4 WebGLContext GLenum Float32Array GLenum (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLsizeiptr GLenum (Eff (canvas :: Canvas | eff) Unit) -bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (canvas :: Canvas | eff) Unit -bufferData = runFn4 bufferDataImpl +bufferData :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit +bufferData webgl target size usage = runFn4 bufferDataImpl webgl target size usage foreign import bufferSubDataImpl """ function bufferSubDataImpl(webgl, target, offset, data) { @@ -337,10 +341,10 @@ foreign import bufferSubDataImpl """ return webgl.bufferSubData(target, offset, data); }; } -""" :: forall eff. Fn4 WebGLContext GLenum GLintptr ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext GLenum GLintptr BufferDataSource (Eff (canvas :: Canvas | eff) Unit) -bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -bufferSubData = runFn4 bufferSubDataImpl +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> BufferDataSource -> Eff (canvas :: Canvas | eff) Unit +bufferSubData webgl target offset data = runFn4 bufferSubDataImpl webgl target offset data foreign import checkFramebufferStatusImpl """ function checkFramebufferStatusImpl(webgl, target) { @@ -351,7 +355,7 @@ foreign import checkFramebufferStatusImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLenum -checkFramebufferStatus = runFn2 checkFramebufferStatusImpl +checkFramebufferStatus webgl target = runFn2 checkFramebufferStatusImpl webgl target foreign import clearImpl """ function clearImpl(webgl, mask) { @@ -362,7 +366,7 @@ foreign import clearImpl """ """ :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) clear :: forall eff. WebGLContext -> GLbitfield -> Eff (canvas :: Canvas | eff) Unit -clear = runFn2 clearImpl +clear webgl mask = runFn2 clearImpl webgl mask foreign import clearColorImpl """ function clearColorImpl(webgl, red, green, blue, alpha) { @@ -373,7 +377,7 @@ foreign import clearColorImpl """ """ :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit -clearColor = runFn5 clearColorImpl +clearColor webgl red green blue alpha = runFn5 clearColorImpl webgl red green blue alpha foreign import clearDepthImpl """ function clearDepthImpl(webgl, depth) { @@ -384,7 +388,7 @@ foreign import clearDepthImpl """ """ :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (canvas :: Canvas | eff) Unit -clearDepth = runFn2 clearDepthImpl +clearDepth webgl depth = runFn2 clearDepthImpl webgl depth foreign import clearStencilImpl """ function clearStencilImpl(webgl, s) { @@ -395,7 +399,7 @@ foreign import clearStencilImpl """ """ :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) clearStencil :: forall eff. WebGLContext -> GLint -> Eff (canvas :: Canvas | eff) Unit -clearStencil = runFn2 clearStencilImpl +clearStencil webgl s = runFn2 clearStencilImpl webgl s foreign import colorMaskImpl """ function colorMaskImpl(webgl, red, green, blue, alpha) { @@ -406,7 +410,7 @@ foreign import colorMaskImpl """ """ :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (canvas :: Canvas | eff) Unit -colorMask = runFn5 colorMaskImpl +colorMask webgl red green blue alpha = runFn5 colorMaskImpl webgl red green blue alpha foreign import compileShaderImpl """ function compileShaderImpl(webgl, shader) { @@ -417,7 +421,29 @@ foreign import compileShaderImpl """ """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit -compileShader = runFn2 compileShaderImpl +compileShader webgl shader = runFn2 compileShaderImpl webgl shader + +foreign import compressedTexImage2DImpl """ + function compressedTexImage2DImpl(webgl, target, level, internalformat, width, height, border, data) { + return function () { + return webgl.compressedTexImage2D(target, level, internalformat, width, height, border, data); + }; + } +""" :: forall eff. Fn8 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +compressedTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +compressedTexImage2D webgl target level internalformat width height border data = runFn8 compressedTexImage2DImpl webgl target level internalformat width height border data + +foreign import compressedTexSubImage2DImpl """ + function compressedTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, data) { + return function () { + return webgl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); + }; + } +""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) + +compressedTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +compressedTexSubImage2D webgl target level xoffset yoffset width height format data = runFn9 compressedTexSubImage2DImpl webgl target level xoffset yoffset width height format data foreign import copyTexImage2DImpl """ function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { @@ -428,7 +454,7 @@ foreign import copyTexImage2DImpl """ """ :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (canvas :: Canvas | eff) Unit -copyTexImage2D = runFn9 copyTexImage2DImpl +copyTexImage2D webgl target level internalformat x y width height border = runFn9 copyTexImage2DImpl webgl target level internalformat x y width height border foreign import copyTexSubImage2DImpl """ function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { @@ -439,7 +465,7 @@ foreign import copyTexSubImage2DImpl """ """ :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit -copyTexSubImage2D = runFn9 copyTexSubImage2DImpl +copyTexSubImage2D webgl target level xoffset yoffset x y width height = runFn9 copyTexSubImage2DImpl webgl target level xoffset yoffset x y width height foreign import createBufferImpl """ function createBufferImpl(webgl) { @@ -449,8 +475,8 @@ foreign import createBufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) -createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLBuffer -createBuffer = runFn1 createBufferImpl +createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLBuffer) +createBuffer webgl = toMaybe $ runFn1 createBufferImpl webgl foreign import createFramebufferImpl """ function createFramebufferImpl(webgl) { @@ -460,8 +486,8 @@ foreign import createFramebufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) -createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLFramebuffer -createFramebuffer = runFn1 createFramebufferImpl +createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLFramebuffer) +createFramebuffer webgl = toMaybe $ runFn1 createFramebufferImpl webgl foreign import createProgramImpl """ function createProgramImpl(webgl) { @@ -471,8 +497,8 @@ foreign import createProgramImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) -createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLProgram -createProgram = runFn1 createProgramImpl +createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLProgram) +createProgram webgl = toMaybe $ runFn1 createProgramImpl webgl foreign import createRenderbufferImpl """ function createRenderbufferImpl(webgl) { @@ -482,8 +508,8 @@ foreign import createRenderbufferImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) -createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLRenderbuffer -createRenderbuffer = runFn1 createRenderbufferImpl +createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLRenderbuffer) +createRenderbuffer webgl = toMaybe $ runFn1 createRenderbufferImpl webgl foreign import createShaderImpl """ function createShaderImpl(webgl, type) { @@ -493,8 +519,8 @@ foreign import createShaderImpl """ } """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) -createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) WebGLShader -createShader = runFn2 createShaderImpl +createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShader) +createShader webgl type = toMaybe $ runFn2 createShaderImpl webgl type foreign import createTextureImpl """ function createTextureImpl(webgl) { @@ -504,8 +530,8 @@ foreign import createTextureImpl """ } """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) -createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLTexture -createTexture = runFn1 createTextureImpl +createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLTexture) +createTexture webgl = toMaybe $ runFn1 createTextureImpl webgl foreign import cullFaceImpl """ function cullFaceImpl(webgl, mode) { @@ -516,7 +542,7 @@ foreign import cullFaceImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) cullFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -cullFace = runFn2 cullFaceImpl +cullFace webgl mode = runFn2 cullFaceImpl webgl mode foreign import deleteBufferImpl """ function deleteBufferImpl(webgl, buffer) { @@ -527,7 +553,7 @@ foreign import deleteBufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit -deleteBuffer = runFn2 deleteBufferImpl +deleteBuffer webgl buffer = runFn2 deleteBufferImpl webgl buffer foreign import deleteFramebufferImpl """ function deleteFramebufferImpl(webgl, framebuffer) { @@ -538,7 +564,7 @@ foreign import deleteFramebufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit -deleteFramebuffer = runFn2 deleteFramebufferImpl +deleteFramebuffer webgl framebuffer = runFn2 deleteFramebufferImpl webgl framebuffer foreign import deleteProgramImpl """ function deleteProgramImpl(webgl, program) { @@ -549,7 +575,7 @@ foreign import deleteProgramImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit -deleteProgram = runFn2 deleteProgramImpl +deleteProgram webgl program = runFn2 deleteProgramImpl webgl program foreign import deleteRenderbufferImpl """ function deleteRenderbufferImpl(webgl, renderbuffer) { @@ -560,7 +586,7 @@ foreign import deleteRenderbufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit -deleteRenderbuffer = runFn2 deleteRenderbufferImpl +deleteRenderbuffer webgl renderbuffer = runFn2 deleteRenderbufferImpl webgl renderbuffer foreign import deleteShaderImpl """ function deleteShaderImpl(webgl, shader) { @@ -571,7 +597,7 @@ foreign import deleteShaderImpl """ """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit -deleteShader = runFn2 deleteShaderImpl +deleteShader webgl shader = runFn2 deleteShaderImpl webgl shader foreign import deleteTextureImpl """ function deleteTextureImpl(webgl, texture) { @@ -582,7 +608,7 @@ foreign import deleteTextureImpl """ """ :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit -deleteTexture = runFn2 deleteTextureImpl +deleteTexture webgl texture = runFn2 deleteTextureImpl webgl texture foreign import depthFuncImpl """ function depthFuncImpl(webgl, func) { @@ -593,7 +619,7 @@ foreign import depthFuncImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -depthFunc = runFn2 depthFuncImpl +depthFunc webgl func = runFn2 depthFuncImpl webgl func foreign import depthMaskImpl """ function depthMaskImpl(webgl, flag) { @@ -604,7 +630,7 @@ foreign import depthMaskImpl """ """ :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (canvas :: Canvas | eff) Unit -depthMask = runFn2 depthMaskImpl +depthMask webgl flag = runFn2 depthMaskImpl webgl flag foreign import depthRangeImpl """ function depthRangeImpl(webgl, zNear, zFar) { @@ -615,7 +641,7 @@ foreign import depthRangeImpl """ """ :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit -depthRange = runFn3 depthRangeImpl +depthRange webgl zNear zFar = runFn3 depthRangeImpl webgl zNear zFar foreign import detachShaderImpl """ function detachShaderImpl(webgl, program, shader) { @@ -626,7 +652,7 @@ foreign import detachShaderImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit -detachShader = runFn3 detachShaderImpl +detachShader webgl program shader = runFn3 detachShaderImpl webgl program shader foreign import disableImpl """ function disableImpl(webgl, cap) { @@ -637,7 +663,7 @@ foreign import disableImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) disable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -disable = runFn2 disableImpl +disable webgl cap = runFn2 disableImpl webgl cap foreign import disableVertexAttribArrayImpl """ function disableVertexAttribArrayImpl(webgl, index) { @@ -648,7 +674,7 @@ foreign import disableVertexAttribArrayImpl """ """ :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit -disableVertexAttribArray = runFn2 disableVertexAttribArrayImpl +disableVertexAttribArray webgl index = runFn2 disableVertexAttribArrayImpl webgl index foreign import drawArraysImpl """ function drawArraysImpl(webgl, mode, first, count) { @@ -659,7 +685,7 @@ foreign import drawArraysImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (canvas :: Canvas | eff) Unit -drawArrays = runFn4 drawArraysImpl +drawArrays webgl mode first count = runFn4 drawArraysImpl webgl mode first count foreign import drawElementsImpl """ function drawElementsImpl(webgl, mode, count, type, offset) { @@ -670,7 +696,7 @@ foreign import drawElementsImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit -drawElements = runFn5 drawElementsImpl +drawElements webgl mode count type offset = runFn5 drawElementsImpl webgl mode count type offset foreign import enableImpl """ function enableImpl(webgl, cap) { @@ -681,7 +707,7 @@ foreign import enableImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) enable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -enable = runFn2 enableImpl +enable webgl cap = runFn2 enableImpl webgl cap foreign import enableVertexAttribArrayImpl """ function enableVertexAttribArrayImpl(webgl, index) { @@ -692,7 +718,7 @@ foreign import enableVertexAttribArrayImpl """ """ :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit -enableVertexAttribArray = runFn2 enableVertexAttribArrayImpl +enableVertexAttribArray webgl index = runFn2 enableVertexAttribArrayImpl webgl index foreign import finishImpl """ function finishImpl(webgl) { @@ -703,7 +729,7 @@ foreign import finishImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) finish :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit -finish = runFn1 finishImpl +finish webgl = runFn1 finishImpl webgl foreign import flushImpl """ function flushImpl(webgl) { @@ -714,7 +740,7 @@ foreign import flushImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) flush :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit -flush = runFn1 flushImpl +flush webgl = runFn1 flushImpl webgl foreign import framebufferRenderbufferImpl """ function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { @@ -725,7 +751,7 @@ foreign import framebufferRenderbufferImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit -framebufferRenderbuffer = runFn5 framebufferRenderbufferImpl +framebufferRenderbuffer webgl target attachment renderbuffertarget renderbuffer = runFn5 framebufferRenderbufferImpl webgl target attachment renderbuffertarget renderbuffer foreign import framebufferTexture2DImpl """ function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { @@ -736,7 +762,7 @@ foreign import framebufferTexture2DImpl """ """ :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (canvas :: Canvas | eff) Unit -framebufferTexture2D = runFn6 framebufferTexture2DImpl +framebufferTexture2D webgl target attachment textarget texture level = runFn6 framebufferTexture2DImpl webgl target attachment textarget texture level foreign import frontFaceImpl """ function frontFaceImpl(webgl, mode) { @@ -747,7 +773,7 @@ foreign import frontFaceImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) frontFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -frontFace = runFn2 frontFaceImpl +frontFace webgl mode = runFn2 frontFaceImpl webgl mode foreign import generateMipmapImpl """ function generateMipmapImpl(webgl, target) { @@ -758,7 +784,7 @@ foreign import generateMipmapImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit -generateMipmap = runFn2 generateMipmapImpl +generateMipmap webgl target = runFn2 generateMipmapImpl webgl target foreign import getActiveAttribImpl """ function getActiveAttribImpl(webgl, program, index) { @@ -768,8 +794,8 @@ foreign import getActiveAttribImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) -getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo -getActiveAttrib = runFn3 getActiveAttribImpl +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) +getActiveAttrib webgl program index = toMaybe $ runFn3 getActiveAttribImpl webgl program index foreign import getActiveUniformImpl """ function getActiveUniformImpl(webgl, program, index) { @@ -779,8 +805,8 @@ foreign import getActiveUniformImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) -getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo -getActiveUniform = runFn3 getActiveUniformImpl +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) +getActiveUniform webgl program index = toMaybe $ runFn3 getActiveUniformImpl webgl program index foreign import getAttachedShadersImpl """ function getAttachedShadersImpl(webgl, program) { @@ -788,10 +814,10 @@ foreign import getAttachedShadersImpl """ return webgl.getAttachedShaders(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) sequence) -getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] -getAttachedShaders = runFn2 getAttachedShadersImpl +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe sequence) +getAttachedShaders webgl program = toMaybe $ runFn2 getAttachedShadersImpl webgl program foreign import getAttribLocationImpl """ function getAttribLocationImpl(webgl, program, name) { @@ -802,18 +828,7 @@ foreign import getAttribLocationImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) GLint) getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) GLint -getAttribLocation = runFn3 getAttribLocationImpl - -foreign import getParameterImpl """ - function getParameterImpl(webgl, pname) { - return function () { - return webgl.getParameter(pname); - }; - } -""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) - -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a -getParameter = runFn2 getParameterImpl +getAttribLocation webgl program name = runFn3 getAttribLocationImpl webgl program name foreign import getBufferParameterImpl """ function getBufferParameterImpl(webgl, target, pname) { @@ -824,7 +839,18 @@ foreign import getBufferParameterImpl """ """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getBufferParameter = runFn3 getBufferParameterImpl +getBufferParameter webgl target pname = runFn3 getBufferParameterImpl webgl target pname + +foreign import getParameterImpl """ + function getParameterImpl(webgl, pname) { + return function () { + return webgl.getParameter(pname); + }; + } +""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) + +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a +getParameter webgl pname = runFn2 getParameterImpl webgl pname foreign import getErrorImpl """ function getErrorImpl(webgl) { @@ -835,7 +861,7 @@ foreign import getErrorImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum -getError = runFn1 getErrorImpl +getError webgl = runFn1 getErrorImpl webgl foreign import getFramebufferAttachmentParameterImpl """ function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { @@ -846,7 +872,7 @@ foreign import getFramebufferAttachmentParameterImpl """ """ :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getFramebufferAttachmentParameter = runFn4 getFramebufferAttachmentParameterImpl +getFramebufferAttachmentParameter webgl target attachment pname = runFn4 getFramebufferAttachmentParameterImpl webgl target attachment pname foreign import getProgramParameterImpl """ function getProgramParameterImpl(webgl, program, pname) { @@ -857,7 +883,7 @@ foreign import getProgramParameterImpl """ """ :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) a -getProgramParameter = runFn3 getProgramParameterImpl +getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname foreign import getProgramInfoLogImpl """ function getProgramInfoLogImpl(webgl, program) { @@ -867,8 +893,8 @@ foreign import getProgramInfoLogImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) DOMString) -getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) DOMString -getProgramInfoLog = runFn2 getProgramInfoLogImpl +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getProgramInfoLog webgl program = toMaybe $ runFn2 getProgramInfoLogImpl webgl program foreign import getRenderbufferParameterImpl """ function getRenderbufferParameterImpl(webgl, target, pname) { @@ -879,7 +905,7 @@ foreign import getRenderbufferParameterImpl """ """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getRenderbufferParameter = runFn3 getRenderbufferParameterImpl +getRenderbufferParameter webgl target pname = runFn3 getRenderbufferParameterImpl webgl target pname foreign import getShaderParameterImpl """ function getShaderParameterImpl(webgl, shader, pname) { @@ -890,7 +916,18 @@ foreign import getShaderParameterImpl """ """ :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) a -getShaderParameter = runFn3 getShaderParameterImpl +getShaderParameter webgl shader pname = runFn3 getShaderParameterImpl webgl shader pname + +foreign import getShaderPrecisionFormatImpl """ + function getShaderPrecisionFormatImpl(webgl, shadertype, precisiontype) { + return function () { + return webgl.getShaderPrecisionFormat(shadertype, precisiontype); + }; + } +""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) WebGLShaderPrecisionFormat) + +getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) +getShaderPrecisionFormat webgl shadertype precisiontype = toMaybe $ runFn3 getShaderPrecisionFormatImpl webgl shadertype precisiontype foreign import getShaderInfoLogImpl """ function getShaderInfoLogImpl(webgl, shader) { @@ -900,8 +937,8 @@ foreign import getShaderInfoLogImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString -getShaderInfoLog = runFn2 getShaderInfoLogImpl +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getShaderInfoLog webgl shader = toMaybe $ runFn2 getShaderInfoLogImpl webgl shader foreign import getShaderSourceImpl """ function getShaderSourceImpl(webgl, shader) { @@ -911,8 +948,8 @@ foreign import getShaderSourceImpl """ } """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) -getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString -getShaderSource = runFn2 getShaderSourceImpl +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getShaderSource webgl shader = toMaybe $ runFn2 getShaderSourceImpl webgl shader foreign import getTexParameterImpl """ function getTexParameterImpl(webgl, target, pname) { @@ -923,7 +960,7 @@ foreign import getTexParameterImpl """ """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getTexParameter = runFn3 getTexParameterImpl +getTexParameter webgl target pname = runFn3 getTexParameterImpl webgl target pname foreign import getUniformImpl """ function getUniformImpl(webgl, program, location) { @@ -934,7 +971,7 @@ foreign import getUniformImpl """ """ :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) a -getUniform = runFn3 getUniformImpl +getUniform webgl program location = runFn3 getUniformImpl webgl program location foreign import getUniformLocationImpl """ function getUniformLocationImpl(webgl, program, name) { @@ -944,8 +981,8 @@ foreign import getUniformLocationImpl """ } """ :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) WebGLUniformLocation) -getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) WebGLUniformLocation -getUniformLocation = runFn3 getUniformLocationImpl +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe WebGLUniformLocation) +getUniformLocation webgl program name = toMaybe $ runFn3 getUniformLocationImpl webgl program name foreign import getVertexAttribImpl """ function getVertexAttribImpl(webgl, index, pname) { @@ -956,7 +993,7 @@ foreign import getVertexAttribImpl """ """ :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) a -getVertexAttrib = runFn3 getVertexAttribImpl +getVertexAttrib webgl index pname = runFn3 getVertexAttribImpl webgl index pname foreign import getVertexAttribOffsetImpl """ function getVertexAttribOffsetImpl(webgl, index, pname) { @@ -967,7 +1004,7 @@ foreign import getVertexAttribOffsetImpl """ """ :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) GLsizeiptr -getVertexAttribOffset = runFn3 getVertexAttribOffsetImpl +getVertexAttribOffset webgl index pname = runFn3 getVertexAttribOffsetImpl webgl index pname foreign import hintImpl """ function hintImpl(webgl, target, mode) { @@ -978,7 +1015,7 @@ foreign import hintImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -hint = runFn3 hintImpl +hint webgl target mode = runFn3 hintImpl webgl target mode foreign import isBufferImpl """ function isBufferImpl(webgl, buffer) { @@ -989,7 +1026,7 @@ foreign import isBufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean -isBuffer = runFn2 isBufferImpl +isBuffer webgl buffer = runFn2 isBufferImpl webgl buffer foreign import isEnabledImpl """ function isEnabledImpl(webgl, cap) { @@ -1000,7 +1037,7 @@ foreign import isEnabledImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLboolean -isEnabled = runFn2 isEnabledImpl +isEnabled webgl cap = runFn2 isEnabledImpl webgl cap foreign import isFramebufferImpl """ function isFramebufferImpl(webgl, framebuffer) { @@ -1011,7 +1048,7 @@ foreign import isFramebufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) GLboolean -isFramebuffer = runFn2 isFramebufferImpl +isFramebuffer webgl framebuffer = runFn2 isFramebufferImpl webgl framebuffer foreign import isProgramImpl """ function isProgramImpl(webgl, program) { @@ -1022,7 +1059,7 @@ foreign import isProgramImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) GLboolean -isProgram = runFn2 isProgramImpl +isProgram webgl program = runFn2 isProgramImpl webgl program foreign import isRenderbufferImpl """ function isRenderbufferImpl(webgl, renderbuffer) { @@ -1033,7 +1070,7 @@ foreign import isRenderbufferImpl """ """ :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) GLboolean -isRenderbuffer = runFn2 isRenderbufferImpl +isRenderbuffer webgl renderbuffer = runFn2 isRenderbufferImpl webgl renderbuffer foreign import isShaderImpl """ function isShaderImpl(webgl, shader) { @@ -1044,7 +1081,7 @@ foreign import isShaderImpl """ """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) GLboolean -isShader = runFn2 isShaderImpl +isShader webgl shader = runFn2 isShaderImpl webgl shader foreign import isTextureImpl """ function isTextureImpl(webgl, texture) { @@ -1055,7 +1092,7 @@ foreign import isTextureImpl """ """ :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) GLboolean -isTexture = runFn2 isTextureImpl +isTexture webgl texture = runFn2 isTextureImpl webgl texture foreign import lineWidthImpl """ function lineWidthImpl(webgl, width) { @@ -1066,7 +1103,7 @@ foreign import lineWidthImpl """ """ :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -lineWidth = runFn2 lineWidthImpl +lineWidth webgl width = runFn2 lineWidthImpl webgl width foreign import linkProgramImpl """ function linkProgramImpl(webgl, program) { @@ -1077,7 +1114,7 @@ foreign import linkProgramImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit -linkProgram = runFn2 linkProgramImpl +linkProgram webgl program = runFn2 linkProgramImpl webgl program foreign import pixelStoreiImpl """ function pixelStoreiImpl(webgl, pname, param) { @@ -1088,7 +1125,7 @@ foreign import pixelStoreiImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit -pixelStorei = runFn3 pixelStoreiImpl +pixelStorei webgl pname param = runFn3 pixelStoreiImpl webgl pname param foreign import polygonOffsetImpl """ function polygonOffsetImpl(webgl, factor, units) { @@ -1099,7 +1136,7 @@ foreign import polygonOffsetImpl """ """ :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -polygonOffset = runFn3 polygonOffsetImpl +polygonOffset webgl factor units = runFn3 polygonOffsetImpl webgl factor units foreign import readPixelsImpl """ function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { @@ -1110,7 +1147,7 @@ foreign import readPixelsImpl """ """ :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -readPixels = runFn8 readPixelsImpl +readPixels webgl x y width height format type pixels = runFn8 readPixelsImpl webgl x y width height format type pixels foreign import renderbufferStorageImpl """ function renderbufferStorageImpl(webgl, target, internalformat, width, height) { @@ -1121,7 +1158,7 @@ foreign import renderbufferStorageImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit -renderbufferStorage = runFn5 renderbufferStorageImpl +renderbufferStorage webgl target internalformat width height = runFn5 renderbufferStorageImpl webgl target internalformat width height foreign import sampleCoverageImpl """ function sampleCoverageImpl(webgl, value, invert) { @@ -1132,7 +1169,7 @@ foreign import sampleCoverageImpl """ """ :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (canvas :: Canvas | eff) Unit -sampleCoverage = runFn3 sampleCoverageImpl +sampleCoverage webgl value invert = runFn3 sampleCoverageImpl webgl value invert foreign import scissorImpl """ function scissorImpl(webgl, x, y, width, height) { @@ -1143,7 +1180,7 @@ foreign import scissorImpl """ """ :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit -scissor = runFn5 scissorImpl +scissor webgl x y width height = runFn5 scissorImpl webgl x y width height foreign import shaderSourceImpl """ function shaderSourceImpl(webgl, shader, source) { @@ -1154,7 +1191,7 @@ foreign import shaderSourceImpl """ """ :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (canvas :: Canvas | eff) Unit) shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (canvas :: Canvas | eff) Unit -shaderSource = runFn3 shaderSourceImpl +shaderSource webgl shader source = runFn3 shaderSourceImpl webgl shader source foreign import stencilFuncImpl """ function stencilFuncImpl(webgl, func, ref, mask) { @@ -1165,7 +1202,7 @@ foreign import stencilFuncImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit -stencilFunc = runFn4 stencilFuncImpl +stencilFunc webgl func ref mask = runFn4 stencilFuncImpl webgl func ref mask foreign import stencilFuncSeparateImpl """ function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { @@ -1176,7 +1213,7 @@ foreign import stencilFuncSeparateImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit -stencilFuncSeparate = runFn5 stencilFuncSeparateImpl +stencilFuncSeparate webgl face func ref mask = runFn5 stencilFuncSeparateImpl webgl face func ref mask foreign import stencilMaskImpl """ function stencilMaskImpl(webgl, mask) { @@ -1187,7 +1224,7 @@ foreign import stencilMaskImpl """ """ :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit -stencilMask = runFn2 stencilMaskImpl +stencilMask webgl mask = runFn2 stencilMaskImpl webgl mask foreign import stencilMaskSeparateImpl """ function stencilMaskSeparateImpl(webgl, face, mask) { @@ -1198,7 +1235,7 @@ foreign import stencilMaskSeparateImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (canvas :: Canvas | eff) Unit -stencilMaskSeparate = runFn3 stencilMaskSeparateImpl +stencilMaskSeparate webgl face mask = runFn3 stencilMaskSeparateImpl webgl face mask foreign import stencilOpImpl """ function stencilOpImpl(webgl, fail, zfail, zpass) { @@ -1209,7 +1246,7 @@ foreign import stencilOpImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -stencilOp = runFn4 stencilOpImpl +stencilOp webgl fail zfail zpass = runFn4 stencilOpImpl webgl fail zfail zpass foreign import stencilOpSeparateImpl """ function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { @@ -1220,7 +1257,7 @@ foreign import stencilOpSeparateImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit -stencilOpSeparate = runFn5 stencilOpSeparateImpl +stencilOpSeparate webgl face fail zfail zpass = runFn5 stencilOpSeparateImpl webgl face fail zfail zpass foreign import texImage2DImpl """ function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { @@ -1231,7 +1268,7 @@ foreign import texImage2DImpl """ """ :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texImage2D = runFn10 texImage2DImpl +texImage2D webgl target level internalformat width height border format type pixels = runFn10 texImage2DImpl webgl target level internalformat width height border format type pixels foreign import texParameterfImpl """ function texParameterfImpl(webgl, target, pname, param) { @@ -1242,7 +1279,7 @@ foreign import texParameterfImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -texParameterf = runFn4 texParameterfImpl +texParameterf webgl target pname param = runFn4 texParameterfImpl webgl target pname param foreign import texParameteriImpl """ function texParameteriImpl(webgl, target, pname, param) { @@ -1253,7 +1290,7 @@ foreign import texParameteriImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit -texParameteri = runFn4 texParameteriImpl +texParameteri webgl target pname param = runFn4 texParameteriImpl webgl target pname param foreign import texSubImage2DImpl """ function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { @@ -1264,7 +1301,7 @@ foreign import texSubImage2DImpl """ """ :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texSubImage2D = runFn10 texSubImage2DImpl +texSubImage2D webgl target level xoffset yoffset width height format type pixels = runFn10 texSubImage2DImpl webgl target level xoffset yoffset width height format type pixels foreign import uniform1fImpl """ function uniform1fImpl(webgl, location, x) { @@ -1275,7 +1312,7 @@ foreign import uniform1fImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -uniform1f = runFn3 uniform1fImpl +uniform1f webgl location x = runFn3 uniform1fImpl webgl location x foreign import uniform1fvImpl """ function uniform1fvImpl(webgl, location, v) { @@ -1283,10 +1320,10 @@ foreign import uniform1fvImpl """ return webgl.uniform1fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniform1fv = runFn3 uniform1fvImpl +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1fv webgl location v = runFn3 uniform1fvImpl webgl location v foreign import uniform1iImpl """ function uniform1iImpl(webgl, location, x) { @@ -1297,7 +1334,7 @@ foreign import uniform1iImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (canvas :: Canvas | eff) Unit -uniform1i = runFn3 uniform1iImpl +uniform1i webgl location x = runFn3 uniform1iImpl webgl location x foreign import uniform1ivImpl """ function uniform1ivImpl(webgl, location, v) { @@ -1308,7 +1345,7 @@ foreign import uniform1ivImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit -uniform1iv = runFn3 uniform1ivImpl +uniform1iv webgl location v = runFn3 uniform1ivImpl webgl location v foreign import uniform2fImpl """ function uniform2fImpl(webgl, location, x, y) { @@ -1319,7 +1356,7 @@ foreign import uniform2fImpl """ """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -uniform2f = runFn4 uniform2fImpl +uniform2f webgl location x y = runFn4 uniform2fImpl webgl location x y foreign import uniform2fvImpl """ function uniform2fvImpl(webgl, location, v) { @@ -1327,10 +1364,10 @@ foreign import uniform2fvImpl """ return webgl.uniform2fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniform2fv = runFn3 uniform2fvImpl +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2fv webgl location v = runFn3 uniform2fvImpl webgl location v foreign import uniform2iImpl """ function uniform2iImpl(webgl, location, x, y) { @@ -1341,7 +1378,7 @@ foreign import uniform2iImpl """ """ :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit -uniform2i = runFn4 uniform2iImpl +uniform2i webgl location x y = runFn4 uniform2iImpl webgl location x y foreign import uniform2ivImpl """ function uniform2ivImpl(webgl, location, v) { @@ -1352,7 +1389,7 @@ foreign import uniform2ivImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit -uniform2iv = runFn3 uniform2ivImpl +uniform2iv webgl location v = runFn3 uniform2ivImpl webgl location v foreign import uniform3fImpl """ function uniform3fImpl(webgl, location, x, y, z) { @@ -1363,7 +1400,7 @@ foreign import uniform3fImpl """ """ :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -uniform3f = runFn5 uniform3fImpl +uniform3f webgl location x y z = runFn5 uniform3fImpl webgl location x y z foreign import uniform3fvImpl """ function uniform3fvImpl(webgl, location, v) { @@ -1371,10 +1408,10 @@ foreign import uniform3fvImpl """ return webgl.uniform3fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniform3fv = runFn3 uniform3fvImpl +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3fv webgl location v = runFn3 uniform3fvImpl webgl location v foreign import uniform3iImpl """ function uniform3iImpl(webgl, location, x, y, z) { @@ -1385,7 +1422,7 @@ foreign import uniform3iImpl """ """ :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit -uniform3i = runFn5 uniform3iImpl +uniform3i webgl location x y z = runFn5 uniform3iImpl webgl location x y z foreign import uniform3ivImpl """ function uniform3ivImpl(webgl, location, v) { @@ -1396,7 +1433,7 @@ foreign import uniform3ivImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit -uniform3iv = runFn3 uniform3ivImpl +uniform3iv webgl location v = runFn3 uniform3ivImpl webgl location v foreign import uniform4fImpl """ function uniform4fImpl(webgl, location, x, y, z, w) { @@ -1407,7 +1444,7 @@ foreign import uniform4fImpl """ """ :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -uniform4f = runFn6 uniform4fImpl +uniform4f webgl location x y z w = runFn6 uniform4fImpl webgl location x y z w foreign import uniform4fvImpl """ function uniform4fvImpl(webgl, location, v) { @@ -1415,10 +1452,10 @@ foreign import uniform4fvImpl """ return webgl.uniform4fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniform4fv = runFn3 uniform4fvImpl +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4fv webgl location v = runFn3 uniform4fvImpl webgl location v foreign import uniform4iImpl """ function uniform4iImpl(webgl, location, x, y, z, w) { @@ -1429,7 +1466,7 @@ foreign import uniform4iImpl """ """ :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit -uniform4i = runFn6 uniform4iImpl +uniform4i webgl location x y z w = runFn6 uniform4iImpl webgl location x y z w foreign import uniform4ivImpl """ function uniform4ivImpl(webgl, location, v) { @@ -1440,7 +1477,7 @@ foreign import uniform4ivImpl """ """ :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit -uniform4iv = runFn3 uniform4ivImpl +uniform4iv webgl location v = runFn3 uniform4ivImpl webgl location v foreign import uniformMatrix2fvImpl """ function uniformMatrix2fvImpl(webgl, location, transpose, value) { @@ -1448,10 +1485,10 @@ foreign import uniformMatrix2fvImpl """ return webgl.uniformMatrix2fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniformMatrix2fv = runFn4 uniformMatrix2fvImpl +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv webgl location transpose value = runFn4 uniformMatrix2fvImpl webgl location transpose value foreign import uniformMatrix3fvImpl """ function uniformMatrix3fvImpl(webgl, location, transpose, value) { @@ -1459,10 +1496,10 @@ foreign import uniformMatrix3fvImpl """ return webgl.uniformMatrix3fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniformMatrix3fv = runFn4 uniformMatrix3fvImpl +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv webgl location transpose value = runFn4 uniformMatrix3fvImpl webgl location transpose value foreign import uniformMatrix4fvImpl """ function uniformMatrix4fvImpl(webgl, location, transpose, value) { @@ -1470,10 +1507,10 @@ foreign import uniformMatrix4fvImpl """ return webgl.uniformMatrix4fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -uniformMatrix4fv = runFn4 uniformMatrix4fvImpl +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv webgl location transpose value = runFn4 uniformMatrix4fvImpl webgl location transpose value foreign import useProgramImpl """ function useProgramImpl(webgl, program) { @@ -1484,7 +1521,7 @@ foreign import useProgramImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit -useProgram = runFn2 useProgramImpl +useProgram webgl program = runFn2 useProgramImpl webgl program foreign import validateProgramImpl """ function validateProgramImpl(webgl, program) { @@ -1495,7 +1532,7 @@ foreign import validateProgramImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit -validateProgram = runFn2 validateProgramImpl +validateProgram webgl program = runFn2 validateProgramImpl webgl program foreign import vertexAttrib1fImpl """ function vertexAttrib1fImpl(webgl, indx, x) { @@ -1506,7 +1543,7 @@ foreign import vertexAttrib1fImpl """ """ :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib1f = runFn3 vertexAttrib1fImpl +vertexAttrib1f webgl indx x = runFn3 vertexAttrib1fImpl webgl indx x foreign import vertexAttrib1fvImpl """ function vertexAttrib1fvImpl(webgl, indx, values) { @@ -1514,10 +1551,10 @@ foreign import vertexAttrib1fvImpl """ return webgl.vertexAttrib1fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib1fv = runFn3 vertexAttrib1fvImpl +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv webgl indx values = runFn3 vertexAttrib1fvImpl webgl indx values foreign import vertexAttrib2fImpl """ function vertexAttrib2fImpl(webgl, indx, x, y) { @@ -1528,7 +1565,7 @@ foreign import vertexAttrib2fImpl """ """ :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib2f = runFn4 vertexAttrib2fImpl +vertexAttrib2f webgl indx x y = runFn4 vertexAttrib2fImpl webgl indx x y foreign import vertexAttrib2fvImpl """ function vertexAttrib2fvImpl(webgl, indx, values) { @@ -1536,10 +1573,10 @@ foreign import vertexAttrib2fvImpl """ return webgl.vertexAttrib2fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib2fv = runFn3 vertexAttrib2fvImpl +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv webgl indx values = runFn3 vertexAttrib2fvImpl webgl indx values foreign import vertexAttrib3fImpl """ function vertexAttrib3fImpl(webgl, indx, x, y, z) { @@ -1550,7 +1587,7 @@ foreign import vertexAttrib3fImpl """ """ :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib3f = runFn5 vertexAttrib3fImpl +vertexAttrib3f webgl indx x y z = runFn5 vertexAttrib3fImpl webgl indx x y z foreign import vertexAttrib3fvImpl """ function vertexAttrib3fvImpl(webgl, indx, values) { @@ -1558,10 +1595,10 @@ foreign import vertexAttrib3fvImpl """ return webgl.vertexAttrib3fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib3fv = runFn3 vertexAttrib3fvImpl +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv webgl indx values = runFn3 vertexAttrib3fvImpl webgl indx values foreign import vertexAttrib4fImpl """ function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { @@ -1572,7 +1609,7 @@ foreign import vertexAttrib4fImpl """ """ :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib4f = runFn6 vertexAttrib4fImpl +vertexAttrib4f webgl indx x y z w = runFn6 vertexAttrib4fImpl webgl indx x y z w foreign import vertexAttrib4fvImpl """ function vertexAttrib4fvImpl(webgl, indx, values) { @@ -1580,10 +1617,10 @@ foreign import vertexAttrib4fvImpl """ return webgl.vertexAttrib4fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint FloatArray (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit -vertexAttrib4fv = runFn3 vertexAttrib4fvImpl +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv webgl indx values = runFn3 vertexAttrib4fvImpl webgl indx values foreign import vertexAttribPointerImpl """ function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { @@ -1594,7 +1631,7 @@ foreign import vertexAttribPointerImpl """ """ :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit -vertexAttribPointer = runFn7 vertexAttribPointerImpl +vertexAttribPointer webgl indx size type normalized stride offset = runFn7 vertexAttribPointerImpl webgl indx size type normalized stride offset foreign import viewportImpl """ function viewportImpl(webgl, x, y, width, height) { @@ -1605,5 +1642,5 @@ foreign import viewportImpl """ """ :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit -viewport = runFn5 viewportImpl +viewport webgl x y width height = runFn5 viewportImpl webgl x y width height diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 0cad46f..8db6ecb 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -153,9 +153,6 @@ back = 1029 frontAndBack :: GLenum frontAndBack = 1032 -texture2d :: GLenum -texture2d = 3553 - cullFace :: GLenum cullFace = 2884 @@ -342,9 +339,6 @@ sampleCoverageValue = 32938 sampleCoverageInvert :: GLenum sampleCoverageInvert = 32939 -numCompressedTextureFormats :: GLenum -numCompressedTextureFormats = 34466 - compressedTextureFormats :: GLenum compressedTextureFormats = 34467 @@ -453,15 +447,9 @@ attachedShaders = 35717 activeUniforms :: GLenum activeUniforms = 35718 -activeUniformMaxLength :: GLenum -activeUniformMaxLength = 35719 - activeAttributes :: GLenum activeAttributes = 35721 -activeAttributeMaxLength :: GLenum -activeAttributeMaxLength = 35722 - shadingLanguageVersion :: GLenum shadingLanguageVersion = 35724 @@ -552,6 +540,9 @@ textureWrapS = 10242 textureWrapT :: GLenum textureWrapT = 10243 +texture2d :: GLenum +texture2d = 3553 + texture :: GLenum texture = 5890 @@ -756,14 +747,14 @@ vertexAttribArrayPointer = 34373 vertexAttribArrayBufferBinding :: GLenum vertexAttribArrayBufferBinding = 34975 -compileStatus :: GLenum -compileStatus = 35713 +implementationColorReadType :: GLenum +implementationColorReadType = 35738 -infoLogLength :: GLenum -infoLogLength = 35716 +implementationColorReadFormat :: GLenum +implementationColorReadFormat = 35739 -shaderSourceLength :: GLenum -shaderSourceLength = 35720 +compileStatus :: GLenum +compileStatus = 35713 lowFloat :: GLenum lowFloat = 36336 diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 3455101..975459e 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -23,9 +23,8 @@ type GLuint = Number type GLushort = Number foreign import data ArrayBufferView :: * -foreign import data HTMLImageElement :: * -foreign import data HTMLVideoElement :: * -foreign import data ImageData :: * +foreign import data BufferDataSource :: * +foreign import data TexImageSource :: * foreign import data WebGLActiveInfo :: * foreign import data WebGLBuffer :: * foreign import data WebGLContext :: * @@ -33,6 +32,7 @@ foreign import data WebGLFramebuffer :: * foreign import data WebGLProgram :: * foreign import data WebGLRenderbuffer :: * foreign import data WebGLShader :: * +foreign import data WebGLShaderPrecisionFormat :: * foreign import data WebGLTexture :: * foreign import data WebGLUniformLocation :: * From 54379b275fb0d52ba78ad29dc66b00f95a9566e6 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 19:28:34 -0500 Subject: [PATCH 35/51] correctly parse and print maybe and array types --- generator/IDL/AST.hs | 3 +-- generator/IDL/Parser.hs | 32 ++++++++++++------------------- generator/IDL/Printer.hs | 14 +++++++------- src/Graphics/WebGL/Raw.purs | 12 ++++++------ src/Graphics/WebGL/Raw/Types.purs | 1 - src/Graphics/WebGL/Raw/Util.purs | 22 +++++++++++++++++++++ 6 files changed, 48 insertions(+), 36 deletions(-) create mode 100644 src/Graphics/WebGL/Raw/Util.purs diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 6e360a1..f5998ed 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -43,7 +43,6 @@ data Type | Concrete { typeName :: String , typeIsArray :: Bool - , typeCondPara :: Maybe String , typeIsMaybe :: Bool } deriving Show @@ -64,7 +63,7 @@ emptyIdl :: IDL emptyIdl = IDL [] [] [] [] [] webglContext :: Arg -webglContext = Arg (Concrete "WebGLContext" False Nothing False) "webgl" +webglContext = Arg (Concrete "WebGLContext" False False) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index 221551d..1c957ff 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -57,10 +57,7 @@ lexer :: PP.GenTokenParser String u Identity lexer = PP.makeTokenParser PP.emptyDef parseIdl :: Parse IDL -parseIdl = - parseDecls >>= - return . foldr partition emptyIdl >>= - return . cleanup +parseIdl = parseDecls >>= return . cleanup . foldr partition emptyIdl . nub -- helpers @@ -82,13 +79,7 @@ partition a@Attribute{} idl = idl partition _ idl = idl cleanup :: IDL -> IDL -cleanup idl = IDL - { enums = nub $ enums idl - , comments = nub $ comments idl - , functions = nub $ functions idl - , attributes = nub $ attributes idl - , types = nub . filter onlyAllowedTypes $ types idl - } +cleanup idl = idl { types = nub . filter onlyAllowedTypes $ types idl } where onlyAllowedTypes Concrete{ typeName = t } = t `notElem` excludedTypes onlyAllowedTypes _ = False @@ -172,21 +163,22 @@ parseTypedef = do parseType :: Parse Type parseType = typ PP. "expecting type" where + arrayName = do + symbol' "sequence" + name <- angles' identifier' + return (name, True) + singleName = do + name <- identifier' + return (name, False) typ = do - ident <- identifier' - isArray <- PP.option False $ brackets' whiteSpace' >> return True - condPara <- - if ident == "sequence" - then angles' identifier' >>= return . Just - else return Nothing + (name, isArray) <- PP.try arrayName PP.<|> singleName isMaybe <- PP.option False $ symbol' "?" >> return True return $ - if ident `elem` ["any", "object"] + if name `elem` ["any", "object"] then Generic else Concrete - { typeName = ident + { typeName = name , typeIsArray = isArray - , typeCondPara = condPara , typeIsMaybe = isMaybe } diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 191eab1..08d02f0 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -141,14 +141,11 @@ ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f ppRunFuncBody :: Decl -> Doc ppRunFuncBody f@Function { methodName = name, methodRetType = retType } = text name <+> args <+> "=" <+> - (if isMaybe then "toMaybe $" else empty) <+> + (if ppAsMaybe retType then "toMaybe $" else empty) <+> "runFn" <> int (length $ funcArgs f) <+> implName f <+> args where args = ppPsArgs f - isMaybe = case retType of - c@Concrete{} -> typeIsMaybe c - _ -> False ppFuncImpl :: Decl -> Doc ppFuncImpl f@Function{} = @@ -196,10 +193,9 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } ppConvertType _ = empty ppConvertMaybeType :: Type -> Doc -ppConvertMaybeType t@Concrete{ typeIsMaybe = isMaybe } = - wrapMaybe $ ppConvertType t +ppConvertMaybeType t@Concrete{} = wrapMaybe $ ppConvertType t where - wrapMaybe t = if isMaybe then parens ("Maybe" <+> t) else t + wrapMaybe typ = if ppAsMaybe t then parens ("Maybe" <+> typ) else typ ppConvertMaybeType _ = empty ppExportList :: [Decl] -> Doc @@ -255,3 +251,7 @@ toCamelCase = text . foldr go "" where go '_' (l:ls) = toUpper l : ls go l ls = toLower l : ls + +ppAsMaybe :: Type -> Bool +ppAsMaybe t@Concrete{} = typeIsMaybe t && not (typeIsArray t) +ppAsMaybe _ = False diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index 19b8882..c4b99f4 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -176,10 +176,10 @@ foreign import getSupportedExtensionsImpl """ return webgl.getSupportedExtensions(); }; } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) sequence) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) -getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe sequence) -getSupportedExtensions webgl = toMaybe $ runFn1 getSupportedExtensionsImpl webgl +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] +getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl foreign import getExtensionImpl """ function getExtensionImpl(webgl, name) { @@ -814,10 +814,10 @@ foreign import getAttachedShadersImpl """ return webgl.getAttachedShaders(program); }; } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) sequence) +""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) -getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe sequence) -getAttachedShaders webgl program = toMaybe $ runFn2 getAttachedShadersImpl webgl program +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] +getAttachedShaders webgl program = runFn2 getAttachedShadersImpl webgl program foreign import getAttribLocationImpl """ function getAttribLocationImpl(webgl, program, name) { diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 975459e..0f3ae1e 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -24,7 +24,6 @@ type GLushort = Number foreign import data ArrayBufferView :: * foreign import data BufferDataSource :: * -foreign import data TexImageSource :: * foreign import data WebGLActiveInfo :: * foreign import data WebGLBuffer :: * foreign import data WebGLContext :: * diff --git a/src/Graphics/WebGL/Raw/Util.purs b/src/Graphics/WebGL/Raw/Util.purs new file mode 100644 index 0000000..db3b681 --- /dev/null +++ b/src/Graphics/WebGL/Raw/Util.purs @@ -0,0 +1,22 @@ +module Graphics.WebGL.Raw.Util +( toMaybe +) where + +import Data.Maybe (Maybe (..)) + +foreign import toMaybe3 """ + function ensure3(Nothing) { + return function(Just) { + return function(v) { + if (v === undefined || v === null) { + return Nothing; + } else { + return Just(v); + } + }; + }; + } +""" :: forall a. Maybe a -> (a -> Maybe a) -> a -> Maybe a + +toMaybe :: forall a. a -> Maybe a +toMaybe = toMaybe3 Nothing Just From 080fbacebb89ed7630618c79a36101a76a6c11b3 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 3 Jun 2015 22:46:41 -0500 Subject: [PATCH 36/51] set null array values to empty --- generator/IDL/AST.hs | 6 +++++- generator/IDL/Parser.hs | 2 +- generator/IDL/Printer.hs | 12 +++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index f5998ed..df43134 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -43,7 +43,7 @@ data Type | Concrete { typeName :: String , typeIsArray :: Bool - , typeIsMaybe :: Bool + , typeIsMaybe' :: Bool } deriving Show @@ -67,3 +67,7 @@ webglContext = Arg (Concrete "WebGLContext" False False) "webgl" funcArgs :: Decl -> [Arg] funcArgs f = webglContext : methodArgs f + +typeIsMaybe :: Type -> Bool +typeIsMaybe t@Concrete{} = typeIsMaybe' t && not (typeIsArray t) +typeIsMaybe _ = False diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index 1c957ff..d82429b 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -179,7 +179,7 @@ parseType = typ PP. "expecting type" else Concrete { typeName = name , typeIsArray = isArray - , typeIsMaybe = isMaybe + , typeIsMaybe' = isMaybe } parseArg :: Parse Arg diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 08d02f0..197a6fb 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -141,7 +141,7 @@ ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f ppRunFuncBody :: Decl -> Doc ppRunFuncBody f@Function { methodName = name, methodRetType = retType } = text name <+> args <+> "=" <+> - (if ppAsMaybe retType then "toMaybe $" else empty) <+> + safetyFn retType <+> "runFn" <> int (length $ funcArgs f) <+> implName f <+> args where @@ -195,7 +195,7 @@ ppConvertType _ = empty ppConvertMaybeType :: Type -> Doc ppConvertMaybeType t@Concrete{} = wrapMaybe $ ppConvertType t where - wrapMaybe typ = if ppAsMaybe t then parens ("Maybe" <+> typ) else typ + wrapMaybe name = if typeIsMaybe t then parens ("Maybe" <+> name) else name ppConvertMaybeType _ = empty ppExportList :: [Decl] -> Doc @@ -252,6 +252,8 @@ toCamelCase = text . foldr go "" go '_' (l:ls) = toUpper l : ls go l ls = toLower l : ls -ppAsMaybe :: Type -> Bool -ppAsMaybe t@Concrete{} = typeIsMaybe t && not (typeIsArray t) -ppAsMaybe _ = False +safetyFn :: Type -> Doc +safetyFn t@Concrete{} + | typeIsMaybe t = "toMaybe $" + | typeIsArray t = "nullAsEmpty $" +safetyFn _ = empty From 69d1aa81f29e9612fea7cf3b8c11302b99df09d7 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Thu, 4 Jun 2015 08:35:27 -0500 Subject: [PATCH 37/51] wrap generic return types in Maybe --- docs/README.md | 176 +++++++++++++++--------------- generator/IDL/AST.hs | 2 +- generator/IDL/Printer.hs | 43 ++++---- src/Graphics/WebGL/Raw.purs | 91 +++++++-------- src/Graphics/WebGL/Raw/Enums.purs | 2 +- src/Graphics/WebGL/Raw/Types.purs | 2 +- src/Graphics/WebGL/Raw/Util.purs | 34 +++--- 7 files changed, 182 insertions(+), 168 deletions(-) diff --git a/docs/README.md b/docs/README.md index 7a9e77e..716cf4e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,7 +6,7 @@ #### `getContextAttributes` ``` purescript -getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLContextAttributes +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) ``` @@ -27,7 +27,7 @@ getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | ef #### `getExtension` ``` purescript -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) a +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) ``` @@ -118,14 +118,14 @@ blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> G #### `bufferData` ``` purescript -bufferData :: forall eff. WebGLContext -> GLenum -> Float32Array -> GLenum -> Eff (canvas :: Canvas | eff) Unit +bufferData :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` #### `bufferSubData` ``` purescript -bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> BufferDataSource -> Eff (canvas :: Canvas | eff) Unit ``` @@ -178,6 +178,20 @@ compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canva ``` +#### `compressedTexImage2D` + +``` purescript +compressedTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `compressedTexSubImage2D` + +``` purescript +compressedTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + + #### `copyTexImage2D` ``` purescript @@ -195,42 +209,42 @@ copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLi #### `createBuffer` ``` purescript -createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLBuffer +createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLBuffer) ``` #### `createFramebuffer` ``` purescript -createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLFramebuffer +createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLFramebuffer) ``` #### `createProgram` ``` purescript -createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLProgram +createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLProgram) ``` #### `createRenderbuffer` ``` purescript -createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLRenderbuffer +createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLRenderbuffer) ``` #### `createShader` ``` purescript -createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) WebGLShader +createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShader) ``` #### `createTexture` ``` purescript -createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) WebGLTexture +createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLTexture) ``` @@ -398,14 +412,14 @@ generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | #### `getActiveAttrib` ``` purescript -getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) ``` #### `getActiveUniform` ``` purescript -getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) WebGLActiveInfo +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) ``` @@ -423,17 +437,17 @@ getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Ef ``` -#### `getParameter` +#### `getBufferParameter` ``` purescript -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` -#### `getBufferParameter` +#### `getParameter` ``` purescript -getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` @@ -447,77 +461,84 @@ getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum #### `getFramebufferAttachmentParameter` ``` purescript -getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` #### `getProgramParameter` ``` purescript -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) a +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` #### `getProgramInfoLog` ``` purescript -getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) DOMString +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) ``` #### `getRenderbufferParameter` ``` purescript -getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` #### `getShaderParameter` ``` purescript -getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) a +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + + +#### `getShaderPrecisionFormat` + +``` purescript +getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) ``` #### `getShaderInfoLog` ``` purescript -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) ``` #### `getShaderSource` ``` purescript -getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) DOMString +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) ``` #### `getTexParameter` ``` purescript -getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` #### `getUniform` ``` purescript -getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) a +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) (Maybe a) ``` #### `getUniformLocation` ``` purescript -getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) WebGLUniformLocation +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe WebGLUniformLocation) ``` #### `getVertexAttrib` ``` purescript -getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) a +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` @@ -727,7 +748,7 @@ uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff #### `uniform1fv` ``` purescript -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -755,7 +776,7 @@ uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform2fv` ``` purescript -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -783,7 +804,7 @@ uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform3fv` ``` purescript -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -811,7 +832,7 @@ uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform4fv` ``` purescript -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -832,21 +853,21 @@ uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> #### `uniformMatrix2fv` ``` purescript -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix3fv` ``` purescript -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix4fv` ``` purescript -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -874,7 +895,7 @@ vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas : #### `vertexAttrib1fv` ``` purescript -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -888,7 +909,7 @@ vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Ef #### `vertexAttrib2fv` ``` purescript -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -902,7 +923,7 @@ vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GL #### `vertexAttrib3fv` ``` purescript -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -916,7 +937,7 @@ vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GL #### `vertexAttrib4fv` ``` purescript -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> FloatArray -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -1281,13 +1302,6 @@ frontAndBack :: GLenum ``` -#### `texture2d` - -``` purescript -texture2d :: GLenum -``` - - #### `cullFace` ``` purescript @@ -1722,13 +1736,6 @@ sampleCoverageInvert :: GLenum ``` -#### `numCompressedTextureFormats` - -``` purescript -numCompressedTextureFormats :: GLenum -``` - - #### `compressedTextureFormats` ``` purescript @@ -1981,13 +1988,6 @@ activeUniforms :: GLenum ``` -#### `activeUniformMaxLength` - -``` purescript -activeUniformMaxLength :: GLenum -``` - - #### `activeAttributes` ``` purescript @@ -1995,13 +1995,6 @@ activeAttributes :: GLenum ``` -#### `activeAttributeMaxLength` - -``` purescript -activeAttributeMaxLength :: GLenum -``` - - #### `shadingLanguageVersion` ``` purescript @@ -2212,6 +2205,13 @@ textureWrapT :: GLenum ``` +#### `texture2d` + +``` purescript +texture2d :: GLenum +``` + + #### `texture` ``` purescript @@ -2688,24 +2688,24 @@ vertexAttribArrayBufferBinding :: GLenum ``` -#### `compileStatus` +#### `implementationColorReadType` ``` purescript -compileStatus :: GLenum +implementationColorReadType :: GLenum ``` -#### `infoLogLength` +#### `implementationColorReadFormat` ``` purescript -infoLogLength :: GLenum +implementationColorReadFormat :: GLenum ``` -#### `shaderSourceLength` +#### `compileStatus` ``` purescript -shaderSourceLength :: GLenum +compileStatus :: GLenum ``` @@ -3161,24 +3161,10 @@ data ArrayBufferView :: * ``` -#### `HTMLImageElement` - -``` purescript -data HTMLImageElement :: * -``` - - -#### `HTMLVideoElement` +#### `BufferDataSource` ``` purescript -data HTMLVideoElement :: * -``` - - -#### `ImageData` - -``` purescript -data ImageData :: * +data BufferDataSource :: * ``` @@ -3231,6 +3217,13 @@ data WebGLShader :: * ``` +#### `WebGLShaderPrecisionFormat` + +``` purescript +data WebGLShaderPrecisionFormat :: * +``` + + #### `WebGLTexture` ``` purescript @@ -3259,4 +3252,11 @@ type WebGLContextAttributes = { failIfMajorPerformanceCaveat :: Boolean, preferL ``` purescript toMaybe :: forall a. a -> Maybe a +``` + + +#### `nullAsEmpty` + +``` purescript +nullAsEmpty :: forall a. [a] -> [a] ``` \ No newline at end of file diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index df43134..a5efa8c 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -70,4 +70,4 @@ funcArgs f = webglContext : methodArgs f typeIsMaybe :: Type -> Bool typeIsMaybe t@Concrete{} = typeIsMaybe' t && not (typeIsArray t) -typeIsMaybe _ = False +typeIsMaybe _ = True diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 197a6fb..af18891 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -56,7 +56,8 @@ funcsFFI idl = , ppExportList (functions idl) $+$ ") where" ] imports = vcat - [ "import Graphics.Canvas (Canvas ())" + [ "import Data.Maybe (Maybe ())" + , "import Graphics.Canvas (Canvas ())" , "" , "import Control.Monad.Eff" , "import Data.ArrayBuffer.Types" @@ -70,7 +71,7 @@ funcsFFI idl = generatedWarning :: Doc generatedWarning = vcat [ "-- This file is automatically generated! Don't edit this file, but" - , "-- instead modify purescript-webgl-generator." + , "-- instead modify the included IDL parser and PureScript generator." ] typeDefs :: Doc @@ -141,9 +142,9 @@ ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f ppRunFuncBody :: Decl -> Doc ppRunFuncBody f@Function { methodName = name, methodRetType = retType } = text name <+> args <+> "=" <+> - safetyFn retType <+> "runFn" <> int (length $ funcArgs f) <+> - implName f <+> args + implName f <+> args <+> + safetyFn retType where args = ppPsArgs f @@ -174,7 +175,10 @@ ppJsArgs :: (Decl -> [Arg]) -> Decl -> Doc ppJsArgs f = hcat . punctuate ", " . map (text . argName) . f ppPsArgs :: Decl -> Doc -ppPsArgs = hcat . punctuate " " . map (text . argName) . funcArgs +ppPsArgs = hcat . punctuate " " . map argNames . funcArgs + where + argNames = text . filterReserved . argName + ppTypeDecl :: Type -> Doc ppTypeDecl Concrete{ typeName = name } = @@ -190,13 +194,12 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } where toType = wrapArray . text wrapArray t = if isArray then brackets t else t -ppConvertType _ = empty +ppConvertType _ = genericType ppConvertMaybeType :: Type -> Doc -ppConvertMaybeType t@Concrete{} = wrapMaybe $ ppConvertType t +ppConvertMaybeType t = wrapMaybe $ ppConvertType t where wrapMaybe name = if typeIsMaybe t then parens ("Maybe" <+> name) else name -ppConvertMaybeType _ = empty ppExportList :: [Decl] -> Doc ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) @@ -211,16 +214,10 @@ sigForall Function{ methodRetType = ret } = _ -> ":: forall eff." runReturnType :: Decl -> Doc -runReturnType Function{ methodRetType = ret } = - case ret of - t@Concrete{} -> effMonad <+> ppConvertMaybeType t - _ -> effMonad <+> genericType +runReturnType fn = effMonad <+> ppConvertMaybeType (methodRetType fn) implReturnType :: Decl -> Doc -implReturnType Function{ methodRetType = ret } = - case ret of - t@Concrete{} -> effMonad <+> ppConvertType t - _ -> effMonad <+> genericType +implReturnType fn = effMonad <+> ppConvertType (methodRetType fn) -- helpers @@ -254,6 +251,14 @@ toCamelCase = text . foldr go "" safetyFn :: Type -> Doc safetyFn t@Concrete{} - | typeIsMaybe t = "toMaybe $" - | typeIsArray t = "nullAsEmpty $" -safetyFn _ = empty + | typeIsMaybe t = ">>= toMaybe >>> return" + | typeIsArray t = ">>= nullAsEmpty >>> return" + | otherwise = empty +safetyFn t@Generic = ">>= toMaybe >>> return" + +filterReserved :: String -> String +filterReserved s = case s of + "data" -> "data'" + "where" -> "where'" + "type" -> "type'" + ok -> ok diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index c4b99f4..dce0ae8 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -1,5 +1,5 @@ -- This file is automatically generated! Don't edit this file, but --- instead modify purescript-webgl-generator. +-- instead modify the included IDL parser and PureScript generator. module Graphics.WebGL.Raw ( getContextAttributes @@ -140,6 +140,7 @@ module Graphics.WebGL.Raw , viewport ) where +import Data.Maybe (Maybe ()) import Graphics.Canvas (Canvas ()) import Control.Monad.Eff @@ -157,7 +158,7 @@ foreign import getContextAttributesImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) -getContextAttributes webgl = toMaybe $ runFn1 getContextAttributesImpl webgl +getContextAttributes webgl = runFn1 getContextAttributesImpl webgl >>= toMaybe >>> return foreign import isContextLostImpl """ function isContextLostImpl(webgl) { @@ -179,7 +180,7 @@ foreign import getSupportedExtensionsImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] -getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl +getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl >>= nullAsEmpty >>> return foreign import getExtensionImpl """ function getExtensionImpl(webgl, name) { @@ -189,8 +190,8 @@ foreign import getExtensionImpl """ } """ :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) a -getExtension webgl name = runFn2 getExtensionImpl webgl name +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) +getExtension webgl name = runFn2 getExtensionImpl webgl name >>= toMaybe >>> return foreign import activeTextureImpl """ function activeTextureImpl(webgl, texture) { @@ -344,7 +345,7 @@ foreign import bufferSubDataImpl """ """ :: forall eff. Fn4 WebGLContext GLenum GLintptr BufferDataSource (Eff (canvas :: Canvas | eff) Unit) bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> BufferDataSource -> Eff (canvas :: Canvas | eff) Unit -bufferSubData webgl target offset data = runFn4 bufferSubDataImpl webgl target offset data +bufferSubData webgl target offset data' = runFn4 bufferSubDataImpl webgl target offset data' foreign import checkFramebufferStatusImpl """ function checkFramebufferStatusImpl(webgl, target) { @@ -432,7 +433,7 @@ foreign import compressedTexImage2DImpl """ """ :: forall eff. Fn8 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) compressedTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -compressedTexImage2D webgl target level internalformat width height border data = runFn8 compressedTexImage2DImpl webgl target level internalformat width height border data +compressedTexImage2D webgl target level internalformat width height border data' = runFn8 compressedTexImage2DImpl webgl target level internalformat width height border data' foreign import compressedTexSubImage2DImpl """ function compressedTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, data) { @@ -443,7 +444,7 @@ foreign import compressedTexSubImage2DImpl """ """ :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) compressedTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -compressedTexSubImage2D webgl target level xoffset yoffset width height format data = runFn9 compressedTexSubImage2DImpl webgl target level xoffset yoffset width height format data +compressedTexSubImage2D webgl target level xoffset yoffset width height format data' = runFn9 compressedTexSubImage2DImpl webgl target level xoffset yoffset width height format data' foreign import copyTexImage2DImpl """ function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { @@ -476,7 +477,7 @@ foreign import createBufferImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLBuffer) -createBuffer webgl = toMaybe $ runFn1 createBufferImpl webgl +createBuffer webgl = runFn1 createBufferImpl webgl >>= toMaybe >>> return foreign import createFramebufferImpl """ function createFramebufferImpl(webgl) { @@ -487,7 +488,7 @@ foreign import createFramebufferImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLFramebuffer) -createFramebuffer webgl = toMaybe $ runFn1 createFramebufferImpl webgl +createFramebuffer webgl = runFn1 createFramebufferImpl webgl >>= toMaybe >>> return foreign import createProgramImpl """ function createProgramImpl(webgl) { @@ -498,7 +499,7 @@ foreign import createProgramImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLProgram) -createProgram webgl = toMaybe $ runFn1 createProgramImpl webgl +createProgram webgl = runFn1 createProgramImpl webgl >>= toMaybe >>> return foreign import createRenderbufferImpl """ function createRenderbufferImpl(webgl) { @@ -509,7 +510,7 @@ foreign import createRenderbufferImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLRenderbuffer) -createRenderbuffer webgl = toMaybe $ runFn1 createRenderbufferImpl webgl +createRenderbuffer webgl = runFn1 createRenderbufferImpl webgl >>= toMaybe >>> return foreign import createShaderImpl """ function createShaderImpl(webgl, type) { @@ -520,7 +521,7 @@ foreign import createShaderImpl """ """ :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShader) -createShader webgl type = toMaybe $ runFn2 createShaderImpl webgl type +createShader webgl type' = runFn2 createShaderImpl webgl type' >>= toMaybe >>> return foreign import createTextureImpl """ function createTextureImpl(webgl) { @@ -531,7 +532,7 @@ foreign import createTextureImpl """ """ :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLTexture) -createTexture webgl = toMaybe $ runFn1 createTextureImpl webgl +createTexture webgl = runFn1 createTextureImpl webgl >>= toMaybe >>> return foreign import cullFaceImpl """ function cullFaceImpl(webgl, mode) { @@ -696,7 +697,7 @@ foreign import drawElementsImpl """ """ :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit -drawElements webgl mode count type offset = runFn5 drawElementsImpl webgl mode count type offset +drawElements webgl mode count type' offset = runFn5 drawElementsImpl webgl mode count type' offset foreign import enableImpl """ function enableImpl(webgl, cap) { @@ -795,7 +796,7 @@ foreign import getActiveAttribImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) -getActiveAttrib webgl program index = toMaybe $ runFn3 getActiveAttribImpl webgl program index +getActiveAttrib webgl program index = runFn3 getActiveAttribImpl webgl program index >>= toMaybe >>> return foreign import getActiveUniformImpl """ function getActiveUniformImpl(webgl, program, index) { @@ -806,7 +807,7 @@ foreign import getActiveUniformImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) -getActiveUniform webgl program index = toMaybe $ runFn3 getActiveUniformImpl webgl program index +getActiveUniform webgl program index = runFn3 getActiveUniformImpl webgl program index >>= toMaybe >>> return foreign import getAttachedShadersImpl """ function getAttachedShadersImpl(webgl, program) { @@ -817,7 +818,7 @@ foreign import getAttachedShadersImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] -getAttachedShaders webgl program = runFn2 getAttachedShadersImpl webgl program +getAttachedShaders webgl program = runFn2 getAttachedShadersImpl webgl program >>= nullAsEmpty >>> return foreign import getAttribLocationImpl """ function getAttribLocationImpl(webgl, program, name) { @@ -838,8 +839,8 @@ foreign import getBufferParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getBufferParameter webgl target pname = runFn3 getBufferParameterImpl webgl target pname +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getBufferParameter webgl target pname = runFn3 getBufferParameterImpl webgl target pname >>= toMaybe >>> return foreign import getParameterImpl """ function getParameterImpl(webgl, pname) { @@ -849,8 +850,8 @@ foreign import getParameterImpl """ } """ :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) a -getParameter webgl pname = runFn2 getParameterImpl webgl pname +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getParameter webgl pname = runFn2 getParameterImpl webgl pname >>= toMaybe >>> return foreign import getErrorImpl """ function getErrorImpl(webgl) { @@ -871,8 +872,8 @@ foreign import getFramebufferAttachmentParameterImpl """ } """ :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getFramebufferAttachmentParameter webgl target attachment pname = runFn4 getFramebufferAttachmentParameterImpl webgl target attachment pname +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getFramebufferAttachmentParameter webgl target attachment pname = runFn4 getFramebufferAttachmentParameterImpl webgl target attachment pname >>= toMaybe >>> return foreign import getProgramParameterImpl """ function getProgramParameterImpl(webgl, program, pname) { @@ -882,8 +883,8 @@ foreign import getProgramParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) a -getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname >>= toMaybe >>> return foreign import getProgramInfoLogImpl """ function getProgramInfoLogImpl(webgl, program) { @@ -894,7 +895,7 @@ foreign import getProgramInfoLogImpl """ """ :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) DOMString) getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) -getProgramInfoLog webgl program = toMaybe $ runFn2 getProgramInfoLogImpl webgl program +getProgramInfoLog webgl program = runFn2 getProgramInfoLogImpl webgl program >>= toMaybe >>> return foreign import getRenderbufferParameterImpl """ function getRenderbufferParameterImpl(webgl, target, pname) { @@ -904,8 +905,8 @@ foreign import getRenderbufferParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getRenderbufferParameter webgl target pname = runFn3 getRenderbufferParameterImpl webgl target pname +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getRenderbufferParameter webgl target pname = runFn3 getRenderbufferParameterImpl webgl target pname >>= toMaybe >>> return foreign import getShaderParameterImpl """ function getShaderParameterImpl(webgl, shader, pname) { @@ -915,8 +916,8 @@ foreign import getShaderParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) -getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) a -getShaderParameter webgl shader pname = runFn3 getShaderParameterImpl webgl shader pname +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getShaderParameter webgl shader pname = runFn3 getShaderParameterImpl webgl shader pname >>= toMaybe >>> return foreign import getShaderPrecisionFormatImpl """ function getShaderPrecisionFormatImpl(webgl, shadertype, precisiontype) { @@ -927,7 +928,7 @@ foreign import getShaderPrecisionFormatImpl """ """ :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) WebGLShaderPrecisionFormat) getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) -getShaderPrecisionFormat webgl shadertype precisiontype = toMaybe $ runFn3 getShaderPrecisionFormatImpl webgl shadertype precisiontype +getShaderPrecisionFormat webgl shadertype precisiontype = runFn3 getShaderPrecisionFormatImpl webgl shadertype precisiontype >>= toMaybe >>> return foreign import getShaderInfoLogImpl """ function getShaderInfoLogImpl(webgl, shader) { @@ -938,7 +939,7 @@ foreign import getShaderInfoLogImpl """ """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) -getShaderInfoLog webgl shader = toMaybe $ runFn2 getShaderInfoLogImpl webgl shader +getShaderInfoLog webgl shader = runFn2 getShaderInfoLogImpl webgl shader >>= toMaybe >>> return foreign import getShaderSourceImpl """ function getShaderSourceImpl(webgl, shader) { @@ -949,7 +950,7 @@ foreign import getShaderSourceImpl """ """ :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) -getShaderSource webgl shader = toMaybe $ runFn2 getShaderSourceImpl webgl shader +getShaderSource webgl shader = runFn2 getShaderSourceImpl webgl shader >>= toMaybe >>> return foreign import getTexParameterImpl """ function getTexParameterImpl(webgl, target, pname) { @@ -959,8 +960,8 @@ foreign import getTexParameterImpl """ } """ :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) -getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) a -getTexParameter webgl target pname = runFn3 getTexParameterImpl webgl target pname +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getTexParameter webgl target pname = runFn3 getTexParameterImpl webgl target pname >>= toMaybe >>> return foreign import getUniformImpl """ function getUniformImpl(webgl, program, location) { @@ -970,8 +971,8 @@ foreign import getUniformImpl """ } """ :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) -getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) a -getUniform webgl program location = runFn3 getUniformImpl webgl program location +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) (Maybe a) +getUniform webgl program location = runFn3 getUniformImpl webgl program location >>= toMaybe >>> return foreign import getUniformLocationImpl """ function getUniformLocationImpl(webgl, program, name) { @@ -982,7 +983,7 @@ foreign import getUniformLocationImpl """ """ :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) WebGLUniformLocation) getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe WebGLUniformLocation) -getUniformLocation webgl program name = toMaybe $ runFn3 getUniformLocationImpl webgl program name +getUniformLocation webgl program name = runFn3 getUniformLocationImpl webgl program name >>= toMaybe >>> return foreign import getVertexAttribImpl """ function getVertexAttribImpl(webgl, index, pname) { @@ -992,8 +993,8 @@ foreign import getVertexAttribImpl """ } """ :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) -getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) a -getVertexAttrib webgl index pname = runFn3 getVertexAttribImpl webgl index pname +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getVertexAttrib webgl index pname = runFn3 getVertexAttribImpl webgl index pname >>= toMaybe >>> return foreign import getVertexAttribOffsetImpl """ function getVertexAttribOffsetImpl(webgl, index, pname) { @@ -1147,7 +1148,7 @@ foreign import readPixelsImpl """ """ :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -readPixels webgl x y width height format type pixels = runFn8 readPixelsImpl webgl x y width height format type pixels +readPixels webgl x y width height format type' pixels = runFn8 readPixelsImpl webgl x y width height format type' pixels foreign import renderbufferStorageImpl """ function renderbufferStorageImpl(webgl, target, internalformat, width, height) { @@ -1268,7 +1269,7 @@ foreign import texImage2DImpl """ """ :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texImage2D webgl target level internalformat width height border format type pixels = runFn10 texImage2DImpl webgl target level internalformat width height border format type pixels +texImage2D webgl target level internalformat width height border format type' pixels = runFn10 texImage2DImpl webgl target level internalformat width height border format type' pixels foreign import texParameterfImpl """ function texParameterfImpl(webgl, target, pname, param) { @@ -1301,7 +1302,7 @@ foreign import texSubImage2DImpl """ """ :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texSubImage2D webgl target level xoffset yoffset width height format type pixels = runFn10 texSubImage2DImpl webgl target level xoffset yoffset width height format type pixels +texSubImage2D webgl target level xoffset yoffset width height format type' pixels = runFn10 texSubImage2DImpl webgl target level xoffset yoffset width height format type' pixels foreign import uniform1fImpl """ function uniform1fImpl(webgl, location, x) { @@ -1631,7 +1632,7 @@ foreign import vertexAttribPointerImpl """ """ :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit -vertexAttribPointer webgl indx size type normalized stride offset = runFn7 vertexAttribPointerImpl webgl indx size type normalized stride offset +vertexAttribPointer webgl indx size type' normalized stride offset = runFn7 vertexAttribPointerImpl webgl indx size type' normalized stride offset foreign import viewportImpl """ function viewportImpl(webgl, x, y, width, height) { diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 8db6ecb..0f59b98 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -1,5 +1,5 @@ -- This file is automatically generated! Don't edit this file, but --- instead modify purescript-webgl-generator. +-- instead modify the included IDL parser and PureScript generator. module Graphics.WebGL.Raw.Enums where diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 0f3ae1e..67f2ef5 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -1,5 +1,5 @@ -- This file is automatically generated! Don't edit this file, but --- instead modify purescript-webgl-generator. +-- instead modify the included IDL parser and PureScript generator. module Graphics.WebGL.Raw.Types where diff --git a/src/Graphics/WebGL/Raw/Util.purs b/src/Graphics/WebGL/Raw/Util.purs index db3b681..17730c0 100644 --- a/src/Graphics/WebGL/Raw/Util.purs +++ b/src/Graphics/WebGL/Raw/Util.purs @@ -1,22 +1,30 @@ module Graphics.WebGL.Raw.Util ( toMaybe +, nullAsEmpty ) where +import Data.Function (Fn3 (..), runFn3) import Data.Maybe (Maybe (..)) -foreign import toMaybe3 """ - function ensure3(Nothing) { - return function(Just) { - return function(v) { - if (v === undefined || v === null) { - return Nothing; - } else { - return Just(v); - } - }; - }; +foreign import toMaybeImpl """ + function toMaybeImpl(Nothing, Just, x) { + if (x === undefined || x === null) { + return Nothing; + } else { + return Just(x); + } } -""" :: forall a. Maybe a -> (a -> Maybe a) -> a -> Maybe a +""" :: forall a. Fn3 (Maybe a) (a -> Maybe a) a (Maybe a) toMaybe :: forall a. a -> Maybe a -toMaybe = toMaybe3 Nothing Just +toMaybe x = runFn3 toMaybeImpl Nothing Just x + +foreign import nullAsEmpty """ + function nullAsEmpty(x) { + if (x === undefined || x === null) { + return []; + } else { + return x; + } + } +""" :: forall a. [a] -> [a] From 9e0e40218cabd5f553339df45e3de27995f8e2a1 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Thu, 4 Jun 2015 09:16:59 -0500 Subject: [PATCH 38/51] update README with info re: Maybes --- README.md | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a5478cb..a4cde5b 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,28 @@ types. [1]: docs/README.md This library is the thinnest possible PureScript wrapper for JavaScript WebGL -methods, and is generated by parsing the [Khronos IDL][2] for the WebGL -specification. The library should not be altered manually but by modifying the -generator. +methods, providing just enough to wrap possible `null`/`undefined` values in +their respective empty contexts. Returned values are wrapped in the `Eff` +monad, using the `Canvas` effect provided by [`purescript-canvas`][2] for +compatibility with general `HTMLCanvasElement` functions. - [2]: https://www.khronos.org/registry/webgl/specs/1.0.3/ + [2]: https://github.com/purescript-contrib/purescript-canvas + +This library is generated by parsing the [Khronos IDL][2] for the WebGL +specification with the included Haskell parser and pretty-printer. This +library should not be altered manually but instead by modifying the +parser/printer. + + [3]: https://www.khronos.org/registry/webgl/specs/1.0.3/ This library is not intended for production use, but instead to be wrapped by -additional libraries providing type-safety and automatic error checking and -handling. +additional libraries providing type-safety and error checking and handling. +Users should note that a returned `Nothing` value is indicative of a WebGL +failure and handle accordingly. -## Khronos IDL Parser and PureScript Generator +## Khronos IDL Parser and PureScript Printer -To build the parser/generator, ensure you have a recent version of Haskell and +To build the parser/printer, ensure you have a recent version of Haskell and `cabal-install` installed, and then: ```sh @@ -47,6 +56,6 @@ running the default Grunt task. Ensure you have a recent version of Node and ## Credits This package is built upon the amazing amounts of hard work done by [Jurgen -Nicklisch-Franken][3], from whom this was forked. +Nicklisch-Franken][3], from whom the original parser/printer was forked. [3]: https://github.com/jutaro From 3c0f09220e28df0928a0e471ebf2d06573c7cb3e Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Thu, 4 Jun 2015 09:57:44 -0500 Subject: [PATCH 39/51] bump version to 0.3.0 --- bower.json | 2 +- package.json | 2 +- purescript-webgl-raw.cabal | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index 69958ee..efc058f 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "purescript-webgl-raw", "description": "a generated low-level PureScript wrapper of WebGL methods", - "version": "0.2.0", + "version": "0.3.0", "license": "GPL-2", "ignore": [ diff --git a/package.json b/package.json index c84bb53..3ba4466 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "purescript-webgl-raw", "description": "a generated low-level PureScript wrapper of WebGL methods", - "version": "0.2.0", + "version": "0.3.0", "license": "CPL-2", "repository": { diff --git a/purescript-webgl-raw.cabal b/purescript-webgl-raw.cabal index 14e1235..8cf9e90 100644 --- a/purescript-webgl-raw.cabal +++ b/purescript-webgl-raw.cabal @@ -1,5 +1,5 @@ name: purescript-webgl-raw -version: 0.2.0 +version: 0.3.0 cabal-version: >= 1.10 build-type: Simple license: GPL-2 From a4dd0c40ea30cf6616cd565e57d7867d363a457d Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 12 Jun 2015 19:59:37 -0700 Subject: [PATCH 40/51] Export duplicate JavaScript functions with parametric polymorphism --- docs/README.md | 1421 ++++++++++++++++------------- generator/IDL/AST.hs | 58 +- generator/IDL/Cleaner.hs | 90 ++ generator/IDL/Parser.hs | 144 +-- generator/IDL/Printer.hs | 20 +- generator/Main.hs | 9 +- purescript-webgl-raw.cabal | 1 + src/Graphics/WebGL/Raw.purs | 444 ++++++--- src/Graphics/WebGL/Raw/Enums.purs | 1190 ++++++++++++------------ src/Graphics/WebGL/Raw/Types.purs | 1 + 10 files changed, 1881 insertions(+), 1497 deletions(-) create mode 100644 generator/IDL/Cleaner.hs diff --git a/docs/README.md b/docs/README.md index 716cf4e..94fd126 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3,34 +3,6 @@ ## Module Graphics.WebGL.Raw -#### `getContextAttributes` - -``` purescript -getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) -``` - - -#### `isContextLost` - -``` purescript -isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean -``` - - -#### `getSupportedExtensions` - -``` purescript -getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] -``` - - -#### `getExtension` - -``` purescript -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) -``` - - #### `activeTexture` ``` purescript @@ -118,7 +90,14 @@ blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> G #### `bufferData` ``` purescript -bufferData :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit +bufferData :: forall eff. WebGLContext -> GLenum -> BufferDataSource -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `bufferData_` + +``` purescript +bufferData_ :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit ``` @@ -444,10 +423,10 @@ getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (can ``` -#### `getParameter` +#### `getContextAttributes` ``` purescript -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) ``` @@ -458,6 +437,13 @@ getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum ``` +#### `getExtension` + +``` purescript +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + + #### `getFramebufferAttachmentParameter` ``` purescript @@ -465,10 +451,10 @@ getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLe ``` -#### `getProgramParameter` +#### `getParameter` ``` purescript -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) ``` @@ -479,6 +465,13 @@ getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: ``` +#### `getProgramParameter` + +``` purescript +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + + #### `getRenderbufferParameter` ``` purescript @@ -486,6 +479,13 @@ getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Ef ``` +#### `getShaderInfoLog` + +``` purescript +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +``` + + #### `getShaderParameter` ``` purescript @@ -500,17 +500,17 @@ getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff ``` -#### `getShaderInfoLog` +#### `getShaderSource` ``` purescript -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) ``` -#### `getShaderSource` +#### `getSupportedExtensions` ``` purescript -getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] ``` @@ -563,6 +563,13 @@ isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | e ``` +#### `isContextLost` + +``` purescript +isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean +``` + + #### `isEnabled` ``` purescript @@ -713,7 +720,14 @@ stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> G #### `texImage2D` ``` purescript -texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `texImage2D_` + +``` purescript +texImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` @@ -734,7 +748,14 @@ texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (c #### `texSubImage2D` ``` purescript -texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `texSubImage2D_` + +``` purescript +texSubImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit ``` @@ -748,7 +769,14 @@ uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff #### `uniform1fv` ``` purescript -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform1fv_` + +``` purescript +uniform1fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -762,7 +790,14 @@ uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (c #### `uniform1iv` ``` purescript -uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform1iv_` + +``` purescript +uniform1iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -776,7 +811,14 @@ uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform2fv` ``` purescript -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform2fv_` + +``` purescript +uniform2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -790,7 +832,14 @@ uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint #### `uniform2iv` ``` purescript -uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform2iv_` + +``` purescript +uniform2iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -804,7 +853,14 @@ uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform3fv` ``` purescript -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform3fv_` + +``` purescript +uniform3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -818,7 +874,14 @@ uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint #### `uniform3iv` ``` purescript -uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform3iv_` + +``` purescript +uniform3iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -832,7 +895,14 @@ uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfl #### `uniform4fv` ``` purescript -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform4fv_` + +``` purescript +uniform4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -846,28 +916,56 @@ uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint #### `uniform4iv` ``` purescript -uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniform4iv_` + +``` purescript +uniform4iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix2fv` ``` purescript -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniformMatrix2fv_` + +``` purescript +uniformMatrix2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix3fv` ``` purescript -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniformMatrix3fv_` + +``` purescript +uniformMatrix3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` #### `uniformMatrix4fv` ``` purescript -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `uniformMatrix4fv_` + +``` purescript +uniformMatrix4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -895,7 +993,14 @@ vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas : #### `vertexAttrib1fv` ``` purescript -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `vertexAttrib1fv_` + +``` purescript +vertexAttrib1fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -909,7 +1014,14 @@ vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Ef #### `vertexAttrib2fv` ``` purescript -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `vertexAttrib2fv_` + +``` purescript +vertexAttrib2fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -923,7 +1035,14 @@ vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GL #### `vertexAttrib3fv` ``` purescript -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `vertexAttrib3fv_` + +``` purescript +vertexAttrib3fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -937,7 +1056,14 @@ vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GL #### `vertexAttrib4fv` ``` purescript -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +``` + + +#### `vertexAttrib4fv_` + +``` purescript +vertexAttrib4fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit ``` @@ -959,892 +1085,892 @@ viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> ## Module Graphics.WebGL.Raw.Enums -#### `depthBufferBit` +#### `activeAttributes` ``` purescript -depthBufferBit :: GLenum +activeAttributes :: GLenum ``` -#### `stencilBufferBit` +#### `activeTexture` ``` purescript -stencilBufferBit :: GLenum +activeTexture :: GLenum ``` -#### `colorBufferBit` +#### `activeUniforms` ``` purescript -colorBufferBit :: GLenum +activeUniforms :: GLenum ``` -#### `points` +#### `aliasedLineWidthRange` ``` purescript -points :: GLenum +aliasedLineWidthRange :: GLenum ``` -#### `lines` +#### `aliasedPointSizeRange` ``` purescript -lines :: GLenum +aliasedPointSizeRange :: GLenum ``` -#### `lineLoop` +#### `alpha` ``` purescript -lineLoop :: GLenum +alpha :: GLenum ``` -#### `lineStrip` +#### `alphaBits` ``` purescript -lineStrip :: GLenum +alphaBits :: GLenum ``` -#### `triangles` +#### `always` ``` purescript -triangles :: GLenum +always :: GLenum ``` -#### `triangleStrip` +#### `arrayBuffer` ``` purescript -triangleStrip :: GLenum +arrayBuffer :: GLenum ``` -#### `triangleFan` +#### `arrayBufferBinding` ``` purescript -triangleFan :: GLenum +arrayBufferBinding :: GLenum ``` -#### `zero` +#### `attachedShaders` ``` purescript -zero :: GLenum +attachedShaders :: GLenum ``` -#### `one` +#### `back` ``` purescript -one :: GLenum +back :: GLenum ``` -#### `srcColor` +#### `blend` ``` purescript -srcColor :: GLenum +blend :: GLenum ``` -#### `oneMinusSrcColor` +#### `blendColor` ``` purescript -oneMinusSrcColor :: GLenum +blendColor :: GLenum ``` -#### `srcAlpha` +#### `blendDstAlpha` ``` purescript -srcAlpha :: GLenum +blendDstAlpha :: GLenum ``` -#### `oneMinusSrcAlpha` +#### `blendDstRgb` ``` purescript -oneMinusSrcAlpha :: GLenum +blendDstRgb :: GLenum ``` -#### `dstAlpha` +#### `blendEquation` ``` purescript -dstAlpha :: GLenum +blendEquation :: GLenum ``` -#### `oneMinusDstAlpha` +#### `blendEquationAlpha` ``` purescript -oneMinusDstAlpha :: GLenum +blendEquationAlpha :: GLenum ``` -#### `dstColor` +#### `blendEquationRgb` ``` purescript -dstColor :: GLenum +blendEquationRgb :: GLenum ``` -#### `oneMinusDstColor` +#### `blendSrcAlpha` ``` purescript -oneMinusDstColor :: GLenum +blendSrcAlpha :: GLenum ``` -#### `srcAlphaSaturate` +#### `blendSrcRgb` ``` purescript -srcAlphaSaturate :: GLenum +blendSrcRgb :: GLenum ``` -#### `funcAdd` +#### `blueBits` ``` purescript -funcAdd :: GLenum +blueBits :: GLenum ``` -#### `blendEquation` +#### `bool` ``` purescript -blendEquation :: GLenum +bool :: GLenum ``` -#### `blendEquationRgb` +#### `boolVec2` ``` purescript -blendEquationRgb :: GLenum +boolVec2 :: GLenum ``` -#### `blendEquationAlpha` +#### `boolVec3` ``` purescript -blendEquationAlpha :: GLenum +boolVec3 :: GLenum ``` -#### `funcSubtract` +#### `boolVec4` ``` purescript -funcSubtract :: GLenum +boolVec4 :: GLenum ``` -#### `funcReverseSubtract` +#### `browserDefaultWebgl` ``` purescript -funcReverseSubtract :: GLenum +browserDefaultWebgl :: GLenum ``` -#### `blendDstRgb` +#### `bufferSize` ``` purescript -blendDstRgb :: GLenum +bufferSize :: GLenum ``` -#### `blendSrcRgb` +#### `bufferUsage` ``` purescript -blendSrcRgb :: GLenum +bufferUsage :: GLenum ``` -#### `blendDstAlpha` +#### `byte` ``` purescript -blendDstAlpha :: GLenum +byte :: GLenum ``` -#### `blendSrcAlpha` +#### `ccw` ``` purescript -blendSrcAlpha :: GLenum +ccw :: GLenum ``` -#### `constantColor` +#### `clampToEdge` ``` purescript -constantColor :: GLenum +clampToEdge :: GLenum ``` -#### `oneMinusConstantColor` +#### `colorAttachment0` ``` purescript -oneMinusConstantColor :: GLenum +colorAttachment0 :: GLenum ``` -#### `constantAlpha` +#### `colorBufferBit` ``` purescript -constantAlpha :: GLenum +colorBufferBit :: GLenum ``` -#### `oneMinusConstantAlpha` +#### `colorClearValue` ``` purescript -oneMinusConstantAlpha :: GLenum +colorClearValue :: GLenum ``` -#### `blendColor` +#### `colorWritemask` ``` purescript -blendColor :: GLenum +colorWritemask :: GLenum ``` -#### `arrayBuffer` +#### `compileStatus` ``` purescript -arrayBuffer :: GLenum +compileStatus :: GLenum ``` -#### `elementArrayBuffer` +#### `compressedTextureFormats` ``` purescript -elementArrayBuffer :: GLenum +compressedTextureFormats :: GLenum ``` -#### `arrayBufferBinding` +#### `constantAlpha` ``` purescript -arrayBufferBinding :: GLenum +constantAlpha :: GLenum ``` -#### `elementArrayBufferBinding` +#### `constantColor` ``` purescript -elementArrayBufferBinding :: GLenum +constantColor :: GLenum ``` -#### `streamDraw` +#### `contextLostWebgl` ``` purescript -streamDraw :: GLenum +contextLostWebgl :: GLenum ``` -#### `staticDraw` +#### `cullFace` ``` purescript -staticDraw :: GLenum +cullFace :: GLenum ``` -#### `dynamicDraw` +#### `cullFaceMode` ``` purescript -dynamicDraw :: GLenum +cullFaceMode :: GLenum ``` -#### `bufferSize` +#### `currentProgram` ``` purescript -bufferSize :: GLenum +currentProgram :: GLenum ``` -#### `bufferUsage` +#### `currentVertexAttrib` ``` purescript -bufferUsage :: GLenum +currentVertexAttrib :: GLenum ``` -#### `currentVertexAttrib` +#### `cw` ``` purescript -currentVertexAttrib :: GLenum +cw :: GLenum ``` -#### `front` +#### `decr` ``` purescript -front :: GLenum +decr :: GLenum ``` -#### `back` +#### `decrWrap` ``` purescript -back :: GLenum +decrWrap :: GLenum ``` -#### `frontAndBack` +#### `deleteStatus` ``` purescript -frontAndBack :: GLenum +deleteStatus :: GLenum ``` -#### `cullFace` +#### `depthAttachment` ``` purescript -cullFace :: GLenum +depthAttachment :: GLenum ``` -#### `blend` +#### `depthBits` ``` purescript -blend :: GLenum +depthBits :: GLenum ``` -#### `dither` +#### `depthBufferBit` ``` purescript -dither :: GLenum +depthBufferBit :: GLenum ``` -#### `stencilTest` +#### `depthClearValue` ``` purescript -stencilTest :: GLenum +depthClearValue :: GLenum ``` -#### `depthTest` +#### `depthComponent` ``` purescript -depthTest :: GLenum +depthComponent :: GLenum ``` -#### `scissorTest` +#### `depthComponent16` ``` purescript -scissorTest :: GLenum +depthComponent16 :: GLenum ``` -#### `polygonOffsetFill` +#### `depthFunc` ``` purescript -polygonOffsetFill :: GLenum +depthFunc :: GLenum ``` -#### `sampleAlphaToCoverage` +#### `depthRange` ``` purescript -sampleAlphaToCoverage :: GLenum +depthRange :: GLenum ``` -#### `sampleCoverage` +#### `depthStencil` ``` purescript -sampleCoverage :: GLenum +depthStencil :: GLenum ``` -#### `noError` +#### `depthStencilAttachment` ``` purescript -noError :: GLenum +depthStencilAttachment :: GLenum ``` -#### `invalidEnum` +#### `depthTest` ``` purescript -invalidEnum :: GLenum +depthTest :: GLenum ``` -#### `invalidValue` +#### `depthWritemask` ``` purescript -invalidValue :: GLenum +depthWritemask :: GLenum ``` -#### `invalidOperation` +#### `dither` ``` purescript -invalidOperation :: GLenum +dither :: GLenum ``` -#### `outOfMemory` +#### `dontCare` ``` purescript -outOfMemory :: GLenum +dontCare :: GLenum ``` -#### `cw` +#### `dstAlpha` ``` purescript -cw :: GLenum +dstAlpha :: GLenum ``` -#### `ccw` +#### `dstColor` ``` purescript -ccw :: GLenum +dstColor :: GLenum ``` -#### `lineWidth` +#### `dynamicDraw` ``` purescript -lineWidth :: GLenum +dynamicDraw :: GLenum ``` -#### `aliasedPointSizeRange` +#### `elementArrayBuffer` ``` purescript -aliasedPointSizeRange :: GLenum +elementArrayBuffer :: GLenum ``` -#### `aliasedLineWidthRange` +#### `elementArrayBufferBinding` ``` purescript -aliasedLineWidthRange :: GLenum +elementArrayBufferBinding :: GLenum ``` -#### `cullFaceMode` +#### `equal` ``` purescript -cullFaceMode :: GLenum +equal :: GLenum ``` -#### `frontFace` +#### `fastest` ``` purescript -frontFace :: GLenum +fastest :: GLenum ``` -#### `depthRange` +#### `float` ``` purescript -depthRange :: GLenum +float :: GLenum ``` -#### `depthWritemask` +#### `floatMat2` ``` purescript -depthWritemask :: GLenum +floatMat2 :: GLenum ``` -#### `depthClearValue` +#### `floatMat3` ``` purescript -depthClearValue :: GLenum +floatMat3 :: GLenum ``` -#### `depthFunc` +#### `floatMat4` ``` purescript -depthFunc :: GLenum +floatMat4 :: GLenum ``` -#### `stencilClearValue` +#### `floatVec2` ``` purescript -stencilClearValue :: GLenum +floatVec2 :: GLenum ``` -#### `stencilFunc` +#### `floatVec3` ``` purescript -stencilFunc :: GLenum +floatVec3 :: GLenum ``` -#### `stencilFail` +#### `floatVec4` ``` purescript -stencilFail :: GLenum +floatVec4 :: GLenum ``` -#### `stencilPassDepthFail` +#### `fragmentShader` ``` purescript -stencilPassDepthFail :: GLenum +fragmentShader :: GLenum ``` -#### `stencilPassDepthPass` +#### `framebuffer` ``` purescript -stencilPassDepthPass :: GLenum +framebuffer :: GLenum ``` -#### `stencilRef` +#### `framebufferAttachmentObjectName` ``` purescript -stencilRef :: GLenum +framebufferAttachmentObjectName :: GLenum ``` -#### `stencilValueMask` +#### `framebufferAttachmentObjectType` ``` purescript -stencilValueMask :: GLenum +framebufferAttachmentObjectType :: GLenum ``` -#### `stencilWritemask` +#### `framebufferAttachmentTextureCubeMapFace` ``` purescript -stencilWritemask :: GLenum +framebufferAttachmentTextureCubeMapFace :: GLenum ``` -#### `stencilBackFunc` +#### `framebufferAttachmentTextureLevel` ``` purescript -stencilBackFunc :: GLenum +framebufferAttachmentTextureLevel :: GLenum ``` -#### `stencilBackFail` +#### `framebufferBinding` ``` purescript -stencilBackFail :: GLenum +framebufferBinding :: GLenum ``` -#### `stencilBackPassDepthFail` +#### `framebufferComplete` ``` purescript -stencilBackPassDepthFail :: GLenum +framebufferComplete :: GLenum ``` -#### `stencilBackPassDepthPass` +#### `framebufferIncompleteAttachment` ``` purescript -stencilBackPassDepthPass :: GLenum +framebufferIncompleteAttachment :: GLenum ``` -#### `stencilBackRef` +#### `framebufferIncompleteDimensions` ``` purescript -stencilBackRef :: GLenum +framebufferIncompleteDimensions :: GLenum ``` -#### `stencilBackValueMask` +#### `framebufferIncompleteMissingAttachment` ``` purescript -stencilBackValueMask :: GLenum +framebufferIncompleteMissingAttachment :: GLenum ``` -#### `stencilBackWritemask` +#### `framebufferUnsupported` ``` purescript -stencilBackWritemask :: GLenum +framebufferUnsupported :: GLenum ``` -#### `viewport` +#### `front` ``` purescript -viewport :: GLenum +front :: GLenum ``` -#### `scissorBox` +#### `frontAndBack` ``` purescript -scissorBox :: GLenum +frontAndBack :: GLenum ``` -#### `colorClearValue` +#### `frontFace` ``` purescript -colorClearValue :: GLenum +frontFace :: GLenum ``` -#### `colorWritemask` +#### `funcAdd` ``` purescript -colorWritemask :: GLenum +funcAdd :: GLenum ``` -#### `unpackAlignment` +#### `funcReverseSubtract` ``` purescript -unpackAlignment :: GLenum +funcReverseSubtract :: GLenum ``` -#### `packAlignment` +#### `funcSubtract` ``` purescript -packAlignment :: GLenum +funcSubtract :: GLenum ``` -#### `maxTextureSize` +#### `generateMipmapHint` ``` purescript -maxTextureSize :: GLenum +generateMipmapHint :: GLenum ``` -#### `maxViewportDims` +#### `gequal` ``` purescript -maxViewportDims :: GLenum +gequal :: GLenum ``` -#### `subpixelBits` +#### `greater` ``` purescript -subpixelBits :: GLenum +greater :: GLenum ``` -#### `redBits` +#### `greenBits` ``` purescript -redBits :: GLenum +greenBits :: GLenum ``` -#### `greenBits` +#### `highFloat` ``` purescript -greenBits :: GLenum +highFloat :: GLenum ``` -#### `blueBits` +#### `highInt` ``` purescript -blueBits :: GLenum +highInt :: GLenum ``` -#### `alphaBits` +#### `implementationColorReadFormat` ``` purescript -alphaBits :: GLenum +implementationColorReadFormat :: GLenum ``` -#### `depthBits` +#### `implementationColorReadType` ``` purescript -depthBits :: GLenum +implementationColorReadType :: GLenum ``` -#### `stencilBits` +#### `incr` ``` purescript -stencilBits :: GLenum +incr :: GLenum ``` -#### `polygonOffsetUnits` +#### `incrWrap` ``` purescript -polygonOffsetUnits :: GLenum +incrWrap :: GLenum ``` -#### `polygonOffsetFactor` +#### `int` ``` purescript -polygonOffsetFactor :: GLenum +int :: GLenum ``` -#### `textureBinding2d` +#### `intVec2` ``` purescript -textureBinding2d :: GLenum +intVec2 :: GLenum ``` -#### `sampleBuffers` +#### `intVec3` ``` purescript -sampleBuffers :: GLenum +intVec3 :: GLenum ``` -#### `samples` +#### `intVec4` ``` purescript -samples :: GLenum +intVec4 :: GLenum ``` -#### `sampleCoverageValue` +#### `invalidEnum` ``` purescript -sampleCoverageValue :: GLenum +invalidEnum :: GLenum ``` -#### `sampleCoverageInvert` +#### `invalidFramebufferOperation` ``` purescript -sampleCoverageInvert :: GLenum +invalidFramebufferOperation :: GLenum ``` -#### `compressedTextureFormats` +#### `invalidOperation` ``` purescript -compressedTextureFormats :: GLenum +invalidOperation :: GLenum ``` -#### `dontCare` +#### `invalidValue` ``` purescript -dontCare :: GLenum +invalidValue :: GLenum ``` -#### `fastest` +#### `invert` ``` purescript -fastest :: GLenum +invert :: GLenum ``` -#### `nicest` +#### `keep` ``` purescript -nicest :: GLenum +keep :: GLenum ``` -#### `generateMipmapHint` +#### `lequal` ``` purescript -generateMipmapHint :: GLenum +lequal :: GLenum ``` -#### `byte` +#### `less` ``` purescript -byte :: GLenum +less :: GLenum ``` -#### `unsignedByte` +#### `linear` ``` purescript -unsignedByte :: GLenum +linear :: GLenum ``` -#### `short` +#### `linearMipmapLinear` ``` purescript -short :: GLenum +linearMipmapLinear :: GLenum ``` -#### `unsignedShort` +#### `linearMipmapNearest` ``` purescript -unsignedShort :: GLenum +linearMipmapNearest :: GLenum ``` -#### `int` +#### `lines` ``` purescript -int :: GLenum +lines :: GLenum ``` -#### `unsignedInt` +#### `lineLoop` ``` purescript -unsignedInt :: GLenum +lineLoop :: GLenum ``` -#### `float` +#### `lineStrip` ``` purescript -float :: GLenum +lineStrip :: GLenum ``` -#### `depthComponent` +#### `lineWidth` ``` purescript -depthComponent :: GLenum +lineWidth :: GLenum ``` -#### `alpha` +#### `linkStatus` ``` purescript -alpha :: GLenum +linkStatus :: GLenum ``` -#### `rgb` +#### `lowFloat` ``` purescript -rgb :: GLenum +lowFloat :: GLenum ``` -#### `rgba` +#### `lowInt` ``` purescript -rgba :: GLenum +lowInt :: GLenum ``` @@ -1862,1179 +1988,1179 @@ luminanceAlpha :: GLenum ``` -#### `unsignedShort4444` +#### `maxCombinedTextureImageUnits` ``` purescript -unsignedShort4444 :: GLenum +maxCombinedTextureImageUnits :: GLenum ``` -#### `unsignedShort5551` +#### `maxCubeMapTextureSize` ``` purescript -unsignedShort5551 :: GLenum +maxCubeMapTextureSize :: GLenum ``` -#### `unsignedShort565` +#### `maxFragmentUniformVectors` ``` purescript -unsignedShort565 :: GLenum +maxFragmentUniformVectors :: GLenum ``` -#### `fragmentShader` +#### `maxRenderbufferSize` ``` purescript -fragmentShader :: GLenum +maxRenderbufferSize :: GLenum ``` -#### `vertexShader` +#### `maxTextureImageUnits` ``` purescript -vertexShader :: GLenum +maxTextureImageUnits :: GLenum ``` -#### `maxVertexAttribs` +#### `maxTextureSize` ``` purescript -maxVertexAttribs :: GLenum +maxTextureSize :: GLenum ``` -#### `maxVertexUniformVectors` +#### `maxVaryingVectors` ``` purescript -maxVertexUniformVectors :: GLenum +maxVaryingVectors :: GLenum ``` -#### `maxVaryingVectors` +#### `maxVertexAttribs` ``` purescript -maxVaryingVectors :: GLenum +maxVertexAttribs :: GLenum ``` -#### `maxCombinedTextureImageUnits` +#### `maxVertexTextureImageUnits` ``` purescript -maxCombinedTextureImageUnits :: GLenum +maxVertexTextureImageUnits :: GLenum ``` -#### `maxVertexTextureImageUnits` +#### `maxVertexUniformVectors` ``` purescript -maxVertexTextureImageUnits :: GLenum +maxVertexUniformVectors :: GLenum ``` -#### `maxTextureImageUnits` +#### `maxViewportDims` ``` purescript -maxTextureImageUnits :: GLenum +maxViewportDims :: GLenum ``` -#### `maxFragmentUniformVectors` +#### `mediumFloat` ``` purescript -maxFragmentUniformVectors :: GLenum +mediumFloat :: GLenum ``` -#### `shaderType` +#### `mediumInt` ``` purescript -shaderType :: GLenum +mediumInt :: GLenum ``` -#### `deleteStatus` +#### `mirroredRepeat` ``` purescript -deleteStatus :: GLenum +mirroredRepeat :: GLenum ``` -#### `linkStatus` +#### `nearest` ``` purescript -linkStatus :: GLenum +nearest :: GLenum ``` -#### `validateStatus` +#### `nearestMipmapLinear` ``` purescript -validateStatus :: GLenum +nearestMipmapLinear :: GLenum ``` -#### `attachedShaders` +#### `nearestMipmapNearest` ``` purescript -attachedShaders :: GLenum +nearestMipmapNearest :: GLenum ``` -#### `activeUniforms` +#### `never` ``` purescript -activeUniforms :: GLenum +never :: GLenum ``` -#### `activeAttributes` +#### `nicest` ``` purescript -activeAttributes :: GLenum +nicest :: GLenum ``` -#### `shadingLanguageVersion` +#### `none` ``` purescript -shadingLanguageVersion :: GLenum +none :: GLenum ``` -#### `currentProgram` +#### `notequal` ``` purescript -currentProgram :: GLenum +notequal :: GLenum ``` -#### `never` +#### `noError` ``` purescript -never :: GLenum +noError :: GLenum ``` -#### `less` +#### `one` ``` purescript -less :: GLenum +one :: GLenum ``` -#### `equal` +#### `oneMinusConstantAlpha` ``` purescript -equal :: GLenum +oneMinusConstantAlpha :: GLenum ``` -#### `lequal` +#### `oneMinusConstantColor` ``` purescript -lequal :: GLenum +oneMinusConstantColor :: GLenum ``` -#### `greater` +#### `oneMinusDstAlpha` ``` purescript -greater :: GLenum +oneMinusDstAlpha :: GLenum ``` -#### `notequal` +#### `oneMinusDstColor` ``` purescript -notequal :: GLenum +oneMinusDstColor :: GLenum ``` -#### `gequal` +#### `oneMinusSrcAlpha` ``` purescript -gequal :: GLenum +oneMinusSrcAlpha :: GLenum ``` -#### `always` +#### `oneMinusSrcColor` ``` purescript -always :: GLenum +oneMinusSrcColor :: GLenum ``` -#### `keep` +#### `outOfMemory` ``` purescript -keep :: GLenum +outOfMemory :: GLenum ``` -#### `replace` +#### `packAlignment` ``` purescript -replace :: GLenum +packAlignment :: GLenum ``` -#### `incr` +#### `points` ``` purescript -incr :: GLenum +points :: GLenum ``` -#### `decr` +#### `polygonOffsetFactor` ``` purescript -decr :: GLenum +polygonOffsetFactor :: GLenum ``` -#### `invert` +#### `polygonOffsetFill` ``` purescript -invert :: GLenum +polygonOffsetFill :: GLenum ``` -#### `incrWrap` +#### `polygonOffsetUnits` ``` purescript -incrWrap :: GLenum +polygonOffsetUnits :: GLenum ``` -#### `decrWrap` +#### `redBits` ``` purescript -decrWrap :: GLenum +redBits :: GLenum ``` -#### `vendor` +#### `renderbuffer` ``` purescript -vendor :: GLenum +renderbuffer :: GLenum ``` -#### `renderer` +#### `renderbufferAlphaSize` ``` purescript -renderer :: GLenum +renderbufferAlphaSize :: GLenum ``` -#### `version` +#### `renderbufferBinding` ``` purescript -version :: GLenum +renderbufferBinding :: GLenum ``` -#### `nearest` +#### `renderbufferBlueSize` ``` purescript -nearest :: GLenum +renderbufferBlueSize :: GLenum ``` -#### `linear` +#### `renderbufferDepthSize` ``` purescript -linear :: GLenum +renderbufferDepthSize :: GLenum ``` -#### `nearestMipmapNearest` +#### `renderbufferGreenSize` ``` purescript -nearestMipmapNearest :: GLenum +renderbufferGreenSize :: GLenum ``` -#### `linearMipmapNearest` +#### `renderbufferHeight` ``` purescript -linearMipmapNearest :: GLenum +renderbufferHeight :: GLenum ``` -#### `nearestMipmapLinear` +#### `renderbufferInternalFormat` ``` purescript -nearestMipmapLinear :: GLenum +renderbufferInternalFormat :: GLenum ``` -#### `linearMipmapLinear` +#### `renderbufferRedSize` ``` purescript -linearMipmapLinear :: GLenum +renderbufferRedSize :: GLenum ``` -#### `textureMagFilter` +#### `renderbufferStencilSize` ``` purescript -textureMagFilter :: GLenum +renderbufferStencilSize :: GLenum ``` -#### `textureMinFilter` +#### `renderbufferWidth` ``` purescript -textureMinFilter :: GLenum +renderbufferWidth :: GLenum ``` -#### `textureWrapS` +#### `renderer` ``` purescript -textureWrapS :: GLenum +renderer :: GLenum ``` -#### `textureWrapT` +#### `repeat` ``` purescript -textureWrapT :: GLenum +repeat :: GLenum ``` -#### `texture2d` +#### `replace` ``` purescript -texture2d :: GLenum +replace :: GLenum ``` -#### `texture` +#### `rgb` ``` purescript -texture :: GLenum +rgb :: GLenum ``` -#### `textureCubeMap` +#### `rgb565` ``` purescript -textureCubeMap :: GLenum +rgb565 :: GLenum ``` -#### `textureBindingCubeMap` +#### `rgb5A1` ``` purescript -textureBindingCubeMap :: GLenum +rgb5A1 :: GLenum ``` -#### `textureCubeMapPositiveX` +#### `rgba` ``` purescript -textureCubeMapPositiveX :: GLenum +rgba :: GLenum ``` -#### `textureCubeMapNegativeX` +#### `rgba4` ``` purescript -textureCubeMapNegativeX :: GLenum +rgba4 :: GLenum ``` -#### `textureCubeMapPositiveY` +#### `sampler2d` ``` purescript -textureCubeMapPositiveY :: GLenum +sampler2d :: GLenum ``` -#### `textureCubeMapNegativeY` +#### `samplerCube` ``` purescript -textureCubeMapNegativeY :: GLenum +samplerCube :: GLenum ``` -#### `textureCubeMapPositiveZ` +#### `samples` ``` purescript -textureCubeMapPositiveZ :: GLenum +samples :: GLenum ``` -#### `textureCubeMapNegativeZ` +#### `sampleAlphaToCoverage` ``` purescript -textureCubeMapNegativeZ :: GLenum +sampleAlphaToCoverage :: GLenum ``` -#### `maxCubeMapTextureSize` +#### `sampleBuffers` ``` purescript -maxCubeMapTextureSize :: GLenum +sampleBuffers :: GLenum ``` -#### `texture0` +#### `sampleCoverage` ``` purescript -texture0 :: GLenum +sampleCoverage :: GLenum ``` -#### `texture1` +#### `sampleCoverageInvert` ``` purescript -texture1 :: GLenum +sampleCoverageInvert :: GLenum ``` -#### `texture2` +#### `sampleCoverageValue` ``` purescript -texture2 :: GLenum +sampleCoverageValue :: GLenum ``` -#### `texture3` +#### `scissorBox` ``` purescript -texture3 :: GLenum +scissorBox :: GLenum ``` -#### `texture4` +#### `scissorTest` ``` purescript -texture4 :: GLenum +scissorTest :: GLenum ``` -#### `texture5` +#### `shaderType` ``` purescript -texture5 :: GLenum +shaderType :: GLenum ``` -#### `texture6` +#### `shadingLanguageVersion` ``` purescript -texture6 :: GLenum +shadingLanguageVersion :: GLenum ``` -#### `texture7` +#### `short` ``` purescript -texture7 :: GLenum +short :: GLenum ``` -#### `texture8` +#### `srcAlpha` ``` purescript -texture8 :: GLenum +srcAlpha :: GLenum ``` -#### `texture9` +#### `srcAlphaSaturate` ``` purescript -texture9 :: GLenum +srcAlphaSaturate :: GLenum ``` -#### `texture10` +#### `srcColor` ``` purescript -texture10 :: GLenum +srcColor :: GLenum ``` -#### `texture11` +#### `staticDraw` ``` purescript -texture11 :: GLenum +staticDraw :: GLenum ``` -#### `texture12` +#### `stencilAttachment` ``` purescript -texture12 :: GLenum +stencilAttachment :: GLenum ``` -#### `texture13` +#### `stencilBackFail` ``` purescript -texture13 :: GLenum +stencilBackFail :: GLenum ``` -#### `texture14` +#### `stencilBackFunc` ``` purescript -texture14 :: GLenum +stencilBackFunc :: GLenum ``` -#### `texture15` +#### `stencilBackPassDepthFail` ``` purescript -texture15 :: GLenum +stencilBackPassDepthFail :: GLenum ``` -#### `texture16` +#### `stencilBackPassDepthPass` ``` purescript -texture16 :: GLenum +stencilBackPassDepthPass :: GLenum ``` -#### `texture17` +#### `stencilBackRef` ``` purescript -texture17 :: GLenum +stencilBackRef :: GLenum ``` -#### `texture18` +#### `stencilBackValueMask` ``` purescript -texture18 :: GLenum +stencilBackValueMask :: GLenum ``` -#### `texture19` +#### `stencilBackWritemask` ``` purescript -texture19 :: GLenum +stencilBackWritemask :: GLenum ``` -#### `texture20` +#### `stencilBits` ``` purescript -texture20 :: GLenum +stencilBits :: GLenum ``` -#### `texture21` +#### `stencilBufferBit` ``` purescript -texture21 :: GLenum +stencilBufferBit :: GLenum ``` -#### `texture22` +#### `stencilClearValue` ``` purescript -texture22 :: GLenum +stencilClearValue :: GLenum ``` -#### `texture23` +#### `stencilFail` ``` purescript -texture23 :: GLenum +stencilFail :: GLenum ``` -#### `texture24` +#### `stencilFunc` ``` purescript -texture24 :: GLenum +stencilFunc :: GLenum ``` -#### `texture25` +#### `stencilIndex` ``` purescript -texture25 :: GLenum +stencilIndex :: GLenum ``` -#### `texture26` +#### `stencilIndex8` ``` purescript -texture26 :: GLenum +stencilIndex8 :: GLenum ``` -#### `texture27` +#### `stencilPassDepthFail` ``` purescript -texture27 :: GLenum +stencilPassDepthFail :: GLenum ``` -#### `texture28` +#### `stencilPassDepthPass` ``` purescript -texture28 :: GLenum +stencilPassDepthPass :: GLenum ``` -#### `texture29` +#### `stencilRef` ``` purescript -texture29 :: GLenum +stencilRef :: GLenum ``` -#### `texture30` +#### `stencilTest` ``` purescript -texture30 :: GLenum +stencilTest :: GLenum ``` -#### `texture31` +#### `stencilValueMask` ``` purescript -texture31 :: GLenum +stencilValueMask :: GLenum ``` -#### `activeTexture` +#### `stencilWritemask` ``` purescript -activeTexture :: GLenum +stencilWritemask :: GLenum ``` -#### `repeat` +#### `streamDraw` ``` purescript -repeat :: GLenum +streamDraw :: GLenum ``` -#### `clampToEdge` +#### `subpixelBits` ``` purescript -clampToEdge :: GLenum +subpixelBits :: GLenum ``` -#### `mirroredRepeat` +#### `texture` ``` purescript -mirroredRepeat :: GLenum +texture :: GLenum ``` -#### `floatVec2` +#### `texture0` ``` purescript -floatVec2 :: GLenum +texture0 :: GLenum ``` -#### `floatVec3` +#### `texture1` ``` purescript -floatVec3 :: GLenum +texture1 :: GLenum ``` -#### `floatVec4` +#### `texture10` ``` purescript -floatVec4 :: GLenum +texture10 :: GLenum ``` -#### `intVec2` +#### `texture11` ``` purescript -intVec2 :: GLenum +texture11 :: GLenum ``` -#### `intVec3` +#### `texture12` ``` purescript -intVec3 :: GLenum +texture12 :: GLenum ``` -#### `intVec4` +#### `texture13` ``` purescript -intVec4 :: GLenum +texture13 :: GLenum ``` -#### `bool` +#### `texture14` ``` purescript -bool :: GLenum +texture14 :: GLenum ``` -#### `boolVec2` +#### `texture15` ``` purescript -boolVec2 :: GLenum +texture15 :: GLenum ``` -#### `boolVec3` +#### `texture16` ``` purescript -boolVec3 :: GLenum +texture16 :: GLenum ``` -#### `boolVec4` +#### `texture17` ``` purescript -boolVec4 :: GLenum +texture17 :: GLenum ``` -#### `floatMat2` +#### `texture18` ``` purescript -floatMat2 :: GLenum +texture18 :: GLenum ``` -#### `floatMat3` +#### `texture19` ``` purescript -floatMat3 :: GLenum +texture19 :: GLenum ``` -#### `floatMat4` +#### `texture2` ``` purescript -floatMat4 :: GLenum +texture2 :: GLenum ``` -#### `sampler2d` +#### `texture20` ``` purescript -sampler2d :: GLenum +texture20 :: GLenum ``` -#### `samplerCube` +#### `texture21` ``` purescript -samplerCube :: GLenum +texture21 :: GLenum ``` -#### `vertexAttribArrayEnabled` +#### `texture22` ``` purescript -vertexAttribArrayEnabled :: GLenum +texture22 :: GLenum ``` -#### `vertexAttribArraySize` +#### `texture23` ``` purescript -vertexAttribArraySize :: GLenum +texture23 :: GLenum ``` -#### `vertexAttribArrayStride` +#### `texture24` ``` purescript -vertexAttribArrayStride :: GLenum +texture24 :: GLenum ``` -#### `vertexAttribArrayType` +#### `texture25` ``` purescript -vertexAttribArrayType :: GLenum +texture25 :: GLenum ``` -#### `vertexAttribArrayNormalized` +#### `texture26` ``` purescript -vertexAttribArrayNormalized :: GLenum +texture26 :: GLenum ``` -#### `vertexAttribArrayPointer` +#### `texture27` ``` purescript -vertexAttribArrayPointer :: GLenum +texture27 :: GLenum ``` -#### `vertexAttribArrayBufferBinding` +#### `texture28` ``` purescript -vertexAttribArrayBufferBinding :: GLenum +texture28 :: GLenum ``` -#### `implementationColorReadType` +#### `texture29` ``` purescript -implementationColorReadType :: GLenum +texture29 :: GLenum ``` -#### `implementationColorReadFormat` +#### `texture3` ``` purescript -implementationColorReadFormat :: GLenum +texture3 :: GLenum ``` -#### `compileStatus` +#### `texture30` ``` purescript -compileStatus :: GLenum +texture30 :: GLenum ``` -#### `lowFloat` +#### `texture31` ``` purescript -lowFloat :: GLenum +texture31 :: GLenum ``` -#### `mediumFloat` +#### `texture4` ``` purescript -mediumFloat :: GLenum +texture4 :: GLenum ``` -#### `highFloat` +#### `texture5` ``` purescript -highFloat :: GLenum +texture5 :: GLenum ``` -#### `lowInt` +#### `texture6` ``` purescript -lowInt :: GLenum +texture6 :: GLenum ``` -#### `mediumInt` +#### `texture7` ``` purescript -mediumInt :: GLenum +texture7 :: GLenum ``` -#### `highInt` +#### `texture8` ``` purescript -highInt :: GLenum +texture8 :: GLenum ``` -#### `framebuffer` +#### `texture9` ``` purescript -framebuffer :: GLenum +texture9 :: GLenum ``` -#### `renderbuffer` +#### `texture2d` ``` purescript -renderbuffer :: GLenum +texture2d :: GLenum ``` -#### `rgba4` +#### `textureBinding2d` ``` purescript -rgba4 :: GLenum +textureBinding2d :: GLenum ``` -#### `rgb5A1` +#### `textureBindingCubeMap` ``` purescript -rgb5A1 :: GLenum +textureBindingCubeMap :: GLenum ``` -#### `rgb565` +#### `textureCubeMap` ``` purescript -rgb565 :: GLenum +textureCubeMap :: GLenum ``` -#### `depthComponent16` +#### `textureCubeMapNegativeX` ``` purescript -depthComponent16 :: GLenum +textureCubeMapNegativeX :: GLenum ``` -#### `stencilIndex` +#### `textureCubeMapNegativeY` ``` purescript -stencilIndex :: GLenum +textureCubeMapNegativeY :: GLenum ``` -#### `stencilIndex8` +#### `textureCubeMapNegativeZ` ``` purescript -stencilIndex8 :: GLenum +textureCubeMapNegativeZ :: GLenum ``` -#### `depthStencil` +#### `textureCubeMapPositiveX` ``` purescript -depthStencil :: GLenum +textureCubeMapPositiveX :: GLenum ``` -#### `renderbufferWidth` +#### `textureCubeMapPositiveY` ``` purescript -renderbufferWidth :: GLenum +textureCubeMapPositiveY :: GLenum ``` -#### `renderbufferHeight` +#### `textureCubeMapPositiveZ` ``` purescript -renderbufferHeight :: GLenum +textureCubeMapPositiveZ :: GLenum ``` -#### `renderbufferInternalFormat` +#### `textureMagFilter` ``` purescript -renderbufferInternalFormat :: GLenum +textureMagFilter :: GLenum ``` -#### `renderbufferRedSize` +#### `textureMinFilter` ``` purescript -renderbufferRedSize :: GLenum +textureMinFilter :: GLenum ``` -#### `renderbufferGreenSize` +#### `textureWrapS` ``` purescript -renderbufferGreenSize :: GLenum +textureWrapS :: GLenum ``` -#### `renderbufferBlueSize` +#### `textureWrapT` ``` purescript -renderbufferBlueSize :: GLenum +textureWrapT :: GLenum ``` -#### `renderbufferAlphaSize` +#### `triangles` ``` purescript -renderbufferAlphaSize :: GLenum +triangles :: GLenum ``` -#### `renderbufferDepthSize` +#### `triangleFan` ``` purescript -renderbufferDepthSize :: GLenum +triangleFan :: GLenum ``` -#### `renderbufferStencilSize` +#### `triangleStrip` ``` purescript -renderbufferStencilSize :: GLenum +triangleStrip :: GLenum ``` -#### `framebufferAttachmentObjectType` +#### `unpackAlignment` ``` purescript -framebufferAttachmentObjectType :: GLenum +unpackAlignment :: GLenum ``` -#### `framebufferAttachmentObjectName` +#### `unpackColorspaceConversionWebgl` ``` purescript -framebufferAttachmentObjectName :: GLenum +unpackColorspaceConversionWebgl :: GLenum ``` -#### `framebufferAttachmentTextureLevel` +#### `unpackFlipYWebgl` ``` purescript -framebufferAttachmentTextureLevel :: GLenum +unpackFlipYWebgl :: GLenum ``` -#### `framebufferAttachmentTextureCubeMapFace` +#### `unpackPremultiplyAlphaWebgl` ``` purescript -framebufferAttachmentTextureCubeMapFace :: GLenum +unpackPremultiplyAlphaWebgl :: GLenum ``` -#### `colorAttachment0` +#### `unsignedByte` ``` purescript -colorAttachment0 :: GLenum +unsignedByte :: GLenum ``` -#### `depthAttachment` +#### `unsignedInt` ``` purescript -depthAttachment :: GLenum +unsignedInt :: GLenum ``` -#### `stencilAttachment` +#### `unsignedShort` ``` purescript -stencilAttachment :: GLenum +unsignedShort :: GLenum ``` -#### `depthStencilAttachment` +#### `unsignedShort4444` ``` purescript -depthStencilAttachment :: GLenum +unsignedShort4444 :: GLenum ``` -#### `none` +#### `unsignedShort5551` ``` purescript -none :: GLenum +unsignedShort5551 :: GLenum ``` -#### `framebufferComplete` +#### `unsignedShort565` ``` purescript -framebufferComplete :: GLenum +unsignedShort565 :: GLenum ``` -#### `framebufferIncompleteAttachment` +#### `validateStatus` ``` purescript -framebufferIncompleteAttachment :: GLenum +validateStatus :: GLenum ``` -#### `framebufferIncompleteMissingAttachment` +#### `vendor` ``` purescript -framebufferIncompleteMissingAttachment :: GLenum +vendor :: GLenum ``` -#### `framebufferIncompleteDimensions` +#### `version` ``` purescript -framebufferIncompleteDimensions :: GLenum +version :: GLenum ``` -#### `framebufferUnsupported` +#### `vertexAttribArrayBufferBinding` ``` purescript -framebufferUnsupported :: GLenum +vertexAttribArrayBufferBinding :: GLenum ``` -#### `framebufferBinding` +#### `vertexAttribArrayEnabled` ``` purescript -framebufferBinding :: GLenum +vertexAttribArrayEnabled :: GLenum ``` -#### `renderbufferBinding` +#### `vertexAttribArrayNormalized` ``` purescript -renderbufferBinding :: GLenum +vertexAttribArrayNormalized :: GLenum ``` -#### `maxRenderbufferSize` +#### `vertexAttribArrayPointer` ``` purescript -maxRenderbufferSize :: GLenum +vertexAttribArrayPointer :: GLenum ``` -#### `invalidFramebufferOperation` +#### `vertexAttribArraySize` ``` purescript -invalidFramebufferOperation :: GLenum +vertexAttribArraySize :: GLenum ``` -#### `unpackFlipYWebgl` +#### `vertexAttribArrayStride` ``` purescript -unpackFlipYWebgl :: GLenum +vertexAttribArrayStride :: GLenum ``` -#### `unpackPremultiplyAlphaWebgl` +#### `vertexAttribArrayType` ``` purescript -unpackPremultiplyAlphaWebgl :: GLenum +vertexAttribArrayType :: GLenum ``` -#### `contextLostWebgl` +#### `vertexShader` ``` purescript -contextLostWebgl :: GLenum +vertexShader :: GLenum ``` -#### `unpackColorspaceConversionWebgl` +#### `viewport` ``` purescript -unpackColorspaceConversionWebgl :: GLenum +viewport :: GLenum ``` -#### `browserDefaultWebgl` +#### `zero` ``` purescript -browserDefaultWebgl :: GLenum +zero :: GLenum ``` @@ -3168,6 +3294,13 @@ data BufferDataSource :: * ``` +#### `TexImageSource` + +``` purescript +data TexImageSource :: * +``` + + #### `WebGLActiveInfo` ``` purescript diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index a5efa8c..25c3478 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -1,11 +1,25 @@ module IDL.AST where -data IDL = IDL - { enums :: [Decl] - , comments :: [Decl] - , functions :: [Decl] - , attributes :: [Decl] - , types :: [Type] +import qualified Data.Map as Map + +data Type + = Generic + | Concrete + { typeName :: String + , typeIsArray :: Bool + , typeIsMaybe' :: Bool + } + deriving Show + +instance Eq Type where + x == y = typeName x == typeName y + +instance Ord Type where + compare x y = compare (typeName x) (typeName y) + +data Arg = Arg + { argType :: Type + , argName :: String } deriving Show @@ -19,6 +33,7 @@ data Decl } | Function { methodName :: String + , actualName :: String , methodRetType :: Type , methodArgs :: [Arg] , methodRaises :: Maybe String @@ -31,36 +46,15 @@ data Decl | Typedef deriving Show -instance Eq Decl where - x@Enum{} == y@Enum{} = enumName x == enumName y - x@Comment{} == y@Comment{} = comment x == comment y - x@Function{} == y@Function{} = methodName x == methodName y - x@Attribute{} == y@Attribute{} = attrName x == attrName y - _ == _ = False - -data Type - = Generic - | Concrete - { typeName :: String - , typeIsArray :: Bool - , typeIsMaybe' :: Bool - } - deriving Show - -instance Eq Type where - x == y = typeName x == typeName y - -instance Ord Type where - compare x y = compare (typeName x) (typeName y) - -data Arg = Arg - { argType :: Type - , argName :: String +data IDL = IDL + { enums :: Map.Map String Decl + , functions :: Map.Map String Decl + , types :: Map.Map String Type } deriving Show emptyIdl :: IDL -emptyIdl = IDL [] [] [] [] [] +emptyIdl = IDL Map.empty Map.empty Map.empty webglContext :: Arg webglContext = Arg (Concrete "WebGLContext" False False) "webgl" diff --git a/generator/IDL/Cleaner.hs b/generator/IDL/Cleaner.hs new file mode 100644 index 0000000..75213b7 --- /dev/null +++ b/generator/IDL/Cleaner.hs @@ -0,0 +1,90 @@ +module IDL.Cleaner +( declsToIdl +, getEnums +, getFuncs +, getTypes +) where + +import Data.List (foldl') + +import qualified Data.Map as Map + +import IDL.AST + +-- constants + +excludedTypes :: [String] +excludedTypes = + [ "ArrayBuffer" + , "DOMString" + , "Float32Array" + , "FloatArray" + , "GLbitfield" + , "GLboolean" + , "GLbyte" + , "GLclampf" + , "GLenum" + , "GLfloat" + , "GLint" + , "GLintptr" + , "GLshort" + , "GLsizei" + , "GLsizeiptr" + , "GLubyte" + , "GLuint" + , "GLushort" + , "HTMLCanvasElement" + , "Int32Array" + , "WebGLContextAttributes" + , "any" + , "boolean" + , "long" + , "object" + , "sequence" + , "void" + ] + +-- public functions + +declsToIdl :: [Decl] -> IDL +declsToIdl = cleanup . foldr partition emptyIdl + +getTypes :: IDL -> [Type] +getTypes = map snd . Map.toList . types + +getEnums :: IDL -> [Decl] +getEnums = map snd . Map.toList . enums + +getFuncs :: IDL -> [Decl] +getFuncs = map snd . Map.toList . functions + +-- private functions + +partition :: Decl -> IDL -> IDL +partition e@Enum{} idl = idl + { enums = Map.insert (enumName e) e (enums idl) + } +partition f@Function{} idl = idl + { functions = underscore f $ functions idl + , types = insertFuncTypes f $ types idl + } +partition _ idl = idl + +underscore :: Decl -> Map.Map String Decl -> Map.Map String Decl +underscore f fs + | Map.member name fs = underscore (f { methodName = name ++ "_" }) fs + | otherwise = Map.insert name f fs + where + name = methodName f + +insertFuncTypes :: Decl -> Map.Map String Type -> Map.Map String Type +insertFuncTypes f types = foldl' insert types ftypes + where + ftypes = methodRetType f : map argType (funcArgs f) + insert ts Generic = ts + insert ts t = Map.insert (typeName t) t ts + +cleanup :: IDL -> IDL +cleanup idl = idl { types = removeExcluded $ types idl } + where + removeExcluded types = foldl' (flip Map.delete) types excludedTypes diff --git a/generator/IDL/Parser.hs b/generator/IDL/Parser.hs index d82429b..851a832 100644 --- a/generator/IDL/Parser.hs +++ b/generator/IDL/Parser.hs @@ -1,103 +1,48 @@ -module IDL.Parser (parseIdl) where +module IDL.Parser (parseDecls) where import Control.Monad (liftM) import Data.Functor.Identity (Identity(..)) -import Data.List (nub) -import qualified Text.Parsec.Token as PP -import qualified Text.Parsec as PP -import qualified Text.Parsec.Error as PP -import qualified Text.ParserCombinators.Parsec.Language as PP -import qualified Text.ParserCombinators.Parsec as PP (Parser) +import qualified Text.Parsec.Token as Par +import qualified Text.Parsec as Par +import qualified Text.Parsec.Error as Par +import qualified Text.ParserCombinators.Parsec.Language as Par +import qualified Text.ParserCombinators.Parsec as Par (Parser) import IDL.AST -type Parse a = PP.Parsec String () a - -symbol' = PP.symbol lexer -whiteSpace' = PP.whiteSpace lexer -identifier' = PP.identifier lexer -integer' = PP.integer lexer -semi' = PP.semi lexer -parens' = PP.parens lexer -brackets' = PP.brackets lexer -angles' = PP.angles lexer - -excludedTypes :: [String] -excludedTypes = - [ "ArrayBuffer" - , "DOMString" - , "Float32Array" - , "FloatArray" - , "GLbitfield" - , "GLboolean" - , "GLbyte" - , "GLclampf" - , "GLenum" - , "GLfloat" - , "GLint" - , "GLintptr" - , "GLshort" - , "GLsizei" - , "GLsizeiptr" - , "GLubyte" - , "GLuint" - , "GLushort" - , "HTMLCanvasElement" - , "Int32Array" - , "WebGLContextAttributes" - , "any" - , "boolean" - , "object" - , "sequence" - , "void" - ] - -lexer :: PP.GenTokenParser String u Identity -lexer = PP.makeTokenParser PP.emptyDef - -parseIdl :: Parse IDL -parseIdl = parseDecls >>= return . cleanup . foldr partition emptyIdl . nub - --- helpers - -partition :: Decl -> IDL -> IDL -partition e@Enum{} idl = idl - { enums = e : enums idl - } -partition c@Comment{} idl = idl - { comments = c : comments idl - } -partition f@Function{} idl = idl - { functions = f : functions idl - , types = methodRetType f : map argType (funcArgs f) ++ types idl - } -partition a@Attribute{} idl = idl - { attributes = a : attributes idl - , types = attrType a : types idl - } -partition _ idl = idl - -cleanup :: IDL -> IDL -cleanup idl = idl { types = nub . filter onlyAllowedTypes $ types idl } - where - onlyAllowedTypes Concrete{ typeName = t } = t `notElem` excludedTypes - onlyAllowedTypes _ = False +type Parse a = Par.Parsec String () a + +-- constants + +symbol' = Par.symbol lexer +whiteSpace' = Par.whiteSpace lexer +identifier' = Par.identifier lexer +integer' = Par.integer lexer +semi' = Par.semi lexer +parens' = Par.parens lexer +brackets' = Par.brackets lexer +angles' = Par.angles lexer --- parsers +lexer :: Par.GenTokenParser String u Identity +lexer = Par.makeTokenParser Par.emptyDef + +-- public functions parseDecls :: Parse [Decl] parseDecls = - PP.manyTill (whiteSpace' >> parseDecl) PP.eof PP. "expecting idl" + Par.manyTill (whiteSpace' >> parseDecl) Par.eof Par. "expecting idl" + +-- private functions parseDecl :: Parse Decl -parseDecl = decl PP. "expecting decl" +parseDecl = decl Par. "expecting decl" where - decl = PP.try parseConst PP.<|> - PP.try parseComment PP.<|> - PP.try parseMethod PP.<|> - PP.try parseAttr PP.<|> - PP.try parseTypedef + decl = Par.try parseConst Par.<|> + Par.try parseComment Par.<|> + Par.try parseMethod Par.<|> + Par.try parseAttr Par.<|> + Par.try parseTypedef parseConst :: Parse Decl parseConst = do @@ -113,28 +58,29 @@ parseConst = do } parseComment :: Parse Decl -parseComment = inlineComment PP.<|> blockComment +parseComment = inlineComment Par.<|> blockComment where - inlineComment = PP.try $ do + inlineComment = Par.try $ do symbol' "//" - comment <- PP.manyTill PP.anyChar PP.newline - PP.optional whiteSpace' + comment <- Par.manyTill Par.anyChar Par.newline + Par.optional whiteSpace' return Comment { comment = comment } blockComment = do symbol' "/*" - comment <- PP.manyTill PP.anyChar $ symbol' "*/" + comment <- Par.manyTill Par.anyChar $ symbol' "*/" return Comment { comment = comment } parseMethod :: Parse Decl parseMethod = do - PP.optional $ symbol' "[WebGLHandlesContextLoss]" + Par.optional $ symbol' "[WebGLHandlesContextLoss]" returnType <- parseType methodName <- identifier' - args <- parens' . PP.sepBy parseArg $ symbol' "," - condRaises <- PP.option Nothing parseRaises + args <- parens' . Par.sepBy parseArg $ symbol' "," + condRaises <- Par.option Nothing parseRaises semi' return Function { methodName = methodName + , actualName = methodName , methodRetType = returnType , methodArgs = args , methodRaises = condRaises @@ -142,7 +88,7 @@ parseMethod = do parseAttr :: Parse Decl parseAttr = do - isReadonly <- PP.option False $ symbol' "readonly" >> return True + isReadonly <- Par.option False $ symbol' "readonly" >> return True symbol' "attribute" typ <- parseType name <- identifier' @@ -156,12 +102,12 @@ parseAttr = do parseTypedef :: Parse Decl parseTypedef = do symbol' "typedef" - PP.manyTill PP.anyChar semi' + Par.manyTill Par.anyChar semi' return Typedef parseType :: Parse Type -parseType = typ PP. "expecting type" +parseType = typ Par. "expecting type" where arrayName = do symbol' "sequence" @@ -171,8 +117,8 @@ parseType = typ PP. "expecting type" name <- identifier' return (name, False) typ = do - (name, isArray) <- PP.try arrayName PP.<|> singleName - isMaybe <- PP.option False $ symbol' "?" >> return True + (name, isArray) <- Par.try arrayName Par.<|> singleName + isMaybe <- Par.option False $ symbol' "?" >> return True return $ if name `elem` ["any", "object"] then Generic diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index af18891..dae6513 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -7,8 +7,8 @@ module IDL.Printer ) where import Data.Char (toLower, toUpper) -import Data.List (sort) import Data.Maybe (isNothing) +import IDL.Cleaner (getEnums, getFuncs, getTypes) import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, hcat, int, integer, nest, parens, punctuate, text, vcat) @@ -22,7 +22,7 @@ typesFFI idl = typeDecls $+$ blank $+$ contextAttrs $+$ blank where - typeDecls = vcat . map ppTypeDecl . sort $ types idl + typeDecls = vcat . map ppTypeDecl $ getTypes idl header = vcat [ "module Graphics.WebGL.Raw.Types where" , "" @@ -35,7 +35,7 @@ enumsFFI idl = header $+$ blank $+$ constants $+$ blank where - constants = vcat . map ppConstant $ enums idl + constants = vcat . map ppConstant $ getEnums idl header = vcat [ "module Graphics.WebGL.Raw.Enums where" , "" @@ -50,10 +50,11 @@ funcsFFI idl = imports $+$ blank $+$ methods $+$ blank where - methods = vcat . map ppFunc $ functions idl + functions = getFuncs idl + methods = vcat $ map ppFunc functions moduleDef = vcat [ "module Graphics.WebGL.Raw" - , ppExportList (functions idl) $+$ ") where" + , ppExportList functions $+$ ") where" ] imports = vcat [ "import Data.Maybe (Maybe ())" @@ -160,16 +161,16 @@ ppFuncImplBody :: Decl -> Doc ppFuncImplBody f = func <+> implName f <> parens (ppJsArgs funcArgs f) <+> "{" $+$ nest 2 (ret <+> func <+> "() {") $+$ - nest 4 (ret <+> ppMethod f) $+$ + nest 4 (ret <+> ppActual f) $+$ nest 2 "};" $+$ "}" where func = "function" ret = "return" -ppMethod :: Decl -> Doc -ppMethod f@Function{} = - prefixWebgl <> text (methodName f) <> parens (ppJsArgs methodArgs f) <> ";" +ppActual :: Decl -> Doc +ppActual f@Function{} = + prefixWebgl <> text (actualName f) <> parens (ppJsArgs methodArgs f) <> ";" ppJsArgs :: (Decl -> [Arg]) -> Decl -> Doc ppJsArgs f = hcat . punctuate ", " . map (text . argName) . f @@ -190,6 +191,7 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } | name == "void" = toType "Unit" | name == "boolean" = toType "Boolean" | name == "ArrayBuffer" = toType "Float32Array" + | name == "long" = toType "GLfloat" | otherwise = toType name where toType = wrapArray . text diff --git a/generator/Main.hs b/generator/Main.hs index b760837..1a492d1 100644 --- a/generator/Main.hs +++ b/generator/Main.hs @@ -1,5 +1,8 @@ module Main (main) where +import IDL.Parser (parseDecls) +import IDL.Cleaner (declsToIdl) +import IDL.Printer (enumsFFI, funcsFFI, typesFFI) import System.Environment (getArgs) import System.Exit (exitSuccess) import System.IO (writeFile) @@ -10,8 +13,6 @@ import qualified Text.Parsec as PP (runParser) import qualified Text.Parsec.Error as PP import IDL.AST -import IDL.Parser -import IDL.Printer noIdlError :: String noIdlError = "WebGL generator requires input IDL file" @@ -25,9 +26,9 @@ getFilepath _ = putStrLn noIdlError >> exitSuccess runParser :: String -> IO () runParser body = - case PP.runParser parseIdl () "" body of + case PP.runParser parseDecls () "" body of Left err -> mapM_ (putStrLn . PP.messageString) (PP.errorMessages err) - Right idl -> printFiles idl + Right decls -> printFiles $ declsToIdl decls printFiles :: IDL -> IO () printFiles idl = do diff --git a/purescript-webgl-raw.cabal b/purescript-webgl-raw.cabal index 8cf9e90..772478e 100644 --- a/purescript-webgl-raw.cabal +++ b/purescript-webgl-raw.cabal @@ -17,6 +17,7 @@ executable purescript-webgl-raw other-modules: IDL.AST IDL.Parser IDL.Printer build-depends: base == 4.*, + containers == 0.5.*, parsec == 3.1.*, pretty == 1.1.*, transformers == 0.4.* diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index dce0ae8..d679945 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -2,11 +2,7 @@ -- instead modify the included IDL parser and PureScript generator. module Graphics.WebGL.Raw -( getContextAttributes -, isContextLost -, getSupportedExtensions -, getExtension -, activeTexture +( activeTexture , attachShader , bindAttribLocation , bindBuffer @@ -19,6 +15,7 @@ module Graphics.WebGL.Raw , blendFunc , blendFuncSeparate , bufferData +, bufferData_ , bufferSubData , checkFramebufferStatus , clear @@ -65,16 +62,19 @@ module Graphics.WebGL.Raw , getAttachedShaders , getAttribLocation , getBufferParameter -, getParameter +, getContextAttributes , getError +, getExtension , getFramebufferAttachmentParameter -, getProgramParameter +, getParameter , getProgramInfoLog +, getProgramParameter , getRenderbufferParameter +, getShaderInfoLog , getShaderParameter , getShaderPrecisionFormat -, getShaderInfoLog , getShaderSource +, getSupportedExtensions , getTexParameter , getUniform , getUniformLocation @@ -82,6 +82,7 @@ module Graphics.WebGL.Raw , getVertexAttribOffset , hint , isBuffer +, isContextLost , isEnabled , isFramebuffer , isProgram @@ -104,38 +105,55 @@ module Graphics.WebGL.Raw , stencilOp , stencilOpSeparate , texImage2D +, texImage2D_ , texParameterf , texParameteri , texSubImage2D +, texSubImage2D_ , uniform1f , uniform1fv +, uniform1fv_ , uniform1i , uniform1iv +, uniform1iv_ , uniform2f , uniform2fv +, uniform2fv_ , uniform2i , uniform2iv +, uniform2iv_ , uniform3f , uniform3fv +, uniform3fv_ , uniform3i , uniform3iv +, uniform3iv_ , uniform4f , uniform4fv +, uniform4fv_ , uniform4i , uniform4iv +, uniform4iv_ , uniformMatrix2fv +, uniformMatrix2fv_ , uniformMatrix3fv +, uniformMatrix3fv_ , uniformMatrix4fv +, uniformMatrix4fv_ , useProgram , validateProgram , vertexAttrib1f , vertexAttrib1fv +, vertexAttrib1fv_ , vertexAttrib2f , vertexAttrib2fv +, vertexAttrib2fv_ , vertexAttrib3f , vertexAttrib3fv +, vertexAttrib3fv_ , vertexAttrib4f , vertexAttrib4fv +, vertexAttrib4fv_ , vertexAttribPointer , viewport ) where @@ -149,50 +167,6 @@ import Data.Function import Graphics.WebGL.Raw.Types import Graphics.WebGL.Raw.Util -foreign import getContextAttributesImpl """ - function getContextAttributesImpl(webgl) { - return function () { - return webgl.getContextAttributes(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) - -getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) -getContextAttributes webgl = runFn1 getContextAttributesImpl webgl >>= toMaybe >>> return - -foreign import isContextLostImpl """ - function isContextLostImpl(webgl) { - return function () { - return webgl.isContextLost(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) - -isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean -isContextLost webgl = runFn1 isContextLostImpl webgl - -foreign import getSupportedExtensionsImpl """ - function getSupportedExtensionsImpl(webgl) { - return function () { - return webgl.getSupportedExtensions(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) - -getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] -getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl >>= nullAsEmpty >>> return - -foreign import getExtensionImpl """ - function getExtensionImpl(webgl, name) { - return function () { - return webgl.getExtension(name); - }; - } -""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) - -getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) -getExtension webgl name = runFn2 getExtensionImpl webgl name >>= toMaybe >>> return - foreign import activeTextureImpl """ function activeTextureImpl(webgl, texture) { return function () { @@ -326,15 +300,26 @@ blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> G blendFuncSeparate webgl srcRGB dstRGB srcAlpha dstAlpha = runFn5 blendFuncSeparateImpl webgl srcRGB dstRGB srcAlpha dstAlpha foreign import bufferDataImpl """ - function bufferDataImpl(webgl, target, size, usage) { + function bufferDataImpl(webgl, target, data, usage) { + return function () { + return webgl.bufferData(target, data, usage); + }; + } +""" :: forall eff. Fn4 WebGLContext GLenum BufferDataSource GLenum (Eff (canvas :: Canvas | eff) Unit) + +bufferData :: forall eff. WebGLContext -> GLenum -> BufferDataSource -> GLenum -> Eff (canvas :: Canvas | eff) Unit +bufferData webgl target data' usage = runFn4 bufferDataImpl webgl target data' usage + +foreign import bufferData_Impl """ + function bufferData_Impl(webgl, target, size, usage) { return function () { return webgl.bufferData(target, size, usage); }; } """ :: forall eff. Fn4 WebGLContext GLenum GLsizeiptr GLenum (Eff (canvas :: Canvas | eff) Unit) -bufferData :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit -bufferData webgl target size usage = runFn4 bufferDataImpl webgl target size usage +bufferData_ :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit +bufferData_ webgl target size usage = runFn4 bufferData_Impl webgl target size usage foreign import bufferSubDataImpl """ function bufferSubDataImpl(webgl, target, offset, data) { @@ -842,16 +827,16 @@ foreign import getBufferParameterImpl """ getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getBufferParameter webgl target pname = runFn3 getBufferParameterImpl webgl target pname >>= toMaybe >>> return -foreign import getParameterImpl """ - function getParameterImpl(webgl, pname) { +foreign import getContextAttributesImpl """ + function getContextAttributesImpl(webgl) { return function () { - return webgl.getParameter(pname); + return webgl.getContextAttributes(); }; } -""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) -getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) -getParameter webgl pname = runFn2 getParameterImpl webgl pname >>= toMaybe >>> return +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) +getContextAttributes webgl = runFn1 getContextAttributesImpl webgl >>= toMaybe >>> return foreign import getErrorImpl """ function getErrorImpl(webgl) { @@ -864,6 +849,17 @@ foreign import getErrorImpl """ getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum getError webgl = runFn1 getErrorImpl webgl +foreign import getExtensionImpl """ + function getExtensionImpl(webgl, name) { + return function () { + return webgl.getExtension(name); + }; + } +""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) + +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) +getExtension webgl name = runFn2 getExtensionImpl webgl name >>= toMaybe >>> return + foreign import getFramebufferAttachmentParameterImpl """ function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { return function () { @@ -875,16 +871,16 @@ foreign import getFramebufferAttachmentParameterImpl """ getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getFramebufferAttachmentParameter webgl target attachment pname = runFn4 getFramebufferAttachmentParameterImpl webgl target attachment pname >>= toMaybe >>> return -foreign import getProgramParameterImpl """ - function getProgramParameterImpl(webgl, program, pname) { +foreign import getParameterImpl """ + function getParameterImpl(webgl, pname) { return function () { - return webgl.getProgramParameter(program, pname); + return webgl.getParameter(pname); }; } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) +""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) -getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) -getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname >>= toMaybe >>> return +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getParameter webgl pname = runFn2 getParameterImpl webgl pname >>= toMaybe >>> return foreign import getProgramInfoLogImpl """ function getProgramInfoLogImpl(webgl, program) { @@ -897,6 +893,17 @@ foreign import getProgramInfoLogImpl """ getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) getProgramInfoLog webgl program = runFn2 getProgramInfoLogImpl webgl program >>= toMaybe >>> return +foreign import getProgramParameterImpl """ + function getProgramParameterImpl(webgl, program, pname) { + return function () { + return webgl.getProgramParameter(program, pname); + }; + } +""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) + +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname >>= toMaybe >>> return + foreign import getRenderbufferParameterImpl """ function getRenderbufferParameterImpl(webgl, target, pname) { return function () { @@ -908,6 +915,17 @@ foreign import getRenderbufferParameterImpl """ getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getRenderbufferParameter webgl target pname = runFn3 getRenderbufferParameterImpl webgl target pname >>= toMaybe >>> return +foreign import getShaderInfoLogImpl """ + function getShaderInfoLogImpl(webgl, shader) { + return function () { + return webgl.getShaderInfoLog(shader); + }; + } +""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) + +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +getShaderInfoLog webgl shader = runFn2 getShaderInfoLogImpl webgl shader >>= toMaybe >>> return + foreign import getShaderParameterImpl """ function getShaderParameterImpl(webgl, shader, pname) { return function () { @@ -930,17 +948,6 @@ foreign import getShaderPrecisionFormatImpl """ getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) getShaderPrecisionFormat webgl shadertype precisiontype = runFn3 getShaderPrecisionFormatImpl webgl shadertype precisiontype >>= toMaybe >>> return -foreign import getShaderInfoLogImpl """ - function getShaderInfoLogImpl(webgl, shader) { - return function () { - return webgl.getShaderInfoLog(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) - -getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) -getShaderInfoLog webgl shader = runFn2 getShaderInfoLogImpl webgl shader >>= toMaybe >>> return - foreign import getShaderSourceImpl """ function getShaderSourceImpl(webgl, shader) { return function () { @@ -952,6 +959,17 @@ foreign import getShaderSourceImpl """ getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) getShaderSource webgl shader = runFn2 getShaderSourceImpl webgl shader >>= toMaybe >>> return +foreign import getSupportedExtensionsImpl """ + function getSupportedExtensionsImpl(webgl) { + return function () { + return webgl.getSupportedExtensions(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) + +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] +getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl >>= nullAsEmpty >>> return + foreign import getTexParameterImpl """ function getTexParameterImpl(webgl, target, pname) { return function () { @@ -1029,6 +1047,17 @@ foreign import isBufferImpl """ isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean isBuffer webgl buffer = runFn2 isBufferImpl webgl buffer +foreign import isContextLostImpl """ + function isContextLostImpl(webgl) { + return function () { + return webgl.isContextLost(); + }; + } +""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) + +isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean +isContextLost webgl = runFn1 isContextLostImpl webgl + foreign import isEnabledImpl """ function isEnabledImpl(webgl, cap) { return function () { @@ -1261,15 +1290,26 @@ stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> G stencilOpSeparate webgl face fail zfail zpass = runFn5 stencilOpSeparateImpl webgl face fail zfail zpass foreign import texImage2DImpl """ - function texImage2DImpl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { + function texImage2DImpl(webgl, target, level, internalformat, format, type, source) { + return function () { + return webgl.texImage2D(target, level, internalformat, format, type, source); + }; + } +""" :: forall eff. Fn7 WebGLContext GLenum GLint GLenum GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) + +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +texImage2D webgl target level internalformat format type' source = runFn7 texImage2DImpl webgl target level internalformat format type' source + +foreign import texImage2D_Impl """ + function texImage2D_Impl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { return function () { return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); }; } """ :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texImage2D webgl target level internalformat width height border format type' pixels = runFn10 texImage2DImpl webgl target level internalformat width height border format type' pixels +texImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +texImage2D_ webgl target level internalformat width height border format type' pixels = runFn10 texImage2D_Impl webgl target level internalformat width height border format type' pixels foreign import texParameterfImpl """ function texParameterfImpl(webgl, target, pname, param) { @@ -1294,15 +1334,26 @@ texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (c texParameteri webgl target pname param = runFn4 texParameteriImpl webgl target pname param foreign import texSubImage2DImpl """ - function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { + function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, format, type, source) { + return function () { + return webgl.texSubImage2D(target, level, xoffset, yoffset, format, type, source); + }; + } +""" :: forall eff. Fn8 WebGLContext GLenum GLint GLint GLint GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) + +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +texSubImage2D webgl target level xoffset yoffset format type' source = runFn8 texSubImage2DImpl webgl target level xoffset yoffset format type' source + +foreign import texSubImage2D_Impl """ + function texSubImage2D_Impl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { return function () { return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); }; } """ :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) -texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit -texSubImage2D webgl target level xoffset yoffset width height format type' pixels = runFn10 texSubImage2DImpl webgl target level xoffset yoffset width height format type' pixels +texSubImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +texSubImage2D_ webgl target level xoffset yoffset width height format type' pixels = runFn10 texSubImage2D_Impl webgl target level xoffset yoffset width height format type' pixels foreign import uniform1fImpl """ function uniform1fImpl(webgl, location, x) { @@ -1321,11 +1372,22 @@ foreign import uniform1fvImpl """ return webgl.uniform1fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform1fv webgl location v = runFn3 uniform1fvImpl webgl location v +foreign import uniform1fv_Impl """ + function uniform1fv_Impl(webgl, location, v) { + return function () { + return webgl.uniform1fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform1fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1fv_ webgl location v = runFn3 uniform1fv_Impl webgl location v + foreign import uniform1iImpl """ function uniform1iImpl(webgl, location, x) { return function () { @@ -1343,11 +1405,22 @@ foreign import uniform1ivImpl """ return webgl.uniform1iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform1iv webgl location v = runFn3 uniform1ivImpl webgl location v +foreign import uniform1iv_Impl """ + function uniform1iv_Impl(webgl, location, v) { + return function () { + return webgl.uniform1iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform1iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform1iv_ webgl location v = runFn3 uniform1iv_Impl webgl location v + foreign import uniform2fImpl """ function uniform2fImpl(webgl, location, x, y) { return function () { @@ -1365,11 +1438,22 @@ foreign import uniform2fvImpl """ return webgl.uniform2fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform2fv webgl location v = runFn3 uniform2fvImpl webgl location v +foreign import uniform2fv_Impl """ + function uniform2fv_Impl(webgl, location, v) { + return function () { + return webgl.uniform2fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2fv_ webgl location v = runFn3 uniform2fv_Impl webgl location v + foreign import uniform2iImpl """ function uniform2iImpl(webgl, location, x, y) { return function () { @@ -1387,11 +1471,22 @@ foreign import uniform2ivImpl """ return webgl.uniform2iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform2iv webgl location v = runFn3 uniform2ivImpl webgl location v +foreign import uniform2iv_Impl """ + function uniform2iv_Impl(webgl, location, v) { + return function () { + return webgl.uniform2iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform2iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform2iv_ webgl location v = runFn3 uniform2iv_Impl webgl location v + foreign import uniform3fImpl """ function uniform3fImpl(webgl, location, x, y, z) { return function () { @@ -1409,11 +1504,22 @@ foreign import uniform3fvImpl """ return webgl.uniform3fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform3fv webgl location v = runFn3 uniform3fvImpl webgl location v +foreign import uniform3fv_Impl """ + function uniform3fv_Impl(webgl, location, v) { + return function () { + return webgl.uniform3fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3fv_ webgl location v = runFn3 uniform3fv_Impl webgl location v + foreign import uniform3iImpl """ function uniform3iImpl(webgl, location, x, y, z) { return function () { @@ -1431,11 +1537,22 @@ foreign import uniform3ivImpl """ return webgl.uniform3iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform3iv webgl location v = runFn3 uniform3ivImpl webgl location v +foreign import uniform3iv_Impl """ + function uniform3iv_Impl(webgl, location, v) { + return function () { + return webgl.uniform3iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform3iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform3iv_ webgl location v = runFn3 uniform3iv_Impl webgl location v + foreign import uniform4fImpl """ function uniform4fImpl(webgl, location, x, y, z, w) { return function () { @@ -1453,11 +1570,22 @@ foreign import uniform4fvImpl """ return webgl.uniform4fv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform4fv webgl location v = runFn3 uniform4fvImpl webgl location v +foreign import uniform4fv_Impl """ + function uniform4fv_Impl(webgl, location, v) { + return function () { + return webgl.uniform4fv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4fv_ webgl location v = runFn3 uniform4fv_Impl webgl location v + foreign import uniform4iImpl """ function uniform4iImpl(webgl, location, x, y, z, w) { return function () { @@ -1475,44 +1603,88 @@ foreign import uniform4ivImpl """ return webgl.uniform4iv(location, v); }; } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniform4iv webgl location v = runFn3 uniform4ivImpl webgl location v +foreign import uniform4iv_Impl """ + function uniform4iv_Impl(webgl, location, v) { + return function () { + return webgl.uniform4iv(location, v); + }; + } +""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) + +uniform4iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +uniform4iv_ webgl location v = runFn3 uniform4iv_Impl webgl location v + foreign import uniformMatrix2fvImpl """ function uniformMatrix2fvImpl(webgl, location, transpose, value) { return function () { return webgl.uniformMatrix2fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniformMatrix2fv webgl location transpose value = runFn4 uniformMatrix2fvImpl webgl location transpose value +foreign import uniformMatrix2fv_Impl """ + function uniformMatrix2fv_Impl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix2fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniformMatrix2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv_ webgl location transpose value = runFn4 uniformMatrix2fv_Impl webgl location transpose value + foreign import uniformMatrix3fvImpl """ function uniformMatrix3fvImpl(webgl, location, transpose, value) { return function () { return webgl.uniformMatrix3fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniformMatrix3fv webgl location transpose value = runFn4 uniformMatrix3fvImpl webgl location transpose value +foreign import uniformMatrix3fv_Impl """ + function uniformMatrix3fv_Impl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix3fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniformMatrix3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv_ webgl location transpose value = runFn4 uniformMatrix3fv_Impl webgl location transpose value + foreign import uniformMatrix4fvImpl """ function uniformMatrix4fvImpl(webgl, location, transpose, value) { return function () { return webgl.uniformMatrix4fv(location, transpose, value); }; } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit uniformMatrix4fv webgl location transpose value = runFn4 uniformMatrix4fvImpl webgl location transpose value +foreign import uniformMatrix4fv_Impl """ + function uniformMatrix4fv_Impl(webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix4fv(location, transpose, value); + }; + } +""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) + +uniformMatrix4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv_ webgl location transpose value = runFn4 uniformMatrix4fv_Impl webgl location transpose value + foreign import useProgramImpl """ function useProgramImpl(webgl, program) { return function () { @@ -1552,11 +1724,22 @@ foreign import vertexAttrib1fvImpl """ return webgl.vertexAttrib1fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1fv webgl indx values = runFn3 vertexAttrib1fvImpl webgl indx values +foreign import vertexAttrib1fv_Impl """ + function vertexAttrib1fv_Impl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib1fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) + +vertexAttrib1fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv_ webgl indx values = runFn3 vertexAttrib1fv_Impl webgl indx values + foreign import vertexAttrib2fImpl """ function vertexAttrib2fImpl(webgl, indx, x, y) { return function () { @@ -1574,11 +1757,22 @@ foreign import vertexAttrib2fvImpl """ return webgl.vertexAttrib2fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2fv webgl indx values = runFn3 vertexAttrib2fvImpl webgl indx values +foreign import vertexAttrib2fv_Impl """ + function vertexAttrib2fv_Impl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib2fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) + +vertexAttrib2fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv_ webgl indx values = runFn3 vertexAttrib2fv_Impl webgl indx values + foreign import vertexAttrib3fImpl """ function vertexAttrib3fImpl(webgl, indx, x, y, z) { return function () { @@ -1596,11 +1790,22 @@ foreign import vertexAttrib3fvImpl """ return webgl.vertexAttrib3fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3fv webgl indx values = runFn3 vertexAttrib3fvImpl webgl indx values +foreign import vertexAttrib3fv_Impl """ + function vertexAttrib3fv_Impl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib3fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) + +vertexAttrib3fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv_ webgl indx values = runFn3 vertexAttrib3fv_Impl webgl indx values + foreign import vertexAttrib4fImpl """ function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { return function () { @@ -1618,11 +1823,22 @@ foreign import vertexAttrib4fvImpl """ return webgl.vertexAttrib4fv(indx, values); }; } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4fv webgl indx values = runFn3 vertexAttrib4fvImpl webgl indx values +foreign import vertexAttrib4fv_Impl """ + function vertexAttrib4fv_Impl(webgl, indx, values) { + return function () { + return webgl.vertexAttrib4fv(indx, values); + }; + } +""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) + +vertexAttrib4fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv_ webgl indx values = runFn3 vertexAttrib4fv_Impl webgl indx values + foreign import vertexAttribPointerImpl """ function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { return function () { diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 0f59b98..69e3a03 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -6,134 +6,86 @@ module Graphics.WebGL.Raw.Enums where import Graphics.WebGL.Raw.Types import qualified Prelude as Pre -depthBufferBit :: GLenum -depthBufferBit = 256 - -stencilBufferBit :: GLenum -stencilBufferBit = 1024 - -colorBufferBit :: GLenum -colorBufferBit = 16384 - -points :: GLenum -points = 0 - -lines :: GLenum -lines = 1 - -lineLoop :: GLenum -lineLoop = 2 - -lineStrip :: GLenum -lineStrip = 3 +activeAttributes :: GLenum +activeAttributes = 35721 -triangles :: GLenum -triangles = 4 +activeTexture :: GLenum +activeTexture = 34016 -triangleStrip :: GLenum -triangleStrip = 5 +activeUniforms :: GLenum +activeUniforms = 35718 -triangleFan :: GLenum -triangleFan = 6 +aliasedLineWidthRange :: GLenum +aliasedLineWidthRange = 33902 -zero :: GLenum -zero = 0 +aliasedPointSizeRange :: GLenum +aliasedPointSizeRange = 33901 -one :: GLenum -one = 1 +alpha :: GLenum +alpha = 6406 -srcColor :: GLenum -srcColor = 768 +alphaBits :: GLenum +alphaBits = 3413 -oneMinusSrcColor :: GLenum -oneMinusSrcColor = 769 +always :: GLenum +always = 519 -srcAlpha :: GLenum -srcAlpha = 770 +arrayBuffer :: GLenum +arrayBuffer = 34962 -oneMinusSrcAlpha :: GLenum -oneMinusSrcAlpha = 771 +arrayBufferBinding :: GLenum +arrayBufferBinding = 34964 -dstAlpha :: GLenum -dstAlpha = 772 +attachedShaders :: GLenum +attachedShaders = 35717 -oneMinusDstAlpha :: GLenum -oneMinusDstAlpha = 773 +back :: GLenum +back = 1029 -dstColor :: GLenum -dstColor = 774 +blend :: GLenum +blend = 3042 -oneMinusDstColor :: GLenum -oneMinusDstColor = 775 +blendColor :: GLenum +blendColor = 32773 -srcAlphaSaturate :: GLenum -srcAlphaSaturate = 776 +blendDstAlpha :: GLenum +blendDstAlpha = 32970 -funcAdd :: GLenum -funcAdd = 32774 +blendDstRgb :: GLenum +blendDstRgb = 32968 blendEquation :: GLenum blendEquation = 32777 -blendEquationRgb :: GLenum -blendEquationRgb = 32777 - blendEquationAlpha :: GLenum blendEquationAlpha = 34877 -funcSubtract :: GLenum -funcSubtract = 32778 - -funcReverseSubtract :: GLenum -funcReverseSubtract = 32779 - -blendDstRgb :: GLenum -blendDstRgb = 32968 - -blendSrcRgb :: GLenum -blendSrcRgb = 32969 - -blendDstAlpha :: GLenum -blendDstAlpha = 32970 +blendEquationRgb :: GLenum +blendEquationRgb = 32777 blendSrcAlpha :: GLenum blendSrcAlpha = 32971 -constantColor :: GLenum -constantColor = 32769 - -oneMinusConstantColor :: GLenum -oneMinusConstantColor = 32770 - -constantAlpha :: GLenum -constantAlpha = 32771 - -oneMinusConstantAlpha :: GLenum -oneMinusConstantAlpha = 32772 - -blendColor :: GLenum -blendColor = 32773 - -arrayBuffer :: GLenum -arrayBuffer = 34962 +blendSrcRgb :: GLenum +blendSrcRgb = 32969 -elementArrayBuffer :: GLenum -elementArrayBuffer = 34963 +blueBits :: GLenum +blueBits = 3412 -arrayBufferBinding :: GLenum -arrayBufferBinding = 34964 +bool :: GLenum +bool = 35670 -elementArrayBufferBinding :: GLenum -elementArrayBufferBinding = 34965 +boolVec2 :: GLenum +boolVec2 = 35671 -streamDraw :: GLenum -streamDraw = 35040 +boolVec3 :: GLenum +boolVec3 = 35672 -staticDraw :: GLenum -staticDraw = 35044 +boolVec4 :: GLenum +boolVec4 = 35673 -dynamicDraw :: GLenum -dynamicDraw = 35048 +browserDefaultWebgl :: GLenum +browserDefaultWebgl = 37444 bufferSize :: GLenum bufferSize = 34660 @@ -141,746 +93,746 @@ bufferSize = 34660 bufferUsage :: GLenum bufferUsage = 34661 -currentVertexAttrib :: GLenum -currentVertexAttrib = 34342 - -front :: GLenum -front = 1028 - -back :: GLenum -back = 1029 +byte :: GLenum +byte = 5120 -frontAndBack :: GLenum -frontAndBack = 1032 +ccw :: GLenum +ccw = 2305 -cullFace :: GLenum -cullFace = 2884 +clampToEdge :: GLenum +clampToEdge = 33071 -blend :: GLenum -blend = 3042 +colorAttachment0 :: GLenum +colorAttachment0 = 36064 -dither :: GLenum -dither = 3024 +colorBufferBit :: GLenum +colorBufferBit = 16384 -stencilTest :: GLenum -stencilTest = 2960 +colorClearValue :: GLenum +colorClearValue = 3106 -depthTest :: GLenum -depthTest = 2929 +colorWritemask :: GLenum +colorWritemask = 3107 -scissorTest :: GLenum -scissorTest = 3089 +compileStatus :: GLenum +compileStatus = 35713 -polygonOffsetFill :: GLenum -polygonOffsetFill = 32823 +compressedTextureFormats :: GLenum +compressedTextureFormats = 34467 -sampleAlphaToCoverage :: GLenum -sampleAlphaToCoverage = 32926 +constantAlpha :: GLenum +constantAlpha = 32771 -sampleCoverage :: GLenum -sampleCoverage = 32928 +constantColor :: GLenum +constantColor = 32769 -noError :: GLenum -noError = 0 +contextLostWebgl :: GLenum +contextLostWebgl = 37442 -invalidEnum :: GLenum -invalidEnum = 1280 +cullFace :: GLenum +cullFace = 2884 -invalidValue :: GLenum -invalidValue = 1281 +cullFaceMode :: GLenum +cullFaceMode = 2885 -invalidOperation :: GLenum -invalidOperation = 1282 +currentProgram :: GLenum +currentProgram = 35725 -outOfMemory :: GLenum -outOfMemory = 1285 +currentVertexAttrib :: GLenum +currentVertexAttrib = 34342 cw :: GLenum cw = 2304 -ccw :: GLenum -ccw = 2305 - -lineWidth :: GLenum -lineWidth = 2849 - -aliasedPointSizeRange :: GLenum -aliasedPointSizeRange = 33901 +decr :: GLenum +decr = 7683 -aliasedLineWidthRange :: GLenum -aliasedLineWidthRange = 33902 +decrWrap :: GLenum +decrWrap = 34056 -cullFaceMode :: GLenum -cullFaceMode = 2885 +deleteStatus :: GLenum +deleteStatus = 35712 -frontFace :: GLenum -frontFace = 2886 +depthAttachment :: GLenum +depthAttachment = 36096 -depthRange :: GLenum -depthRange = 2928 +depthBits :: GLenum +depthBits = 3414 -depthWritemask :: GLenum -depthWritemask = 2930 +depthBufferBit :: GLenum +depthBufferBit = 256 depthClearValue :: GLenum depthClearValue = 2931 +depthComponent :: GLenum +depthComponent = 6402 + +depthComponent16 :: GLenum +depthComponent16 = 33189 + depthFunc :: GLenum depthFunc = 2932 -stencilClearValue :: GLenum -stencilClearValue = 2961 +depthRange :: GLenum +depthRange = 2928 -stencilFunc :: GLenum -stencilFunc = 2962 - -stencilFail :: GLenum -stencilFail = 2964 - -stencilPassDepthFail :: GLenum -stencilPassDepthFail = 2965 +depthStencil :: GLenum +depthStencil = 34041 -stencilPassDepthPass :: GLenum -stencilPassDepthPass = 2966 +depthStencilAttachment :: GLenum +depthStencilAttachment = 33306 -stencilRef :: GLenum -stencilRef = 2967 +depthTest :: GLenum +depthTest = 2929 -stencilValueMask :: GLenum -stencilValueMask = 2963 +depthWritemask :: GLenum +depthWritemask = 2930 -stencilWritemask :: GLenum -stencilWritemask = 2968 +dither :: GLenum +dither = 3024 -stencilBackFunc :: GLenum -stencilBackFunc = 34816 +dontCare :: GLenum +dontCare = 4352 -stencilBackFail :: GLenum -stencilBackFail = 34817 +dstAlpha :: GLenum +dstAlpha = 772 -stencilBackPassDepthFail :: GLenum -stencilBackPassDepthFail = 34818 +dstColor :: GLenum +dstColor = 774 -stencilBackPassDepthPass :: GLenum -stencilBackPassDepthPass = 34819 +dynamicDraw :: GLenum +dynamicDraw = 35048 -stencilBackRef :: GLenum -stencilBackRef = 36003 +elementArrayBuffer :: GLenum +elementArrayBuffer = 34963 -stencilBackValueMask :: GLenum -stencilBackValueMask = 36004 +elementArrayBufferBinding :: GLenum +elementArrayBufferBinding = 34965 -stencilBackWritemask :: GLenum -stencilBackWritemask = 36005 +equal :: GLenum +equal = 514 -viewport :: GLenum -viewport = 2978 +fastest :: GLenum +fastest = 4353 -scissorBox :: GLenum -scissorBox = 3088 +float :: GLenum +float = 5126 -colorClearValue :: GLenum -colorClearValue = 3106 +floatMat2 :: GLenum +floatMat2 = 35674 -colorWritemask :: GLenum -colorWritemask = 3107 +floatMat3 :: GLenum +floatMat3 = 35675 -unpackAlignment :: GLenum -unpackAlignment = 3317 +floatMat4 :: GLenum +floatMat4 = 35676 -packAlignment :: GLenum -packAlignment = 3333 +floatVec2 :: GLenum +floatVec2 = 35664 -maxTextureSize :: GLenum -maxTextureSize = 3379 +floatVec3 :: GLenum +floatVec3 = 35665 -maxViewportDims :: GLenum -maxViewportDims = 3386 +floatVec4 :: GLenum +floatVec4 = 35666 -subpixelBits :: GLenum -subpixelBits = 3408 +fragmentShader :: GLenum +fragmentShader = 35632 -redBits :: GLenum -redBits = 3410 +framebuffer :: GLenum +framebuffer = 36160 -greenBits :: GLenum -greenBits = 3411 +framebufferAttachmentObjectName :: GLenum +framebufferAttachmentObjectName = 36049 -blueBits :: GLenum -blueBits = 3412 +framebufferAttachmentObjectType :: GLenum +framebufferAttachmentObjectType = 36048 -alphaBits :: GLenum -alphaBits = 3413 +framebufferAttachmentTextureCubeMapFace :: GLenum +framebufferAttachmentTextureCubeMapFace = 36051 -depthBits :: GLenum -depthBits = 3414 +framebufferAttachmentTextureLevel :: GLenum +framebufferAttachmentTextureLevel = 36050 -stencilBits :: GLenum -stencilBits = 3415 +framebufferBinding :: GLenum +framebufferBinding = 36006 -polygonOffsetUnits :: GLenum -polygonOffsetUnits = 10752 +framebufferComplete :: GLenum +framebufferComplete = 36053 -polygonOffsetFactor :: GLenum -polygonOffsetFactor = 32824 +framebufferIncompleteAttachment :: GLenum +framebufferIncompleteAttachment = 36054 -textureBinding2d :: GLenum -textureBinding2d = 32873 +framebufferIncompleteDimensions :: GLenum +framebufferIncompleteDimensions = 36057 -sampleBuffers :: GLenum -sampleBuffers = 32936 +framebufferIncompleteMissingAttachment :: GLenum +framebufferIncompleteMissingAttachment = 36055 -samples :: GLenum -samples = 32937 +framebufferUnsupported :: GLenum +framebufferUnsupported = 36061 -sampleCoverageValue :: GLenum -sampleCoverageValue = 32938 +front :: GLenum +front = 1028 -sampleCoverageInvert :: GLenum -sampleCoverageInvert = 32939 +frontAndBack :: GLenum +frontAndBack = 1032 -compressedTextureFormats :: GLenum -compressedTextureFormats = 34467 +frontFace :: GLenum +frontFace = 2886 -dontCare :: GLenum -dontCare = 4352 +funcAdd :: GLenum +funcAdd = 32774 -fastest :: GLenum -fastest = 4353 +funcReverseSubtract :: GLenum +funcReverseSubtract = 32779 -nicest :: GLenum -nicest = 4354 +funcSubtract :: GLenum +funcSubtract = 32778 generateMipmapHint :: GLenum generateMipmapHint = 33170 -byte :: GLenum -byte = 5120 +gequal :: GLenum +gequal = 518 -unsignedByte :: GLenum -unsignedByte = 5121 +greater :: GLenum +greater = 516 -short :: GLenum -short = 5122 +greenBits :: GLenum +greenBits = 3411 -unsignedShort :: GLenum -unsignedShort = 5123 +highFloat :: GLenum +highFloat = 36338 -int :: GLenum -int = 5124 +highInt :: GLenum +highInt = 36341 -unsignedInt :: GLenum -unsignedInt = 5125 +implementationColorReadFormat :: GLenum +implementationColorReadFormat = 35739 -float :: GLenum -float = 5126 +implementationColorReadType :: GLenum +implementationColorReadType = 35738 -depthComponent :: GLenum -depthComponent = 6402 +incr :: GLenum +incr = 7682 -alpha :: GLenum -alpha = 6406 +incrWrap :: GLenum +incrWrap = 34055 -rgb :: GLenum -rgb = 6407 +int :: GLenum +int = 5124 -rgba :: GLenum -rgba = 6408 +intVec2 :: GLenum +intVec2 = 35667 -luminance :: GLenum -luminance = 6409 +intVec3 :: GLenum +intVec3 = 35668 -luminanceAlpha :: GLenum -luminanceAlpha = 6410 +intVec4 :: GLenum +intVec4 = 35669 -unsignedShort4444 :: GLenum -unsignedShort4444 = 32819 +invalidEnum :: GLenum +invalidEnum = 1280 -unsignedShort5551 :: GLenum -unsignedShort5551 = 32820 +invalidFramebufferOperation :: GLenum +invalidFramebufferOperation = 1286 -unsignedShort565 :: GLenum -unsignedShort565 = 33635 +invalidOperation :: GLenum +invalidOperation = 1282 -fragmentShader :: GLenum -fragmentShader = 35632 +invalidValue :: GLenum +invalidValue = 1281 -vertexShader :: GLenum -vertexShader = 35633 +invert :: GLenum +invert = 5386 -maxVertexAttribs :: GLenum -maxVertexAttribs = 34921 +keep :: GLenum +keep = 7680 -maxVertexUniformVectors :: GLenum -maxVertexUniformVectors = 36347 +lequal :: GLenum +lequal = 515 -maxVaryingVectors :: GLenum -maxVaryingVectors = 36348 +less :: GLenum +less = 513 -maxCombinedTextureImageUnits :: GLenum -maxCombinedTextureImageUnits = 35661 +linear :: GLenum +linear = 9729 -maxVertexTextureImageUnits :: GLenum -maxVertexTextureImageUnits = 35660 +linearMipmapLinear :: GLenum +linearMipmapLinear = 9987 -maxTextureImageUnits :: GLenum -maxTextureImageUnits = 34930 +linearMipmapNearest :: GLenum +linearMipmapNearest = 9985 -maxFragmentUniformVectors :: GLenum -maxFragmentUniformVectors = 36349 +lines :: GLenum +lines = 1 -shaderType :: GLenum -shaderType = 35663 +lineLoop :: GLenum +lineLoop = 2 -deleteStatus :: GLenum -deleteStatus = 35712 +lineStrip :: GLenum +lineStrip = 3 + +lineWidth :: GLenum +lineWidth = 2849 linkStatus :: GLenum linkStatus = 35714 -validateStatus :: GLenum -validateStatus = 35715 - -attachedShaders :: GLenum -attachedShaders = 35717 - -activeUniforms :: GLenum -activeUniforms = 35718 - -activeAttributes :: GLenum -activeAttributes = 35721 - -shadingLanguageVersion :: GLenum -shadingLanguageVersion = 35724 - -currentProgram :: GLenum -currentProgram = 35725 - -never :: GLenum -never = 512 +lowFloat :: GLenum +lowFloat = 36336 -less :: GLenum -less = 513 +lowInt :: GLenum +lowInt = 36339 -equal :: GLenum -equal = 514 +luminance :: GLenum +luminance = 6409 -lequal :: GLenum -lequal = 515 +luminanceAlpha :: GLenum +luminanceAlpha = 6410 -greater :: GLenum -greater = 516 +maxCombinedTextureImageUnits :: GLenum +maxCombinedTextureImageUnits = 35661 -notequal :: GLenum -notequal = 517 +maxCubeMapTextureSize :: GLenum +maxCubeMapTextureSize = 34076 -gequal :: GLenum -gequal = 518 +maxFragmentUniformVectors :: GLenum +maxFragmentUniformVectors = 36349 -always :: GLenum -always = 519 +maxRenderbufferSize :: GLenum +maxRenderbufferSize = 34024 -keep :: GLenum -keep = 7680 +maxTextureImageUnits :: GLenum +maxTextureImageUnits = 34930 -replace :: GLenum -replace = 7681 +maxTextureSize :: GLenum +maxTextureSize = 3379 -incr :: GLenum -incr = 7682 +maxVaryingVectors :: GLenum +maxVaryingVectors = 36348 -decr :: GLenum -decr = 7683 +maxVertexAttribs :: GLenum +maxVertexAttribs = 34921 -invert :: GLenum -invert = 5386 +maxVertexTextureImageUnits :: GLenum +maxVertexTextureImageUnits = 35660 -incrWrap :: GLenum -incrWrap = 34055 +maxVertexUniformVectors :: GLenum +maxVertexUniformVectors = 36347 -decrWrap :: GLenum -decrWrap = 34056 +maxViewportDims :: GLenum +maxViewportDims = 3386 -vendor :: GLenum -vendor = 7936 +mediumFloat :: GLenum +mediumFloat = 36337 -renderer :: GLenum -renderer = 7937 +mediumInt :: GLenum +mediumInt = 36340 -version :: GLenum -version = 7938 +mirroredRepeat :: GLenum +mirroredRepeat = 33648 nearest :: GLenum nearest = 9728 -linear :: GLenum -linear = 9729 +nearestMipmapLinear :: GLenum +nearestMipmapLinear = 9986 nearestMipmapNearest :: GLenum nearestMipmapNearest = 9984 -linearMipmapNearest :: GLenum -linearMipmapNearest = 9985 - -nearestMipmapLinear :: GLenum -nearestMipmapLinear = 9986 +never :: GLenum +never = 512 -linearMipmapLinear :: GLenum -linearMipmapLinear = 9987 +nicest :: GLenum +nicest = 4354 -textureMagFilter :: GLenum -textureMagFilter = 10240 +none :: GLenum +none = 0 -textureMinFilter :: GLenum -textureMinFilter = 10241 +notequal :: GLenum +notequal = 517 -textureWrapS :: GLenum -textureWrapS = 10242 +noError :: GLenum +noError = 0 -textureWrapT :: GLenum -textureWrapT = 10243 +one :: GLenum +one = 1 -texture2d :: GLenum -texture2d = 3553 +oneMinusConstantAlpha :: GLenum +oneMinusConstantAlpha = 32772 -texture :: GLenum -texture = 5890 +oneMinusConstantColor :: GLenum +oneMinusConstantColor = 32770 -textureCubeMap :: GLenum -textureCubeMap = 34067 +oneMinusDstAlpha :: GLenum +oneMinusDstAlpha = 773 -textureBindingCubeMap :: GLenum -textureBindingCubeMap = 34068 +oneMinusDstColor :: GLenum +oneMinusDstColor = 775 -textureCubeMapPositiveX :: GLenum -textureCubeMapPositiveX = 34069 +oneMinusSrcAlpha :: GLenum +oneMinusSrcAlpha = 771 -textureCubeMapNegativeX :: GLenum -textureCubeMapNegativeX = 34070 +oneMinusSrcColor :: GLenum +oneMinusSrcColor = 769 -textureCubeMapPositiveY :: GLenum -textureCubeMapPositiveY = 34071 +outOfMemory :: GLenum +outOfMemory = 1285 -textureCubeMapNegativeY :: GLenum -textureCubeMapNegativeY = 34072 +packAlignment :: GLenum +packAlignment = 3333 -textureCubeMapPositiveZ :: GLenum -textureCubeMapPositiveZ = 34073 +points :: GLenum +points = 0 -textureCubeMapNegativeZ :: GLenum -textureCubeMapNegativeZ = 34074 +polygonOffsetFactor :: GLenum +polygonOffsetFactor = 32824 -maxCubeMapTextureSize :: GLenum -maxCubeMapTextureSize = 34076 +polygonOffsetFill :: GLenum +polygonOffsetFill = 32823 -texture0 :: GLenum -texture0 = 33984 +polygonOffsetUnits :: GLenum +polygonOffsetUnits = 10752 -texture1 :: GLenum -texture1 = 33985 +redBits :: GLenum +redBits = 3410 -texture2 :: GLenum -texture2 = 33986 +renderbuffer :: GLenum +renderbuffer = 36161 -texture3 :: GLenum -texture3 = 33987 +renderbufferAlphaSize :: GLenum +renderbufferAlphaSize = 36179 -texture4 :: GLenum -texture4 = 33988 +renderbufferBinding :: GLenum +renderbufferBinding = 36007 -texture5 :: GLenum -texture5 = 33989 +renderbufferBlueSize :: GLenum +renderbufferBlueSize = 36178 -texture6 :: GLenum -texture6 = 33990 +renderbufferDepthSize :: GLenum +renderbufferDepthSize = 36180 -texture7 :: GLenum -texture7 = 33991 +renderbufferGreenSize :: GLenum +renderbufferGreenSize = 36177 -texture8 :: GLenum -texture8 = 33992 +renderbufferHeight :: GLenum +renderbufferHeight = 36163 -texture9 :: GLenum -texture9 = 33993 +renderbufferInternalFormat :: GLenum +renderbufferInternalFormat = 36164 -texture10 :: GLenum -texture10 = 33994 +renderbufferRedSize :: GLenum +renderbufferRedSize = 36176 -texture11 :: GLenum -texture11 = 33995 +renderbufferStencilSize :: GLenum +renderbufferStencilSize = 36181 -texture12 :: GLenum -texture12 = 33996 +renderbufferWidth :: GLenum +renderbufferWidth = 36162 -texture13 :: GLenum -texture13 = 33997 +renderer :: GLenum +renderer = 7937 -texture14 :: GLenum -texture14 = 33998 +repeat :: GLenum +repeat = 10497 -texture15 :: GLenum -texture15 = 33999 +replace :: GLenum +replace = 7681 -texture16 :: GLenum -texture16 = 34000 +rgb :: GLenum +rgb = 6407 -texture17 :: GLenum -texture17 = 34001 +rgb565 :: GLenum +rgb565 = 36194 -texture18 :: GLenum -texture18 = 34002 +rgb5A1 :: GLenum +rgb5A1 = 32855 -texture19 :: GLenum -texture19 = 34003 +rgba :: GLenum +rgba = 6408 -texture20 :: GLenum -texture20 = 34004 +rgba4 :: GLenum +rgba4 = 32854 -texture21 :: GLenum -texture21 = 34005 +sampler2d :: GLenum +sampler2d = 35678 -texture22 :: GLenum -texture22 = 34006 +samplerCube :: GLenum +samplerCube = 35680 -texture23 :: GLenum -texture23 = 34007 +samples :: GLenum +samples = 32937 -texture24 :: GLenum -texture24 = 34008 +sampleAlphaToCoverage :: GLenum +sampleAlphaToCoverage = 32926 -texture25 :: GLenum -texture25 = 34009 +sampleBuffers :: GLenum +sampleBuffers = 32936 -texture26 :: GLenum -texture26 = 34010 +sampleCoverage :: GLenum +sampleCoverage = 32928 -texture27 :: GLenum -texture27 = 34011 +sampleCoverageInvert :: GLenum +sampleCoverageInvert = 32939 -texture28 :: GLenum -texture28 = 34012 +sampleCoverageValue :: GLenum +sampleCoverageValue = 32938 -texture29 :: GLenum -texture29 = 34013 +scissorBox :: GLenum +scissorBox = 3088 -texture30 :: GLenum -texture30 = 34014 +scissorTest :: GLenum +scissorTest = 3089 -texture31 :: GLenum -texture31 = 34015 +shaderType :: GLenum +shaderType = 35663 -activeTexture :: GLenum -activeTexture = 34016 +shadingLanguageVersion :: GLenum +shadingLanguageVersion = 35724 -repeat :: GLenum -repeat = 10497 +short :: GLenum +short = 5122 -clampToEdge :: GLenum -clampToEdge = 33071 +srcAlpha :: GLenum +srcAlpha = 770 -mirroredRepeat :: GLenum -mirroredRepeat = 33648 +srcAlphaSaturate :: GLenum +srcAlphaSaturate = 776 -floatVec2 :: GLenum -floatVec2 = 35664 +srcColor :: GLenum +srcColor = 768 -floatVec3 :: GLenum -floatVec3 = 35665 +staticDraw :: GLenum +staticDraw = 35044 -floatVec4 :: GLenum -floatVec4 = 35666 +stencilAttachment :: GLenum +stencilAttachment = 36128 -intVec2 :: GLenum -intVec2 = 35667 +stencilBackFail :: GLenum +stencilBackFail = 34817 -intVec3 :: GLenum -intVec3 = 35668 +stencilBackFunc :: GLenum +stencilBackFunc = 34816 -intVec4 :: GLenum -intVec4 = 35669 +stencilBackPassDepthFail :: GLenum +stencilBackPassDepthFail = 34818 -bool :: GLenum -bool = 35670 +stencilBackPassDepthPass :: GLenum +stencilBackPassDepthPass = 34819 -boolVec2 :: GLenum -boolVec2 = 35671 +stencilBackRef :: GLenum +stencilBackRef = 36003 -boolVec3 :: GLenum -boolVec3 = 35672 +stencilBackValueMask :: GLenum +stencilBackValueMask = 36004 -boolVec4 :: GLenum -boolVec4 = 35673 +stencilBackWritemask :: GLenum +stencilBackWritemask = 36005 -floatMat2 :: GLenum -floatMat2 = 35674 +stencilBits :: GLenum +stencilBits = 3415 -floatMat3 :: GLenum -floatMat3 = 35675 +stencilBufferBit :: GLenum +stencilBufferBit = 1024 -floatMat4 :: GLenum -floatMat4 = 35676 +stencilClearValue :: GLenum +stencilClearValue = 2961 -sampler2d :: GLenum -sampler2d = 35678 +stencilFail :: GLenum +stencilFail = 2964 -samplerCube :: GLenum -samplerCube = 35680 +stencilFunc :: GLenum +stencilFunc = 2962 -vertexAttribArrayEnabled :: GLenum -vertexAttribArrayEnabled = 34338 +stencilIndex :: GLenum +stencilIndex = 6401 -vertexAttribArraySize :: GLenum -vertexAttribArraySize = 34339 +stencilIndex8 :: GLenum +stencilIndex8 = 36168 -vertexAttribArrayStride :: GLenum -vertexAttribArrayStride = 34340 +stencilPassDepthFail :: GLenum +stencilPassDepthFail = 2965 -vertexAttribArrayType :: GLenum -vertexAttribArrayType = 34341 +stencilPassDepthPass :: GLenum +stencilPassDepthPass = 2966 -vertexAttribArrayNormalized :: GLenum -vertexAttribArrayNormalized = 34922 +stencilRef :: GLenum +stencilRef = 2967 -vertexAttribArrayPointer :: GLenum -vertexAttribArrayPointer = 34373 +stencilTest :: GLenum +stencilTest = 2960 -vertexAttribArrayBufferBinding :: GLenum -vertexAttribArrayBufferBinding = 34975 +stencilValueMask :: GLenum +stencilValueMask = 2963 -implementationColorReadType :: GLenum -implementationColorReadType = 35738 +stencilWritemask :: GLenum +stencilWritemask = 2968 -implementationColorReadFormat :: GLenum -implementationColorReadFormat = 35739 +streamDraw :: GLenum +streamDraw = 35040 -compileStatus :: GLenum -compileStatus = 35713 +subpixelBits :: GLenum +subpixelBits = 3408 -lowFloat :: GLenum -lowFloat = 36336 +texture :: GLenum +texture = 5890 -mediumFloat :: GLenum -mediumFloat = 36337 +texture0 :: GLenum +texture0 = 33984 -highFloat :: GLenum -highFloat = 36338 +texture1 :: GLenum +texture1 = 33985 -lowInt :: GLenum -lowInt = 36339 +texture10 :: GLenum +texture10 = 33994 -mediumInt :: GLenum -mediumInt = 36340 +texture11 :: GLenum +texture11 = 33995 -highInt :: GLenum -highInt = 36341 +texture12 :: GLenum +texture12 = 33996 -framebuffer :: GLenum -framebuffer = 36160 +texture13 :: GLenum +texture13 = 33997 -renderbuffer :: GLenum -renderbuffer = 36161 +texture14 :: GLenum +texture14 = 33998 -rgba4 :: GLenum -rgba4 = 32854 +texture15 :: GLenum +texture15 = 33999 -rgb5A1 :: GLenum -rgb5A1 = 32855 +texture16 :: GLenum +texture16 = 34000 -rgb565 :: GLenum -rgb565 = 36194 +texture17 :: GLenum +texture17 = 34001 -depthComponent16 :: GLenum -depthComponent16 = 33189 +texture18 :: GLenum +texture18 = 34002 -stencilIndex :: GLenum -stencilIndex = 6401 +texture19 :: GLenum +texture19 = 34003 -stencilIndex8 :: GLenum -stencilIndex8 = 36168 +texture2 :: GLenum +texture2 = 33986 -depthStencil :: GLenum -depthStencil = 34041 +texture20 :: GLenum +texture20 = 34004 -renderbufferWidth :: GLenum -renderbufferWidth = 36162 +texture21 :: GLenum +texture21 = 34005 -renderbufferHeight :: GLenum -renderbufferHeight = 36163 +texture22 :: GLenum +texture22 = 34006 -renderbufferInternalFormat :: GLenum -renderbufferInternalFormat = 36164 +texture23 :: GLenum +texture23 = 34007 -renderbufferRedSize :: GLenum -renderbufferRedSize = 36176 +texture24 :: GLenum +texture24 = 34008 -renderbufferGreenSize :: GLenum -renderbufferGreenSize = 36177 +texture25 :: GLenum +texture25 = 34009 -renderbufferBlueSize :: GLenum -renderbufferBlueSize = 36178 +texture26 :: GLenum +texture26 = 34010 -renderbufferAlphaSize :: GLenum -renderbufferAlphaSize = 36179 +texture27 :: GLenum +texture27 = 34011 -renderbufferDepthSize :: GLenum -renderbufferDepthSize = 36180 +texture28 :: GLenum +texture28 = 34012 -renderbufferStencilSize :: GLenum -renderbufferStencilSize = 36181 +texture29 :: GLenum +texture29 = 34013 -framebufferAttachmentObjectType :: GLenum -framebufferAttachmentObjectType = 36048 +texture3 :: GLenum +texture3 = 33987 -framebufferAttachmentObjectName :: GLenum -framebufferAttachmentObjectName = 36049 +texture30 :: GLenum +texture30 = 34014 -framebufferAttachmentTextureLevel :: GLenum -framebufferAttachmentTextureLevel = 36050 +texture31 :: GLenum +texture31 = 34015 -framebufferAttachmentTextureCubeMapFace :: GLenum -framebufferAttachmentTextureCubeMapFace = 36051 +texture4 :: GLenum +texture4 = 33988 -colorAttachment0 :: GLenum -colorAttachment0 = 36064 +texture5 :: GLenum +texture5 = 33989 -depthAttachment :: GLenum -depthAttachment = 36096 +texture6 :: GLenum +texture6 = 33990 -stencilAttachment :: GLenum -stencilAttachment = 36128 +texture7 :: GLenum +texture7 = 33991 -depthStencilAttachment :: GLenum -depthStencilAttachment = 33306 +texture8 :: GLenum +texture8 = 33992 -none :: GLenum -none = 0 +texture9 :: GLenum +texture9 = 33993 -framebufferComplete :: GLenum -framebufferComplete = 36053 +texture2d :: GLenum +texture2d = 3553 -framebufferIncompleteAttachment :: GLenum -framebufferIncompleteAttachment = 36054 +textureBinding2d :: GLenum +textureBinding2d = 32873 -framebufferIncompleteMissingAttachment :: GLenum -framebufferIncompleteMissingAttachment = 36055 +textureBindingCubeMap :: GLenum +textureBindingCubeMap = 34068 -framebufferIncompleteDimensions :: GLenum -framebufferIncompleteDimensions = 36057 +textureCubeMap :: GLenum +textureCubeMap = 34067 -framebufferUnsupported :: GLenum -framebufferUnsupported = 36061 +textureCubeMapNegativeX :: GLenum +textureCubeMapNegativeX = 34070 -framebufferBinding :: GLenum -framebufferBinding = 36006 +textureCubeMapNegativeY :: GLenum +textureCubeMapNegativeY = 34072 -renderbufferBinding :: GLenum -renderbufferBinding = 36007 +textureCubeMapNegativeZ :: GLenum +textureCubeMapNegativeZ = 34074 -maxRenderbufferSize :: GLenum -maxRenderbufferSize = 34024 +textureCubeMapPositiveX :: GLenum +textureCubeMapPositiveX = 34069 -invalidFramebufferOperation :: GLenum -invalidFramebufferOperation = 1286 +textureCubeMapPositiveY :: GLenum +textureCubeMapPositiveY = 34071 + +textureCubeMapPositiveZ :: GLenum +textureCubeMapPositiveZ = 34073 + +textureMagFilter :: GLenum +textureMagFilter = 10240 + +textureMinFilter :: GLenum +textureMinFilter = 10241 + +textureWrapS :: GLenum +textureWrapS = 10242 + +textureWrapT :: GLenum +textureWrapT = 10243 + +triangles :: GLenum +triangles = 4 + +triangleFan :: GLenum +triangleFan = 6 + +triangleStrip :: GLenum +triangleStrip = 5 + +unpackAlignment :: GLenum +unpackAlignment = 3317 + +unpackColorspaceConversionWebgl :: GLenum +unpackColorspaceConversionWebgl = 37443 unpackFlipYWebgl :: GLenum unpackFlipYWebgl = 37440 @@ -888,12 +840,60 @@ unpackFlipYWebgl = 37440 unpackPremultiplyAlphaWebgl :: GLenum unpackPremultiplyAlphaWebgl = 37441 -contextLostWebgl :: GLenum -contextLostWebgl = 37442 +unsignedByte :: GLenum +unsignedByte = 5121 -unpackColorspaceConversionWebgl :: GLenum -unpackColorspaceConversionWebgl = 37443 +unsignedInt :: GLenum +unsignedInt = 5125 -browserDefaultWebgl :: GLenum -browserDefaultWebgl = 37444 +unsignedShort :: GLenum +unsignedShort = 5123 + +unsignedShort4444 :: GLenum +unsignedShort4444 = 32819 + +unsignedShort5551 :: GLenum +unsignedShort5551 = 32820 + +unsignedShort565 :: GLenum +unsignedShort565 = 33635 + +validateStatus :: GLenum +validateStatus = 35715 + +vendor :: GLenum +vendor = 7936 + +version :: GLenum +version = 7938 + +vertexAttribArrayBufferBinding :: GLenum +vertexAttribArrayBufferBinding = 34975 + +vertexAttribArrayEnabled :: GLenum +vertexAttribArrayEnabled = 34338 + +vertexAttribArrayNormalized :: GLenum +vertexAttribArrayNormalized = 34922 + +vertexAttribArrayPointer :: GLenum +vertexAttribArrayPointer = 34373 + +vertexAttribArraySize :: GLenum +vertexAttribArraySize = 34339 + +vertexAttribArrayStride :: GLenum +vertexAttribArrayStride = 34340 + +vertexAttribArrayType :: GLenum +vertexAttribArrayType = 34341 + +vertexShader :: GLenum +vertexShader = 35633 + +viewport :: GLenum +viewport = 2978 + +zero :: GLenum +zero = 0 diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 67f2ef5..29a3646 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -24,6 +24,7 @@ type GLushort = Number foreign import data ArrayBufferView :: * foreign import data BufferDataSource :: * +foreign import data TexImageSource :: * foreign import data WebGLActiveInfo :: * foreign import data WebGLBuffer :: * foreign import data WebGLContext :: * From b9b07ed5fae44b581cda621173c7ea598a0a58fd Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 12 Jun 2015 20:33:17 -0700 Subject: [PATCH 41/51] add correct alias for BufferDataSource --- docs/README.md | 14 ++++++------- generator/IDL/Cleaner.hs | 1 + generator/IDL/Printer.hs | 33 +++++++++++++++--------------- src/Graphics/WebGL/Raw/Types.purs | 34 +++++++++++++++---------------- 4 files changed, 42 insertions(+), 40 deletions(-) diff --git a/docs/README.md b/docs/README.md index 94fd126..b2a759e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -3175,6 +3175,13 @@ type DOMString = String ``` +#### `BufferDataSource` + +``` purescript +type BufferDataSource = Float32Array +``` + + #### `FloatArray` ``` purescript @@ -3287,13 +3294,6 @@ data ArrayBufferView :: * ``` -#### `BufferDataSource` - -``` purescript -data BufferDataSource :: * -``` - - #### `TexImageSource` ``` purescript diff --git a/generator/IDL/Cleaner.hs b/generator/IDL/Cleaner.hs index 75213b7..f67b948 100644 --- a/generator/IDL/Cleaner.hs +++ b/generator/IDL/Cleaner.hs @@ -16,6 +16,7 @@ import IDL.AST excludedTypes :: [String] excludedTypes = [ "ArrayBuffer" + , "BufferDataSource" , "DOMString" , "Float32Array" , "FloatArray" diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index dae6513..266e5c5 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -77,22 +77,23 @@ generatedWarning = vcat typeDefs :: Doc typeDefs = vcat - [ "type DOMString = String" - , "type FloatArray = Float32Array" - , "type GLbitfield = Number" - , "type GLboolean = Boolean" - , "type GLbyte = Number" - , "type GLclampf = Number" - , "type GLenum = Number" - , "type GLfloat = Number" - , "type GLint = Number" - , "type GLintptr = Number" - , "type GLshort = Number" - , "type GLsizei = Number" - , "type GLsizeiptr = Number" - , "type GLubyte = Number" - , "type GLuint = Number" - , "type GLushort = Number" + [ "type DOMString = String" + , "type BufferDataSource = Float32Array" + , "type FloatArray = Float32Array" + , "type GLbitfield = Number" + , "type GLboolean = Boolean" + , "type GLbyte = Number" + , "type GLclampf = Number" + , "type GLenum = Number" + , "type GLfloat = Number" + , "type GLint = Number" + , "type GLintptr = Number" + , "type GLshort = Number" + , "type GLsizei = Number" + , "type GLsizeiptr = Number" + , "type GLubyte = Number" + , "type GLuint = Number" + , "type GLushort = Number" ] contextAttrs :: Doc diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 29a3646..a7a87ab 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -5,25 +5,25 @@ module Graphics.WebGL.Raw.Types where import Data.ArrayBuffer.Types -type DOMString = String -type FloatArray = Float32Array -type GLbitfield = Number -type GLboolean = Boolean -type GLbyte = Number -type GLclampf = Number -type GLenum = Number -type GLfloat = Number -type GLint = Number -type GLintptr = Number -type GLshort = Number -type GLsizei = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLuint = Number -type GLushort = Number +type DOMString = String +type BufferDataSource = Float32Array +type FloatArray = Float32Array +type GLbitfield = Number +type GLboolean = Boolean +type GLbyte = Number +type GLclampf = Number +type GLenum = Number +type GLfloat = Number +type GLint = Number +type GLintptr = Number +type GLshort = Number +type GLsizei = Number +type GLsizeiptr = Number +type GLubyte = Number +type GLuint = Number +type GLushort = Number foreign import data ArrayBufferView :: * -foreign import data BufferDataSource :: * foreign import data TexImageSource :: * foreign import data WebGLActiveInfo :: * foreign import data WebGLBuffer :: * From 59ce06743e2dd75e9abbeb48323f9a59f448f376 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Sat, 13 Jun 2015 11:30:49 -0700 Subject: [PATCH 42/51] remove unused instances --- generator/IDL/AST.hs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/generator/IDL/AST.hs b/generator/IDL/AST.hs index 25c3478..b4b0789 100644 --- a/generator/IDL/AST.hs +++ b/generator/IDL/AST.hs @@ -11,12 +11,6 @@ data Type } deriving Show -instance Eq Type where - x == y = typeName x == typeName y - -instance Ord Type where - compare x y = compare (typeName x) (typeName y) - data Arg = Arg { argType :: Type , argName :: String From 14a4d1ff549ee596dd0fea551b66f98da7919336 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 29 Jul 2015 14:17:41 -0500 Subject: [PATCH 43/51] remvoe Grunt in favor of Pulp --- gruntfile.js | 38 -------------------------------------- package.json | 16 ---------------- 2 files changed, 54 deletions(-) delete mode 100644 gruntfile.js delete mode 100644 package.json diff --git a/gruntfile.js b/gruntfile.js deleted file mode 100644 index a5d7784..0000000 --- a/gruntfile.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = function(grunt) { - "use strict"; - - grunt.initConfig({ - - srcFiles: [ - "src/**/*.purs", - "bower_components/purescript-*/src/**/*.purs" - ], - - dotPsci: ["<%=srcFiles%>"], - - psc: { - options: { - modules: 'Graphics.WebGL.Raw', - main: 'Graphics.WebGL.Raw', - dest: 'dist' - } - }, - - pscDocs: { - readme: { - src: "src/**/*.purs", - dest: "docs/README.md" - } - }, - - pscMake: { - all: { - src: ["<%=srcFiles%>"], - dest: "dist/purescript" - } - } - }); - - grunt.loadNpmTasks("grunt-purescript"); - grunt.registerTask("default", ["pscMake", "dotPsci", "pscDocs"]); -}; diff --git a/package.json b/package.json deleted file mode 100644 index 3ba4466..0000000 --- a/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "purescript-webgl-raw", - "description": "a generated low-level PureScript wrapper of WebGL methods", - "version": "0.3.0", - "license": "CPL-2", - - "repository": { - "type": "git", - "url": "https://github.com/Jonplussed/purescript-webgl-raw" - }, - - "dependencies": { - "grunt": "^0.4.5", - "grunt-purescript": "^0.6.0" - } -} From 082dad2af3b51d4f27970e928ca3da6dcb7a89d8 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 29 Jul 2015 17:50:29 -0500 Subject: [PATCH 44/51] update Util module for PureScript 0.7 --- src/Graphics/WebGL/Raw/Util.js | 19 +++++++++++++++++++ src/Graphics/WebGL/Raw/Util.purs | 20 ++------------------ 2 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 src/Graphics/WebGL/Raw/Util.js diff --git a/src/Graphics/WebGL/Raw/Util.js b/src/Graphics/WebGL/Raw/Util.js new file mode 100644 index 0000000..a3e63fe --- /dev/null +++ b/src/Graphics/WebGL/Raw/Util.js @@ -0,0 +1,19 @@ +"use strict"; + +// module Graphics.WebGL.Raw.Util + +exports.toMaybeImpl = function (Nothing, Just, x) { + if (x === undefined || x === null) { + return Nothing; + } else { + return Just(x); + } +} + +exports.nullAsEmpty = function (x) { + if (x === undefined || x === null) { + return []; + } else { + return x; + } +} diff --git a/src/Graphics/WebGL/Raw/Util.purs b/src/Graphics/WebGL/Raw/Util.purs index 17730c0..6569668 100644 --- a/src/Graphics/WebGL/Raw/Util.purs +++ b/src/Graphics/WebGL/Raw/Util.purs @@ -6,25 +6,9 @@ module Graphics.WebGL.Raw.Util import Data.Function (Fn3 (..), runFn3) import Data.Maybe (Maybe (..)) -foreign import toMaybeImpl """ - function toMaybeImpl(Nothing, Just, x) { - if (x === undefined || x === null) { - return Nothing; - } else { - return Just(x); - } - } -""" :: forall a. Fn3 (Maybe a) (a -> Maybe a) a (Maybe a) +foreign import toMaybeImpl :: forall a. Fn3 (Maybe a) (a -> Maybe a) a (Maybe a) toMaybe :: forall a. a -> Maybe a toMaybe x = runFn3 toMaybeImpl Nothing Just x -foreign import nullAsEmpty """ - function nullAsEmpty(x) { - if (x === undefined || x === null) { - return []; - } else { - return x; - } - } -""" :: forall a. [a] -> [a] +foreign import nullAsEmpty :: forall a. [a] -> [a] From cde888c4ae3c994b1f72bd94f31de217e2a83fe7 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 29 Jul 2015 17:54:44 -0500 Subject: [PATCH 45/51] update Enums/Types for PureScript 0.7 --- generator/IDL/Printer.hs | 27 +++++++++++++-------------- src/Graphics/WebGL/Raw/Enums.purs | 3 +-- src/Graphics/WebGL/Raw/Types.purs | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 266e5c5..db7128e 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -9,7 +9,7 @@ module IDL.Printer import Data.Char (toLower, toUpper) import Data.Maybe (isNothing) import IDL.Cleaner (getEnums, getFuncs, getTypes) -import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), brackets, char, empty, +import Text.PrettyPrint (Doc, ($+$), ($$), (<>), (<+>), char, empty, hcat, int, integer, nest, parens, punctuate, text, vcat) import IDL.AST @@ -39,8 +39,7 @@ enumsFFI idl = header = vcat [ "module Graphics.WebGL.Raw.Enums where" , "" - , "import Graphics.WebGL.Raw.Types" - , "import qualified Prelude as Pre" + , "import Graphics.WebGL.Raw.Types (GLenum ())" ] funcsFFI :: IDL -> Doc @@ -80,20 +79,20 @@ typeDefs = vcat [ "type DOMString = String" , "type BufferDataSource = Float32Array" , "type FloatArray = Float32Array" - , "type GLbitfield = Number" + , "type GLbitfield = Int" , "type GLboolean = Boolean" - , "type GLbyte = Number" + , "type GLbyte = Int" , "type GLclampf = Number" - , "type GLenum = Number" + , "type GLenum = Int" , "type GLfloat = Number" - , "type GLint = Number" - , "type GLintptr = Number" - , "type GLshort = Number" - , "type GLsizei = Number" - , "type GLsizeiptr = Number" - , "type GLubyte = Number" - , "type GLuint = Number" - , "type GLushort = Number" + , "type GLint = Int" + , "type GLintptr = Int" + , "type GLshort = Int" + , "type GLsizei = Int" + , "type GLsizeiptr = Int" + , "type GLubyte = Int" + , "type GLuint = Int" + , "type GLushort = Int" ] contextAttrs :: Doc diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 69e3a03..4567d5e 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -3,8 +3,7 @@ module Graphics.WebGL.Raw.Enums where -import Graphics.WebGL.Raw.Types -import qualified Prelude as Pre +import Graphics.WebGL.Raw.Types (GLenum ()) activeAttributes :: GLenum activeAttributes = 35721 diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index a7a87ab..8f726d3 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -8,20 +8,20 @@ import Data.ArrayBuffer.Types type DOMString = String type BufferDataSource = Float32Array type FloatArray = Float32Array -type GLbitfield = Number +type GLbitfield = Int type GLboolean = Boolean -type GLbyte = Number +type GLbyte = Int type GLclampf = Number -type GLenum = Number +type GLenum = Int type GLfloat = Number -type GLint = Number -type GLintptr = Number -type GLshort = Number -type GLsizei = Number -type GLsizeiptr = Number -type GLubyte = Number -type GLuint = Number -type GLushort = Number +type GLint = Int +type GLintptr = Int +type GLshort = Int +type GLsizei = Int +type GLsizeiptr = Int +type GLubyte = Int +type GLuint = Int +type GLushort = Int foreign import data ArrayBufferView :: * foreign import data TexImageSource :: * From 94231caa7d89952889786ea23da1d8a3089d4ee3 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Wed, 29 Jul 2015 17:59:58 -0500 Subject: [PATCH 46/51] update array type representation for PureScript 0.7 --- generator/IDL/Printer.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index db7128e..52146d7 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -191,11 +191,13 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } | name == "void" = toType "Unit" | name == "boolean" = toType "Boolean" | name == "ArrayBuffer" = toType "Float32Array" - | name == "long" = toType "GLfloat" + | name == "long" = toType "Int" | otherwise = toType name where toType = wrapArray . text - wrapArray t = if isArray then brackets t else t + wrapArray t = if isArray + then parens $ "Array" <+> t + else t ppConvertType _ = genericType ppConvertMaybeType :: Type -> Doc From d63d7f3134ad1e777c175af9f1482a4a3b5ee977 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 31 Jul 2015 15:05:43 -0500 Subject: [PATCH 47/51] first pass at updating Printer for PureScript 0.7.0 --- generator/IDL/Printer.hs | 224 ++++++++++++++++++++------------------- generator/Main.hs | 9 +- 2 files changed, 119 insertions(+), 114 deletions(-) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 52146d7..4bb1d55 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -3,7 +3,8 @@ module IDL.Printer ( typesFFI , enumsFFI -, funcsFFI +, exportsFFI +, importsFFI ) where import Data.Char (toLower, toUpper) @@ -16,64 +17,59 @@ import IDL.AST typesFFI :: IDL -> Doc typesFFI idl = - generatedWarning $+$ blank $+$ - header $+$ blank $+$ - typeDefs $+$ blank $+$ - typeDecls $+$ blank $+$ - contextAttrs $+$ blank + header $+$ blank $+$ + typeDefs $+$ blank $+$ + typeDecls $+$ blank $+$ + contextAttrs $+$ blank where - typeDecls = vcat . map ppTypeDecl $ getTypes idl header = vcat [ "module Graphics.WebGL.Raw.Types where" , "" , "import Data.ArrayBuffer.Types" ] + typeDecls = vcat . map ppTypeDecl $ getTypes idl enumsFFI :: IDL -> Doc enumsFFI idl = - generatedWarning $+$ blank $+$ - header $+$ blank $+$ - constants $+$ blank + header $+$ blank $+$ + constants $+$ blank where - constants = vcat . map ppConstant $ getEnums idl header = vcat [ "module Graphics.WebGL.Raw.Enums where" , "" , "import Graphics.WebGL.Raw.Types (GLenum ())" ] + constants = vcat . map ppConstant $ getEnums idl -funcsFFI :: IDL -> Doc -funcsFFI idl = - generatedWarning $+$ blank $+$ - moduleDef $+$ blank $+$ - imports $+$ blank $+$ - methods $+$ blank +exportsFFI :: IDL -> Doc +exportsFFI idl = + header $+$ blank $+$ + methods $+$ blank where - functions = getFuncs idl - methods = vcat $ map ppFunc functions - moduleDef = vcat - [ "module Graphics.WebGL.Raw" - , ppExportList functions $+$ ") where" + header = vcat + [ "\"use strict\";" + , "" + , "// module Graphics.WebGL.Raw" ] - imports = vcat - [ "import Data.Maybe (Maybe ())" - , "import Graphics.Canvas (Canvas ())" + methods = vcat . map ppJsFunc $ getFuncs idl + +importsFFI :: IDL -> Doc +importsFFI idl = + header $+$ blank $+$ + funcs $+$ blank + where + header = vcat + [ "module Graphics.WebGL.Raw" , "" - , "import Control.Monad.Eff" - , "import Data.ArrayBuffer.Types" , "import Data.Function" + , "import Data.Maybe" , "import Graphics.WebGL.Raw.Types" - , "import Graphics.WebGL.Raw.Util" + , "import Prelude" ] + funcs = vcat . map ppImport $ getFuncs idl -- predefined text -generatedWarning :: Doc -generatedWarning = vcat - [ "-- This file is automatically generated! Don't edit this file, but" - , "-- instead modify the included IDL parser and PureScript generator." - ] - typeDefs :: Doc typeDefs = vcat [ "type DOMString = String" @@ -109,82 +105,40 @@ contextAttrs = vcat , " }" ] --- component pretty-printers - -ppConstant :: Decl -> Doc -ppConstant Enum { enumName = n, enumValue = v } = - constName <+> ":: GLenum" $$ - constName <+> "=" <+> (integer v) $$ - blank - where - constName = toCamelCase n - -ppImplTypeSig :: Decl -> Doc -ppImplTypeSig f@Function{} = - sigForall f <+> funcType <+> argList <+> parens (implReturnType f) - where - args = funcArgs f - funcType = "Fn" <> int (length args) - argList = hcat . punctuate " " $ map (ppConvertType . argType) args - -ppRunTypeSig :: Decl -> Doc -ppRunTypeSig f@Function{ methodName = name } = - text name <+> sigForall f <+> argList - where - types = map (ppConvertType . argType) (funcArgs f) ++ [runReturnType f] - argList = hcat $ punctuate " -> " types - -ppFunc :: Decl -> Doc -ppFunc f@Function{} = ppFuncImpl f $+$ blank $+$ ppRunFunc f $+$ blank - -ppRunFunc :: Decl -> Doc -ppRunFunc f@Function{} = ppRunTypeSig f $+$ ppRunFuncBody f - -ppRunFuncBody :: Decl -> Doc -ppRunFuncBody f@Function { methodName = name, methodRetType = retType } = - text name <+> args <+> "=" <+> - "runFn" <> int (length $ funcArgs f) <+> - implName f <+> args <+> - safetyFn retType - where - args = ppPsArgs f - -ppFuncImpl :: Decl -> Doc -ppFuncImpl f@Function{} = - "foreign import" <+> implName f <+> jsBlock $+$ - nest 2 (ppFuncImplBody f) $+$ - jsBlock <+> ppImplTypeSig f - where - jsBlock = "\"\"\"" +-- javascript pretty-printers -ppFuncImplBody :: Decl -> Doc -ppFuncImplBody f = - func <+> implName f <> parens (ppJsArgs funcArgs f) <+> "{" $+$ +ppJsFunc :: Decl -> Doc +ppJsFunc f = + expName <+> "=" <+> func <+> parens (ppJsArgs funcArgs f) <+> "{" $+$ nest 2 (ret <+> func <+> "() {") $+$ - nest 4 (ret <+> ppActual f) $+$ + nest 4 (ret <+> ppJsFuncInner f) $+$ nest 2 "};" $+$ - "}" + "}" $+$ + blank where + expName = "exports." <> implName f func = "function" ret = "return" -ppActual :: Decl -> Doc -ppActual f@Function{} = +ppJsFuncInner :: Decl -> Doc +ppJsFuncInner f@Function{} = prefixWebgl <> text (actualName f) <> parens (ppJsArgs methodArgs f) <> ";" ppJsArgs :: (Decl -> [Arg]) -> Decl -> Doc ppJsArgs f = hcat . punctuate ", " . map (text . argName) . f -ppPsArgs :: Decl -> Doc -ppPsArgs = hcat . punctuate " " . map argNames . funcArgs - where - argNames = text . filterReserved . argName +-- purescript raw module pretty-printers +ppExportList :: [Decl] -> Doc +ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) + where + addOpener (x:xs) = "(" <+> x : xs + addOpener xs = xs -ppTypeDecl :: Type -> Doc -ppTypeDecl Concrete{ typeName = name } = - "foreign import data" <+> text name <+> ":: *" -ppTypeDecl _ = empty +ppImport :: Decl -> Doc +ppImport f@Function{} = + ppImpl f $+$ blank $+$ + ppFunc f $+$ blank ppConvertType :: Type -> Doc ppConvertType Concrete{ typeName = name, typeIsArray = isArray } @@ -200,28 +154,78 @@ ppConvertType Concrete{ typeName = name, typeIsArray = isArray } else t ppConvertType _ = genericType +ppSigForall :: Decl -> Doc +ppSigForall Function{ methodRetType = ret } = + case ret of + Generic -> ":: forall eff" <+> genericType <> "." + _ -> ":: forall eff." + +-- purescript impl pretty-printers + +ppImpl :: Decl -> Doc +ppImpl f@Function{} = "foreign import" <+> implName f <+> ppImplTypeSig f + +ppImplTypeSig :: Decl -> Doc +ppImplTypeSig f@Function{} = + ppSigForall f <+> funcType <+> argList <+> parens (ppImplReturnType f) + where + args = funcArgs f + funcType = "Fn" <> int (length args) + argList = hcat . punctuate " " $ map (ppConvertType . argType) args + +ppImplReturnType :: Decl -> Doc +ppImplReturnType fn = effMonad <+> ppConvertType (methodRetType fn) + +-- purescript function pretty-printers + +ppFunc :: Decl -> Doc +ppFunc f@Function{} = ppFuncTypeSig f $+$ ppFuncDef f + +ppFuncTypeSig :: Decl -> Doc +ppFuncTypeSig f@Function{ methodName = name } = + text name <+> ppSigForall f <+> argList + where + types = map (ppConvertType . argType) (funcArgs f) ++ [ppFuncReturnType f] + argList = hcat $ punctuate " -> " types + +ppFuncDef :: Decl -> Doc +ppFuncDef f@Function { methodName = name, methodRetType = retType } = + text name <+> args <+> "=" <+> + "runFn" <> int (length $ funcArgs f) <+> + implName f <+> args <+> + safetyFn retType + where + args = ppFuncArgs f + +ppFuncArgs :: Decl -> Doc +ppFuncArgs = hcat . punctuate " " . map argNames . funcArgs + where + argNames = text . filterReserved . argName + +ppFuncReturnType :: Decl -> Doc +ppFuncReturnType fn = effMonad <+> ppConvertMaybeType (methodRetType fn) + ppConvertMaybeType :: Type -> Doc ppConvertMaybeType t = wrapMaybe $ ppConvertType t where wrapMaybe name = if typeIsMaybe t then parens ("Maybe" <+> name) else name -ppExportList :: [Decl] -> Doc -ppExportList = vcat . addOpener . prePunct (", ") . map (text . methodName) - where - addOpener (x:xs) = "(" <+> x : xs - addOpener xs = xs +-- purecript enum pretty-printers -sigForall :: Decl -> Doc -sigForall Function{ methodRetType = ret } = - case ret of - Generic -> ":: forall eff" <+> genericType <> "." - _ -> ":: forall eff." +ppConstant :: Decl -> Doc +ppConstant Enum { enumName = n, enumValue = v } = + constName <+> ":: GLenum" $$ + constName <+> "=" <+> (integer v) $$ + blank + where + constName = toCamelCase n -runReturnType :: Decl -> Doc -runReturnType fn = effMonad <+> ppConvertMaybeType (methodRetType fn) +-- purescript typedef pretty-printers -implReturnType :: Decl -> Doc -implReturnType fn = effMonad <+> ppConvertType (methodRetType fn) +ppTypeDecl :: Type -> Doc +ppTypeDecl Concrete{ typeName = name } = + "foreign import data" <+> text name <+> ":: *" +ppTypeDecl _ = empty -- helpers diff --git a/generator/Main.hs b/generator/Main.hs index 1a492d1..1a39da7 100644 --- a/generator/Main.hs +++ b/generator/Main.hs @@ -2,7 +2,7 @@ module Main (main) where import IDL.Parser (parseDecls) import IDL.Cleaner (declsToIdl) -import IDL.Printer (enumsFFI, funcsFFI, typesFFI) +import IDL.Printer (typesFFI, enumsFFI, exportsFFI, importsFFI) import System.Environment (getArgs) import System.Exit (exitSuccess) import System.IO (writeFile) @@ -32,6 +32,7 @@ runParser body = printFiles :: IDL -> IO () printFiles idl = do - writeFile "src/Graphics/WebGL/Raw/Types.purs" . render $ typesFFI idl - writeFile "src/Graphics/WebGL/Raw/Enums.purs" . render $ enumsFFI idl - writeFile "src/Graphics/WebGL/Raw.purs" . render $ funcsFFI idl + writeFile "src/Graphics/WebGL/Raw/Types.purs" . render $ typesFFI idl + writeFile "src/Graphics/WebGL/Raw/Enums.purs" . render $ enumsFFI idl + writeFile "src/Graphics/WebGL/Raw.js" . render $ exportsFFI idl + writeFile "src/Graphics/WebGL/Raw.purs" . render $ importsFFI idl From 872398aad1bbc1510fa549ea649a367f97eb6946 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 31 Jul 2015 15:54:58 -0500 Subject: [PATCH 48/51] update deps for PureScript 0.7.0 --- bower.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index efc058f..54a4fb5 100644 --- a/bower.json +++ b/bower.json @@ -13,8 +13,11 @@ ], "dependencies": { - "purescript-arraybuffer-types": "0.1.*", - "purescript-maybe": "0.2.*", - "purescript-typedarray": "0.3.*" + "purescript-canvas": "0.3.*", + "purescript-eff": "0.1.*", + "purescript-functions": "0.1.*", + "purescript-arraybuffer-types": "0.2.*", + "purescript-maybe": "0.3.*", + "purescript-typedarray": "0.4.*" } } From 5886779388ab7c866079e1004a535ba051fb746d Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 31 Jul 2015 15:55:33 -0500 Subject: [PATCH 49/51] fix generated imports so purescript properly builds --- generator/IDL/Printer.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/generator/IDL/Printer.hs b/generator/IDL/Printer.hs index 4bb1d55..b587e87 100644 --- a/generator/IDL/Printer.hs +++ b/generator/IDL/Printer.hs @@ -60,12 +60,19 @@ importsFFI idl = where header = vcat [ "module Graphics.WebGL.Raw" + , expList + , ") where" , "" + , "import Control.Monad.Eff" + , "import Data.ArrayBuffer.Types" , "import Data.Function" , "import Data.Maybe" + , "import Graphics.Canvas" , "import Graphics.WebGL.Raw.Types" + , "import Graphics.WebGL.Raw.Util" , "import Prelude" ] + expList = ppExportList $ getFuncs idl funcs = vcat . map ppImport $ getFuncs idl -- predefined text From 0a078a1698beffe5af572520979abecc70940ec6 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 31 Jul 2015 15:55:54 -0500 Subject: [PATCH 50/51] update generated purescript for 0.7.0 --- src/Graphics/WebGL/Raw.js | 928 +++++++++++++++++++++ src/Graphics/WebGL/Raw.purs | 1275 ++++------------------------- src/Graphics/WebGL/Raw/Enums.purs | 3 - src/Graphics/WebGL/Raw/Types.purs | 3 - src/Graphics/WebGL/Raw/Util.purs | 2 +- 5 files changed, 1103 insertions(+), 1108 deletions(-) create mode 100644 src/Graphics/WebGL/Raw.js diff --git a/src/Graphics/WebGL/Raw.js b/src/Graphics/WebGL/Raw.js new file mode 100644 index 0000000..f5a6fcf --- /dev/null +++ b/src/Graphics/WebGL/Raw.js @@ -0,0 +1,928 @@ +"use strict"; + +// module Graphics.WebGL.Raw + +exports.activeTextureImpl = function (webgl, texture) { + return function () { + return webgl.activeTexture(texture); + }; +} + +exports.attachShaderImpl = function (webgl, program, shader) { + return function () { + return webgl.attachShader(program, shader); + }; +} + +exports.bindAttribLocationImpl = function (webgl, program, index, name) { + return function () { + return webgl.bindAttribLocation(program, index, name); + }; +} + +exports.bindBufferImpl = function (webgl, target, buffer) { + return function () { + return webgl.bindBuffer(target, buffer); + }; +} + +exports.bindFramebufferImpl = function (webgl, target, framebuffer) { + return function () { + return webgl.bindFramebuffer(target, framebuffer); + }; +} + +exports.bindRenderbufferImpl = function (webgl, target, renderbuffer) { + return function () { + return webgl.bindRenderbuffer(target, renderbuffer); + }; +} + +exports.bindTextureImpl = function (webgl, target, texture) { + return function () { + return webgl.bindTexture(target, texture); + }; +} + +exports.blendColorImpl = function (webgl, red, green, blue, alpha) { + return function () { + return webgl.blendColor(red, green, blue, alpha); + }; +} + +exports.blendEquationImpl = function (webgl, mode) { + return function () { + return webgl.blendEquation(mode); + }; +} + +exports.blendEquationSeparateImpl = function (webgl, modeRGB, modeAlpha) { + return function () { + return webgl.blendEquationSeparate(modeRGB, modeAlpha); + }; +} + +exports.blendFuncImpl = function (webgl, sfactor, dfactor) { + return function () { + return webgl.blendFunc(sfactor, dfactor); + }; +} + +exports.blendFuncSeparateImpl = function (webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { + return function () { + return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + }; +} + +exports.bufferDataImpl = function (webgl, target, data, usage) { + return function () { + return webgl.bufferData(target, data, usage); + }; +} + +exports.bufferData_Impl = function (webgl, target, size, usage) { + return function () { + return webgl.bufferData(target, size, usage); + }; +} + +exports.bufferSubDataImpl = function (webgl, target, offset, data) { + return function () { + return webgl.bufferSubData(target, offset, data); + }; +} + +exports.checkFramebufferStatusImpl = function (webgl, target) { + return function () { + return webgl.checkFramebufferStatus(target); + }; +} + +exports.clearImpl = function (webgl, mask) { + return function () { + return webgl.clear(mask); + }; +} + +exports.clearColorImpl = function (webgl, red, green, blue, alpha) { + return function () { + return webgl.clearColor(red, green, blue, alpha); + }; +} + +exports.clearDepthImpl = function (webgl, depth) { + return function () { + return webgl.clearDepth(depth); + }; +} + +exports.clearStencilImpl = function (webgl, s) { + return function () { + return webgl.clearStencil(s); + }; +} + +exports.colorMaskImpl = function (webgl, red, green, blue, alpha) { + return function () { + return webgl.colorMask(red, green, blue, alpha); + }; +} + +exports.compileShaderImpl = function (webgl, shader) { + return function () { + return webgl.compileShader(shader); + }; +} + +exports.compressedTexImage2DImpl = function (webgl, target, level, internalformat, width, height, border, data) { + return function () { + return webgl.compressedTexImage2D(target, level, internalformat, width, height, border, data); + }; +} + +exports.compressedTexSubImage2DImpl = function (webgl, target, level, xoffset, yoffset, width, height, format, data) { + return function () { + return webgl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); + }; +} + +exports.copyTexImage2DImpl = function (webgl, target, level, internalformat, x, y, width, height, border) { + return function () { + return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); + }; +} + +exports.copyTexSubImage2DImpl = function (webgl, target, level, xoffset, yoffset, x, y, width, height) { + return function () { + return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + }; +} + +exports.createBufferImpl = function (webgl) { + return function () { + return webgl.createBuffer(); + }; +} + +exports.createFramebufferImpl = function (webgl) { + return function () { + return webgl.createFramebuffer(); + }; +} + +exports.createProgramImpl = function (webgl) { + return function () { + return webgl.createProgram(); + }; +} + +exports.createRenderbufferImpl = function (webgl) { + return function () { + return webgl.createRenderbuffer(); + }; +} + +exports.createShaderImpl = function (webgl, type) { + return function () { + return webgl.createShader(type); + }; +} + +exports.createTextureImpl = function (webgl) { + return function () { + return webgl.createTexture(); + }; +} + +exports.cullFaceImpl = function (webgl, mode) { + return function () { + return webgl.cullFace(mode); + }; +} + +exports.deleteBufferImpl = function (webgl, buffer) { + return function () { + return webgl.deleteBuffer(buffer); + }; +} + +exports.deleteFramebufferImpl = function (webgl, framebuffer) { + return function () { + return webgl.deleteFramebuffer(framebuffer); + }; +} + +exports.deleteProgramImpl = function (webgl, program) { + return function () { + return webgl.deleteProgram(program); + }; +} + +exports.deleteRenderbufferImpl = function (webgl, renderbuffer) { + return function () { + return webgl.deleteRenderbuffer(renderbuffer); + }; +} + +exports.deleteShaderImpl = function (webgl, shader) { + return function () { + return webgl.deleteShader(shader); + }; +} + +exports.deleteTextureImpl = function (webgl, texture) { + return function () { + return webgl.deleteTexture(texture); + }; +} + +exports.depthFuncImpl = function (webgl, func) { + return function () { + return webgl.depthFunc(func); + }; +} + +exports.depthMaskImpl = function (webgl, flag) { + return function () { + return webgl.depthMask(flag); + }; +} + +exports.depthRangeImpl = function (webgl, zNear, zFar) { + return function () { + return webgl.depthRange(zNear, zFar); + }; +} + +exports.detachShaderImpl = function (webgl, program, shader) { + return function () { + return webgl.detachShader(program, shader); + }; +} + +exports.disableImpl = function (webgl, cap) { + return function () { + return webgl.disable(cap); + }; +} + +exports.disableVertexAttribArrayImpl = function (webgl, index) { + return function () { + return webgl.disableVertexAttribArray(index); + }; +} + +exports.drawArraysImpl = function (webgl, mode, first, count) { + return function () { + return webgl.drawArrays(mode, first, count); + }; +} + +exports.drawElementsImpl = function (webgl, mode, count, type, offset) { + return function () { + return webgl.drawElements(mode, count, type, offset); + }; +} + +exports.enableImpl = function (webgl, cap) { + return function () { + return webgl.enable(cap); + }; +} + +exports.enableVertexAttribArrayImpl = function (webgl, index) { + return function () { + return webgl.enableVertexAttribArray(index); + }; +} + +exports.finishImpl = function (webgl) { + return function () { + return webgl.finish(); + }; +} + +exports.flushImpl = function (webgl) { + return function () { + return webgl.flush(); + }; +} + +exports.framebufferRenderbufferImpl = function (webgl, target, attachment, renderbuffertarget, renderbuffer) { + return function () { + return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + }; +} + +exports.framebufferTexture2DImpl = function (webgl, target, attachment, textarget, texture, level) { + return function () { + return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); + }; +} + +exports.frontFaceImpl = function (webgl, mode) { + return function () { + return webgl.frontFace(mode); + }; +} + +exports.generateMipmapImpl = function (webgl, target) { + return function () { + return webgl.generateMipmap(target); + }; +} + +exports.getActiveAttribImpl = function (webgl, program, index) { + return function () { + return webgl.getActiveAttrib(program, index); + }; +} + +exports.getActiveUniformImpl = function (webgl, program, index) { + return function () { + return webgl.getActiveUniform(program, index); + }; +} + +exports.getAttachedShadersImpl = function (webgl, program) { + return function () { + return webgl.getAttachedShaders(program); + }; +} + +exports.getAttribLocationImpl = function (webgl, program, name) { + return function () { + return webgl.getAttribLocation(program, name); + }; +} + +exports.getBufferParameterImpl = function (webgl, target, pname) { + return function () { + return webgl.getBufferParameter(target, pname); + }; +} + +exports.getContextAttributesImpl = function (webgl) { + return function () { + return webgl.getContextAttributes(); + }; +} + +exports.getErrorImpl = function (webgl) { + return function () { + return webgl.getError(); + }; +} + +exports.getExtensionImpl = function (webgl, name) { + return function () { + return webgl.getExtension(name); + }; +} + +exports.getFramebufferAttachmentParameterImpl = function (webgl, target, attachment, pname) { + return function () { + return webgl.getFramebufferAttachmentParameter(target, attachment, pname); + }; +} + +exports.getParameterImpl = function (webgl, pname) { + return function () { + return webgl.getParameter(pname); + }; +} + +exports.getProgramInfoLogImpl = function (webgl, program) { + return function () { + return webgl.getProgramInfoLog(program); + }; +} + +exports.getProgramParameterImpl = function (webgl, program, pname) { + return function () { + return webgl.getProgramParameter(program, pname); + }; +} + +exports.getRenderbufferParameterImpl = function (webgl, target, pname) { + return function () { + return webgl.getRenderbufferParameter(target, pname); + }; +} + +exports.getShaderInfoLogImpl = function (webgl, shader) { + return function () { + return webgl.getShaderInfoLog(shader); + }; +} + +exports.getShaderParameterImpl = function (webgl, shader, pname) { + return function () { + return webgl.getShaderParameter(shader, pname); + }; +} + +exports.getShaderPrecisionFormatImpl = function (webgl, shadertype, precisiontype) { + return function () { + return webgl.getShaderPrecisionFormat(shadertype, precisiontype); + }; +} + +exports.getShaderSourceImpl = function (webgl, shader) { + return function () { + return webgl.getShaderSource(shader); + }; +} + +exports.getSupportedExtensionsImpl = function (webgl) { + return function () { + return webgl.getSupportedExtensions(); + }; +} + +exports.getTexParameterImpl = function (webgl, target, pname) { + return function () { + return webgl.getTexParameter(target, pname); + }; +} + +exports.getUniformImpl = function (webgl, program, location) { + return function () { + return webgl.getUniform(program, location); + }; +} + +exports.getUniformLocationImpl = function (webgl, program, name) { + return function () { + return webgl.getUniformLocation(program, name); + }; +} + +exports.getVertexAttribImpl = function (webgl, index, pname) { + return function () { + return webgl.getVertexAttrib(index, pname); + }; +} + +exports.getVertexAttribOffsetImpl = function (webgl, index, pname) { + return function () { + return webgl.getVertexAttribOffset(index, pname); + }; +} + +exports.hintImpl = function (webgl, target, mode) { + return function () { + return webgl.hint(target, mode); + }; +} + +exports.isBufferImpl = function (webgl, buffer) { + return function () { + return webgl.isBuffer(buffer); + }; +} + +exports.isContextLostImpl = function (webgl) { + return function () { + return webgl.isContextLost(); + }; +} + +exports.isEnabledImpl = function (webgl, cap) { + return function () { + return webgl.isEnabled(cap); + }; +} + +exports.isFramebufferImpl = function (webgl, framebuffer) { + return function () { + return webgl.isFramebuffer(framebuffer); + }; +} + +exports.isProgramImpl = function (webgl, program) { + return function () { + return webgl.isProgram(program); + }; +} + +exports.isRenderbufferImpl = function (webgl, renderbuffer) { + return function () { + return webgl.isRenderbuffer(renderbuffer); + }; +} + +exports.isShaderImpl = function (webgl, shader) { + return function () { + return webgl.isShader(shader); + }; +} + +exports.isTextureImpl = function (webgl, texture) { + return function () { + return webgl.isTexture(texture); + }; +} + +exports.lineWidthImpl = function (webgl, width) { + return function () { + return webgl.lineWidth(width); + }; +} + +exports.linkProgramImpl = function (webgl, program) { + return function () { + return webgl.linkProgram(program); + }; +} + +exports.pixelStoreiImpl = function (webgl, pname, param) { + return function () { + return webgl.pixelStorei(pname, param); + }; +} + +exports.polygonOffsetImpl = function (webgl, factor, units) { + return function () { + return webgl.polygonOffset(factor, units); + }; +} + +exports.readPixelsImpl = function (webgl, x, y, width, height, format, type, pixels) { + return function () { + return webgl.readPixels(x, y, width, height, format, type, pixels); + }; +} + +exports.renderbufferStorageImpl = function (webgl, target, internalformat, width, height) { + return function () { + return webgl.renderbufferStorage(target, internalformat, width, height); + }; +} + +exports.sampleCoverageImpl = function (webgl, value, invert) { + return function () { + return webgl.sampleCoverage(value, invert); + }; +} + +exports.scissorImpl = function (webgl, x, y, width, height) { + return function () { + return webgl.scissor(x, y, width, height); + }; +} + +exports.shaderSourceImpl = function (webgl, shader, source) { + return function () { + return webgl.shaderSource(shader, source); + }; +} + +exports.stencilFuncImpl = function (webgl, func, ref, mask) { + return function () { + return webgl.stencilFunc(func, ref, mask); + }; +} + +exports.stencilFuncSeparateImpl = function (webgl, face, func, ref, mask) { + return function () { + return webgl.stencilFuncSeparate(face, func, ref, mask); + }; +} + +exports.stencilMaskImpl = function (webgl, mask) { + return function () { + return webgl.stencilMask(mask); + }; +} + +exports.stencilMaskSeparateImpl = function (webgl, face, mask) { + return function () { + return webgl.stencilMaskSeparate(face, mask); + }; +} + +exports.stencilOpImpl = function (webgl, fail, zfail, zpass) { + return function () { + return webgl.stencilOp(fail, zfail, zpass); + }; +} + +exports.stencilOpSeparateImpl = function (webgl, face, fail, zfail, zpass) { + return function () { + return webgl.stencilOpSeparate(face, fail, zfail, zpass); + }; +} + +exports.texImage2DImpl = function (webgl, target, level, internalformat, format, type, source) { + return function () { + return webgl.texImage2D(target, level, internalformat, format, type, source); + }; +} + +exports.texImage2D_Impl = function (webgl, target, level, internalformat, width, height, border, format, type, pixels) { + return function () { + return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); + }; +} + +exports.texParameterfImpl = function (webgl, target, pname, param) { + return function () { + return webgl.texParameterf(target, pname, param); + }; +} + +exports.texParameteriImpl = function (webgl, target, pname, param) { + return function () { + return webgl.texParameteri(target, pname, param); + }; +} + +exports.texSubImage2DImpl = function (webgl, target, level, xoffset, yoffset, format, type, source) { + return function () { + return webgl.texSubImage2D(target, level, xoffset, yoffset, format, type, source); + }; +} + +exports.texSubImage2D_Impl = function (webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { + return function () { + return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); + }; +} + +exports.uniform1fImpl = function (webgl, location, x) { + return function () { + return webgl.uniform1f(location, x); + }; +} + +exports.uniform1fvImpl = function (webgl, location, v) { + return function () { + return webgl.uniform1fv(location, v); + }; +} + +exports.uniform1fv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform1fv(location, v); + }; +} + +exports.uniform1iImpl = function (webgl, location, x) { + return function () { + return webgl.uniform1i(location, x); + }; +} + +exports.uniform1ivImpl = function (webgl, location, v) { + return function () { + return webgl.uniform1iv(location, v); + }; +} + +exports.uniform1iv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform1iv(location, v); + }; +} + +exports.uniform2fImpl = function (webgl, location, x, y) { + return function () { + return webgl.uniform2f(location, x, y); + }; +} + +exports.uniform2fvImpl = function (webgl, location, v) { + return function () { + return webgl.uniform2fv(location, v); + }; +} + +exports.uniform2fv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform2fv(location, v); + }; +} + +exports.uniform2iImpl = function (webgl, location, x, y) { + return function () { + return webgl.uniform2i(location, x, y); + }; +} + +exports.uniform2ivImpl = function (webgl, location, v) { + return function () { + return webgl.uniform2iv(location, v); + }; +} + +exports.uniform2iv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform2iv(location, v); + }; +} + +exports.uniform3fImpl = function (webgl, location, x, y, z) { + return function () { + return webgl.uniform3f(location, x, y, z); + }; +} + +exports.uniform3fvImpl = function (webgl, location, v) { + return function () { + return webgl.uniform3fv(location, v); + }; +} + +exports.uniform3fv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform3fv(location, v); + }; +} + +exports.uniform3iImpl = function (webgl, location, x, y, z) { + return function () { + return webgl.uniform3i(location, x, y, z); + }; +} + +exports.uniform3ivImpl = function (webgl, location, v) { + return function () { + return webgl.uniform3iv(location, v); + }; +} + +exports.uniform3iv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform3iv(location, v); + }; +} + +exports.uniform4fImpl = function (webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4f(location, x, y, z, w); + }; +} + +exports.uniform4fvImpl = function (webgl, location, v) { + return function () { + return webgl.uniform4fv(location, v); + }; +} + +exports.uniform4fv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform4fv(location, v); + }; +} + +exports.uniform4iImpl = function (webgl, location, x, y, z, w) { + return function () { + return webgl.uniform4i(location, x, y, z, w); + }; +} + +exports.uniform4ivImpl = function (webgl, location, v) { + return function () { + return webgl.uniform4iv(location, v); + }; +} + +exports.uniform4iv_Impl = function (webgl, location, v) { + return function () { + return webgl.uniform4iv(location, v); + }; +} + +exports.uniformMatrix2fvImpl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix2fv(location, transpose, value); + }; +} + +exports.uniformMatrix2fv_Impl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix2fv(location, transpose, value); + }; +} + +exports.uniformMatrix3fvImpl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix3fv(location, transpose, value); + }; +} + +exports.uniformMatrix3fv_Impl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix3fv(location, transpose, value); + }; +} + +exports.uniformMatrix4fvImpl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix4fv(location, transpose, value); + }; +} + +exports.uniformMatrix4fv_Impl = function (webgl, location, transpose, value) { + return function () { + return webgl.uniformMatrix4fv(location, transpose, value); + }; +} + +exports.useProgramImpl = function (webgl, program) { + return function () { + return webgl.useProgram(program); + }; +} + +exports.validateProgramImpl = function (webgl, program) { + return function () { + return webgl.validateProgram(program); + }; +} + +exports.vertexAttrib1fImpl = function (webgl, indx, x) { + return function () { + return webgl.vertexAttrib1f(indx, x); + }; +} + +exports.vertexAttrib1fvImpl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib1fv(indx, values); + }; +} + +exports.vertexAttrib1fv_Impl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib1fv(indx, values); + }; +} + +exports.vertexAttrib2fImpl = function (webgl, indx, x, y) { + return function () { + return webgl.vertexAttrib2f(indx, x, y); + }; +} + +exports.vertexAttrib2fvImpl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib2fv(indx, values); + }; +} + +exports.vertexAttrib2fv_Impl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib2fv(indx, values); + }; +} + +exports.vertexAttrib3fImpl = function (webgl, indx, x, y, z) { + return function () { + return webgl.vertexAttrib3f(indx, x, y, z); + }; +} + +exports.vertexAttrib3fvImpl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib3fv(indx, values); + }; +} + +exports.vertexAttrib3fv_Impl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib3fv(indx, values); + }; +} + +exports.vertexAttrib4fImpl = function (webgl, indx, x, y, z, w) { + return function () { + return webgl.vertexAttrib4f(indx, x, y, z, w); + }; +} + +exports.vertexAttrib4fvImpl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib4fv(indx, values); + }; +} + +exports.vertexAttrib4fv_Impl = function (webgl, indx, values) { + return function () { + return webgl.vertexAttrib4fv(indx, values); + }; +} + +exports.vertexAttribPointerImpl = function (webgl, indx, size, type, normalized, stride, offset) { + return function () { + return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); + }; +} + +exports.viewportImpl = function (webgl, x, y, width, height) { + return function () { + return webgl.viewport(x, y, width, height); + }; +} + diff --git a/src/Graphics/WebGL/Raw.purs b/src/Graphics/WebGL/Raw.purs index d679945..52e15e8 100644 --- a/src/Graphics/WebGL/Raw.purs +++ b/src/Graphics/WebGL/Raw.purs @@ -1,6 +1,3 @@ --- This file is automatically generated! Don't edit this file, but --- instead modify the included IDL parser and PureScript generator. - module Graphics.WebGL.Raw ( activeTexture , attachShader @@ -158,1705 +155,781 @@ module Graphics.WebGL.Raw , viewport ) where -import Data.Maybe (Maybe ()) -import Graphics.Canvas (Canvas ()) - import Control.Monad.Eff import Data.ArrayBuffer.Types import Data.Function +import Data.Maybe +import Graphics.Canvas import Graphics.WebGL.Raw.Types import Graphics.WebGL.Raw.Util +import Prelude -foreign import activeTextureImpl """ - function activeTextureImpl(webgl, texture) { - return function () { - return webgl.activeTexture(texture); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import activeTextureImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit activeTexture webgl texture = runFn2 activeTextureImpl webgl texture -foreign import attachShaderImpl """ - function attachShaderImpl(webgl, program, shader) { - return function () { - return webgl.attachShader(program, shader); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) +foreign import attachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit attachShader webgl program shader = runFn3 attachShaderImpl webgl program shader -foreign import bindAttribLocationImpl """ - function bindAttribLocationImpl(webgl, program, index, name) { - return function () { - return webgl.bindAttribLocation(program, index, name); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (canvas :: Canvas | eff) Unit) +foreign import bindAttribLocationImpl :: forall eff. Fn4 WebGLContext WebGLProgram GLuint DOMString (Eff (canvas :: Canvas | eff) Unit) bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (canvas :: Canvas | eff) Unit bindAttribLocation webgl program index name = runFn4 bindAttribLocationImpl webgl program index name -foreign import bindBufferImpl """ - function bindBufferImpl(webgl, target, buffer) { - return function () { - return webgl.bindBuffer(target, buffer); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import bindBufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit bindBuffer webgl target buffer = runFn3 bindBufferImpl webgl target buffer -foreign import bindFramebufferImpl """ - function bindFramebufferImpl(webgl, target, framebuffer) { - return function () { - return webgl.bindFramebuffer(target, framebuffer); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import bindFramebufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit bindFramebuffer webgl target framebuffer = runFn3 bindFramebufferImpl webgl target framebuffer -foreign import bindRenderbufferImpl """ - function bindRenderbufferImpl(webgl, target, renderbuffer) { - return function () { - return webgl.bindRenderbuffer(target, renderbuffer); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import bindRenderbufferImpl :: forall eff. Fn3 WebGLContext GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit bindRenderbuffer webgl target renderbuffer = runFn3 bindRenderbufferImpl webgl target renderbuffer -foreign import bindTextureImpl """ - function bindTextureImpl(webgl, target, texture) { - return function () { - return webgl.bindTexture(target, texture); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) +foreign import bindTextureImpl :: forall eff. Fn3 WebGLContext GLenum WebGLTexture (Eff (canvas :: Canvas | eff) Unit) bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit bindTexture webgl target texture = runFn3 bindTextureImpl webgl target texture -foreign import blendColorImpl """ - function blendColorImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.blendColor(red, green, blue, alpha); - }; - } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +foreign import blendColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit blendColor webgl red green blue alpha = runFn5 blendColorImpl webgl red green blue alpha -foreign import blendEquationImpl """ - function blendEquationImpl(webgl, mode) { - return function () { - return webgl.blendEquation(mode); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import blendEquationImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendEquation webgl mode = runFn2 blendEquationImpl webgl mode -foreign import blendEquationSeparateImpl """ - function blendEquationSeparateImpl(webgl, modeRGB, modeAlpha) { - return function () { - return webgl.blendEquationSeparate(modeRGB, modeAlpha); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import blendEquationSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendEquationSeparate webgl modeRGB modeAlpha = runFn3 blendEquationSeparateImpl webgl modeRGB modeAlpha -foreign import blendFuncImpl """ - function blendFuncImpl(webgl, sfactor, dfactor) { - return function () { - return webgl.blendFunc(sfactor, dfactor); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import blendFuncImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendFunc webgl sfactor dfactor = runFn3 blendFuncImpl webgl sfactor dfactor -foreign import blendFuncSeparateImpl """ - function blendFuncSeparateImpl(webgl, srcRGB, dstRGB, srcAlpha, dstAlpha) { - return function () { - return webgl.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import blendFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit blendFuncSeparate webgl srcRGB dstRGB srcAlpha dstAlpha = runFn5 blendFuncSeparateImpl webgl srcRGB dstRGB srcAlpha dstAlpha -foreign import bufferDataImpl """ - function bufferDataImpl(webgl, target, data, usage) { - return function () { - return webgl.bufferData(target, data, usage); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum BufferDataSource GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import bufferDataImpl :: forall eff. Fn4 WebGLContext GLenum BufferDataSource GLenum (Eff (canvas :: Canvas | eff) Unit) bufferData :: forall eff. WebGLContext -> GLenum -> BufferDataSource -> GLenum -> Eff (canvas :: Canvas | eff) Unit bufferData webgl target data' usage = runFn4 bufferDataImpl webgl target data' usage -foreign import bufferData_Impl """ - function bufferData_Impl(webgl, target, size, usage) { - return function () { - return webgl.bufferData(target, size, usage); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLsizeiptr GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import bufferData_Impl :: forall eff. Fn4 WebGLContext GLenum GLsizeiptr GLenum (Eff (canvas :: Canvas | eff) Unit) bufferData_ :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit bufferData_ webgl target size usage = runFn4 bufferData_Impl webgl target size usage -foreign import bufferSubDataImpl """ - function bufferSubDataImpl(webgl, target, offset, data) { - return function () { - return webgl.bufferSubData(target, offset, data); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLintptr BufferDataSource (Eff (canvas :: Canvas | eff) Unit) +foreign import bufferSubDataImpl :: forall eff. Fn4 WebGLContext GLenum GLintptr BufferDataSource (Eff (canvas :: Canvas | eff) Unit) bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> BufferDataSource -> Eff (canvas :: Canvas | eff) Unit bufferSubData webgl target offset data' = runFn4 bufferSubDataImpl webgl target offset data' -foreign import checkFramebufferStatusImpl """ - function checkFramebufferStatusImpl(webgl, target) { - return function () { - return webgl.checkFramebufferStatus(target); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) +foreign import checkFramebufferStatusImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLenum) checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLenum checkFramebufferStatus webgl target = runFn2 checkFramebufferStatusImpl webgl target -foreign import clearImpl """ - function clearImpl(webgl, mask) { - return function () { - return webgl.clear(mask); - }; - } -""" :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) +foreign import clearImpl :: forall eff. Fn2 WebGLContext GLbitfield (Eff (canvas :: Canvas | eff) Unit) clear :: forall eff. WebGLContext -> GLbitfield -> Eff (canvas :: Canvas | eff) Unit clear webgl mask = runFn2 clearImpl webgl mask -foreign import clearColorImpl """ - function clearColorImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.clearColor(red, green, blue, alpha); - }; - } -""" :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +foreign import clearColorImpl :: forall eff. Fn5 WebGLContext GLclampf GLclampf GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit clearColor webgl red green blue alpha = runFn5 clearColorImpl webgl red green blue alpha -foreign import clearDepthImpl """ - function clearDepthImpl(webgl, depth) { - return function () { - return webgl.clearDepth(depth); - }; - } -""" :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) +foreign import clearDepthImpl :: forall eff. Fn2 WebGLContext GLclampf (Eff (canvas :: Canvas | eff) Unit) clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (canvas :: Canvas | eff) Unit clearDepth webgl depth = runFn2 clearDepthImpl webgl depth -foreign import clearStencilImpl """ - function clearStencilImpl(webgl, s) { - return function () { - return webgl.clearStencil(s); - }; - } -""" :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import clearStencilImpl :: forall eff. Fn2 WebGLContext GLint (Eff (canvas :: Canvas | eff) Unit) clearStencil :: forall eff. WebGLContext -> GLint -> Eff (canvas :: Canvas | eff) Unit clearStencil webgl s = runFn2 clearStencilImpl webgl s -foreign import colorMaskImpl """ - function colorMaskImpl(webgl, red, green, blue, alpha) { - return function () { - return webgl.colorMask(red, green, blue, alpha); - }; - } -""" :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) +foreign import colorMaskImpl :: forall eff. Fn5 WebGLContext GLboolean GLboolean GLboolean GLboolean (Eff (canvas :: Canvas | eff) Unit) colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (canvas :: Canvas | eff) Unit colorMask webgl red green blue alpha = runFn5 colorMaskImpl webgl red green blue alpha -foreign import compileShaderImpl """ - function compileShaderImpl(webgl, shader) { - return function () { - return webgl.compileShader(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) +foreign import compileShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit compileShader webgl shader = runFn2 compileShaderImpl webgl shader -foreign import compressedTexImage2DImpl """ - function compressedTexImage2DImpl(webgl, target, level, internalformat, width, height, border, data) { - return function () { - return webgl.compressedTexImage2D(target, level, internalformat, width, height, border, data); - }; - } -""" :: forall eff. Fn8 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +foreign import compressedTexImage2DImpl :: forall eff. Fn8 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) compressedTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit compressedTexImage2D webgl target level internalformat width height border data' = runFn8 compressedTexImage2DImpl webgl target level internalformat width height border data' -foreign import compressedTexSubImage2DImpl """ - function compressedTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, width, height, format, data) { - return function () { - return webgl.compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data); - }; - } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +foreign import compressedTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) compressedTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit compressedTexSubImage2D webgl target level xoffset yoffset width height format data' = runFn9 compressedTexSubImage2DImpl webgl target level xoffset yoffset width height format data' -foreign import copyTexImage2DImpl """ - function copyTexImage2DImpl(webgl, target, level, internalformat, x, y, width, height, border) { - return function () { - return webgl.copyTexImage2D(target, level, internalformat, x, y, width, height, border); - }; - } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import copyTexImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLenum GLint GLint GLsizei GLsizei GLint (Eff (canvas :: Canvas | eff) Unit) copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (canvas :: Canvas | eff) Unit copyTexImage2D webgl target level internalformat x y width height border = runFn9 copyTexImage2DImpl webgl target level internalformat x y width height border -foreign import copyTexSubImage2DImpl """ - function copyTexSubImage2DImpl(webgl, target, level, xoffset, yoffset, x, y, width, height) { - return function () { - return webgl.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); - }; - } -""" :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +foreign import copyTexSubImage2DImpl :: forall eff. Fn9 WebGLContext GLenum GLint GLint GLint GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit copyTexSubImage2D webgl target level xoffset yoffset x y width height = runFn9 copyTexSubImage2DImpl webgl target level xoffset yoffset x y width height -foreign import createBufferImpl """ - function createBufferImpl(webgl) { - return function () { - return webgl.createBuffer(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) +foreign import createBufferImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLBuffer) createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLBuffer) createBuffer webgl = runFn1 createBufferImpl webgl >>= toMaybe >>> return -foreign import createFramebufferImpl """ - function createFramebufferImpl(webgl) { - return function () { - return webgl.createFramebuffer(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) +foreign import createFramebufferImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLFramebuffer) createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLFramebuffer) createFramebuffer webgl = runFn1 createFramebufferImpl webgl >>= toMaybe >>> return -foreign import createProgramImpl """ - function createProgramImpl(webgl) { - return function () { - return webgl.createProgram(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) +foreign import createProgramImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLProgram) createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLProgram) createProgram webgl = runFn1 createProgramImpl webgl >>= toMaybe >>> return -foreign import createRenderbufferImpl """ - function createRenderbufferImpl(webgl) { - return function () { - return webgl.createRenderbuffer(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) +foreign import createRenderbufferImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLRenderbuffer) createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLRenderbuffer) createRenderbuffer webgl = runFn1 createRenderbufferImpl webgl >>= toMaybe >>> return -foreign import createShaderImpl """ - function createShaderImpl(webgl, type) { - return function () { - return webgl.createShader(type); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) +foreign import createShaderImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) WebGLShader) createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShader) createShader webgl type' = runFn2 createShaderImpl webgl type' >>= toMaybe >>> return -foreign import createTextureImpl """ - function createTextureImpl(webgl) { - return function () { - return webgl.createTexture(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) +foreign import createTextureImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLTexture) createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLTexture) createTexture webgl = runFn1 createTextureImpl webgl >>= toMaybe >>> return -foreign import cullFaceImpl """ - function cullFaceImpl(webgl, mode) { - return function () { - return webgl.cullFace(mode); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import cullFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) cullFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit cullFace webgl mode = runFn2 cullFaceImpl webgl mode -foreign import deleteBufferImpl """ - function deleteBufferImpl(webgl, buffer) { - return function () { - return webgl.deleteBuffer(buffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) Unit) deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit deleteBuffer webgl buffer = runFn2 deleteBufferImpl webgl buffer -foreign import deleteFramebufferImpl """ - function deleteFramebufferImpl(webgl, framebuffer) { - return function () { - return webgl.deleteFramebuffer(framebuffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) Unit) deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit deleteFramebuffer webgl framebuffer = runFn2 deleteFramebufferImpl webgl framebuffer -foreign import deleteProgramImpl """ - function deleteProgramImpl(webgl, program) { - return function () { - return webgl.deleteProgram(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit deleteProgram webgl program = runFn2 deleteProgramImpl webgl program -foreign import deleteRenderbufferImpl """ - function deleteRenderbufferImpl(webgl, renderbuffer) { - return function () { - return webgl.deleteRenderbuffer(renderbuffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit deleteRenderbuffer webgl renderbuffer = runFn2 deleteRenderbufferImpl webgl renderbuffer -foreign import deleteShaderImpl """ - function deleteShaderImpl(webgl, shader) { - return function () { - return webgl.deleteShader(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) Unit) deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit deleteShader webgl shader = runFn2 deleteShaderImpl webgl shader -foreign import deleteTextureImpl """ - function deleteTextureImpl(webgl, texture) { - return function () { - return webgl.deleteTexture(texture); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) +foreign import deleteTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) Unit) deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit deleteTexture webgl texture = runFn2 deleteTextureImpl webgl texture -foreign import depthFuncImpl """ - function depthFuncImpl(webgl, func) { - return function () { - return webgl.depthFunc(func); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import depthFuncImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit depthFunc webgl func = runFn2 depthFuncImpl webgl func -foreign import depthMaskImpl """ - function depthMaskImpl(webgl, flag) { - return function () { - return webgl.depthMask(flag); - }; - } -""" :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) +foreign import depthMaskImpl :: forall eff. Fn2 WebGLContext GLboolean (Eff (canvas :: Canvas | eff) Unit) depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (canvas :: Canvas | eff) Unit depthMask webgl flag = runFn2 depthMaskImpl webgl flag -foreign import depthRangeImpl """ - function depthRangeImpl(webgl, zNear, zFar) { - return function () { - return webgl.depthRange(zNear, zFar); - }; - } -""" :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) +foreign import depthRangeImpl :: forall eff. Fn3 WebGLContext GLclampf GLclampf (Eff (canvas :: Canvas | eff) Unit) depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit depthRange webgl zNear zFar = runFn3 depthRangeImpl webgl zNear zFar -foreign import detachShaderImpl """ - function detachShaderImpl(webgl, program, shader) { - return function () { - return webgl.detachShader(program, shader); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) +foreign import detachShaderImpl :: forall eff. Fn3 WebGLContext WebGLProgram WebGLShader (Eff (canvas :: Canvas | eff) Unit) detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit detachShader webgl program shader = runFn3 detachShaderImpl webgl program shader -foreign import disableImpl """ - function disableImpl(webgl, cap) { - return function () { - return webgl.disable(cap); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import disableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) disable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit disable webgl cap = runFn2 disableImpl webgl cap -foreign import disableVertexAttribArrayImpl """ - function disableVertexAttribArrayImpl(webgl, index) { - return function () { - return webgl.disableVertexAttribArray(index); - }; - } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import disableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit disableVertexAttribArray webgl index = runFn2 disableVertexAttribArrayImpl webgl index -foreign import drawArraysImpl """ - function drawArraysImpl(webgl, mode, first, count) { - return function () { - return webgl.drawArrays(mode, first, count); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) +foreign import drawArraysImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLsizei (Eff (canvas :: Canvas | eff) Unit) drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (canvas :: Canvas | eff) Unit drawArrays webgl mode first count = runFn4 drawArraysImpl webgl mode first count -foreign import drawElementsImpl """ - function drawElementsImpl(webgl, mode, count, type, offset) { - return function () { - return webgl.drawElements(mode, count, type, offset); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) +foreign import drawElementsImpl :: forall eff. Fn5 WebGLContext GLenum GLsizei GLenum GLintptr (Eff (canvas :: Canvas | eff) Unit) drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit drawElements webgl mode count type' offset = runFn5 drawElementsImpl webgl mode count type' offset -foreign import enableImpl """ - function enableImpl(webgl, cap) { - return function () { - return webgl.enable(cap); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import enableImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) enable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit enable webgl cap = runFn2 enableImpl webgl cap -foreign import enableVertexAttribArrayImpl """ - function enableVertexAttribArrayImpl(webgl, index) { - return function () { - return webgl.enableVertexAttribArray(index); - }; - } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import enableVertexAttribArrayImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit enableVertexAttribArray webgl index = runFn2 enableVertexAttribArrayImpl webgl index -foreign import finishImpl """ - function finishImpl(webgl) { - return function () { - return webgl.finish(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) +foreign import finishImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) finish :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit finish webgl = runFn1 finishImpl webgl -foreign import flushImpl """ - function flushImpl(webgl) { - return function () { - return webgl.flush(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) +foreign import flushImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Unit) flush :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit flush webgl = runFn1 flushImpl webgl -foreign import framebufferRenderbufferImpl """ - function framebufferRenderbufferImpl(webgl, target, attachment, renderbuffertarget, renderbuffer) { - return function () { - return webgl.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) +foreign import framebufferRenderbufferImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum WebGLRenderbuffer (Eff (canvas :: Canvas | eff) Unit) framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit framebufferRenderbuffer webgl target attachment renderbuffertarget renderbuffer = runFn5 framebufferRenderbufferImpl webgl target attachment renderbuffertarget renderbuffer -foreign import framebufferTexture2DImpl """ - function framebufferTexture2DImpl(webgl, target, attachment, textarget, texture, level) { - return function () { - return webgl.framebufferTexture2D(target, attachment, textarget, texture, level); - }; - } -""" :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import framebufferTexture2DImpl :: forall eff. Fn6 WebGLContext GLenum GLenum GLenum WebGLTexture GLint (Eff (canvas :: Canvas | eff) Unit) framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (canvas :: Canvas | eff) Unit framebufferTexture2D webgl target attachment textarget texture level = runFn6 framebufferTexture2DImpl webgl target attachment textarget texture level -foreign import frontFaceImpl """ - function frontFaceImpl(webgl, mode) { - return function () { - return webgl.frontFace(mode); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import frontFaceImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) frontFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit frontFace webgl mode = runFn2 frontFaceImpl webgl mode -foreign import generateMipmapImpl """ - function generateMipmapImpl(webgl, target) { - return function () { - return webgl.generateMipmap(target); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import generateMipmapImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) Unit) generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit generateMipmap webgl target = runFn2 generateMipmapImpl webgl target -foreign import getActiveAttribImpl """ - function getActiveAttribImpl(webgl, program, index) { - return function () { - return webgl.getActiveAttrib(program, index); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) +foreign import getActiveAttribImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) getActiveAttrib webgl program index = runFn3 getActiveAttribImpl webgl program index >>= toMaybe >>> return -foreign import getActiveUniformImpl """ - function getActiveUniformImpl(webgl, program, index) { - return function () { - return webgl.getActiveUniform(program, index); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) +foreign import getActiveUniformImpl :: forall eff. Fn3 WebGLContext WebGLProgram GLuint (Eff (canvas :: Canvas | eff) WebGLActiveInfo) getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) getActiveUniform webgl program index = runFn3 getActiveUniformImpl webgl program index >>= toMaybe >>> return -foreign import getAttachedShadersImpl """ - function getAttachedShadersImpl(webgl, program) { - return function () { - return webgl.getAttachedShaders(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) [WebGLShader]) +foreign import getAttachedShadersImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) (Array WebGLShader)) -getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) [WebGLShader] +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Array WebGLShader) getAttachedShaders webgl program = runFn2 getAttachedShadersImpl webgl program >>= nullAsEmpty >>> return -foreign import getAttribLocationImpl """ - function getAttribLocationImpl(webgl, program, name) { - return function () { - return webgl.getAttribLocation(program, name); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) GLint) +foreign import getAttribLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) GLint) getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) GLint getAttribLocation webgl program name = runFn3 getAttribLocationImpl webgl program name -foreign import getBufferParameterImpl """ - function getBufferParameterImpl(webgl, target, pname) { - return function () { - return webgl.getBufferParameter(target, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getBufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getBufferParameter webgl target pname = runFn3 getBufferParameterImpl webgl target pname >>= toMaybe >>> return -foreign import getContextAttributesImpl """ - function getContextAttributesImpl(webgl) { - return function () { - return webgl.getContextAttributes(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) +foreign import getContextAttributesImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) WebGLContextAttributes) getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) getContextAttributes webgl = runFn1 getContextAttributesImpl webgl >>= toMaybe >>> return -foreign import getErrorImpl """ - function getErrorImpl(webgl) { - return function () { - return webgl.getError(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) +foreign import getErrorImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) GLenum) getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum getError webgl = runFn1 getErrorImpl webgl -foreign import getExtensionImpl """ - function getExtensionImpl(webgl, name) { - return function () { - return webgl.getExtension(name); - }; - } -""" :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) +foreign import getExtensionImpl :: forall eff a. Fn2 WebGLContext DOMString (Eff (canvas :: Canvas | eff) a) getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) getExtension webgl name = runFn2 getExtensionImpl webgl name >>= toMaybe >>> return -foreign import getFramebufferAttachmentParameterImpl """ - function getFramebufferAttachmentParameterImpl(webgl, target, attachment, pname) { - return function () { - return webgl.getFramebufferAttachmentParameter(target, attachment, pname); - }; - } -""" :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getFramebufferAttachmentParameterImpl :: forall eff a. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) a) getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getFramebufferAttachmentParameter webgl target attachment pname = runFn4 getFramebufferAttachmentParameterImpl webgl target attachment pname >>= toMaybe >>> return -foreign import getParameterImpl """ - function getParameterImpl(webgl, pname) { - return function () { - return webgl.getParameter(pname); - }; - } -""" :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getParameterImpl :: forall eff a. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) a) getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getParameter webgl pname = runFn2 getParameterImpl webgl pname >>= toMaybe >>> return -foreign import getProgramInfoLogImpl """ - function getProgramInfoLogImpl(webgl, program) { - return function () { - return webgl.getProgramInfoLog(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) DOMString) +foreign import getProgramInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) DOMString) getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) getProgramInfoLog webgl program = runFn2 getProgramInfoLogImpl webgl program >>= toMaybe >>> return -foreign import getProgramParameterImpl """ - function getProgramParameterImpl(webgl, program, pname) { - return function () { - return webgl.getProgramParameter(program, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getProgramParameterImpl :: forall eff a. Fn3 WebGLContext WebGLProgram GLenum (Eff (canvas :: Canvas | eff) a) getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getProgramParameter webgl program pname = runFn3 getProgramParameterImpl webgl program pname >>= toMaybe >>> return -foreign import getRenderbufferParameterImpl """ - function getRenderbufferParameterImpl(webgl, target, pname) { - return function () { - return webgl.getRenderbufferParameter(target, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getRenderbufferParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getRenderbufferParameter webgl target pname = runFn3 getRenderbufferParameterImpl webgl target pname >>= toMaybe >>> return -foreign import getShaderInfoLogImpl """ - function getShaderInfoLogImpl(webgl, shader) { - return function () { - return webgl.getShaderInfoLog(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) +foreign import getShaderInfoLogImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) getShaderInfoLog webgl shader = runFn2 getShaderInfoLogImpl webgl shader >>= toMaybe >>> return -foreign import getShaderParameterImpl """ - function getShaderParameterImpl(webgl, shader, pname) { - return function () { - return webgl.getShaderParameter(shader, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getShaderParameterImpl :: forall eff a. Fn3 WebGLContext WebGLShader GLenum (Eff (canvas :: Canvas | eff) a) getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getShaderParameter webgl shader pname = runFn3 getShaderParameterImpl webgl shader pname >>= toMaybe >>> return -foreign import getShaderPrecisionFormatImpl """ - function getShaderPrecisionFormatImpl(webgl, shadertype, precisiontype) { - return function () { - return webgl.getShaderPrecisionFormat(shadertype, precisiontype); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) WebGLShaderPrecisionFormat) +foreign import getShaderPrecisionFormatImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) WebGLShaderPrecisionFormat) getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) getShaderPrecisionFormat webgl shadertype precisiontype = runFn3 getShaderPrecisionFormatImpl webgl shadertype precisiontype >>= toMaybe >>> return -foreign import getShaderSourceImpl """ - function getShaderSourceImpl(webgl, shader) { - return function () { - return webgl.getShaderSource(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) +foreign import getShaderSourceImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) DOMString) getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) getShaderSource webgl shader = runFn2 getShaderSourceImpl webgl shader >>= toMaybe >>> return -foreign import getSupportedExtensionsImpl """ - function getSupportedExtensionsImpl(webgl) { - return function () { - return webgl.getSupportedExtensions(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) [DOMString]) +foreign import getSupportedExtensionsImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) (Array DOMString)) -getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) [DOMString] +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Array DOMString) getSupportedExtensions webgl = runFn1 getSupportedExtensionsImpl webgl >>= nullAsEmpty >>> return -foreign import getTexParameterImpl """ - function getTexParameterImpl(webgl, target, pname) { - return function () { - return webgl.getTexParameter(target, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getTexParameterImpl :: forall eff a. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) a) getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getTexParameter webgl target pname = runFn3 getTexParameterImpl webgl target pname >>= toMaybe >>> return -foreign import getUniformImpl """ - function getUniformImpl(webgl, program, location) { - return function () { - return webgl.getUniform(program, location); - }; - } -""" :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) +foreign import getUniformImpl :: forall eff a. Fn3 WebGLContext WebGLProgram WebGLUniformLocation (Eff (canvas :: Canvas | eff) a) getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) (Maybe a) getUniform webgl program location = runFn3 getUniformImpl webgl program location >>= toMaybe >>> return -foreign import getUniformLocationImpl """ - function getUniformLocationImpl(webgl, program, name) { - return function () { - return webgl.getUniformLocation(program, name); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) WebGLUniformLocation) +foreign import getUniformLocationImpl :: forall eff. Fn3 WebGLContext WebGLProgram DOMString (Eff (canvas :: Canvas | eff) WebGLUniformLocation) getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe WebGLUniformLocation) getUniformLocation webgl program name = runFn3 getUniformLocationImpl webgl program name >>= toMaybe >>> return -foreign import getVertexAttribImpl """ - function getVertexAttribImpl(webgl, index, pname) { - return function () { - return webgl.getVertexAttrib(index, pname); - }; - } -""" :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) +foreign import getVertexAttribImpl :: forall eff a. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) a) getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) getVertexAttrib webgl index pname = runFn3 getVertexAttribImpl webgl index pname >>= toMaybe >>> return -foreign import getVertexAttribOffsetImpl """ - function getVertexAttribOffsetImpl(webgl, index, pname) { - return function () { - return webgl.getVertexAttribOffset(index, pname); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) +foreign import getVertexAttribOffsetImpl :: forall eff. Fn3 WebGLContext GLuint GLenum (Eff (canvas :: Canvas | eff) GLsizeiptr) getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) GLsizeiptr getVertexAttribOffset webgl index pname = runFn3 getVertexAttribOffsetImpl webgl index pname -foreign import hintImpl """ - function hintImpl(webgl, target, mode) { - return function () { - return webgl.hint(target, mode); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import hintImpl :: forall eff. Fn3 WebGLContext GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit hint webgl target mode = runFn3 hintImpl webgl target mode -foreign import isBufferImpl """ - function isBufferImpl(webgl, buffer) { - return function () { - return webgl.isBuffer(buffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isBufferImpl :: forall eff. Fn2 WebGLContext WebGLBuffer (Eff (canvas :: Canvas | eff) GLboolean) isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean isBuffer webgl buffer = runFn2 isBufferImpl webgl buffer -foreign import isContextLostImpl """ - function isContextLostImpl(webgl) { - return function () { - return webgl.isContextLost(); - }; - } -""" :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) +foreign import isContextLostImpl :: forall eff. Fn1 WebGLContext (Eff (canvas :: Canvas | eff) Boolean) isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean isContextLost webgl = runFn1 isContextLostImpl webgl -foreign import isEnabledImpl """ - function isEnabledImpl(webgl, cap) { - return function () { - return webgl.isEnabled(cap); - }; - } -""" :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isEnabledImpl :: forall eff. Fn2 WebGLContext GLenum (Eff (canvas :: Canvas | eff) GLboolean) isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLboolean isEnabled webgl cap = runFn2 isEnabledImpl webgl cap -foreign import isFramebufferImpl """ - function isFramebufferImpl(webgl, framebuffer) { - return function () { - return webgl.isFramebuffer(framebuffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isFramebufferImpl :: forall eff. Fn2 WebGLContext WebGLFramebuffer (Eff (canvas :: Canvas | eff) GLboolean) isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) GLboolean isFramebuffer webgl framebuffer = runFn2 isFramebufferImpl webgl framebuffer -foreign import isProgramImpl """ - function isProgramImpl(webgl, program) { - return function () { - return webgl.isProgram(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) GLboolean) isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) GLboolean isProgram webgl program = runFn2 isProgramImpl webgl program -foreign import isRenderbufferImpl """ - function isRenderbufferImpl(webgl, renderbuffer) { - return function () { - return webgl.isRenderbuffer(renderbuffer); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isRenderbufferImpl :: forall eff. Fn2 WebGLContext WebGLRenderbuffer (Eff (canvas :: Canvas | eff) GLboolean) isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) GLboolean isRenderbuffer webgl renderbuffer = runFn2 isRenderbufferImpl webgl renderbuffer -foreign import isShaderImpl """ - function isShaderImpl(webgl, shader) { - return function () { - return webgl.isShader(shader); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isShaderImpl :: forall eff. Fn2 WebGLContext WebGLShader (Eff (canvas :: Canvas | eff) GLboolean) isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) GLboolean isShader webgl shader = runFn2 isShaderImpl webgl shader -foreign import isTextureImpl """ - function isTextureImpl(webgl, texture) { - return function () { - return webgl.isTexture(texture); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) +foreign import isTextureImpl :: forall eff. Fn2 WebGLContext WebGLTexture (Eff (canvas :: Canvas | eff) GLboolean) isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) GLboolean isTexture webgl texture = runFn2 isTextureImpl webgl texture -foreign import lineWidthImpl """ - function lineWidthImpl(webgl, width) { - return function () { - return webgl.lineWidth(width); - }; - } -""" :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import lineWidthImpl :: forall eff. Fn2 WebGLContext GLfloat (Eff (canvas :: Canvas | eff) Unit) lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (canvas :: Canvas | eff) Unit lineWidth webgl width = runFn2 lineWidthImpl webgl width -foreign import linkProgramImpl """ - function linkProgramImpl(webgl, program) { - return function () { - return webgl.linkProgram(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +foreign import linkProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit linkProgram webgl program = runFn2 linkProgramImpl webgl program -foreign import pixelStoreiImpl """ - function pixelStoreiImpl(webgl, pname, param) { - return function () { - return webgl.pixelStorei(pname, param); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import pixelStoreiImpl :: forall eff. Fn3 WebGLContext GLenum GLint (Eff (canvas :: Canvas | eff) Unit) pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit pixelStorei webgl pname param = runFn3 pixelStoreiImpl webgl pname param -foreign import polygonOffsetImpl """ - function polygonOffsetImpl(webgl, factor, units) { - return function () { - return webgl.polygonOffset(factor, units); - }; - } -""" :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import polygonOffsetImpl :: forall eff. Fn3 WebGLContext GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit polygonOffset webgl factor units = runFn3 polygonOffsetImpl webgl factor units -foreign import readPixelsImpl """ - function readPixelsImpl(webgl, x, y, width, height, format, type, pixels) { - return function () { - return webgl.readPixels(x, y, width, height, format, type, pixels); - }; - } -""" :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +foreign import readPixelsImpl :: forall eff. Fn8 WebGLContext GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit readPixels webgl x y width height format type' pixels = runFn8 readPixelsImpl webgl x y width height format type' pixels -foreign import renderbufferStorageImpl """ - function renderbufferStorageImpl(webgl, target, internalformat, width, height) { - return function () { - return webgl.renderbufferStorage(target, internalformat, width, height); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +foreign import renderbufferStorageImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit renderbufferStorage webgl target internalformat width height = runFn5 renderbufferStorageImpl webgl target internalformat width height -foreign import sampleCoverageImpl """ - function sampleCoverageImpl(webgl, value, invert) { - return function () { - return webgl.sampleCoverage(value, invert); - }; - } -""" :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) +foreign import sampleCoverageImpl :: forall eff. Fn3 WebGLContext GLclampf GLboolean (Eff (canvas :: Canvas | eff) Unit) sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (canvas :: Canvas | eff) Unit sampleCoverage webgl value invert = runFn3 sampleCoverageImpl webgl value invert -foreign import scissorImpl """ - function scissorImpl(webgl, x, y, width, height) { - return function () { - return webgl.scissor(x, y, width, height); - }; - } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +foreign import scissorImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit scissor webgl x y width height = runFn5 scissorImpl webgl x y width height -foreign import shaderSourceImpl """ - function shaderSourceImpl(webgl, shader, source) { - return function () { - return webgl.shaderSource(shader, source); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (canvas :: Canvas | eff) Unit) +foreign import shaderSourceImpl :: forall eff. Fn3 WebGLContext WebGLShader DOMString (Eff (canvas :: Canvas | eff) Unit) shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (canvas :: Canvas | eff) Unit shaderSource webgl shader source = runFn3 shaderSourceImpl webgl shader source -foreign import stencilFuncImpl """ - function stencilFuncImpl(webgl, func, ref, mask) { - return function () { - return webgl.stencilFunc(func, ref, mask); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilFuncImpl :: forall eff. Fn4 WebGLContext GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilFunc webgl func ref mask = runFn4 stencilFuncImpl webgl func ref mask -foreign import stencilFuncSeparateImpl """ - function stencilFuncSeparateImpl(webgl, face, func, ref, mask) { - return function () { - return webgl.stencilFuncSeparate(face, func, ref, mask); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilFuncSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLint GLuint (Eff (canvas :: Canvas | eff) Unit) stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilFuncSeparate webgl face func ref mask = runFn5 stencilFuncSeparateImpl webgl face func ref mask -foreign import stencilMaskImpl """ - function stencilMaskImpl(webgl, mask) { - return function () { - return webgl.stencilMask(mask); - }; - } -""" :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilMaskImpl :: forall eff. Fn2 WebGLContext GLuint (Eff (canvas :: Canvas | eff) Unit) stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilMask webgl mask = runFn2 stencilMaskImpl webgl mask -foreign import stencilMaskSeparateImpl """ - function stencilMaskSeparateImpl(webgl, face, mask) { - return function () { - return webgl.stencilMaskSeparate(face, mask); - }; - } -""" :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilMaskSeparateImpl :: forall eff. Fn3 WebGLContext GLenum GLuint (Eff (canvas :: Canvas | eff) Unit) stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (canvas :: Canvas | eff) Unit stencilMaskSeparate webgl face mask = runFn3 stencilMaskSeparateImpl webgl face mask -foreign import stencilOpImpl """ - function stencilOpImpl(webgl, fail, zfail, zpass) { - return function () { - return webgl.stencilOp(fail, zfail, zpass); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilOpImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit stencilOp webgl fail zfail zpass = runFn4 stencilOpImpl webgl fail zfail zpass -foreign import stencilOpSeparateImpl """ - function stencilOpSeparateImpl(webgl, face, fail, zfail, zpass) { - return function () { - return webgl.stencilOpSeparate(face, fail, zfail, zpass); - }; - } -""" :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) +foreign import stencilOpSeparateImpl :: forall eff. Fn5 WebGLContext GLenum GLenum GLenum GLenum (Eff (canvas :: Canvas | eff) Unit) stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit stencilOpSeparate webgl face fail zfail zpass = runFn5 stencilOpSeparateImpl webgl face fail zfail zpass -foreign import texImage2DImpl """ - function texImage2DImpl(webgl, target, level, internalformat, format, type, source) { - return function () { - return webgl.texImage2D(target, level, internalformat, format, type, source); - }; - } -""" :: forall eff. Fn7 WebGLContext GLenum GLint GLenum GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) +foreign import texImage2DImpl :: forall eff. Fn7 WebGLContext GLenum GLint GLenum GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit texImage2D webgl target level internalformat format type' source = runFn7 texImage2DImpl webgl target level internalformat format type' source -foreign import texImage2D_Impl """ - function texImage2D_Impl(webgl, target, level, internalformat, width, height, border, format, type, pixels) { - return function () { - return webgl.texImage2D(target, level, internalformat, width, height, border, format, type, pixels); - }; - } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +foreign import texImage2D_Impl :: forall eff. Fn10 WebGLContext GLenum GLint GLenum GLsizei GLsizei GLint GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit texImage2D_ webgl target level internalformat width height border format type' pixels = runFn10 texImage2D_Impl webgl target level internalformat width height border format type' pixels -foreign import texParameterfImpl """ - function texParameterfImpl(webgl, target, pname, param) { - return function () { - return webgl.texParameterf(target, pname, param); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import texParameterfImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLfloat (Eff (canvas :: Canvas | eff) Unit) texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (canvas :: Canvas | eff) Unit texParameterf webgl target pname param = runFn4 texParameterfImpl webgl target pname param -foreign import texParameteriImpl """ - function texParameteriImpl(webgl, target, pname, param) { - return function () { - return webgl.texParameteri(target, pname, param); - }; - } -""" :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import texParameteriImpl :: forall eff. Fn4 WebGLContext GLenum GLenum GLint (Eff (canvas :: Canvas | eff) Unit) texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit texParameteri webgl target pname param = runFn4 texParameteriImpl webgl target pname param -foreign import texSubImage2DImpl """ - function texSubImage2DImpl(webgl, target, level, xoffset, yoffset, format, type, source) { - return function () { - return webgl.texSubImage2D(target, level, xoffset, yoffset, format, type, source); - }; - } -""" :: forall eff. Fn8 WebGLContext GLenum GLint GLint GLint GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) +foreign import texSubImage2DImpl :: forall eff. Fn8 WebGLContext GLenum GLint GLint GLint GLenum GLenum TexImageSource (Eff (canvas :: Canvas | eff) Unit) texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit texSubImage2D webgl target level xoffset yoffset format type' source = runFn8 texSubImage2DImpl webgl target level xoffset yoffset format type' source -foreign import texSubImage2D_Impl """ - function texSubImage2D_Impl(webgl, target, level, xoffset, yoffset, width, height, format, type, pixels) { - return function () { - return webgl.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - }; - } -""" :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) +foreign import texSubImage2D_Impl :: forall eff. Fn10 WebGLContext GLenum GLint GLint GLint GLsizei GLsizei GLenum GLenum ArrayBufferView (Eff (canvas :: Canvas | eff) Unit) texSubImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit texSubImage2D_ webgl target level xoffset yoffset width height format type' pixels = runFn10 texSubImage2D_Impl webgl target level xoffset yoffset width height format type' pixels -foreign import uniform1fImpl """ - function uniform1fImpl(webgl, location, x) { - return function () { - return webgl.uniform1f(location, x); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1fImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform1f webgl location x = runFn3 uniform1fImpl webgl location x -foreign import uniform1fvImpl """ - function uniform1fvImpl(webgl, location, v) { - return function () { - return webgl.uniform1fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniform1fv webgl location v = runFn3 uniform1fvImpl webgl location v -foreign import uniform1fv_Impl """ - function uniform1fv_Impl(webgl, location, v) { - return function () { - return webgl.uniform1fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1fv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) uniform1fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniform1fv_ webgl location v = runFn3 uniform1fv_Impl webgl location v -foreign import uniform1iImpl """ - function uniform1iImpl(webgl, location, x) { - return function () { - return webgl.uniform1i(location, x); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1iImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation GLint (Eff (canvas :: Canvas | eff) Unit) uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform1i webgl location x = runFn3 uniform1iImpl webgl location x -foreign import uniform1ivImpl """ - function uniform1ivImpl(webgl, location, v) { - return function () { - return webgl.uniform1iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array Int) (Eff (canvas :: Canvas | eff) Unit) -uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array Int) -> Eff (canvas :: Canvas | eff) Unit uniform1iv webgl location v = runFn3 uniform1ivImpl webgl location v -foreign import uniform1iv_Impl """ - function uniform1iv_Impl(webgl, location, v) { - return function () { - return webgl.uniform1iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform1iv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform1iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform1iv_ webgl location v = runFn3 uniform1iv_Impl webgl location v -foreign import uniform2fImpl """ - function uniform2fImpl(webgl, location, x, y) { - return function () { - return webgl.uniform2f(location, x, y); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2fImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform2f webgl location x y = runFn4 uniform2fImpl webgl location x y -foreign import uniform2fvImpl """ - function uniform2fvImpl(webgl, location, v) { - return function () { - return webgl.uniform2fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniform2fv webgl location v = runFn3 uniform2fvImpl webgl location v -foreign import uniform2fv_Impl """ - function uniform2fv_Impl(webgl, location, v) { - return function () { - return webgl.uniform2fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2fv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) uniform2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniform2fv_ webgl location v = runFn3 uniform2fv_Impl webgl location v -foreign import uniform2iImpl """ - function uniform2iImpl(webgl, location, x, y) { - return function () { - return webgl.uniform2i(location, x, y); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2iImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform2i webgl location x y = runFn4 uniform2iImpl webgl location x y -foreign import uniform2ivImpl """ - function uniform2ivImpl(webgl, location, v) { - return function () { - return webgl.uniform2iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array Int) (Eff (canvas :: Canvas | eff) Unit) -uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array Int) -> Eff (canvas :: Canvas | eff) Unit uniform2iv webgl location v = runFn3 uniform2ivImpl webgl location v -foreign import uniform2iv_Impl """ - function uniform2iv_Impl(webgl, location, v) { - return function () { - return webgl.uniform2iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform2iv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform2iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform2iv_ webgl location v = runFn3 uniform2iv_Impl webgl location v -foreign import uniform3fImpl """ - function uniform3fImpl(webgl, location, x, y, z) { - return function () { - return webgl.uniform3f(location, x, y, z); - }; - } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3fImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform3f webgl location x y z = runFn5 uniform3fImpl webgl location x y z -foreign import uniform3fvImpl """ - function uniform3fvImpl(webgl, location, v) { - return function () { - return webgl.uniform3fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniform3fv webgl location v = runFn3 uniform3fvImpl webgl location v -foreign import uniform3fv_Impl """ - function uniform3fv_Impl(webgl, location, v) { - return function () { - return webgl.uniform3fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3fv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) uniform3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniform3fv_ webgl location v = runFn3 uniform3fv_Impl webgl location v -foreign import uniform3iImpl """ - function uniform3iImpl(webgl, location, x, y, z) { - return function () { - return webgl.uniform3i(location, x, y, z); - }; - } -""" :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3iImpl :: forall eff. Fn5 WebGLContext WebGLUniformLocation GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform3i webgl location x y z = runFn5 uniform3iImpl webgl location x y z -foreign import uniform3ivImpl """ - function uniform3ivImpl(webgl, location, v) { - return function () { - return webgl.uniform3iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array Int) (Eff (canvas :: Canvas | eff) Unit) -uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array Int) -> Eff (canvas :: Canvas | eff) Unit uniform3iv webgl location v = runFn3 uniform3ivImpl webgl location v -foreign import uniform3iv_Impl """ - function uniform3iv_Impl(webgl, location, v) { - return function () { - return webgl.uniform3iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform3iv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform3iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform3iv_ webgl location v = runFn3 uniform3iv_Impl webgl location v -foreign import uniform4fImpl """ - function uniform4fImpl(webgl, location, x, y, z, w) { - return function () { - return webgl.uniform4f(location, x, y, z, w); - }; - } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4fImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit uniform4f webgl location x y z w = runFn6 uniform4fImpl webgl location x y z w -foreign import uniform4fvImpl """ - function uniform4fvImpl(webgl, location, v) { - return function () { - return webgl.uniform4fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4fvImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniform4fv webgl location v = runFn3 uniform4fvImpl webgl location v -foreign import uniform4fv_Impl """ - function uniform4fv_Impl(webgl, location, v) { - return function () { - return webgl.uniform4fv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4fv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Float32Array (Eff (canvas :: Canvas | eff) Unit) uniform4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniform4fv_ webgl location v = runFn3 uniform4fv_Impl webgl location v -foreign import uniform4iImpl """ - function uniform4iImpl(webgl, location, x, y, z, w) { - return function () { - return webgl.uniform4i(location, x, y, z, w); - }; - } -""" :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4iImpl :: forall eff. Fn6 WebGLContext WebGLUniformLocation GLint GLint GLint GLint (Eff (canvas :: Canvas | eff) Unit) uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit uniform4i webgl location x y z w = runFn6 uniform4iImpl webgl location x y z w -foreign import uniform4ivImpl """ - function uniform4ivImpl(webgl, location, v) { - return function () { - return webgl.uniform4iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4ivImpl :: forall eff. Fn3 WebGLContext WebGLUniformLocation (Array Int) (Eff (canvas :: Canvas | eff) Unit) -uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> (Array Int) -> Eff (canvas :: Canvas | eff) Unit uniform4iv webgl location v = runFn3 uniform4ivImpl webgl location v -foreign import uniform4iv_Impl """ - function uniform4iv_Impl(webgl, location, v) { - return function () { - return webgl.uniform4iv(location, v); - }; - } -""" :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniform4iv_Impl :: forall eff. Fn3 WebGLContext WebGLUniformLocation Int32Array (Eff (canvas :: Canvas | eff) Unit) uniform4iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit uniform4iv_ webgl location v = runFn3 uniform4iv_Impl webgl location v -foreign import uniformMatrix2fvImpl """ - function uniformMatrix2fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix2fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix2fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniformMatrix2fv webgl location transpose value = runFn4 uniformMatrix2fvImpl webgl location transpose value -foreign import uniformMatrix2fv_Impl """ - function uniformMatrix2fv_Impl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix2fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix2fv_Impl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) uniformMatrix2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniformMatrix2fv_ webgl location transpose value = runFn4 uniformMatrix2fv_Impl webgl location transpose value -foreign import uniformMatrix3fvImpl """ - function uniformMatrix3fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix3fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix3fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniformMatrix3fv webgl location transpose value = runFn4 uniformMatrix3fvImpl webgl location transpose value -foreign import uniformMatrix3fv_Impl """ - function uniformMatrix3fv_Impl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix3fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix3fv_Impl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) uniformMatrix3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniformMatrix3fv_ webgl location transpose value = runFn4 uniformMatrix3fv_Impl webgl location transpose value -foreign import uniformMatrix4fvImpl """ - function uniformMatrix4fvImpl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix4fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix4fvImpl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit uniformMatrix4fv webgl location transpose value = runFn4 uniformMatrix4fvImpl webgl location transpose value -foreign import uniformMatrix4fv_Impl """ - function uniformMatrix4fv_Impl(webgl, location, transpose, value) { - return function () { - return webgl.uniformMatrix4fv(location, transpose, value); - }; - } -""" :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import uniformMatrix4fv_Impl :: forall eff. Fn4 WebGLContext WebGLUniformLocation GLboolean Float32Array (Eff (canvas :: Canvas | eff) Unit) uniformMatrix4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit uniformMatrix4fv_ webgl location transpose value = runFn4 uniformMatrix4fv_Impl webgl location transpose value -foreign import useProgramImpl """ - function useProgramImpl(webgl, program) { - return function () { - return webgl.useProgram(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +foreign import useProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit useProgram webgl program = runFn2 useProgramImpl webgl program -foreign import validateProgramImpl """ - function validateProgramImpl(webgl, program) { - return function () { - return webgl.validateProgram(program); - }; - } -""" :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) +foreign import validateProgramImpl :: forall eff. Fn2 WebGLContext WebGLProgram (Eff (canvas :: Canvas | eff) Unit) validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit validateProgram webgl program = runFn2 validateProgramImpl webgl program -foreign import vertexAttrib1fImpl """ - function vertexAttrib1fImpl(webgl, indx, x) { - return function () { - return webgl.vertexAttrib1f(indx, x); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib1fImpl :: forall eff. Fn3 WebGLContext GLuint GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1f webgl indx x = runFn3 vertexAttrib1fImpl webgl indx x -foreign import vertexAttrib1fvImpl """ - function vertexAttrib1fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib1fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib1fvImpl :: forall eff. Fn3 WebGLContext GLuint (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1fv webgl indx values = runFn3 vertexAttrib1fvImpl webgl indx values -foreign import vertexAttrib1fv_Impl """ - function vertexAttrib1fv_Impl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib1fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib1fv_Impl :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) vertexAttrib1fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit vertexAttrib1fv_ webgl indx values = runFn3 vertexAttrib1fv_Impl webgl indx values -foreign import vertexAttrib2fImpl """ - function vertexAttrib2fImpl(webgl, indx, x, y) { - return function () { - return webgl.vertexAttrib2f(indx, x, y); - }; - } -""" :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib2fImpl :: forall eff. Fn4 WebGLContext GLuint GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2f webgl indx x y = runFn4 vertexAttrib2fImpl webgl indx x y -foreign import vertexAttrib2fvImpl """ - function vertexAttrib2fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib2fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib2fvImpl :: forall eff. Fn3 WebGLContext GLuint (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2fv webgl indx values = runFn3 vertexAttrib2fvImpl webgl indx values -foreign import vertexAttrib2fv_Impl """ - function vertexAttrib2fv_Impl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib2fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib2fv_Impl :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) vertexAttrib2fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit vertexAttrib2fv_ webgl indx values = runFn3 vertexAttrib2fv_Impl webgl indx values -foreign import vertexAttrib3fImpl """ - function vertexAttrib3fImpl(webgl, indx, x, y, z) { - return function () { - return webgl.vertexAttrib3f(indx, x, y, z); - }; - } -""" :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib3fImpl :: forall eff. Fn5 WebGLContext GLuint GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3f webgl indx x y z = runFn5 vertexAttrib3fImpl webgl indx x y z -foreign import vertexAttrib3fvImpl """ - function vertexAttrib3fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib3fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib3fvImpl :: forall eff. Fn3 WebGLContext GLuint (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3fv webgl indx values = runFn3 vertexAttrib3fvImpl webgl indx values -foreign import vertexAttrib3fv_Impl """ - function vertexAttrib3fv_Impl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib3fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib3fv_Impl :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) vertexAttrib3fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit vertexAttrib3fv_ webgl indx values = runFn3 vertexAttrib3fv_Impl webgl indx values -foreign import vertexAttrib4fImpl """ - function vertexAttrib4fImpl(webgl, indx, x, y, z, w) { - return function () { - return webgl.vertexAttrib4f(indx, x, y, z, w); - }; - } -""" :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib4fImpl :: forall eff. Fn6 WebGLContext GLuint GLfloat GLfloat GLfloat GLfloat (Eff (canvas :: Canvas | eff) Unit) vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4f webgl indx x y z w = runFn6 vertexAttrib4fImpl webgl indx x y z w -foreign import vertexAttrib4fvImpl """ - function vertexAttrib4fvImpl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib4fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint [GLfloat] (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib4fvImpl :: forall eff. Fn3 WebGLContext GLuint (Array GLfloat) (Eff (canvas :: Canvas | eff) Unit) -vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> [GLfloat] -> Eff (canvas :: Canvas | eff) Unit +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> (Array GLfloat) -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4fv webgl indx values = runFn3 vertexAttrib4fvImpl webgl indx values -foreign import vertexAttrib4fv_Impl """ - function vertexAttrib4fv_Impl(webgl, indx, values) { - return function () { - return webgl.vertexAttrib4fv(indx, values); - }; - } -""" :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttrib4fv_Impl :: forall eff. Fn3 WebGLContext GLuint Float32Array (Eff (canvas :: Canvas | eff) Unit) vertexAttrib4fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit vertexAttrib4fv_ webgl indx values = runFn3 vertexAttrib4fv_Impl webgl indx values -foreign import vertexAttribPointerImpl """ - function vertexAttribPointerImpl(webgl, indx, size, type, normalized, stride, offset) { - return function () { - return webgl.vertexAttribPointer(indx, size, type, normalized, stride, offset); - }; - } -""" :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) +foreign import vertexAttribPointerImpl :: forall eff. Fn7 WebGLContext GLuint GLint GLenum GLboolean GLsizei GLintptr (Eff (canvas :: Canvas | eff) Unit) vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit vertexAttribPointer webgl indx size type' normalized stride offset = runFn7 vertexAttribPointerImpl webgl indx size type' normalized stride offset -foreign import viewportImpl """ - function viewportImpl(webgl, x, y, width, height) { - return function () { - return webgl.viewport(x, y, width, height); - }; - } -""" :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) +foreign import viewportImpl :: forall eff. Fn5 WebGLContext GLint GLint GLsizei GLsizei (Eff (canvas :: Canvas | eff) Unit) viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit viewport webgl x y width height = runFn5 viewportImpl webgl x y width height diff --git a/src/Graphics/WebGL/Raw/Enums.purs b/src/Graphics/WebGL/Raw/Enums.purs index 4567d5e..525eb5e 100644 --- a/src/Graphics/WebGL/Raw/Enums.purs +++ b/src/Graphics/WebGL/Raw/Enums.purs @@ -1,6 +1,3 @@ --- This file is automatically generated! Don't edit this file, but --- instead modify the included IDL parser and PureScript generator. - module Graphics.WebGL.Raw.Enums where import Graphics.WebGL.Raw.Types (GLenum ()) diff --git a/src/Graphics/WebGL/Raw/Types.purs b/src/Graphics/WebGL/Raw/Types.purs index 8f726d3..2cc4c42 100644 --- a/src/Graphics/WebGL/Raw/Types.purs +++ b/src/Graphics/WebGL/Raw/Types.purs @@ -1,6 +1,3 @@ --- This file is automatically generated! Don't edit this file, but --- instead modify the included IDL parser and PureScript generator. - module Graphics.WebGL.Raw.Types where import Data.ArrayBuffer.Types diff --git a/src/Graphics/WebGL/Raw/Util.purs b/src/Graphics/WebGL/Raw/Util.purs index 6569668..da642e2 100644 --- a/src/Graphics/WebGL/Raw/Util.purs +++ b/src/Graphics/WebGL/Raw/Util.purs @@ -11,4 +11,4 @@ foreign import toMaybeImpl :: forall a. Fn3 (Maybe a) (a -> Maybe a) a (Maybe a) toMaybe :: forall a. a -> Maybe a toMaybe x = runFn3 toMaybeImpl Nothing Just x -foreign import nullAsEmpty :: forall a. [a] -> [a] +foreign import nullAsEmpty :: forall a. Array a -> Array a From d314fb8245e0881eb855c6000af6fec41bb1a2f3 Mon Sep 17 00:00:00 2001 From: Jon Childress Date: Fri, 31 Jul 2015 15:56:05 -0500 Subject: [PATCH 51/51] add purescript documentation --- docs/Graphics/WebGL/Raw.md | 927 ++++++++++++++++ docs/Graphics/WebGL/Raw/Enums.md | 1785 ++++++++++++++++++++++++++++++ docs/Graphics/WebGL/Raw/Types.md | 183 +++ docs/Graphics/WebGL/Raw/Util.md | 15 + 4 files changed, 2910 insertions(+) create mode 100644 docs/Graphics/WebGL/Raw.md create mode 100644 docs/Graphics/WebGL/Raw/Enums.md create mode 100644 docs/Graphics/WebGL/Raw/Types.md create mode 100644 docs/Graphics/WebGL/Raw/Util.md diff --git a/docs/Graphics/WebGL/Raw.md b/docs/Graphics/WebGL/Raw.md new file mode 100644 index 0000000..f174c1e --- /dev/null +++ b/docs/Graphics/WebGL/Raw.md @@ -0,0 +1,927 @@ +## Module Graphics.WebGL.Raw + +#### `activeTexture` + +``` purescript +activeTexture :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `attachShader` + +``` purescript +attachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bindAttribLocation` + +``` purescript +bindAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> DOMString -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bindBuffer` + +``` purescript +bindBuffer :: forall eff. WebGLContext -> GLenum -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bindFramebuffer` + +``` purescript +bindFramebuffer :: forall eff. WebGLContext -> GLenum -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bindRenderbuffer` + +``` purescript +bindRenderbuffer :: forall eff. WebGLContext -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bindTexture` + +``` purescript +bindTexture :: forall eff. WebGLContext -> GLenum -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `blendColor` + +``` purescript +blendColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `blendEquation` + +``` purescript +blendEquation :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `blendEquationSeparate` + +``` purescript +blendEquationSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `blendFunc` + +``` purescript +blendFunc :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `blendFuncSeparate` + +``` purescript +blendFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bufferData` + +``` purescript +bufferData :: forall eff. WebGLContext -> GLenum -> BufferDataSource -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bufferData_` + +``` purescript +bufferData_ :: forall eff. WebGLContext -> GLenum -> GLsizeiptr -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `bufferSubData` + +``` purescript +bufferSubData :: forall eff. WebGLContext -> GLenum -> GLintptr -> BufferDataSource -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `checkFramebufferStatus` + +``` purescript +checkFramebufferStatus :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLenum +``` + +#### `clear` + +``` purescript +clear :: forall eff. WebGLContext -> GLbitfield -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `clearColor` + +``` purescript +clearColor :: forall eff. WebGLContext -> GLclampf -> GLclampf -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `clearDepth` + +``` purescript +clearDepth :: forall eff. WebGLContext -> GLclampf -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `clearStencil` + +``` purescript +clearStencil :: forall eff. WebGLContext -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `colorMask` + +``` purescript +colorMask :: forall eff. WebGLContext -> GLboolean -> GLboolean -> GLboolean -> GLboolean -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `compileShader` + +``` purescript +compileShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `compressedTexImage2D` + +``` purescript +compressedTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `compressedTexSubImage2D` + +``` purescript +compressedTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `copyTexImage2D` + +``` purescript +copyTexImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLint -> GLint -> GLsizei -> GLsizei -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `copyTexSubImage2D` + +``` purescript +copyTexSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `createBuffer` + +``` purescript +createBuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLBuffer) +``` + +#### `createFramebuffer` + +``` purescript +createFramebuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLFramebuffer) +``` + +#### `createProgram` + +``` purescript +createProgram :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLProgram) +``` + +#### `createRenderbuffer` + +``` purescript +createRenderbuffer :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLRenderbuffer) +``` + +#### `createShader` + +``` purescript +createShader :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShader) +``` + +#### `createTexture` + +``` purescript +createTexture :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLTexture) +``` + +#### `cullFace` + +``` purescript +cullFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteBuffer` + +``` purescript +deleteBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteFramebuffer` + +``` purescript +deleteFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteProgram` + +``` purescript +deleteProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteRenderbuffer` + +``` purescript +deleteRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteShader` + +``` purescript +deleteShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `deleteTexture` + +``` purescript +deleteTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `depthFunc` + +``` purescript +depthFunc :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `depthMask` + +``` purescript +depthMask :: forall eff. WebGLContext -> GLboolean -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `depthRange` + +``` purescript +depthRange :: forall eff. WebGLContext -> GLclampf -> GLclampf -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `detachShader` + +``` purescript +detachShader :: forall eff. WebGLContext -> WebGLProgram -> WebGLShader -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `disable` + +``` purescript +disable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `disableVertexAttribArray` + +``` purescript +disableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `drawArrays` + +``` purescript +drawArrays :: forall eff. WebGLContext -> GLenum -> GLint -> GLsizei -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `drawElements` + +``` purescript +drawElements :: forall eff. WebGLContext -> GLenum -> GLsizei -> GLenum -> GLintptr -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `enable` + +``` purescript +enable :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `enableVertexAttribArray` + +``` purescript +enableVertexAttribArray :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `finish` + +``` purescript +finish :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `flush` + +``` purescript +flush :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `framebufferRenderbuffer` + +``` purescript +framebufferRenderbuffer :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `framebufferTexture2D` + +``` purescript +framebufferTexture2D :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> WebGLTexture -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `frontFace` + +``` purescript +frontFace :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `generateMipmap` + +``` purescript +generateMipmap :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `getActiveAttrib` + +``` purescript +getActiveAttrib :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) +``` + +#### `getActiveUniform` + +``` purescript +getActiveUniform :: forall eff. WebGLContext -> WebGLProgram -> GLuint -> Eff (canvas :: Canvas | eff) (Maybe WebGLActiveInfo) +``` + +#### `getAttachedShaders` + +``` purescript +getAttachedShaders :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Array WebGLShader) +``` + +#### `getAttribLocation` + +``` purescript +getAttribLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) GLint +``` + +#### `getBufferParameter` + +``` purescript +getBufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getContextAttributes` + +``` purescript +getContextAttributes :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Maybe WebGLContextAttributes) +``` + +#### `getError` + +``` purescript +getError :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) GLenum +``` + +#### `getExtension` + +``` purescript +getExtension :: forall eff a. WebGLContext -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getFramebufferAttachmentParameter` + +``` purescript +getFramebufferAttachmentParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getParameter` + +``` purescript +getParameter :: forall eff a. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getProgramInfoLog` + +``` purescript +getProgramInfoLog :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +``` + +#### `getProgramParameter` + +``` purescript +getProgramParameter :: forall eff a. WebGLContext -> WebGLProgram -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getRenderbufferParameter` + +``` purescript +getRenderbufferParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getShaderInfoLog` + +``` purescript +getShaderInfoLog :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +``` + +#### `getShaderParameter` + +``` purescript +getShaderParameter :: forall eff a. WebGLContext -> WebGLShader -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getShaderPrecisionFormat` + +``` purescript +getShaderPrecisionFormat :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe WebGLShaderPrecisionFormat) +``` + +#### `getShaderSource` + +``` purescript +getShaderSource :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) (Maybe DOMString) +``` + +#### `getSupportedExtensions` + +``` purescript +getSupportedExtensions :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) (Array DOMString) +``` + +#### `getTexParameter` + +``` purescript +getTexParameter :: forall eff a. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getUniform` + +``` purescript +getUniform :: forall eff a. WebGLContext -> WebGLProgram -> WebGLUniformLocation -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getUniformLocation` + +``` purescript +getUniformLocation :: forall eff. WebGLContext -> WebGLProgram -> DOMString -> Eff (canvas :: Canvas | eff) (Maybe WebGLUniformLocation) +``` + +#### `getVertexAttrib` + +``` purescript +getVertexAttrib :: forall eff a. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) (Maybe a) +``` + +#### `getVertexAttribOffset` + +``` purescript +getVertexAttribOffset :: forall eff. WebGLContext -> GLuint -> GLenum -> Eff (canvas :: Canvas | eff) GLsizeiptr +``` + +#### `hint` + +``` purescript +hint :: forall eff. WebGLContext -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `isBuffer` + +``` purescript +isBuffer :: forall eff. WebGLContext -> WebGLBuffer -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isContextLost` + +``` purescript +isContextLost :: forall eff. WebGLContext -> Eff (canvas :: Canvas | eff) Boolean +``` + +#### `isEnabled` + +``` purescript +isEnabled :: forall eff. WebGLContext -> GLenum -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isFramebuffer` + +``` purescript +isFramebuffer :: forall eff. WebGLContext -> WebGLFramebuffer -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isProgram` + +``` purescript +isProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isRenderbuffer` + +``` purescript +isRenderbuffer :: forall eff. WebGLContext -> WebGLRenderbuffer -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isShader` + +``` purescript +isShader :: forall eff. WebGLContext -> WebGLShader -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `isTexture` + +``` purescript +isTexture :: forall eff. WebGLContext -> WebGLTexture -> Eff (canvas :: Canvas | eff) GLboolean +``` + +#### `lineWidth` + +``` purescript +lineWidth :: forall eff. WebGLContext -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `linkProgram` + +``` purescript +linkProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `pixelStorei` + +``` purescript +pixelStorei :: forall eff. WebGLContext -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `polygonOffset` + +``` purescript +polygonOffset :: forall eff. WebGLContext -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `readPixels` + +``` purescript +readPixels :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `renderbufferStorage` + +``` purescript +renderbufferStorage :: forall eff. WebGLContext -> GLenum -> GLenum -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `sampleCoverage` + +``` purescript +sampleCoverage :: forall eff. WebGLContext -> GLclampf -> GLboolean -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `scissor` + +``` purescript +scissor :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `shaderSource` + +``` purescript +shaderSource :: forall eff. WebGLContext -> WebGLShader -> DOMString -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilFunc` + +``` purescript +stencilFunc :: forall eff. WebGLContext -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilFuncSeparate` + +``` purescript +stencilFuncSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilMask` + +``` purescript +stencilMask :: forall eff. WebGLContext -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilMaskSeparate` + +``` purescript +stencilMaskSeparate :: forall eff. WebGLContext -> GLenum -> GLuint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilOp` + +``` purescript +stencilOp :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `stencilOpSeparate` + +``` purescript +stencilOpSeparate :: forall eff. WebGLContext -> GLenum -> GLenum -> GLenum -> GLenum -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texImage2D` + +``` purescript +texImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texImage2D_` + +``` purescript +texImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLenum -> GLsizei -> GLsizei -> GLint -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texParameterf` + +``` purescript +texParameterf :: forall eff. WebGLContext -> GLenum -> GLenum -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texParameteri` + +``` purescript +texParameteri :: forall eff. WebGLContext -> GLenum -> GLenum -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texSubImage2D` + +``` purescript +texSubImage2D :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLenum -> GLenum -> TexImageSource -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `texSubImage2D_` + +``` purescript +texSubImage2D_ :: forall eff. WebGLContext -> GLenum -> GLint -> GLint -> GLint -> GLsizei -> GLsizei -> GLenum -> GLenum -> ArrayBufferView -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1f` + +``` purescript +uniform1f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1fv` + +``` purescript +uniform1fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1fv_` + +``` purescript +uniform1fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1i` + +``` purescript +uniform1i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1iv` + +``` purescript +uniform1iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array Int -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform1iv_` + +``` purescript +uniform1iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2f` + +``` purescript +uniform2f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2fv` + +``` purescript +uniform2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2fv_` + +``` purescript +uniform2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2i` + +``` purescript +uniform2i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2iv` + +``` purescript +uniform2iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array Int -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform2iv_` + +``` purescript +uniform2iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3f` + +``` purescript +uniform3f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3fv` + +``` purescript +uniform3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3fv_` + +``` purescript +uniform3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3i` + +``` purescript +uniform3i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3iv` + +``` purescript +uniform3iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array Int -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform3iv_` + +``` purescript +uniform3iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4f` + +``` purescript +uniform4f :: forall eff. WebGLContext -> WebGLUniformLocation -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4fv` + +``` purescript +uniform4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4fv_` + +``` purescript +uniform4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4i` + +``` purescript +uniform4i :: forall eff. WebGLContext -> WebGLUniformLocation -> GLint -> GLint -> GLint -> GLint -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4iv` + +``` purescript +uniform4iv :: forall eff. WebGLContext -> WebGLUniformLocation -> Array Int -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniform4iv_` + +``` purescript +uniform4iv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> Int32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix2fv` + +``` purescript +uniformMatrix2fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix2fv_` + +``` purescript +uniformMatrix2fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix3fv` + +``` purescript +uniformMatrix3fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix3fv_` + +``` purescript +uniformMatrix3fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix4fv` + +``` purescript +uniformMatrix4fv :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `uniformMatrix4fv_` + +``` purescript +uniformMatrix4fv_ :: forall eff. WebGLContext -> WebGLUniformLocation -> GLboolean -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `useProgram` + +``` purescript +useProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `validateProgram` + +``` purescript +validateProgram :: forall eff. WebGLContext -> WebGLProgram -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib1f` + +``` purescript +vertexAttrib1f :: forall eff. WebGLContext -> GLuint -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib1fv` + +``` purescript +vertexAttrib1fv :: forall eff. WebGLContext -> GLuint -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib1fv_` + +``` purescript +vertexAttrib1fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib2f` + +``` purescript +vertexAttrib2f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib2fv` + +``` purescript +vertexAttrib2fv :: forall eff. WebGLContext -> GLuint -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib2fv_` + +``` purescript +vertexAttrib2fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib3f` + +``` purescript +vertexAttrib3f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib3fv` + +``` purescript +vertexAttrib3fv :: forall eff. WebGLContext -> GLuint -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib3fv_` + +``` purescript +vertexAttrib3fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib4f` + +``` purescript +vertexAttrib4f :: forall eff. WebGLContext -> GLuint -> GLfloat -> GLfloat -> GLfloat -> GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib4fv` + +``` purescript +vertexAttrib4fv :: forall eff. WebGLContext -> GLuint -> Array GLfloat -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttrib4fv_` + +``` purescript +vertexAttrib4fv_ :: forall eff. WebGLContext -> GLuint -> Float32Array -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `vertexAttribPointer` + +``` purescript +vertexAttribPointer :: forall eff. WebGLContext -> GLuint -> GLint -> GLenum -> GLboolean -> GLsizei -> GLintptr -> Eff (canvas :: Canvas | eff) Unit +``` + +#### `viewport` + +``` purescript +viewport :: forall eff. WebGLContext -> GLint -> GLint -> GLsizei -> GLsizei -> Eff (canvas :: Canvas | eff) Unit +``` + + diff --git a/docs/Graphics/WebGL/Raw/Enums.md b/docs/Graphics/WebGL/Raw/Enums.md new file mode 100644 index 0000000..96fc9ed --- /dev/null +++ b/docs/Graphics/WebGL/Raw/Enums.md @@ -0,0 +1,1785 @@ +## Module Graphics.WebGL.Raw.Enums + +#### `activeAttributes` + +``` purescript +activeAttributes :: GLenum +``` + +#### `activeTexture` + +``` purescript +activeTexture :: GLenum +``` + +#### `activeUniforms` + +``` purescript +activeUniforms :: GLenum +``` + +#### `aliasedLineWidthRange` + +``` purescript +aliasedLineWidthRange :: GLenum +``` + +#### `aliasedPointSizeRange` + +``` purescript +aliasedPointSizeRange :: GLenum +``` + +#### `alpha` + +``` purescript +alpha :: GLenum +``` + +#### `alphaBits` + +``` purescript +alphaBits :: GLenum +``` + +#### `always` + +``` purescript +always :: GLenum +``` + +#### `arrayBuffer` + +``` purescript +arrayBuffer :: GLenum +``` + +#### `arrayBufferBinding` + +``` purescript +arrayBufferBinding :: GLenum +``` + +#### `attachedShaders` + +``` purescript +attachedShaders :: GLenum +``` + +#### `back` + +``` purescript +back :: GLenum +``` + +#### `blend` + +``` purescript +blend :: GLenum +``` + +#### `blendColor` + +``` purescript +blendColor :: GLenum +``` + +#### `blendDstAlpha` + +``` purescript +blendDstAlpha :: GLenum +``` + +#### `blendDstRgb` + +``` purescript +blendDstRgb :: GLenum +``` + +#### `blendEquation` + +``` purescript +blendEquation :: GLenum +``` + +#### `blendEquationAlpha` + +``` purescript +blendEquationAlpha :: GLenum +``` + +#### `blendEquationRgb` + +``` purescript +blendEquationRgb :: GLenum +``` + +#### `blendSrcAlpha` + +``` purescript +blendSrcAlpha :: GLenum +``` + +#### `blendSrcRgb` + +``` purescript +blendSrcRgb :: GLenum +``` + +#### `blueBits` + +``` purescript +blueBits :: GLenum +``` + +#### `bool` + +``` purescript +bool :: GLenum +``` + +#### `boolVec2` + +``` purescript +boolVec2 :: GLenum +``` + +#### `boolVec3` + +``` purescript +boolVec3 :: GLenum +``` + +#### `boolVec4` + +``` purescript +boolVec4 :: GLenum +``` + +#### `browserDefaultWebgl` + +``` purescript +browserDefaultWebgl :: GLenum +``` + +#### `bufferSize` + +``` purescript +bufferSize :: GLenum +``` + +#### `bufferUsage` + +``` purescript +bufferUsage :: GLenum +``` + +#### `byte` + +``` purescript +byte :: GLenum +``` + +#### `ccw` + +``` purescript +ccw :: GLenum +``` + +#### `clampToEdge` + +``` purescript +clampToEdge :: GLenum +``` + +#### `colorAttachment0` + +``` purescript +colorAttachment0 :: GLenum +``` + +#### `colorBufferBit` + +``` purescript +colorBufferBit :: GLenum +``` + +#### `colorClearValue` + +``` purescript +colorClearValue :: GLenum +``` + +#### `colorWritemask` + +``` purescript +colorWritemask :: GLenum +``` + +#### `compileStatus` + +``` purescript +compileStatus :: GLenum +``` + +#### `compressedTextureFormats` + +``` purescript +compressedTextureFormats :: GLenum +``` + +#### `constantAlpha` + +``` purescript +constantAlpha :: GLenum +``` + +#### `constantColor` + +``` purescript +constantColor :: GLenum +``` + +#### `contextLostWebgl` + +``` purescript +contextLostWebgl :: GLenum +``` + +#### `cullFace` + +``` purescript +cullFace :: GLenum +``` + +#### `cullFaceMode` + +``` purescript +cullFaceMode :: GLenum +``` + +#### `currentProgram` + +``` purescript +currentProgram :: GLenum +``` + +#### `currentVertexAttrib` + +``` purescript +currentVertexAttrib :: GLenum +``` + +#### `cw` + +``` purescript +cw :: GLenum +``` + +#### `decr` + +``` purescript +decr :: GLenum +``` + +#### `decrWrap` + +``` purescript +decrWrap :: GLenum +``` + +#### `deleteStatus` + +``` purescript +deleteStatus :: GLenum +``` + +#### `depthAttachment` + +``` purescript +depthAttachment :: GLenum +``` + +#### `depthBits` + +``` purescript +depthBits :: GLenum +``` + +#### `depthBufferBit` + +``` purescript +depthBufferBit :: GLenum +``` + +#### `depthClearValue` + +``` purescript +depthClearValue :: GLenum +``` + +#### `depthComponent` + +``` purescript +depthComponent :: GLenum +``` + +#### `depthComponent16` + +``` purescript +depthComponent16 :: GLenum +``` + +#### `depthFunc` + +``` purescript +depthFunc :: GLenum +``` + +#### `depthRange` + +``` purescript +depthRange :: GLenum +``` + +#### `depthStencil` + +``` purescript +depthStencil :: GLenum +``` + +#### `depthStencilAttachment` + +``` purescript +depthStencilAttachment :: GLenum +``` + +#### `depthTest` + +``` purescript +depthTest :: GLenum +``` + +#### `depthWritemask` + +``` purescript +depthWritemask :: GLenum +``` + +#### `dither` + +``` purescript +dither :: GLenum +``` + +#### `dontCare` + +``` purescript +dontCare :: GLenum +``` + +#### `dstAlpha` + +``` purescript +dstAlpha :: GLenum +``` + +#### `dstColor` + +``` purescript +dstColor :: GLenum +``` + +#### `dynamicDraw` + +``` purescript +dynamicDraw :: GLenum +``` + +#### `elementArrayBuffer` + +``` purescript +elementArrayBuffer :: GLenum +``` + +#### `elementArrayBufferBinding` + +``` purescript +elementArrayBufferBinding :: GLenum +``` + +#### `equal` + +``` purescript +equal :: GLenum +``` + +#### `fastest` + +``` purescript +fastest :: GLenum +``` + +#### `float` + +``` purescript +float :: GLenum +``` + +#### `floatMat2` + +``` purescript +floatMat2 :: GLenum +``` + +#### `floatMat3` + +``` purescript +floatMat3 :: GLenum +``` + +#### `floatMat4` + +``` purescript +floatMat4 :: GLenum +``` + +#### `floatVec2` + +``` purescript +floatVec2 :: GLenum +``` + +#### `floatVec3` + +``` purescript +floatVec3 :: GLenum +``` + +#### `floatVec4` + +``` purescript +floatVec4 :: GLenum +``` + +#### `fragmentShader` + +``` purescript +fragmentShader :: GLenum +``` + +#### `framebuffer` + +``` purescript +framebuffer :: GLenum +``` + +#### `framebufferAttachmentObjectName` + +``` purescript +framebufferAttachmentObjectName :: GLenum +``` + +#### `framebufferAttachmentObjectType` + +``` purescript +framebufferAttachmentObjectType :: GLenum +``` + +#### `framebufferAttachmentTextureCubeMapFace` + +``` purescript +framebufferAttachmentTextureCubeMapFace :: GLenum +``` + +#### `framebufferAttachmentTextureLevel` + +``` purescript +framebufferAttachmentTextureLevel :: GLenum +``` + +#### `framebufferBinding` + +``` purescript +framebufferBinding :: GLenum +``` + +#### `framebufferComplete` + +``` purescript +framebufferComplete :: GLenum +``` + +#### `framebufferIncompleteAttachment` + +``` purescript +framebufferIncompleteAttachment :: GLenum +``` + +#### `framebufferIncompleteDimensions` + +``` purescript +framebufferIncompleteDimensions :: GLenum +``` + +#### `framebufferIncompleteMissingAttachment` + +``` purescript +framebufferIncompleteMissingAttachment :: GLenum +``` + +#### `framebufferUnsupported` + +``` purescript +framebufferUnsupported :: GLenum +``` + +#### `front` + +``` purescript +front :: GLenum +``` + +#### `frontAndBack` + +``` purescript +frontAndBack :: GLenum +``` + +#### `frontFace` + +``` purescript +frontFace :: GLenum +``` + +#### `funcAdd` + +``` purescript +funcAdd :: GLenum +``` + +#### `funcReverseSubtract` + +``` purescript +funcReverseSubtract :: GLenum +``` + +#### `funcSubtract` + +``` purescript +funcSubtract :: GLenum +``` + +#### `generateMipmapHint` + +``` purescript +generateMipmapHint :: GLenum +``` + +#### `gequal` + +``` purescript +gequal :: GLenum +``` + +#### `greater` + +``` purescript +greater :: GLenum +``` + +#### `greenBits` + +``` purescript +greenBits :: GLenum +``` + +#### `highFloat` + +``` purescript +highFloat :: GLenum +``` + +#### `highInt` + +``` purescript +highInt :: GLenum +``` + +#### `implementationColorReadFormat` + +``` purescript +implementationColorReadFormat :: GLenum +``` + +#### `implementationColorReadType` + +``` purescript +implementationColorReadType :: GLenum +``` + +#### `incr` + +``` purescript +incr :: GLenum +``` + +#### `incrWrap` + +``` purescript +incrWrap :: GLenum +``` + +#### `int` + +``` purescript +int :: GLenum +``` + +#### `intVec2` + +``` purescript +intVec2 :: GLenum +``` + +#### `intVec3` + +``` purescript +intVec3 :: GLenum +``` + +#### `intVec4` + +``` purescript +intVec4 :: GLenum +``` + +#### `invalidEnum` + +``` purescript +invalidEnum :: GLenum +``` + +#### `invalidFramebufferOperation` + +``` purescript +invalidFramebufferOperation :: GLenum +``` + +#### `invalidOperation` + +``` purescript +invalidOperation :: GLenum +``` + +#### `invalidValue` + +``` purescript +invalidValue :: GLenum +``` + +#### `invert` + +``` purescript +invert :: GLenum +``` + +#### `keep` + +``` purescript +keep :: GLenum +``` + +#### `lequal` + +``` purescript +lequal :: GLenum +``` + +#### `less` + +``` purescript +less :: GLenum +``` + +#### `linear` + +``` purescript +linear :: GLenum +``` + +#### `linearMipmapLinear` + +``` purescript +linearMipmapLinear :: GLenum +``` + +#### `linearMipmapNearest` + +``` purescript +linearMipmapNearest :: GLenum +``` + +#### `lines` + +``` purescript +lines :: GLenum +``` + +#### `lineLoop` + +``` purescript +lineLoop :: GLenum +``` + +#### `lineStrip` + +``` purescript +lineStrip :: GLenum +``` + +#### `lineWidth` + +``` purescript +lineWidth :: GLenum +``` + +#### `linkStatus` + +``` purescript +linkStatus :: GLenum +``` + +#### `lowFloat` + +``` purescript +lowFloat :: GLenum +``` + +#### `lowInt` + +``` purescript +lowInt :: GLenum +``` + +#### `luminance` + +``` purescript +luminance :: GLenum +``` + +#### `luminanceAlpha` + +``` purescript +luminanceAlpha :: GLenum +``` + +#### `maxCombinedTextureImageUnits` + +``` purescript +maxCombinedTextureImageUnits :: GLenum +``` + +#### `maxCubeMapTextureSize` + +``` purescript +maxCubeMapTextureSize :: GLenum +``` + +#### `maxFragmentUniformVectors` + +``` purescript +maxFragmentUniformVectors :: GLenum +``` + +#### `maxRenderbufferSize` + +``` purescript +maxRenderbufferSize :: GLenum +``` + +#### `maxTextureImageUnits` + +``` purescript +maxTextureImageUnits :: GLenum +``` + +#### `maxTextureSize` + +``` purescript +maxTextureSize :: GLenum +``` + +#### `maxVaryingVectors` + +``` purescript +maxVaryingVectors :: GLenum +``` + +#### `maxVertexAttribs` + +``` purescript +maxVertexAttribs :: GLenum +``` + +#### `maxVertexTextureImageUnits` + +``` purescript +maxVertexTextureImageUnits :: GLenum +``` + +#### `maxVertexUniformVectors` + +``` purescript +maxVertexUniformVectors :: GLenum +``` + +#### `maxViewportDims` + +``` purescript +maxViewportDims :: GLenum +``` + +#### `mediumFloat` + +``` purescript +mediumFloat :: GLenum +``` + +#### `mediumInt` + +``` purescript +mediumInt :: GLenum +``` + +#### `mirroredRepeat` + +``` purescript +mirroredRepeat :: GLenum +``` + +#### `nearest` + +``` purescript +nearest :: GLenum +``` + +#### `nearestMipmapLinear` + +``` purescript +nearestMipmapLinear :: GLenum +``` + +#### `nearestMipmapNearest` + +``` purescript +nearestMipmapNearest :: GLenum +``` + +#### `never` + +``` purescript +never :: GLenum +``` + +#### `nicest` + +``` purescript +nicest :: GLenum +``` + +#### `none` + +``` purescript +none :: GLenum +``` + +#### `notequal` + +``` purescript +notequal :: GLenum +``` + +#### `noError` + +``` purescript +noError :: GLenum +``` + +#### `one` + +``` purescript +one :: GLenum +``` + +#### `oneMinusConstantAlpha` + +``` purescript +oneMinusConstantAlpha :: GLenum +``` + +#### `oneMinusConstantColor` + +``` purescript +oneMinusConstantColor :: GLenum +``` + +#### `oneMinusDstAlpha` + +``` purescript +oneMinusDstAlpha :: GLenum +``` + +#### `oneMinusDstColor` + +``` purescript +oneMinusDstColor :: GLenum +``` + +#### `oneMinusSrcAlpha` + +``` purescript +oneMinusSrcAlpha :: GLenum +``` + +#### `oneMinusSrcColor` + +``` purescript +oneMinusSrcColor :: GLenum +``` + +#### `outOfMemory` + +``` purescript +outOfMemory :: GLenum +``` + +#### `packAlignment` + +``` purescript +packAlignment :: GLenum +``` + +#### `points` + +``` purescript +points :: GLenum +``` + +#### `polygonOffsetFactor` + +``` purescript +polygonOffsetFactor :: GLenum +``` + +#### `polygonOffsetFill` + +``` purescript +polygonOffsetFill :: GLenum +``` + +#### `polygonOffsetUnits` + +``` purescript +polygonOffsetUnits :: GLenum +``` + +#### `redBits` + +``` purescript +redBits :: GLenum +``` + +#### `renderbuffer` + +``` purescript +renderbuffer :: GLenum +``` + +#### `renderbufferAlphaSize` + +``` purescript +renderbufferAlphaSize :: GLenum +``` + +#### `renderbufferBinding` + +``` purescript +renderbufferBinding :: GLenum +``` + +#### `renderbufferBlueSize` + +``` purescript +renderbufferBlueSize :: GLenum +``` + +#### `renderbufferDepthSize` + +``` purescript +renderbufferDepthSize :: GLenum +``` + +#### `renderbufferGreenSize` + +``` purescript +renderbufferGreenSize :: GLenum +``` + +#### `renderbufferHeight` + +``` purescript +renderbufferHeight :: GLenum +``` + +#### `renderbufferInternalFormat` + +``` purescript +renderbufferInternalFormat :: GLenum +``` + +#### `renderbufferRedSize` + +``` purescript +renderbufferRedSize :: GLenum +``` + +#### `renderbufferStencilSize` + +``` purescript +renderbufferStencilSize :: GLenum +``` + +#### `renderbufferWidth` + +``` purescript +renderbufferWidth :: GLenum +``` + +#### `renderer` + +``` purescript +renderer :: GLenum +``` + +#### `repeat` + +``` purescript +repeat :: GLenum +``` + +#### `replace` + +``` purescript +replace :: GLenum +``` + +#### `rgb` + +``` purescript +rgb :: GLenum +``` + +#### `rgb565` + +``` purescript +rgb565 :: GLenum +``` + +#### `rgb5A1` + +``` purescript +rgb5A1 :: GLenum +``` + +#### `rgba` + +``` purescript +rgba :: GLenum +``` + +#### `rgba4` + +``` purescript +rgba4 :: GLenum +``` + +#### `sampler2d` + +``` purescript +sampler2d :: GLenum +``` + +#### `samplerCube` + +``` purescript +samplerCube :: GLenum +``` + +#### `samples` + +``` purescript +samples :: GLenum +``` + +#### `sampleAlphaToCoverage` + +``` purescript +sampleAlphaToCoverage :: GLenum +``` + +#### `sampleBuffers` + +``` purescript +sampleBuffers :: GLenum +``` + +#### `sampleCoverage` + +``` purescript +sampleCoverage :: GLenum +``` + +#### `sampleCoverageInvert` + +``` purescript +sampleCoverageInvert :: GLenum +``` + +#### `sampleCoverageValue` + +``` purescript +sampleCoverageValue :: GLenum +``` + +#### `scissorBox` + +``` purescript +scissorBox :: GLenum +``` + +#### `scissorTest` + +``` purescript +scissorTest :: GLenum +``` + +#### `shaderType` + +``` purescript +shaderType :: GLenum +``` + +#### `shadingLanguageVersion` + +``` purescript +shadingLanguageVersion :: GLenum +``` + +#### `short` + +``` purescript +short :: GLenum +``` + +#### `srcAlpha` + +``` purescript +srcAlpha :: GLenum +``` + +#### `srcAlphaSaturate` + +``` purescript +srcAlphaSaturate :: GLenum +``` + +#### `srcColor` + +``` purescript +srcColor :: GLenum +``` + +#### `staticDraw` + +``` purescript +staticDraw :: GLenum +``` + +#### `stencilAttachment` + +``` purescript +stencilAttachment :: GLenum +``` + +#### `stencilBackFail` + +``` purescript +stencilBackFail :: GLenum +``` + +#### `stencilBackFunc` + +``` purescript +stencilBackFunc :: GLenum +``` + +#### `stencilBackPassDepthFail` + +``` purescript +stencilBackPassDepthFail :: GLenum +``` + +#### `stencilBackPassDepthPass` + +``` purescript +stencilBackPassDepthPass :: GLenum +``` + +#### `stencilBackRef` + +``` purescript +stencilBackRef :: GLenum +``` + +#### `stencilBackValueMask` + +``` purescript +stencilBackValueMask :: GLenum +``` + +#### `stencilBackWritemask` + +``` purescript +stencilBackWritemask :: GLenum +``` + +#### `stencilBits` + +``` purescript +stencilBits :: GLenum +``` + +#### `stencilBufferBit` + +``` purescript +stencilBufferBit :: GLenum +``` + +#### `stencilClearValue` + +``` purescript +stencilClearValue :: GLenum +``` + +#### `stencilFail` + +``` purescript +stencilFail :: GLenum +``` + +#### `stencilFunc` + +``` purescript +stencilFunc :: GLenum +``` + +#### `stencilIndex` + +``` purescript +stencilIndex :: GLenum +``` + +#### `stencilIndex8` + +``` purescript +stencilIndex8 :: GLenum +``` + +#### `stencilPassDepthFail` + +``` purescript +stencilPassDepthFail :: GLenum +``` + +#### `stencilPassDepthPass` + +``` purescript +stencilPassDepthPass :: GLenum +``` + +#### `stencilRef` + +``` purescript +stencilRef :: GLenum +``` + +#### `stencilTest` + +``` purescript +stencilTest :: GLenum +``` + +#### `stencilValueMask` + +``` purescript +stencilValueMask :: GLenum +``` + +#### `stencilWritemask` + +``` purescript +stencilWritemask :: GLenum +``` + +#### `streamDraw` + +``` purescript +streamDraw :: GLenum +``` + +#### `subpixelBits` + +``` purescript +subpixelBits :: GLenum +``` + +#### `texture` + +``` purescript +texture :: GLenum +``` + +#### `texture0` + +``` purescript +texture0 :: GLenum +``` + +#### `texture1` + +``` purescript +texture1 :: GLenum +``` + +#### `texture10` + +``` purescript +texture10 :: GLenum +``` + +#### `texture11` + +``` purescript +texture11 :: GLenum +``` + +#### `texture12` + +``` purescript +texture12 :: GLenum +``` + +#### `texture13` + +``` purescript +texture13 :: GLenum +``` + +#### `texture14` + +``` purescript +texture14 :: GLenum +``` + +#### `texture15` + +``` purescript +texture15 :: GLenum +``` + +#### `texture16` + +``` purescript +texture16 :: GLenum +``` + +#### `texture17` + +``` purescript +texture17 :: GLenum +``` + +#### `texture18` + +``` purescript +texture18 :: GLenum +``` + +#### `texture19` + +``` purescript +texture19 :: GLenum +``` + +#### `texture2` + +``` purescript +texture2 :: GLenum +``` + +#### `texture20` + +``` purescript +texture20 :: GLenum +``` + +#### `texture21` + +``` purescript +texture21 :: GLenum +``` + +#### `texture22` + +``` purescript +texture22 :: GLenum +``` + +#### `texture23` + +``` purescript +texture23 :: GLenum +``` + +#### `texture24` + +``` purescript +texture24 :: GLenum +``` + +#### `texture25` + +``` purescript +texture25 :: GLenum +``` + +#### `texture26` + +``` purescript +texture26 :: GLenum +``` + +#### `texture27` + +``` purescript +texture27 :: GLenum +``` + +#### `texture28` + +``` purescript +texture28 :: GLenum +``` + +#### `texture29` + +``` purescript +texture29 :: GLenum +``` + +#### `texture3` + +``` purescript +texture3 :: GLenum +``` + +#### `texture30` + +``` purescript +texture30 :: GLenum +``` + +#### `texture31` + +``` purescript +texture31 :: GLenum +``` + +#### `texture4` + +``` purescript +texture4 :: GLenum +``` + +#### `texture5` + +``` purescript +texture5 :: GLenum +``` + +#### `texture6` + +``` purescript +texture6 :: GLenum +``` + +#### `texture7` + +``` purescript +texture7 :: GLenum +``` + +#### `texture8` + +``` purescript +texture8 :: GLenum +``` + +#### `texture9` + +``` purescript +texture9 :: GLenum +``` + +#### `texture2d` + +``` purescript +texture2d :: GLenum +``` + +#### `textureBinding2d` + +``` purescript +textureBinding2d :: GLenum +``` + +#### `textureBindingCubeMap` + +``` purescript +textureBindingCubeMap :: GLenum +``` + +#### `textureCubeMap` + +``` purescript +textureCubeMap :: GLenum +``` + +#### `textureCubeMapNegativeX` + +``` purescript +textureCubeMapNegativeX :: GLenum +``` + +#### `textureCubeMapNegativeY` + +``` purescript +textureCubeMapNegativeY :: GLenum +``` + +#### `textureCubeMapNegativeZ` + +``` purescript +textureCubeMapNegativeZ :: GLenum +``` + +#### `textureCubeMapPositiveX` + +``` purescript +textureCubeMapPositiveX :: GLenum +``` + +#### `textureCubeMapPositiveY` + +``` purescript +textureCubeMapPositiveY :: GLenum +``` + +#### `textureCubeMapPositiveZ` + +``` purescript +textureCubeMapPositiveZ :: GLenum +``` + +#### `textureMagFilter` + +``` purescript +textureMagFilter :: GLenum +``` + +#### `textureMinFilter` + +``` purescript +textureMinFilter :: GLenum +``` + +#### `textureWrapS` + +``` purescript +textureWrapS :: GLenum +``` + +#### `textureWrapT` + +``` purescript +textureWrapT :: GLenum +``` + +#### `triangles` + +``` purescript +triangles :: GLenum +``` + +#### `triangleFan` + +``` purescript +triangleFan :: GLenum +``` + +#### `triangleStrip` + +``` purescript +triangleStrip :: GLenum +``` + +#### `unpackAlignment` + +``` purescript +unpackAlignment :: GLenum +``` + +#### `unpackColorspaceConversionWebgl` + +``` purescript +unpackColorspaceConversionWebgl :: GLenum +``` + +#### `unpackFlipYWebgl` + +``` purescript +unpackFlipYWebgl :: GLenum +``` + +#### `unpackPremultiplyAlphaWebgl` + +``` purescript +unpackPremultiplyAlphaWebgl :: GLenum +``` + +#### `unsignedByte` + +``` purescript +unsignedByte :: GLenum +``` + +#### `unsignedInt` + +``` purescript +unsignedInt :: GLenum +``` + +#### `unsignedShort` + +``` purescript +unsignedShort :: GLenum +``` + +#### `unsignedShort4444` + +``` purescript +unsignedShort4444 :: GLenum +``` + +#### `unsignedShort5551` + +``` purescript +unsignedShort5551 :: GLenum +``` + +#### `unsignedShort565` + +``` purescript +unsignedShort565 :: GLenum +``` + +#### `validateStatus` + +``` purescript +validateStatus :: GLenum +``` + +#### `vendor` + +``` purescript +vendor :: GLenum +``` + +#### `version` + +``` purescript +version :: GLenum +``` + +#### `vertexAttribArrayBufferBinding` + +``` purescript +vertexAttribArrayBufferBinding :: GLenum +``` + +#### `vertexAttribArrayEnabled` + +``` purescript +vertexAttribArrayEnabled :: GLenum +``` + +#### `vertexAttribArrayNormalized` + +``` purescript +vertexAttribArrayNormalized :: GLenum +``` + +#### `vertexAttribArrayPointer` + +``` purescript +vertexAttribArrayPointer :: GLenum +``` + +#### `vertexAttribArraySize` + +``` purescript +vertexAttribArraySize :: GLenum +``` + +#### `vertexAttribArrayStride` + +``` purescript +vertexAttribArrayStride :: GLenum +``` + +#### `vertexAttribArrayType` + +``` purescript +vertexAttribArrayType :: GLenum +``` + +#### `vertexShader` + +``` purescript +vertexShader :: GLenum +``` + +#### `viewport` + +``` purescript +viewport :: GLenum +``` + +#### `zero` + +``` purescript +zero :: GLenum +``` + + diff --git a/docs/Graphics/WebGL/Raw/Types.md b/docs/Graphics/WebGL/Raw/Types.md new file mode 100644 index 0000000..b35a92c --- /dev/null +++ b/docs/Graphics/WebGL/Raw/Types.md @@ -0,0 +1,183 @@ +## Module Graphics.WebGL.Raw.Types + +#### `DOMString` + +``` purescript +type DOMString = String +``` + +#### `BufferDataSource` + +``` purescript +type BufferDataSource = Float32Array +``` + +#### `FloatArray` + +``` purescript +type FloatArray = Float32Array +``` + +#### `GLbitfield` + +``` purescript +type GLbitfield = Int +``` + +#### `GLboolean` + +``` purescript +type GLboolean = Boolean +``` + +#### `GLbyte` + +``` purescript +type GLbyte = Int +``` + +#### `GLclampf` + +``` purescript +type GLclampf = Number +``` + +#### `GLenum` + +``` purescript +type GLenum = Int +``` + +#### `GLfloat` + +``` purescript +type GLfloat = Number +``` + +#### `GLint` + +``` purescript +type GLint = Int +``` + +#### `GLintptr` + +``` purescript +type GLintptr = Int +``` + +#### `GLshort` + +``` purescript +type GLshort = Int +``` + +#### `GLsizei` + +``` purescript +type GLsizei = Int +``` + +#### `GLsizeiptr` + +``` purescript +type GLsizeiptr = Int +``` + +#### `GLubyte` + +``` purescript +type GLubyte = Int +``` + +#### `GLuint` + +``` purescript +type GLuint = Int +``` + +#### `GLushort` + +``` purescript +type GLushort = Int +``` + +#### `ArrayBufferView` + +``` purescript +data ArrayBufferView :: * +``` + +#### `TexImageSource` + +``` purescript +data TexImageSource :: * +``` + +#### `WebGLActiveInfo` + +``` purescript +data WebGLActiveInfo :: * +``` + +#### `WebGLBuffer` + +``` purescript +data WebGLBuffer :: * +``` + +#### `WebGLContext` + +``` purescript +data WebGLContext :: * +``` + +#### `WebGLFramebuffer` + +``` purescript +data WebGLFramebuffer :: * +``` + +#### `WebGLProgram` + +``` purescript +data WebGLProgram :: * +``` + +#### `WebGLRenderbuffer` + +``` purescript +data WebGLRenderbuffer :: * +``` + +#### `WebGLShader` + +``` purescript +data WebGLShader :: * +``` + +#### `WebGLShaderPrecisionFormat` + +``` purescript +data WebGLShaderPrecisionFormat :: * +``` + +#### `WebGLTexture` + +``` purescript +data WebGLTexture :: * +``` + +#### `WebGLUniformLocation` + +``` purescript +data WebGLUniformLocation :: * +``` + +#### `WebGLContextAttributes` + +``` purescript +type WebGLContextAttributes = { alpha :: Boolean, depth :: Boolean, stencil :: Boolean, antialias :: Boolean, premultipliedAlpha :: Boolean, preserveDrawingBuffer :: Boolean, preferLowPowerToHighPerformance :: Boolean, failIfMajorPerformanceCaveat :: Boolean } +``` + + diff --git a/docs/Graphics/WebGL/Raw/Util.md b/docs/Graphics/WebGL/Raw/Util.md new file mode 100644 index 0000000..cb7ab13 --- /dev/null +++ b/docs/Graphics/WebGL/Raw/Util.md @@ -0,0 +1,15 @@ +## Module Graphics.WebGL.Raw.Util + +#### `toMaybe` + +``` purescript +toMaybe :: forall a. a -> Maybe a +``` + +#### `nullAsEmpty` + +``` purescript +nullAsEmpty :: forall a. Array a -> Array a +``` + +