Sfoglia il codice sorgente

update Webglrenderer2 to make bc94173866497e066aa8abe7f564392075f38ec5 work also

OpenShift guest 12 anni fa
parent
commit
bcbbb2ed1a
2 ha cambiato i file con 24 aggiunte e 0 eliminazioni
  1. 3 0
      src/renderers/WebGLRenderer2.js
  2. 21 0
      src/renderers/webgl/LowLevelRenderer.js

+ 3 - 0
src/renderers/WebGLRenderer2.js

@@ -154,6 +154,9 @@ THREE.WebGLRenderer = THREE.WebGLRenderer2 = function ( parameters ) {
 	this.getPrecision = renderer.getPrecision;
 	this.getContext = renderer.getContext;
 	this.supportsVertexTextures = renderer.supportsVertexTextures;
+	this.supportsFloatTextures = renderer.supportsFloatTextures;
+	this.supportsStandardDerivatives = renderer.supportsStandardDerivatives;
+	this.supportsCompressedTextureS3TC = renderer.supportsCompressedTextureS3TC;
 	this.getMaxAnisotropy  = renderer.getMaxAnisotropy;
 	this.setSize = renderer.setSize;
 	this.setViewport = renderer.setViewport;

+ 21 - 0
src/renderers/webgl/LowLevelRenderer.js

@@ -242,6 +242,24 @@ THREE.WebGLRenderer2.LowLevelRenderer = function(parameters){
 		return _supportsVertexTextures;
 
 	};
+	
+	function supportsFloatTextures() {
+
+		return _glExtensionTextureFloat;
+
+	};
+
+	function supportsStandardDerivatives() {
+
+		return _glExtensionStandardDerivatives;
+
+	};
+
+	function supportsCompressedTextureS3TC() {
+
+		return _glExtensionCompressedTextureS3TC;
+
+	};
 
 	function getMaxAnisotropy() {
 
@@ -1441,6 +1459,9 @@ THREE.WebGLRenderer2.LowLevelRenderer = function(parameters){
 	this.getCurrentWidth = getCurrentWidth;
 	this.getCurrentHeight = getCurrentHeight;
 	this.supportsVertexTextures = supportsVertexTextures;
+	this.supportsFloatTextures = supportsFloatTextures;
+	this.supportsStandardDerivatives = supportsStandardDerivatives;
+	this.supportsCompressedTextureS3TC = supportsCompressedTextureS3TC;
 	this.getMaxAnisotropy  = getMaxAnisotropy;
 	
 	this.setRenderTarget = setRenderTarget;