From bc94173866497e066aa8abe7f564392075f38ec5 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sun, 6 Jan 2013 15:03:32 +0000 Subject: [PATCH] Exposed more supports tests Extra feature detection tests, to know what to load when using library e.g. If no compressed texture support, load regular textures etc If no float texture support, do multi pass rendering and pack float into rgba If no dervitives do something else... --- src/renderers/WebGLRenderer.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index 4b8b61b618..f538e72812 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -263,6 +263,24 @@ THREE.WebGLRenderer = function ( parameters ) { }; + this.supportsFloatTextures = function () { + + return _glExtensionTextureFloat; + + }; + + this.supportsStandardDerivatives = function () { + + return _glExtensionStandardDerivatives; + + }; + + this.supportsCompressedTextureS3TC = function () { + + return _glExtensionCompressedTextureS3TC; + + }; + this.getMaxAnisotropy = function () { return _maxAnisotropy; -- GitLab