aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
index 351d2b2a2..6073a75f8 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/awt/TextRenderer.java
@@ -718,7 +718,7 @@ public class TextRenderer {
// The OpenGL spec is unclear about whether this changes the
// buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
// binding
- if (is15Available(gl)) {
+ if (getUseVertexArrays() && is15Available(gl)) {
try {
gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
} catch (Exception e) {
@@ -1234,7 +1234,7 @@ public class TextRenderer {
// The OpenGL spec is unclear about whether this changes the
// buffer bindings, so preemptively zero out the GL_ARRAY_BUFFER
// binding
- if (is15Available(gl)) {
+ if (getUseVertexArrays() && is15Available(gl)) {
try {
gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
} catch (Exception e) {
@@ -1743,7 +1743,7 @@ public class TextRenderer {
mVertCoords = Buffers.newDirectFloatBuffer(kTotalBufferSizeCoordsVerts);
mTexCoords = Buffers.newDirectFloatBuffer(kTotalBufferSizeCoordsTex);
- usingVBOs = is15Available(gl);
+ usingVBOs = getUseVertexArrays() && is15Available(gl);
if (usingVBOs) {
try {
@@ -1949,7 +1949,7 @@ public class TextRenderer {
* rendering, or whether text is rendered using the OpenGL
* immediate mode commands. Defaults to true.
*/
- public boolean getUseVertexArrays() {
+ public final boolean getUseVertexArrays() {
return useVertexArrays;
}
@@ -1974,7 +1974,7 @@ public class TextRenderer {
return smoothing;
}
- private boolean is15Available(GL gl) {
+ private final boolean is15Available(GL gl) {
if (!checkFor_isExtensionAvailable_GL_VERSION_1_5) {
isExtensionAvailable_GL_VERSION_1_5 = gl.isExtensionAvailable("GL_VERSION_1_5");
checkFor_isExtensionAvailable_GL_VERSION_1_5 = true;