Browse Source

SoftwareRenderer: Moving the rectangle reset to the clear.
Fixes the glitches on the editor. But I don't remember what the logic of this is. I'll have to have a closer look later.

Mr.doob 12 years ago
parent
commit
433222e4e9
1 changed files with 5 additions and 5 deletions
  1. 5 5
      examples/js/renderers/SoftwareRenderer.js

+ 5 - 5
examples/js/renderers/SoftwareRenderer.js

@@ -98,6 +98,11 @@ THREE.SoftwareRenderer = function () {
 
 	this.clear = function () {
 
+		rectx1 = Infinity;
+		recty1 = Infinity;
+		rectx2 = 0;
+		recty2 = 0;
+
 		for ( var i = 0; i < numBlocks; i ++ ) {
 
 			blockMaxZ[ i ] = maxZVal;
@@ -109,11 +114,6 @@ THREE.SoftwareRenderer = function () {
 
 	this.render = function ( scene, camera ) {
 
-		rectx1 = Infinity;
-		recty1 = Infinity;
-		rectx2 = 0;
-		recty2 = 0;
-
 		if ( this.autoClear === true ) this.clear();
 
 		var renderData = projector.projectScene( scene, camera );