Browse Source

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...
Ben Adams 13 năm trước cách đây
mục cha
commit
bc94173866
1 tập tin đã thay đổi với 18 bổ sung0 xóa
  1. 18 0
      src/renderers/WebGLRenderer.js

+ 18 - 0
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 () {
 	this.getMaxAnisotropy  = function () {
 
 
 		return _maxAnisotropy;
 		return _maxAnisotropy;

粤ICP备19079148号