hack depth texture detection for alipay (#6086)

This commit is contained in:
Yun Hsiao Wu
2020-01-12 14:43:47 +08:00
committed by pandamicro
parent 4f142eea67
commit 960e2c203f
+8
View File
@@ -257,6 +257,10 @@ export class WebGLGFXDevice extends GFXDevice {
this._depthBits = gl.getParameter(gl.DEPTH_BITS);
this._stencilBits = gl.getParameter(gl.STENCIL_BITS);
if (CC_ALIPAY) {
this._depthBits = 24;
}
this._devicePixelRatio = info.devicePixelRatio || 1.0;
this._width = this._canvas.width;
this._height = this._canvas.height;
@@ -314,6 +318,10 @@ export class WebGLGFXDevice extends GFXDevice {
this._OES_element_index_uint = this.getExtension('OES_element_index_uint');
this._ANGLE_instanced_arrays = this.getExtension('ANGLE_instanced_arrays');
if (CC_ALIPAY) {
this._WEBGL_depth_texture = { UNSIGNED_INT_24_8_WEBGL: 0x84FA };
}
this._features.fill(false);
if (this._WEBGL_color_buffer_float) {