Uncaught TypeError: Object # <WebGLRenderingContext> does not have a method 'getShaderPrecisionFormat'

I use ThreeJS for an application that I develop at work, in particular for rendering WebGL. It worked fine about a year and a half ago, but when I got back to work today, I get this error when trying to launch my application in Chrome:

Uncaught TypeError: Object # does not have a method 'getShaderPrecisionFormat'

I debugged my application in Chrome and it looks like WebGLRenderingContext does not have a method of 'getShaderPrecisionFormat'; Any suggestions as to what could happen to this?

Thanks!

+4
source share
2 answers

This should be fixed in r56 +. (And maybe in r55, but I don't have a version to check)

See https://github.com/mrdoob/three.js/blob/master/src/renderers/WebGLRenderer.js#L7478

if ( _gl.getShaderPrecisionFormat === undefined ) { _gl.getShaderPrecisionFormat = function() { return { "rangeMin" : 1, "rangeMax" : 1, "precision" : 1 }; } } 
+1
source

Are you sure that you are not overwriting renderer.context, because otherwise you will have to show some code, because I have not received any hints yet?

0
source

All Articles