renamed bufferUnit to ppixelsUnit

This commit is contained in:
codeanticode
2014-03-31 15:20:23 -04:00
parent 8cc6d3408b
commit c5dca8b660
+7 -7
View File
@@ -117,7 +117,7 @@ public class PShader implements PConstants {
protected int modelviewMatLoc;
protected int projectionMatLoc;
protected int ppixelsLoc;
protected int bufferUnit;
protected int ppixelsUnit;
protected int viewportLoc;
// Uniforms only for lines and points
@@ -1210,12 +1210,12 @@ public class PShader implements PConstants {
}
if (-1 < ppixelsLoc) {
bufferUnit = getLastTexUnit() + 1;
setUniformValue(ppixelsLoc, bufferUnit);
pgl.activeTexture(PGL.TEXTURE0 + bufferUnit);
ppixelsUnit = getLastTexUnit() + 1;
setUniformValue(ppixelsLoc, ppixelsUnit);
pgl.activeTexture(PGL.TEXTURE0 + ppixelsUnit);
currentPG.bindFrontTexture();
} else {
bufferUnit = -1;
ppixelsUnit = -1;
}
}
@@ -1306,7 +1306,7 @@ public class PShader implements PConstants {
if (-1 < ppixelsLoc) {
pgl.requestFBOLayer();
pgl.activeTexture(PGL.TEXTURE0 + bufferUnit);
pgl.activeTexture(PGL.TEXTURE0 + ppixelsUnit);
currentPG.unbindFrontTexture();
pgl.activeTexture(PGL.TEXTURE0);
}
@@ -1341,7 +1341,7 @@ public class PShader implements PConstants {
setUniformValue(texOffsetLoc, 1.0f / tex.width, 1.0f / tex.height);
if (-1 < textureLoc) {
texUnit = -1 < bufferUnit ? bufferUnit + 1 : getLastTexUnit() + 1;
texUnit = -1 < ppixelsUnit ? ppixelsUnit + 1 : getLastTexUnit() + 1;
setUniformValue(textureLoc, texUnit);
pgl.activeTexture(PGL.TEXTURE0 + texUnit);
tex.bind();