From 16d8f63f7363218dbf8ca3265297567857ccebb1 Mon Sep 17 00:00:00 2001
From: Kenneth Russel <kbrussel@alum.mit.edu>
Date: Fri, 12 Oct 2007 06:56:02 +0000
Subject: Pre-emptively added clearing out of the GL_ARRAY_BUFFER binding after
 doing glPopClientAttrib since it isn't clear according to the OpenGL
 specification whether this binding is part of the client-side state. Bumped
 build number to 1.1.1-rc6.

git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1396 232f8b59-042b-4e1e-8c03-345bb8c30851
---
 src/classes/com/sun/opengl/util/j2d/TextRenderer.java | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/classes/com/sun')

diff --git a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
index b20a6c2b1..bb497a4dd 100755
--- a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
+++ b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java
@@ -854,6 +854,9 @@ public class TextRenderer
     GL gl = GLU.getCurrentGL();
     // Pop client attrib bits used by the pipelined quad renderer
     gl.glPopClientAttrib();
+    // It's unclear whether this changes the buffer bindings, so
+    // preemptively zero out the GL_ARRAY_BUFFER binding
+    gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
     if (ortho) {
       getBackingStore().endOrthoRendering();
     } else {
@@ -1014,6 +1017,9 @@ public class TextRenderer
         GL gl = GLU.getCurrentGL();
         // Pop client attrib bits used by the pipelined quad renderer
         gl.glPopClientAttrib();
+        // It's unclear whether this changes the buffer bindings, so
+        // preemptively zero out the GL_ARRAY_BUFFER binding
+        gl.glBindBuffer(GL.GL_ARRAY_BUFFER, 0);
         if (isOrthoMode) {
           ((TextureRenderer) oldBackingStore).endOrthoRendering();
         } else {
-- 
cgit v1.2.3