;D ;D ;D ;D ;D
I have found a workaround!!!
Explicitly unbind the last buffer you use by doing this:
gl.glBindBuffer(GL.GL_ARRAY_BUFFER,0);
Put the line above just before calling beginRendering() or begin3DRendering().
It should not be required except if you don’t use the same mechanism to check if VBO extensions are available… that’s the case of TUER. JOGL tests if OpenGL 1.5 is available and if it can bind a buffer (if there is no exception by using a try catch clause), then it considers that VBO extensions are available. TUER (WWJ and other engines too) uses a finer method. It checks only once if the functions and the VBO extensions are both available. Then, under OpenGL 1.4, if ARB VBO extensions are available, TUER uses VBOs and JOGL doesn’t use them and ignores the case of someone using VBOs. Here is the modification to do to allow this to work in all cases:
in com.sun.opengl.util.j2d.TextRenderer:
…
private boolean bindBufferAvailable;
…
public TextRenderer(Font font, boolean antialiased,
boolean useFractionalMetrics, RenderDelegate renderDelegate,
boolean mipmap){
GL gl = GLU.getCurrentGL();
bindBufferAvailable = gl.isFunctionAvailable(“glBindBufferARB”) || gl.isFunctionAvailable(“glBindBuffer”);
…
}
in com.sun.opengl.util.j2d.TextRenderer$Pipelined_QuadRenderer.drawVertexArrays()
…
if (usingVBOs) {
gl.glBindBuffer(GL.GL_ARRAY_BUFFER,
mVBO_For_ResuableTileVertices);
gl.glBufferSubData(GL.GL_ARRAY_BUFFER, 0,
mOutstandingGlyphsVerticesPipeline * kSizeInBytes_OneVertices_VertexData,
mVertCoords); // upload only the new stuff
gl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);
} else {
if(bindBufferAvailable)
gl.glBindBuffer(GL.GL_ARRAY_BUFFER,0);//unbinds any already bound buffer
gl.glVertexPointer(3, GL.GL_FLOAT, 0, mVertCoords);
}
N.B: do the same for texture coordinates
A better way to solve this problem would be to use a finer mechanism to check if VBOs can be used.