提交 5106d9e6 编写于 作者: M Mugen87

WebGLCapabilities: Clean up.

上级 8af1f20d
...@@ -31,7 +31,7 @@ function WebGLCapabilities( gl, extensions, parameters ) { ...@@ -31,7 +31,7 @@ function WebGLCapabilities( gl, extensions, parameters ) {
if ( precision === 'highp' ) { if ( precision === 'highp' ) {
if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 && if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 &&
gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) { gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0 ) {
return 'highp'; return 'highp';
...@@ -44,7 +44,7 @@ function WebGLCapabilities( gl, extensions, parameters ) { ...@@ -44,7 +44,7 @@ function WebGLCapabilities( gl, extensions, parameters ) {
if ( precision === 'mediump' ) { if ( precision === 'mediump' ) {
if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 && if ( gl.getShaderPrecisionFormat( gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 &&
gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) { gl.getShaderPrecisionFormat( gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0 ) {
return 'mediump'; return 'mediump';
...@@ -58,7 +58,7 @@ function WebGLCapabilities( gl, extensions, parameters ) { ...@@ -58,7 +58,7 @@ function WebGLCapabilities( gl, extensions, parameters ) {
/* eslint-disable no-undef */ /* eslint-disable no-undef */
var isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext ) || var isWebGL2 = ( typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext ) ||
( typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext ); ( typeof WebGL2ComputeRenderingContext !== 'undefined' && gl instanceof WebGL2ComputeRenderingContext );
/* eslint-enable no-undef */ /* eslint-enable no-undef */
var precision = parameters.precision !== undefined ? parameters.precision : 'highp'; var precision = parameters.precision !== undefined ? parameters.precision : 'highp';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册