From c867cd712c3b350e911a12cf374f6dee44631e1e Mon Sep 17 00:00:00 2001 From: codeanticode Date: Tue, 24 Jul 2012 19:49:36 +0000 Subject: [PATCH] primary surface is used as key object when setting the cache for font textures --- core/src/processing/opengl/PGraphicsOpenGL.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/processing/opengl/PGraphicsOpenGL.java b/core/src/processing/opengl/PGraphicsOpenGL.java index 3cf38ac42..f01db7ef2 100644 --- a/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/core/src/processing/opengl/PGraphicsOpenGL.java @@ -3319,12 +3319,12 @@ public class PGraphicsOpenGL extends PGraphics { textTex = (PFontTexture)textFont.getCache(pgPrimary); if (textTex == null) { textTex = new PFontTexture(parent, textFont, maxTextureSize, maxTextureSize, is3D()); - textFont.setCache(this, textTex); + textFont.setCache(pgPrimary, textTex); } else { if (textTex.contextIsOutdated()) { textTex = new PFontTexture(parent, textFont, PApplet.min(PGL.MAX_FONT_TEX_SIZE, maxTextureSize), PApplet.min(PGL.MAX_FONT_TEX_SIZE, maxTextureSize), is3D()); - textFont.setCache(this, textTex); + textFont.setCache(pgPrimary, textTex); } } textTex.setFirstTexture();