|
@@ -788,7 +788,9 @@ export class ThinEngine {
|
|
|
}
|
|
|
|
|
|
// Constants
|
|
|
- this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit).
|
|
|
+ if (this._gl.HALF_FLOAT_OES !== 0x8D61) {
|
|
|
+ this._gl.HALF_FLOAT_OES = 0x8D61; // Half floating-point type (16-bit).
|
|
|
+ }
|
|
|
if (this._gl.RGBA16F !== 0x881A) {
|
|
|
this._gl.RGBA16F = 0x881A; // RGBA 16-bit floating-point color-renderable internal sized format.
|
|
|
}
|
|
@@ -814,7 +816,9 @@ export class ThinEngine {
|
|
|
|
|
|
// Checks if some of the format renders first to allow the use of webgl inspector.
|
|
|
if (this._webGLVersion > 1) {
|
|
|
- this._gl.HALF_FLOAT_OES = 0x140B;
|
|
|
+ if (this._gl.HALF_FLOAT_OES !== 0x140B) {
|
|
|
+ this._gl.HALF_FLOAT_OES = 0x140B;
|
|
|
+ }
|
|
|
}
|
|
|
this._caps.textureHalfFloatRender = this._caps.textureHalfFloat && this._canRenderToHalfFloatFramebuffer();
|
|
|
// Draw buffers
|