giles7777
Senior Newbie 
Java games rock!
|
 |
«
Posted
2007-01-11 00:40:22 » |
|
My calls to glGenBuffers are failing on an Amd 64 Linux box. I check the function with gl.isFunctionAvailable which returns true, but then it dies on the actual call. It runs fine on a windows and mac box.
JOGL 1.1.0-rc1 ATI Radeon X800 XT, GL_VERSION 2.0.6234 has GL_ARB_Vertex_buffer_object
Test code showing the issue.
import java.awt.*; import java.awt.event.*;
import javax.media.opengl.*; import com.sun.opengl.util.*;
public class Tester implements GLEventListener { public static void main(String[] args) { Frame frame = new Frame("Gear Demo"); GLCanvas canvas = new GLCanvas();
canvas.addGLEventListener(new Tester()); frame.add(canvas); frame.setSize(300, 300); frame.show(); }
public void init(GLAutoDrawable drawable) { // Use debug pipeline // drawable.setGL(new DebugGL(drawable.getGL()));
GL gl = drawable.getGL();
System.err.println("INIT GL IS: " + gl.getClass().getName());
System.err.println("Chosen GLCapabilities: " + drawable.getChosenGLCapabilities());
boolean funcAvailable = gl.isFunctionAvailable("glGenBuffers");
System.out.println("function: " + funcAvailable); if (funcAvailable) { // Seems on some systems this still fails on the glGenBuffers call, so check try { int[] vbo_id_tmp = new int[1]; gl.glGenBuffers(1, vbo_id_tmp, 0);
System.out.println("Success!"); } catch(Exception e) { System.out.println("VBO's reported but not really available"); } }
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { GL gl = drawable.getGL();
float h = (float)height / (float)width;
gl.glMatrixMode(GL.GL_PROJECTION);
System.err.println("GL_VENDOR: " + gl.glGetString(GL.GL_VENDOR)); System.err.println("GL_RENDERER: " + gl.glGetString(GL.GL_RENDERER)); System.err.println("GL_VERSION: " + gl.glGetString(GL.GL_VERSION)); gl.glLoadIdentity(); gl.glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); gl.glMatrixMode(GL.GL_MODELVIEW); gl.glLoadIdentity(); gl.glTranslatef(0.0f, 0.0f, -40.0f); }
public void display(GLAutoDrawable drawable) { }
public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {} }
|