summaryrefslogtreecommitdiffstats
path: root/src/jogl
diff options
context:
space:
mode:
authorDomokun <[email protected]>2011-02-01 05:23:19 +0100
committerSven Gothel <[email protected]>2011-02-01 05:23:19 +0100
commite894ead4feb75efc0246da0d5b8d3005342c6c1c (patch)
tree60eaae4588028ca04ca8b5e2c2661712269eb774 /src/jogl
parent7b9e0c29128f045f787bb5c4ed010628635f7b83 (diff)
Bugfix (Bug 464 - TextRenderer useVertexArray was ignored)
Diffstat (limited to 'src/jogl')
-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;