JSR-231 1.1.1a Released

LD_LIBRARY_PATH is empty.

You can figure out which incorrect libjogl*.so is loaded on Linux by running the app, waiting until the exception is thrown and then cat /proc/[pid]/maps (I believe) which will print out all of the loaded .so’s. Search the output and delete the stray .so.

The final build of JSR-231 1.1.1 has been posted today, May 22, 2008!

This is the official reference implementation of version 1.1.1 (Maintenance Release 2) of the JSR-231 specification which was posted a few days ago. The binaries and source code are available at the link above. The on-line JOGL demos have been updated to use this release of the code. An extension JNLP file which will permanently point to the 1.1.1 release is now available at


http://download.java.net/media/jogl/builds/archive/jsr-231-1.1.1/webstart/jogl.jnlp

The “current” extension JNLP file listed in the JOGL User’s Guide has also been updated and is the best way to ensure your Java Web Started application is always using the most recent release.


<extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />

Only a couple of changes have been made since Release Candidate 8:

[] A bug fix (Issue 279) to GLJPanel.setAutoSwapBufferMode(false).
[
] 64-bit support on Mac OS X has now been formalized in the JNLP extensions.
[*] Minor build infrastructure changes.

Thanks to all who contributed to this release, in particular Tomas Hrasky for the substantial contribution of the beginnings of the NURBS port to Java, and John Burkey who substantially rearchitected and optimized the TextRenderer. Thanks also to all of you in the community who tried earlier releases and provided feedback and excellent bug reports.

I am very excited about the next directions for JOGL. See this blog article for a hint. More discussions to come here on the forums.

thank you very much for releasing this!

do you already have plans for features in future releases of jogl? :slight_smile:
what do you think about the high precision timer? http://www.java-gaming.org/forums/index.php?topic=18662.0

What about this?

Caused by: javax.media.opengl.GLException: array vertex_buffer_object must be disabled to call this method
at com.sun.opengl.impl.GLImpl.checkBufferObject(GLImpl.java:30667)
at com.sun.opengl.impl.GLImpl.checkArrayVBODisabled(GLImpl.java:30715)
at com.sun.opengl.impl.GLImpl.glVertexPointer(GLImpl.java:27936)
at com.sun.opengl.util.j2d.TextRenderer$Pipelined_QuadRenderer.drawVertexArrays(TextRenderer.java:1771)
at com.sun.opengl.util.j2d.TextRenderer$Pipelined_QuadRenderer.draw(TextRenderer.java:1745)
at com.sun.opengl.util.j2d.TextRenderer$Pipelined_QuadRenderer.access$000(TextRenderer.java:1687)
at com.sun.opengl.util.j2d.TextRenderer.flushGlyphPipeline(TextRenderer.java:809)
at com.sun.opengl.util.j2d.TextRenderer.endRendering(TextRenderer.java:705)
at com.sun.opengl.util.j2d.TextRenderer.endRendering(TextRenderer.java:541)
at main.GLProgressBar.display(GLProgressBar.java:223)
at main.GameGLEventController.display(GameGLEventController.java:582)
at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)
at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:435)
at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)
at javax.media.opengl.GLCanvas$DisplayOnEventDispatchThreadAction.run(GLCanvas.java:452)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

My game worked with JOGL 1.1.0. What should I do to fix it?

In the code, I do this:
textRenderer.endRendering();

Even when I deactivate VBO, it crashes. I notice that, when I don’t use TextRenderer, everything works fine. By debugging, I see that JOGL doesn’t use VBO on my machine to render the text.

I tried the short example (50 lines of code) but I didn’t succeed in reproducing the bug in this case.

In TextRenderer.java, I notice that glEnableClientState is called but never glDisableClientState whereas checkArrayVBODisabled() is called.

I’ve succeeded in reproducing it with this code:

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.nio.FloatBuffer;

import com.sun.opengl.util.Animator;
import com.sun.opengl.util.BufferUtil;
import com.sun.opengl.util.j2d.TextRenderer;
import javax.media.opengl.GL;
import javax.media.opengl.GLCanvas;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLEventListener;

public class HelloWorldDemo extends Frame implements GLEventListener{

private static final long serialVersionUID = 1L;
private TextRenderer textRenderer;
private int[] id=new int[1];
private FloatBuffer buffer=BufferUtil.newFloatBuffer(0);

public HelloWorldDemo(){
    super("JOGL 1.1.1");
    setLayout(new BorderLayout());
    setSize(400, 400);
    setLocation(40, 40);
    setVisible(true);
    GLCapabilities caps = new GLCapabilities();
    caps.setDoubleBuffered(true);
    caps.setHardwareAccelerated(true);
    GLCanvas canvas = new GLCanvas(caps);
    canvas.addGLEventListener(this);
    add(canvas, BorderLayout.CENTER);
    Animator anim = new Animator(canvas);
    anim.start();
    addWindowListener(new WindowAdapter(){
        public void windowClosing(WindowEvent e){
            System.exit(0);
        }
    });
    buffer.put(new float[]{});
    buffer.position(0);
}


public void init(GLAutoDrawable drawable){
    GL gl = drawable.getGL();
    gl.glClearColor(0, 0, 0, 0);
    gl.glMatrixMode(GL.GL_PROJECTION);
    gl.glLoadIdentity();
    gl.glOrtho(0, 1, 0, 1, -1, 1);
    textRenderer=new TextRenderer(new Font("SansSerif",Font.PLAIN,12));
    gl.glGenBuffers(1,id,0);
    gl.glBindBuffer(GL.GL_ARRAY_BUFFER,id[0]);
    gl.glBufferData(GL.GL_ARRAY_BUFFER,BufferUtil.SIZEOF_FLOAT*buffer.capacity(),buffer,GL.GL_STATIC_DRAW_ARB);
    this.buffer.position(0);
}

public void reshape(GLAutoDrawable drawable,
                    int x,
                    int y,
                    int width,
                    int height){
}

public void displayChanged(GLAutoDrawable drawable,
                           boolean modeChanged,
                           boolean deviceChanged){
}

public void display(GLAutoDrawable drawable){
    GL gl = drawable.getGL();
    gl.glClear(GL.GL_COLOR_BUFFER_BIT);
    gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
    gl.glEnableClientState(GL.GL_TEXTURE_COORD_ARRAY);
    gl.glBindBuffer(GL.GL_ARRAY_BUFFER,id[0]);
    gl.glDrawArrays(GL.GL_QUADS,0,0);
    gl.glDisableClientState(GL.GL_TEXTURE_COORD_ARRAY);       
    gl.glDisableClientState(GL.GL_VERTEX_ARRAY);
    textRenderer.beginRendering(100,100);
    textRenderer.draw("JOGL 1.1.1",0,0);
    textRenderer.endRendering();       //crashes here as with TUER
    gl.glFlush();
}

public static void main(String[] args){
    HelloWorldDemo demo = new HelloWorldDemo();
    demo.setVisible(true);
}

}

I hope it will help you. I’m under Mandriva Linux 2007, ATI Radeon 9250 Pro, Xorg driver with hardware acceleration enabled.

this code works fine for me on Vista, GF9600, JOGL1.1.1

Another question:
While migrating from rc8 to the final version,
I encountered some Problems, because the versions of the jars I used for compiling the app and of those that are on the server respectively in the browser cache differed.

Is there a way to get the version of the jar? Either as a file property, or in code, per calling some version-function???

Regards,
Oliver

And then what? JOGL 1.1.0 worked fine under my OS. The problem I point out is a regression, clearly. Your graphics card is better than mine but mine should be supported as well, the ATI Radeon 9250 Pro supports at least OpenGL 1.4 and DirectX 8.1. Your graphics card is recent, supports both OpenGL 2.1 and DirectX 10, some people have “older” (less recent) graphics cards therefore your graphics card is not a representative example. I provided a test case. Isn’t it enough to incite the people who are responsible of JOGL to take this problem under account?

i agree with you, that this is a bug which should be fixed. i just wanted to post that the bug does not occur on my system, which might be helpful to isolate it.

Right. It doesn’t happen on cards that supports at least OpenGL 1.5.

The regression appeared in JOGL 1.1.1 rc5 but with another symptom, the JVM crashes and produces a log file (please find this file enclosed below). The exception in TextRenderer.endRendering() is reproducible in JOGL 1.1.1 rc6, JOGL 1.1.1 rc7, JOGL 1.1.1 rc8 and the final stable version of JOGL 1.1.1. I hope it will help you.

It may come from the introduction of TextureRenderer and Overlay, maybe TextRenderer uses TextureRenderer since rc5, doesn’t it?

How can I fill a bug report for JOGL?

here: https://jogl.dev.java.net/servlets/ProjectIssues

but i think you need to contact ken russel first, to get observer status on the jogl project.
i believe his email is kenneth dot russel at sun dot com

Thanks. I will contact him as soon as possible. I have looked the source code. I have no idea of how to fix it. The only strange thing is that the VBOs are never disabled whereas endRendering() checks if they are disabled.

Please vote here to help me to get some help to solve this bug:
https://jogl.dev.java.net/issues/showvotes.cgi?voteon=356

WWJ, other engines and other games will be penalized by this bug with pre-OpenGL 1.5 versions. People who can’t afford buying more recent graphics cards will be penalized. Can someone help me in fixing this bug? I will try some fixes and I need someone to check if there are no regression for post-OpenGL 1.5 versions.

;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.

Hi!

A better fix would be to add a method called void setUseVertexBufferObjects(boolean useVertexBufferObjects) in TextRenderer to allow programmers to force the use of VBO even though JOGL assumes they should not been used. Could it be added in JOGL 1.1.2?

As nobody seems to be interested in helping me, I will submit several fixes and the people responsible of it will choose the better one.

I was having the same issue! Thanks for pointing it out.

Hi!

I’ve got a good news! I’ve found a quite good fix for the issue 356. It is very close to the first suggestion I made. The impact on the frame rate is tiny if you use VBOs whose element count is under GL_MAX_ELEMENTS_VERTICES. I’m going to submit the file in a few minutes. Please add it into the nightly build if possible. Thank you.

Hi!

I know how to submit a bug but I don’t find how to submit a RFE (request for enhancement). I would like to find JOGL packaged in a RPM because it would allow games using JOGL to be packaged in RPM too and then to be added in some Linux distributions. I found some RPM but they depend on GCJ and TUER works nor with GCJ neither with OpenJDK, only with Sun JVM.