mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
renamed bufferUnit to ppixelsUnit
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user