mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Texture.bind()/unbind() call the gl functions irrespective of the value of the bound flag
This commit is contained in:
@@ -569,6 +569,7 @@ public class PGL {
|
||||
caps.setDepthBits(24);
|
||||
caps.setStencilBits(8);
|
||||
caps.setAlphaBits(8);
|
||||
//caps.setFBO(false);
|
||||
caps.setBackgroundOpaque(true);
|
||||
|
||||
if (toolkit == AWT) {
|
||||
|
||||
@@ -204,7 +204,7 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
/** Flag to indicate that we are inside beginCamera/endCamera block. */
|
||||
protected boolean manipulatingCamera;
|
||||
|
||||
/** Flag indicating the use of an ortographics projection matrix. */
|
||||
/** Flag indicating the use of an orthographic projection matrix. */
|
||||
protected boolean usingOrthoProjection;
|
||||
|
||||
// ........................................................
|
||||
|
||||
@@ -556,20 +556,16 @@ public class Texture implements PConstants {
|
||||
|
||||
|
||||
public void bind() {
|
||||
if (!bound) {
|
||||
pgl.enableTexturing(glTarget);
|
||||
pgl.glBindTexture(glTarget, glName);
|
||||
bound = true;
|
||||
}
|
||||
pgl.enableTexturing(glTarget);
|
||||
pgl.glBindTexture(glTarget, glName);
|
||||
bound = true;
|
||||
}
|
||||
|
||||
|
||||
public void unbind() {
|
||||
if (bound) {
|
||||
pgl.enableTexturing(glTarget);
|
||||
pgl.glBindTexture(glTarget, 0);
|
||||
bound = false;
|
||||
}
|
||||
pgl.enableTexturing(glTarget);
|
||||
pgl.glBindTexture(glTarget, 0);
|
||||
bound = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user