package js_of_ocaml

All checked builds pass
  1. Overview
  2. Docs
Compiler from OCaml bytecode to JavaScript

Install

dune-project
 Dependency

Authors

Maintainers

Sources

js_of_ocaml-6.5.0.tbz
sha256=a991ce25175a5a13240c8bf64354b8f35e0a8d7223b90bef01ba32bc6f929cf4
sha512=ce476986cb2c78990f29b1d7a01bb173a0d30ad0e0a80ba7bde9aa8365952ed01eda4935d92a323b982b0c1c897b20ef01eabe75fe80e4da858f73f6a2d25232

doc/js_of_ocaml/Js_of_ocaml/WebGL2/index.html

Module Js_of_ocaml.WebGL2Source

WebGL2 binding.

WebGL2 (WebGL2RenderingContext) is a strict superset of WebGL1, so the context renderingContext inherits every method and constant of WebGL.renderingContext and adds the WebGL2 ones on top.

Following the pragmatic style of WebGL, the enumerations are kept as abstract types shared between related uses. In particular the many WebGL2 sized internal formats and the plain formats share the single type pixelFormat; the binding therefore does not enforce, at compile time, that the (internalformat, format, type) triples passed to e.g. renderingContext.texImage3D are mutually coherent (WebGL itself is not type safe there).

Types reused from WebGL1

Sourcetype sizei = WebGL.sizei
Sourcetype sizeiptr = WebGL.sizeiptr
Sourcetype intptr = WebGL.intptr
Sourcetype uint = WebGL.uint
Sourcetype clampf = WebGL.clampf
Sourcetype void = WebGL.void
Sourcetype clearBufferMask = WebGL.clearBufferMask
Sourcetype beginMode = WebGL.beginMode
Sourcetype bufferTarget = WebGL.bufferTarget
Sourcetype bufferUsage = WebGL.bufferUsage
Sourcetype enableCap = WebGL.enableCap
Sourcetype dataType = WebGL.dataType
Sourcetype pixelType = WebGL.pixelType
Sourcetype pixelFormat = WebGL.pixelFormat
Sourcetype format = WebGL.format
Sourcetype texTarget = WebGL.texTarget
Sourcetype texFilter = WebGL.texFilter
Sourcetype rbTarget = WebGL.rbTarget
Sourcetype fbTarget = WebGL.fbTarget
Sourcetype attachmentPoint = WebGL.attachmentPoint
Sourcetype 'a parameter = 'a WebGL.parameter
Sourcetype 'a pixelStoreParam = 'a WebGL.pixelStoreParam
Sourcetype buffer = WebGL.buffer
Sourcetype framebuffer = WebGL.framebuffer
Sourcetype program = WebGL.program
Sourcetype renderbuffer = WebGL.renderbuffer
Sourcetype shader = WebGL.shader
Sourcetype texture = WebGL.texture
Sourcetype 'a uniformLocation = 'a WebGL.uniformLocation
Sourcetype 'a texParam = 'a WebGL.texParam
Sourcetype wrapMode = WebGL.wrapMode
Sourcetype depthFunction = WebGL.depthFunction
Sourcetype 'a programParam = 'a WebGL.programParam
Sourcetype 'a vertexAttribParam = 'a WebGL.vertexAttribParam
Sourcetype 'a attachParam = 'a WebGL.attachParam
Sourcetype framebufferStatus = WebGL.framebufferStatus
Sourcetype uniformType = WebGL.uniformType
Sourcetype hintTarget = WebGL.hintTarget
Sourcetype objectType = WebGL.objectType

New WebGL2 objects

Sourcetype query
Sourcetype sampler
Sourcetype sync
Sourcetype transformFeedback
Sourcetype vertexArrayObject

New WebGL2 enumerations

Sourcetype queryTarget
Sourcetype currentQueryParam
Sourcetype 'a queryParam
Sourcetype syncCondition
Sourcetype 'a syncParam
Sourcetype syncStatus
Sourcetype clientWaitSyncStatus
Sourcetype clearBuffer
Sourcetype transformFeedbackMode
Sourcetype 'a samplerParam
Sourcetype 'a activeUniformParam
Sourcetype 'a uniformBlockParam
Sourcetype transformFeedbackTarget
Sourcetype textureCompareMode
Sourcetype 'a indexedParameter
Sourcetype 'a internalformatParam
Sourcetype componentType
Sourcetype colorEncoding
Sourcetype syncObjectType
Sourceclass type renderingContext = object ... end

Getting a WebGL2 context