2
0
Эх сурвалжийг харах

WebGLUtils: Add WebGL constant fallback to convert(). (#23813)

Michael Herzog 3 жил өмнө
parent
commit
fce7ca7e00

+ 4 - 0
src/renderers/webgl/WebGLUtils.js

@@ -250,6 +250,10 @@ function WebGLUtils( gl, extensions, capabilities ) {
 
 		}
 
+		// if "p" can't be resolved, assume the user defines a WebGL constant as a string (fallback/workaround for packed RGB formats)
+
+		return ( gl[ p ] !== undefined ) ? gl[ p ] : null;
+
 	}
 
 	return { convert: convert };