123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380(* Js_of_ocaml library
* http://www.ocsigen.org/js_of_ocaml/
* Copyright (C) 2012 Jérôme Vouillon
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)openJsopen!Import(** 5.1 Types *)typesizei=inttypesizeiptr=inttypeintptr=inttypeuint=inttypeclampf=floattypevoidtypeclearBufferMask=inttypebeginModetypeblendingFactortypeblendModetypebufferTargettypebufferUsagetypecullFaceModetypedepthFunctiontypeenableCaptypeerrorCodetypefrontFaceDirtypehintTargettypehintModetypetextureUnit=inttype'apixelStoreParamtypestencilOptypefbTargettypeattachmentPointtyperbTargettypetexTargettype'aparametertype'abufferParametertype'avertexAttribParamtypevertexAttribPointerParamtype'aattachParamtypeframebufferStatustype'arenderbufferParamtypeformattypepixelFormattypepixelTypetype'atexParamtypedataTypetypeshaderTypetype'aprogramParamtype'ashaderParamtypetextureFiltertypewrapModetypetexFiltertypeuniformTypetypecolorspaceConversiontypeshaderPrecisionTypetypeobjectType(** 5.2 WebGLContextAttributes *)classtypecontextAttributes=objectmethodalpha:booltpropmethoddepth:booltpropmethodstencil:booltpropmethodantialias:booltpropmethodpremultipliedAlpha:booltpropmethodpreserveDrawingBuffer:booltpropmethodpreferLowPowerToHighPerformance:booltpropmethodfailIfMajorPerformanceCaveat:booltpropendletdefaultContextAttributes=Js.Unsafe.(obj[|"alpha",inject_true;"depth",inject_true;"stencil",inject_false;"antialias",inject_true;"premultipliedAlpha",inject_false;"preserveDrawingBuffer",inject_false;"preferLowPowerToHighPerformance",inject_false;"failIfMajorPerformanceCaveat",inject_false|])typebuffertypeframebuffertypeprogramtyperenderbuffertypeshadertypetexturetype'auniformLocationclasstypeactiveInfo=objectmethodsize:intreadonly_propmethod_type:uniformTypereadonly_propmethodname:js_stringtreadonly_propendclasstypeshaderPrecisionFormat=objectmethodrangeMin:intreadonly_propmethodrangeMax:intreadonly_propmethodprecision:intreadonly_propendclasstyperenderingContext=object(** 5.13.1 Attributes *)methodcanvas:Dom_html.canvasElementtreadonly_propmethoddrawingBufferWidth:sizeireadonly_propmethoddrawingBufferHeight:sizeireadonly_prop(** 5.13.2 Getting information about the context *)methodgetContextAttributes:contextAttributestmeth(** 5.13.3 Setting and getting state *)methodactiveTexture:textureUnit->unitmethmethodblendColor:clampf->clampf->clampf->clampf->unitmethmethodblendEquation:blendMode->unitmethmethodblendEquationSeparate:blendMode->blendMode->unitmethmethodblendFunc:blendingFactor->blendingFactor->unitmethmethodblendFuncSeparate:blendingFactor->blendingFactor->blendingFactor->blendingFactor->unitmethmethodclearColor:clampf->clampf->clampf->clampf->unitmethmethodclearDepth:clampf->unitmethmethodclearStencil:int->unitmethmethodcolorMask:boolt->boolt->boolt->boolt->unitmethmethodcullFace:cullFaceMode->unitmethmethoddepthFunc:depthFunction->unitmethmethoddepthMask:boolt->unitmethmethoddepthRange:clampf->clampf->unitmethmethoddisable:enableCap->unitmethmethodenable:enableCap->unitmethmethodfrontFace:frontFaceDir->unitmethmethodgetParameter:'a.'aparameter->'amethmethodgetError:errorCodemethmethodhint:hintTarget->hintMode->unitmethmethodisEnabled:enableCap->booltmethmethodlineWidth:float->unitmethmethodpixelStorei:'a.'apixelStoreParam->'a->unitmethmethodpolygonOffset:float->float->unitmethmethodsampleCoverage:clampf->boolt->unitmethmethodstencilFunc:depthFunction->int->uint->unitmethmethodstencilFuncSeparate:cullFaceMode->depthFunction->int->uint->unitmethmethodstencilMask:uint->unitmethmethodstencilMaskSeparate:cullFaceMode->uint->unitmethmethodstencilOp:stencilOp->stencilOp->stencilOp->unitmethmethodstencilOpSeparate:cullFaceMode->stencilOp->stencilOp->stencilOp->unitmeth(** 5.13.4 Viewing and clipping *)methodscissor:int->int->sizei->sizei->unitmethmethodviewport:int->int->sizei->sizei->unitmeth(** 5.13.5 Buffer objects *)methodbindBuffer:bufferTarget->buffert->unitmethmethodbindBuffer_:bufferTarget->buffertopt->unitmethmethodbufferData_create:bufferTarget->sizeiptr->bufferUsage->unitmethmethodbufferData:bufferTarget->#Typed_array.arrayBufferViewt->bufferUsage->unitmethmethodbufferData_raw:bufferTarget->Typed_array.arrayBuffert->bufferUsage->unitmethmethodbufferSubData:bufferTarget->intptr->#Typed_array.arrayBufferViewt->unitmethmethodbufferSubData_raw:bufferTarget->intptr->Typed_array.arrayBuffert->unitmethmethodcreateBuffer:buffertmethmethoddeleteBuffer:buffert->unitmethmethodgetBufferParameter:'a.bufferTarget->'abufferParameter->'amethmethodisBuffer:buffert->booltmeth(** 5.13.6 Framebuffer objects *)methodbindFramebuffer:fbTarget->framebuffert->unitmethmethodbindFramebuffer_:fbTarget->framebuffertopt->unitmethmethodcheckFramebufferStatus:fbTarget->framebufferStatusmethmethodcreateFramebuffer:framebuffertmethmethoddeleteFramebuffer:framebuffert->unitmethmethodframebufferRenderbuffer:fbTarget->attachmentPoint->rbTarget->renderbuffert->unitmethmethodframebufferTexture2D:fbTarget->attachmentPoint->texTarget->texturet->int->unitmethmethodgetFramebufferAttachmentParameter:'a.fbTarget->attachmentPoint->'aattachParam->'amethmethodisFramebuffer:framebuffert->booltmeth(** 5.13.7 Renderbuffer objects *)methodbindRenderbuffer:rbTarget->renderbuffert->unitmethmethodbindRenderbuffer_:rbTarget->renderbuffertopt->unitmethmethodcreateRenderbuffer:renderbuffertmethmethoddeleteRenderbuffer:renderbuffert->unitmethmethodgetRenderbufferParameter:'a.rbTarget->'arenderbufferParam->'amethmethodisRenderbuffer:renderbuffert->booltmethmethodrenderbufferStorage:rbTarget->format->sizei->sizei->unitmeth(** 5.13.8 Texture objects *)methodbindTexture:texTarget->texturet->unitmethmethodbindTexture_:texTarget->texturetopt->unitmethmethodcompressedTexImage2D:texTarget->int->pixelFormat->sizei->sizei->int->#Typed_array.arrayBufferViewt->unitmethmethodcompressedTexSubImage2D:texTarget->int->int->int->sizei->sizei->pixelFormat->#Typed_array.arrayBufferViewt->unitmethmethodcopyTexImage2D:texTarget->int->pixelFormat->int->int->sizei->sizei->int->unitmethmethodcopyTexSubImage2D:texTarget->int->int->int->int->int->sizei->sizei->unitmethmethodcreateTexture:texturetmethmethoddeleteTexture:texturet->unitmethmethodgenerateMipmap:texTarget->unitmethmethodgetTexParameter:texTarget->'atexParam->'amethmethodisTexture:texturet->booltmethmethodtexImage2D_new:texTarget->int->pixelFormat->sizei->sizei->int->pixelFormat->pixelType->voidopt->unitmethmethodtexImage2D_fromView:texTarget->int->pixelFormat->sizei->sizei->int->pixelFormat->pixelType->#Typed_array.arrayBufferViewt->unitmethmethodtexImage2D_fromImageData:texTarget->int->pixelFormat->pixelFormat->pixelType->Dom_html.imageDatat->unitmethmethodtexImage2D_fromImage:texTarget->int->pixelFormat->pixelFormat->pixelType->Dom_html.imageElementt->unitmethmethodtexImage2D_fromCanvas:texTarget->int->pixelFormat->pixelFormat->pixelType->Dom_html.canvasElementt->unitmethmethodtexImage2D_fromVideo:texTarget->int->pixelFormat->pixelFormat->pixelType->Dom_html.videoElementt->unitmeth(* {[
method texParameterf : texTarget -> texParam -> float -> unit meth
]}
*)methodtexParameteri:texTarget->'atexParam->'a->unitmethmethodtexSubImage2D_fromView:texTarget->int->int->int->sizei->sizei->pixelFormat->pixelType->#Typed_array.arrayBufferViewt->unitmethmethodtexSubImage2D_fromImageData:texTarget->int->int->int->pixelFormat->pixelType->Dom_html.imageDatat->unitmethmethodtexSubImage2D_fromImage:texTarget->int->int->int->pixelFormat->pixelType->Dom_html.imageElementt->unitmethmethodtexSubImage2D_fromCanvas:texTarget->int->int->int->pixelFormat->pixelType->Dom_html.canvasElementt->unitmethmethodtexSubImage2D_fromVideo:texTarget->int->int->int->pixelFormat->pixelType->Dom_html.videoElementt->unitmeth(** 5.13.9 Programs and Shaders *)methodattachShader:programt->shadert->unitmethmethodbindAttribLocation:programt->uint->js_stringt->unitmethmethodcompileShader:shadert->unitmethmethodcreateProgram:programtmethmethodcreateShader:shaderType->shadertmethmethoddeleteProgram:programt->unitmethmethoddeleteShader:shadert->unitmethmethoddetachShader:programt->shadert->unitmethmethodgetAttachedShaders:programt->shadertjs_arraytmethmethodgetProgramParameter:'a.programt->'aprogramParam->'amethmethodgetProgramInfoLog:programt->js_stringtmethmethodgetShaderParameter:'a.shadert->'ashaderParam->'amethmethodgetShaderPrecisionFormat:shaderType->shaderPrecisionType->shaderPrecisionFormattmethmethodgetShaderInfoLog:shadert->js_stringtmethmethodgetShaderSource:shadert->js_stringtmethmethodisProgram:programt->booltmethmethodisShader:shadert->booltmethmethodlinkProgram:programt->unitmethmethodshaderSource:shadert->js_stringt->unitmethmethoduseProgram:programt->unitmethmethodvalidateProgram:programt->unitmeth(** 5.13.10 Uniforms and attributes *)methoddisableVertexAttribArray:uint->unitmethmethodenableVertexAttribArray:uint->unitmethmethodgetActiveAttrib:programt->uint->activeInfotmethmethodgetActiveUniform:programt->uint->activeInfotmethmethodgetAttribLocation:programt->js_stringt->intmethmethodgetUniform:'a'b.programt->'auniformLocationt->'bmethmethodgetUniformLocation:'a.programt->js_stringt->'auniformLocationtmethmethodgetVertexAttrib:'a.uint->'avertexAttribParam->'amethmethodgetVertexAttribOffset:uint->vertexAttribPointerParam->sizeiptrmethmethoduniform1f:floatuniformLocationt->float->unitmethmethoduniform1fv_typed:floatuniformLocationt->Typed_array.float32Arrayt->unitmethmethoduniform1fv:floatuniformLocationt->floatjs_arrayt->unitmethmethoduniform1i:intuniformLocationt->int->unitmethmethoduniform1iv_typed:intuniformLocationt->Typed_array.int32Arrayt->unitmethmethoduniform1iv:intuniformLocationt->intjs_arrayt->unitmethmethoduniform2f:[`vec2]uniformLocationt->float->float->unitmethmethoduniform2fv_typed:[`vec2]uniformLocationt->Typed_array.float32Arrayt->unitmethmethoduniform2fv:[`vec2]uniformLocationt->floatjs_arrayt->unitmethmethoduniform2i:[`ivec2]uniformLocationt->int->int->unitmethmethoduniform2iv:[`ivec2]uniformLocationt->intjs_arrayt->unitmethmethoduniform2iv_typed:[`ivec2]uniformLocationt->Typed_array.int32Arrayt->unitmethmethoduniform3f:[`vec3]uniformLocationt->float->float->float->unitmethmethoduniform3fv_typed:[`vec3]uniformLocationt->Typed_array.float32Arrayt->unitmethmethoduniform3fv:[`vec3]uniformLocationt->floatjs_arrayt->unitmethmethoduniform3i:[`ivec3]uniformLocationt->int->int->int->unitmethmethoduniform3iv:[`ivec3]uniformLocationt->intjs_arrayt->unitmethmethoduniform3iv_typed:[`ivec3]uniformLocationt->Typed_array.int32Arrayt->unitmethmethoduniform4f:[`vec4]uniformLocationt->float->float->float->float->unitmethmethoduniform4fv_typed:[`vec4]uniformLocationt->Typed_array.float32Arrayt->unitmethmethoduniform4fv:[`vec4]uniformLocationt->floatjs_arrayt->unitmethmethoduniform4i:[`ivec4]uniformLocationt->int->int->int->int->unitmethmethoduniform4iv:[`ivec4]uniformLocationt->intjs_arrayt->unitmethmethoduniform4iv_typed:[`ivec4]uniformLocationt->Typed_array.int32Arrayt->unitmethmethoduniformMatrix2fv:[`mat2]uniformLocationt->boolt->floatjs_arrayt->unitmethmethoduniformMatrix2fv_typed:[`mat2]uniformLocationt->boolt->Typed_array.float32Arrayt->unitmethmethoduniformMatrix3fv:[`mat3]uniformLocationt->boolt->floatjs_arrayt->unitmethmethoduniformMatrix3fv_typed:[`mat3]uniformLocationt->boolt->Typed_array.float32Arrayt->unitmethmethoduniformMatrix4fv:[`mat4]uniformLocationt->boolt->floatjs_arrayt->unitmethmethoduniformMatrix4fv_typed:[`mat4]uniformLocationt->boolt->Typed_array.float32Arrayt->unitmethmethodvertexAttrib1f:uint->float->unitmethmethodvertexAttrib1fv:uint->floatjs_arrayt->unitmethmethodvertexAttrib1fv_typed:uint->Typed_array.float32Arrayt->unitmethmethodvertexAttrib2f:uint->float->float->unitmethmethodvertexAttrib2fv:uint->floatjs_arrayt->unitmethmethodvertexAttrib2fv_typed:uint->Typed_array.float32Arrayt->unitmethmethodvertexAttrib3f:uint->float->float->float->unitmethmethodvertexAttrib3fv:uint->floatjs_arrayt->unitmethmethodvertexAttrib3fv_typed:uint->Typed_array.float32Arrayt->unitmethmethodvertexAttrib4f:uint->float->float->float->float->unitmethmethodvertexAttrib4fv:uint->floatjs_arrayt->unitmethmethodvertexAttrib4fv_typed:uint->Typed_array.float32Arrayt->unitmethmethodvertexAttribPointer:uint->int->dataType->boolt->sizei->intptr->unitmeth(** 5.13.11 Writing to the drawing buffer *)methodclear:clearBufferMask->unitmethmethoddrawArrays:beginMode->int->sizei->unitmethmethoddrawElements:beginMode->sizei->dataType->intptr->unitmethmethodfinish:unitmethmethodflush:unitmeth(** 5.13.12 Reading back pixels *)methodreadPixels:int->int->sizei->sizei->pixelFormat->pixelType->#Typed_array.arrayBufferViewt->unitmeth(** 5.13.13 Detecting context lost events *)methodisContextLost:booltmeth(** 5.13.14 Detecting and enabling extensions *)methodgetSupportedExtensions:js_stringtjs_arraytmethmethodgetExtension:'a.js_stringt->'atoptmeth(* Untyped! *)(** Constants *)method_DEPTH_BUFFER_BIT_:clearBufferMaskreadonly_propmethod_STENCIL_BUFFER_BIT_:clearBufferMaskreadonly_propmethod_COLOR_BUFFER_BIT_:clearBufferMaskreadonly_propmethod_POINTS:beginModereadonly_propmethod_LINES:beginModereadonly_propmethod_LINE_LOOP_:beginModereadonly_propmethod_LINE_STRIP_:beginModereadonly_propmethod_TRIANGLES:beginModereadonly_propmethod_TRIANGLE_STRIP_:beginModereadonly_propmethod_TRIANGLE_FAN_:beginModereadonly_propmethod_ZERO:blendingFactorreadonly_propmethod_ONE:blendingFactorreadonly_propmethod_SRC_COLOR_:blendingFactorreadonly_propmethod_ONE_MINUS_SRC_COLOR_:blendingFactorreadonly_propmethod_SRC_ALPHA_:blendingFactorreadonly_propmethod_ONE_MINUS_SRC_ALPHA_:blendingFactorreadonly_propmethod_DST_ALPHA_:blendingFactorreadonly_propmethod_ONE_MINUS_DST_ALPHA_:blendingFactorreadonly_propmethod_DST_COLOR_:blendingFactorreadonly_propmethod_ONE_MINUS_DST_COLOR_:blendingFactorreadonly_propmethod_SRC_ALPHA_SATURATE_:blendingFactorreadonly_propmethod_FUNC_ADD_:blendModereadonly_propmethod_FUNC_SUBTRACT_:blendModereadonly_propmethod_FUNC_REVERSE_SUBTRACT_:blendModereadonly_propmethod_CONSTANT_COLOR_:blendModereadonly_propmethod_ONE_MINUS_CONSTANT_COLOR_:blendModereadonly_propmethod_CONSTANT_ALPHA_:blendModereadonly_propmethod_ONE_MINUS_CONSTANT_ALPHA_:blendModereadonly_propmethod_ARRAY_BUFFER_:bufferTargetreadonly_propmethod_ELEMENT_ARRAY_BUFFER_:bufferTargetreadonly_propmethod_STREAM_DRAW_:bufferUsagereadonly_propmethod_STATIC_DRAW_:bufferUsagereadonly_propmethod_DYNAMIC_DRAW_:bufferUsagereadonly_propmethod_FRONT:cullFaceModereadonly_propmethod_BACK:cullFaceModereadonly_propmethod_FRONT_AND_BACK_:cullFaceModereadonly_propmethod_CULL_FACE_:enableCapreadonly_propmethod_BLEND:enableCapreadonly_propmethod_DITHER:enableCapreadonly_propmethod_STENCIL_TEST_:enableCapreadonly_propmethod_DEPTH_TEST_:enableCapreadonly_propmethod_SCISSOR_TEST_:enableCapreadonly_propmethod_POLYGON_OFFSET_FILL_:enableCapreadonly_propmethod_SAMPLE_ALPHA_TO_COVERAGE_:enableCapreadonly_propmethod_SAMPLE_COVERAGE_:enableCapreadonly_propmethod_NO_ERROR_:errorCodereadonly_propmethod_INVALID_ENUM_:errorCodereadonly_propmethod_INVALID_VALUE_:errorCodereadonly_propmethod_INVALID_OPERATION_:errorCodereadonly_propmethod_OUT_OF_MEMORY_:errorCodereadonly_propmethod_CONTEXT_LOST_WEBGL_:errorCodereadonly_propmethod_INVALID_FRAMEBUFFER_OPERATION_:errorCodereadonly_propmethod_CW:frontFaceDirreadonly_propmethod_CCW:frontFaceDirreadonly_propmethod_DONT_CARE_:hintModereadonly_propmethod_FASTEST:hintModereadonly_propmethod_NICEST:hintModereadonly_propmethod_GENERATE_MIPMAP_HINT_:hintTargetreadonly_propmethod_BLEND_EQUATION_:blendModeparameterreadonly_propmethod_BLEND_EQUATION_RGB_:blendModeparameterreadonly_propmethod_BLEND_EQUATION_ALPHA_:blendModeparameterreadonly_propmethod_BLEND_DST_RGB_:blendingFactorparameterreadonly_propmethod_BLEND_SRC_RGB_:blendingFactorparameterreadonly_propmethod_BLEND_DST_ALPHA_:blendingFactorparameterreadonly_propmethod_BLEND_SRC_ALPHA_:blendingFactorparameterreadonly_propmethod_BLEND_COLOR_:Typed_array.float32Arraytparameterreadonly_propmethod_ARRAY_BUFFER_BINDING_:buffertoptparameterreadonly_propmethod_ELEMENT_ARRAY_BUFFER_BINDING_:buffertoptparameterreadonly_propmethod_CULL_FACE_PARAM:booltparameterreadonly_propmethod_BLEND_PARAM:booltparameterreadonly_propmethod_DITHER_PARAM:booltparameterreadonly_propmethod_STENCIL_TEST_PARAM:booltparameterreadonly_propmethod_DEPTH_TEST_PARAM:booltparameterreadonly_propmethod_SCISSOR_TEST_PARAM:booltparameterreadonly_propmethod_POLYGON_OFFSET_FILL_PARAM:booltparameterreadonly_propmethod_LINE_WIDTH_:floatparameterreadonly_propmethod_ALIASED_POINT_SIZE_RANGE_:Typed_array.float32Arraytparameterreadonly_propmethod_ALIASED_LINE_WIDTH_RANGE_:Typed_array.float32Arraytparameterreadonly_propmethod_CULL_FACE_MODE_:cullFaceModeparameterreadonly_propmethod_FRONT_FACE_:frontFaceDirparameterreadonly_propmethod_DEPTH_RANGE_:Typed_array.float32Arraytparameterreadonly_propmethod_DEPTH_WRITEMASK_:booltparameterreadonly_propmethod_DEPTH_CLEAR_VALUE_:floatparameterreadonly_propmethod_DEPTH_FUNC_:depthFunctionparameterreadonly_propmethod_STENCIL_CLEAR_VALUE_:intparameterreadonly_propmethod_STENCIL_FUNC_:intparameterreadonly_propmethod_STENCIL_FAIL_:intparameterreadonly_propmethod_STENCIL_PASS_DEPTH_FAIL_:intparameterreadonly_propmethod_STENCIL_PASS_DEPTH_PASS_:intparameterreadonly_propmethod_STENCIL_REF_:intparameterreadonly_propmethod_STENCIL_VALUE_MASK_:intparameterreadonly_propmethod_STENCIL_WRITEMASK_:intparameterreadonly_propmethod_STENCIL_BACK_FUNC_:intparameterreadonly_propmethod_STENCIL_BACK_FAIL_:intparameterreadonly_propmethod_STENCIL_BACK_PASS_DEPTH_FAIL_:intparameterreadonly_propmethod_STENCIL_BACK_PASS_DEPTH_PASS_:intparameterreadonly_propmethod_STENCIL_BACK_REF_:intparameterreadonly_propmethod_STENCIL_BACK_VALUE_MASK_:intparameterreadonly_propmethod_STENCIL_BACK_WRITEMASK_:intparameterreadonly_propmethod_VIEWPORT:Typed_array.int32Arraytparameterreadonly_propmethod_SCISSOR_BOX_:Typed_array.int32Arraytparameterreadonly_propmethod_COLOR_CLEAR_VALUE_:Typed_array.float32Arraytparameterreadonly_propmethod_COLOR_WRITEMASK_:booltjs_arraytparameterreadonly_propmethod_UNPACK_ALIGNMENT_PARAM:intparameterreadonly_propmethod_PACK_ALIGNMENT_:intparameterreadonly_propmethod_MAX_TEXTURE_SIZE_:intparameterreadonly_propmethod_MAX_VIEWPORT_DIMS_:Typed_array.int32Arraytparameterreadonly_propmethod_SUBPIXEL_BITS_:intparameterreadonly_propmethod_RED_BITS_:intparameterreadonly_propmethod_GREEN_BITS_:intparameterreadonly_propmethod_BLUE_BITS_:intparameterreadonly_propmethod_ALPHA_BITS_:intparameterreadonly_propmethod_DEPTH_BITS_:intparameterreadonly_propmethod_STENCIL_BITS_:intparameterreadonly_propmethod_POLYGON_OFFSET_UNITS_:floatparameterreadonly_propmethod_POLYGON_OFFSET_FACTOR_:floatparameterreadonly_propmethod_TEXTURE_BINDING_2D_:texturetoptparameterreadonly_propmethod_TEXTURE_BINDING_CUBE_MAP_:texturetoptparameterreadonly_propmethod_SAMPLE_BUFFERS_:intparameterreadonly_propmethod_SAMPLES_:intparameterreadonly_propmethod_SAMPLE_COVERAGE_VALUE_:floatparameterreadonly_propmethod_SAMPLE_COVERAGE_INVERT_:booltparameterreadonly_propmethod_NUM_COMPRESSED_TEXTURE_FORMATS_:intparameterreadonly_propmethod_COMPRESSED_TEXTURE_FORMATS_:Typed_array.uint32Arraytparameterreadonly_propmethod_GENERATE_MIPMAP_HINT_PARAM_:hintModeparameterreadonly_propmethod_BUFFER_SIZE_:intbufferParameterreadonly_propmethod_BUFFER_USAGE_:bufferUsagebufferParameterreadonly_propmethod_BYTE:dataTypereadonly_propmethod_UNSIGNED_BYTE_DT:dataTypereadonly_propmethod_SHORT:dataTypereadonly_propmethod_UNSIGNED_SHORT_:dataTypereadonly_propmethod_INT:dataTypereadonly_propmethod_UNSIGNED_INT_:dataTypereadonly_propmethod_FLOAT:dataTypereadonly_propmethod_UNSIGNED_BYTE_:pixelTypereadonly_propmethod_UNSIGNED_SHORT_4_4_4_4_:pixelTypereadonly_propmethod_UNSIGNED_SHORT_5_5_5_1_:pixelTypereadonly_propmethod_UNSIGNED_SHORT_5_6_5_:pixelTypereadonly_propmethod_ALPHA:pixelFormatreadonly_propmethod_RGB:pixelFormatreadonly_propmethod_RGBA:pixelFormatreadonly_propmethod_LUMINANCE:pixelFormatreadonly_propmethod_LUMINANCE_ALPHA_:pixelFormatreadonly_propmethod_STENCIL_INDEX_:pixelFormatreadonly_propmethod_DEPTH_STENCIL_:pixelFormatreadonly_propmethod_DEPTH_COMPONENT_:pixelFormatreadonly_propmethod_FRAGMENT_SHADER_:shaderTypereadonly_propmethod_VERTEX_SHADER_:shaderTypereadonly_propmethod_MAX_VERTEX_ATTRIBS_:intparameterreadonly_propmethod_MAX_VERTEX_UNIFORM_VECTORS_:intparameterreadonly_propmethod_MAX_VARYING_VECTORS_:intparameterreadonly_propmethod_MAX_COMBINED_TEXTURE_IMAGE_UNITS_:intparameterreadonly_propmethod_MAX_VERTEX_TEXTURE_IMAGE_UNITS_:intparameterreadonly_propmethod_MAX_TEXTURE_IMAGE_UNITS_:intparameterreadonly_propmethod_MAX_FRAGMENT_UNIFORM_VECTORS_:intparameterreadonly_propmethod_SHADER_TYPE_:shaderTypeshaderParamreadonly_propmethod_DELETE_STATUS_:booltshaderParamreadonly_propmethod_COMPILE_STATUS_:booltshaderParamreadonly_propmethod_DELETE_STATUS_PROG:booltprogramParamreadonly_propmethod_LINK_STATUS_:booltprogramParamreadonly_propmethod_VALIDATE_STATUS_:booltprogramParamreadonly_propmethod_ATTACHED_SHADERS_:intprogramParamreadonly_propmethod_ACTIVE_UNIFORMS_:intprogramParamreadonly_propmethod_ACTIVE_ATTRIBUTES_:intprogramParamreadonly_propmethod_SHADING_LANGUAGE_VERSION_:js_stringtparameterreadonly_propmethod_CURRENT_PROGRAM_:programtoptparameterreadonly_propmethod_VENDOR:js_stringtparameterreadonly_propmethod_RENDERER:js_stringtparameterreadonly_propmethod_VERSION:js_stringtparameterreadonly_propmethod_MAX_CUBE_MAP_TEXTURE_SIZE_:intparameterreadonly_propmethod_ACTIVE_TEXTURE_:intparameterreadonly_propmethod_FRAMEBUFFER_BINDING_:framebuffertoptparameterreadonly_propmethod_RENDERBUFFER_BINDING_:renderbuffertoptparameterreadonly_propmethod_MAX_RENDERBUFFER_SIZE:intparameterreadonly_propmethod_NEVER:depthFunctionreadonly_propmethod_LESS:depthFunctionreadonly_propmethod_EQUAL:depthFunctionreadonly_propmethod_LEQUAL:depthFunctionreadonly_propmethod_GREATER:depthFunctionreadonly_propmethod_NOTEQUAL:depthFunctionreadonly_propmethod_GEQUAL:depthFunctionreadonly_propmethod_ALWAYS:depthFunctionreadonly_propmethod_KEEP:stencilOpreadonly_propmethod_REPLACE:stencilOpreadonly_propmethod_INCR:stencilOpreadonly_propmethod_DECR:stencilOpreadonly_propmethod_INVERT:stencilOpreadonly_propmethod_INCR_WRAP_:stencilOpreadonly_propmethod_DECR_WRAP_:stencilOpreadonly_propmethod_ZERO_:stencilOpreadonly_propmethod_NEAREST:texFilterreadonly_propmethod_LINEAR:texFilterreadonly_propmethod_NEAREST_MIPMAP_NEAREST_:texFilterreadonly_propmethod_LINEAR_MIPMAP_NEAREST_:texFilterreadonly_propmethod_NEAREST_MIPMAP_LINEAR_:texFilterreadonly_propmethod_LINEAR_MIPMAP_LINEAR_:texFilterreadonly_propmethod_TEXTURE_MAG_FILTER_:texFiltertexParamreadonly_propmethod_TEXTURE_MIN_FILTER_:texFiltertexParamreadonly_propmethod_TEXTURE_WRAP_S_:wrapModetexParamreadonly_propmethod_TEXTURE_WRAP_T_:wrapModetexParamreadonly_propmethod_NONE_OT:objectTypereadonly_propmethod_TEXTURE_OT:objectTypereadonly_propmethod_RENDERBUFFER_OT:objectTypereadonly_propmethod_TEXTURE_2D_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_POSITIVE_X_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_NEGATIVE_X_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_POSITIVE_Y_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_NEGATIVE_Y_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_POSITIVE_Z_:texTargetreadonly_propmethod_TEXTURE_CUBE_MAP_NEGATIVE_Z_:texTargetreadonly_propmethod_TEXTURE0:textureUnitreadonly_propmethod_TEXTURE1:textureUnitreadonly_propmethod_TEXTURE2:textureUnitreadonly_propmethod_TEXTURE3:textureUnitreadonly_propmethod_TEXTURE4:textureUnitreadonly_propmethod_TEXTURE5:textureUnitreadonly_propmethod_TEXTURE6:textureUnitreadonly_propmethod_TEXTURE7:textureUnitreadonly_propmethod_TEXTURE8:textureUnitreadonly_propmethod_TEXTURE9:textureUnitreadonly_propmethod_TEXTURE10:textureUnitreadonly_propmethod_TEXTURE11:textureUnitreadonly_propmethod_TEXTURE12:textureUnitreadonly_propmethod_TEXTURE13:textureUnitreadonly_propmethod_TEXTURE14:textureUnitreadonly_propmethod_TEXTURE15:textureUnitreadonly_propmethod_TEXTURE16:textureUnitreadonly_propmethod_TEXTURE17:textureUnitreadonly_propmethod_TEXTURE18:textureUnitreadonly_propmethod_TEXTURE19:textureUnitreadonly_propmethod_TEXTURE20:textureUnitreadonly_propmethod_TEXTURE21:textureUnitreadonly_propmethod_TEXTURE22:textureUnitreadonly_propmethod_TEXTURE23:textureUnitreadonly_propmethod_TEXTURE24:textureUnitreadonly_propmethod_TEXTURE25:textureUnitreadonly_propmethod_TEXTURE26:textureUnitreadonly_propmethod_TEXTURE27:textureUnitreadonly_propmethod_TEXTURE28:textureUnitreadonly_propmethod_TEXTURE29:textureUnitreadonly_propmethod_TEXTURE30:textureUnitreadonly_propmethod_TEXTURE31:textureUnitreadonly_propmethod_REPEAT:wrapModereadonly_propmethod_CLAMP_TO_EDGE_:wrapModereadonly_propmethod_MIRRORED_REPEAT_:wrapModereadonly_propmethod_FLOAT_:uniformTypereadonly_propmethod_FLOAT_VEC2_:uniformTypereadonly_propmethod_FLOAT_VEC3_:uniformTypereadonly_propmethod_FLOAT_VEC4_:uniformTypereadonly_propmethod_INT_:uniformTypereadonly_propmethod_INT_VEC2_:uniformTypereadonly_propmethod_INT_VEC3_:uniformTypereadonly_propmethod_INT_VEC4_:uniformTypereadonly_propmethod_BOOL_:uniformTypereadonly_propmethod_BOOL_VEC2_:uniformTypereadonly_propmethod_BOOL_VEC3_:uniformTypereadonly_propmethod_BOOL_VEC4_:uniformTypereadonly_propmethod_FLOAT_MAT2_:uniformTypereadonly_propmethod_FLOAT_MAT3_:uniformTypereadonly_propmethod_FLOAT_MAT4_:uniformTypereadonly_propmethod_SAMPLER_2D_:uniformTypereadonly_propmethod_SAMPLER_CUBE_:uniformTypereadonly_propmethod_VERTEX_ATTRIB_ARRAY_ENABLED_:booltvertexAttribParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_SIZE_:intvertexAttribParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_STRIDE_:intvertexAttribParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_TYPE_:intvertexAttribParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_NORMALIZED_:booltvertexAttribParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_POINTER_:vertexAttribPointerParamreadonly_propmethod_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_:buffertoptvertexAttribParamreadonly_propmethod_CURRENT_VERTEX_ATTRIB_:Typed_array.float32ArraytvertexAttribParamreadonly_propmethod_LOW_FLOAT_:shaderPrecisionTypereadonly_propmethod_MEDIUM_FLOAT_:shaderPrecisionTypereadonly_propmethod_HIGH_FLOAT_:shaderPrecisionTypereadonly_propmethod_LOW_INT_:shaderPrecisionTypereadonly_propmethod_MEDIUM_INT_:shaderPrecisionTypereadonly_propmethod_HIGH_INT_:shaderPrecisionTypereadonly_propmethod_FRAMEBUFFER:fbTargetreadonly_propmethod_RENDERBUFFER:rbTargetreadonly_propmethod_RGBA4:formatreadonly_propmethod_RGB5_A1_:formatreadonly_propmethod_RGB565:formatreadonly_propmethod_DEPTH_COMPONENT16_:formatreadonly_propmethod_STENCIL_INDEX8_:formatreadonly_propmethod_RENDERBUFFER_WIDTH_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_HEIGHT_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_INTERNAL_FORMAT_:formatrenderbufferParamreadonly_propmethod_RENDERBUFFER_RED_SIZE_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_GREEN_SIZE_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_BLUE_SIZE_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_ALPHA_SIZE_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_DEPTH_SIZE_:intrenderbufferParamreadonly_propmethod_RENDERBUFFER_STENCIL_SIZE_:intrenderbufferParamreadonly_propmethod_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_:objectTypeattachParamreadonly_propmethod_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_RENDERBUFFER:renderbuffertattachParamreadonly_propmethod_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_TEXTURE:texturetattachParamreadonly_propmethod_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_:intattachParamreadonly_propmethod_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_:intattachParamreadonly_propmethod_COLOR_ATTACHMENT0_:attachmentPointreadonly_propmethod_DEPTH_ATTACHMENT_:attachmentPointreadonly_propmethod_STENCIL_ATTACHMENT_:attachmentPointreadonly_propmethod_DEPTH_STENCIL_ATTACHMENT_:attachmentPointreadonly_propmethod_FRAMEBUFFER_COMPLETE_:framebufferStatusreadonly_propmethod_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_:framebufferStatusreadonly_propmethod_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_:framebufferStatusreadonly_propmethod_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_:framebufferStatusreadonly_propmethod_FRAMEBUFFER_UNSUPPORTED_:framebufferStatusreadonly_propmethod_UNPACK_FLIP_Y_WEBGL_PARAM:booltparameterreadonly_propmethod_UNPACK_PREMULTIPLY_ALPHA_WEBGL_PARAM:booltparameterreadonly_propmethod_UNPACK_COLORSPACE_CONVERSION_WEBGL_PARAM:colorspaceConversionparameterreadonly_propmethod_NONE:colorspaceConversionreadonly_propmethod_BROWSER_DEFAULT_WEBGL_:colorspaceConversionreadonly_propmethod_UNPACK_ALIGNMENT_:intpixelStoreParamreadonly_propmethod_UNPACK_FLIP_Y_WEBGL_:booltpixelStoreParamreadonly_propmethod_UNPACK_PREMULTIPLY_ALPHA_WEBGL_:booltpixelStoreParamreadonly_propmethod_UNPACK_COLORSPACE_CONVERSION_WEBGL_:intpixelStoreParamreadonly_propend(** 5.14 WebGLContextEvent *)classtypecontextEvent=objectinheritDom_html.eventmethodstatusMessage:js_stringtreadonly_propendmoduleEvent=structletwebglcontextlost=Dom_html.Event.make"webglcontextlost"letwebglcontextrestored=Dom_html.Event.make"webglcontextrestored"letwebglcontextcreationerror=Dom_html.Event.make"webglcontextcreationerror"end(****)classtypecanvasElement=objectmethodgetContext:js_stringt->renderingContexttoptmethmethodgetContext_:js_stringt->contextAttributest->renderingContexttoptmethendletgetContext(c:Dom_html.canvasElementt)=letc:canvasElementt=Js.Unsafe.coercecinletctx=c##getContext(Js.string"webgl")inifOpt.testctxthenctxelsec##(getContext(Js.string"experimental-webgl"))letgetContextWithAttributes(c:Dom_html.canvasElementt)attribs=letc:canvasElementt=Js.Unsafe.coercecinletctx=c##getContext_(Js.string"webgl")attribsinifOpt.testctxthenctxelsec##getContext_(Js.string"experimental-webgl")attribs