From 87d07557dd74c2880de695a22be609c3fba03d29 Mon Sep 17 00:00:00 2001 From: codeanticode Date: Wed, 25 Jul 2012 17:12:59 +0000 Subject: [PATCH] Texture.bind()/unbind() call the gl functions irrespective of the value of the bound flag --- core/src/processing/opengl/PGL.java | 1 + core/src/processing/opengl/PGraphicsOpenGL.java | 2 +- core/src/processing/opengl/Texture.java | 16 ++++++---------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 97eedc52f..0cddc505b 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -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) { diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 7418c175e..e7eb3a8b5 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -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; // ........................................................ diff --git a/core/src/processing/opengl/Texture.java b/core/src/processing/opengl/Texture.java index 5d05dc9c2..c06d1e9f0 100644 --- a/core/src/processing/opengl/Texture.java +++ b/core/src/processing/opengl/Texture.java @@ -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; }