Methods
(static) checkGLError(gl)
Check if the webgl context contains any errors in the current state
Parameters:
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
A valid WebGL context |
(static) getByteSize(type)
Get size in bytes of a specific type.
Parameters:
Name | Type | Description |
---|---|---|
type |
string |
Type to retrieve bytesize for |
(static) getEnumNameFromError(gl, error) → {*|string}
Get error enum name from enum value.
Parameters:
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
A valid WebGL context |
error |
number |
A WebGL error enum value |
(static) getTextureFilterFallBack(filter, isPowerOfTwo)
Return fallBack texture filter if the passed in one is not compatible with current system
Parameters:
Name | Type | Description |
---|---|---|
filter |
||
isPowerOfTwo |
(static) getTextureWrapFallBack(wrap, isPowerOfTwo) → {string}
Return fallBack texture wrap if the passed in one is not compatible with current system
repeating NPOT(non-power-of-two) textures are not supported in webgl1
https://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences
https://www.khronos.org/registry/webgl/conformance-suites/2.0.0/conformance2/textures/misc/texture-npot.html
https://www.khronos.org/registry/webgl/conformance-suites/1.0.3/conformance/textures/texture-npot.html
Parameters:
Name | Type | Description |
---|---|---|
wrap |
||
isPowerOfTwo |