![]() |
libgpac
Documentation of the core library of GPAC
|
import <webgl.idl;
Inheritance diagram for WebGLContext:
Collaboration diagram for WebGLContext:Public Member Functions | |
| WebGLContext (unsigned long width, unsigned long height, WebGLContextAttributes context_attributes) | |
| WebGLContext (Object canvas_obj, WebGLContextAttributes context_attributes) | |
| void | activate (boolean activate) |
| void | resize (unsigned long width, unsigned long height) |
| void | texImage2D (GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Texture source) |
| void | texImage2D (GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, FilterPacket source) |
| NamedTexture | createTexture (DOMString name, optional VideoColorConfig vcfg=null) |
| void | bindTexture (GLenum target, NamedTexture texture) |
| DOMString | textureName (NamedTexture texture) |
| sequence< DOMString > | getSupportedExtensions (optional boolean use_gl_exts=false) |
Extensions for GPAC WebGL
| WebGLContext::WebGLContext | ( | unsigned long | width, |
| unsigned long | height, | ||
| WebGLContextAttributes | context_attributes | ||
| ) |
creates a new WebGL context
| width | the target width in pixels of the drawing buffer |
| height | the target height in pixels of the drawing buffer |
| context_attributes | the context attributes as defined by WebGL (see https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2) |
| WebGLContext::WebGLContext | ( | Object | canvas_obj, |
| WebGLContextAttributes | context_attributes | ||
| ) |
creates a new WebGL context (mainly defined for future canvas simulation)
| canvas_obj | an object exposing "width" and "height" properties |
| context_attributes | the context attributes as defined by WebGL (see https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.2) |
| void WebGLContext::activate | ( | boolean | activate | ) |
activate or deactivate a WebGL context
| activate | if true, binds the associated frame buffer. If false, unbinds it |
| void WebGLContext::resize | ( | unsigned long | width, |
| unsigned long | height | ||
| ) |
resize the underlying frame buffer to the indicated size
| width | new width in pixels |
| height | new height in pixels |
| void WebGLContext::texImage2D | ( | GLenum | target, |
| GLint | level, | ||
| GLint | internalformat, | ||
| GLenum | format, | ||
| GLenum | type, | ||
| Texture | source | ||
| ) |
uploads the content of the EVG Texture to the bound texture. The bound texture can be a WebGLTexture or a NamedTexture
| target | ignored, default to gl.TEXTURE_2D |
| level | target same as regular texImage2D |
| internalformat | ignored, overloaded during upload based on input data |
| format | ignored, overloaded during upload based on input data |
| type | ignored, overloaded during upload based on input data |
| source | the source Texture to use |
| void WebGLContext::texImage2D | ( | GLenum | target, |
| GLint | level, | ||
| GLint | internalformat, | ||
| GLenum | format, | ||
| GLenum | type, | ||
| FilterPacket | source | ||
| ) |
uploads the content of the FilterPacket to the bound texture. The bound texture shall be a NamedTexture
| target | ignored, default to gl.TEXTURE_2D |
| level | target same as regular texImage2D |
| internalformat | ignored, overloaded during upload based on input data |
| format | ignored, overloaded during upload based on input data |
| type | ignored, overloaded during upload based on input data |
| source | the source FilterPacket to use |
| NamedTexture WebGLContext::createTexture | ( | DOMString | name, |
| optional VideoColorConfig | vcfg = null |
||
| ) |
creates a named texture
| name | the name of the texture - if null, generates name |
| vcfg | video config options - if null, default are assumed (everything unspecified, no full range) |
| void WebGLContext::bindTexture | ( | GLenum | target, |
| NamedTexture | texture | ||
| ) |
| target | ignored, default to gl.TEXTURE_2D |
| texture | the named texture to bind, or null to unbind textures |
| DOMString WebGLContext::textureName | ( | NamedTexture | texture | ) |
get the name of a named texture
| texture | target named texture |
| use_gl_exts | if true, queries all extensions supported by the underlying OpenGL implementation. Otherwise, queries only supported WebGL extensions (none at the moment) |