未验证 提交 d9f87fb1 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #15906 from Mugen87/dev27

Examples: Avoid usage of raw WebGL context
......@@ -77,19 +77,17 @@
renderer.gammaOutput = true;
document.body.appendChild( renderer.domElement );
var gl = renderer.context;
// Check for float-RT support
// TODO (abelnation): figure out fall-back for float textures
if ( ! gl.getExtension( 'OES_texture_float' ) ) {
if ( ! renderer.extensions.get( 'OES_texture_float' ) ) {
alert( 'OES_texture_float not supported' );
throw 'missing webgl extension';
}
if ( ! gl.getExtension( 'OES_texture_float_linear' ) ) {
if ( ! renderer.extensions.get( 'OES_texture_float_linear' ) ) {
alert( 'OES_texture_float_linear not supported' );
throw 'missing webgl extension';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册