IllegalStateExeption at GLContext.useContext with new AMD Driver

Started by Secromacer, April 27, 2013, 19:28:16

Previous topic - Next topic

Secromacer

Hey guys,

I'm useing LWJGL together with SWT and since i updatetd my graphics driver (AMD) from 12.10 to 13.1/13.4
GLContext.useContext throws an illegalStateException.

Here the Stack trace and the Code:

java.lang.IllegalStateException: Function is not supported
	at org.lwjgl.BufferChecks.checkFunctionAddress(BufferChecks.java:64)
	at org.lwjgl.opengl.GL30.glGetStringi(GL30.java:517)
	at org.lwjgl.opengl.GLContext.getSupportedExtensions(GLContext.java:240)
	at org.lwjgl.opengl.ContextCapabilities.initAllStubs(ContextCapabilities.java:3079)
	at org.lwjgl.opengl.ContextCapabilities.<init>(ContextCapabilities.java:3283)
	at org.lwjgl.opengl.GLContext.useContext(GLContext.java:324)


public static void main(String[] args) {

		Display display = new Display ();
    	
		//setup main Shell
		final Shell shell = new Shell(display);
		
		
		shell.setLayout(new FillLayout());
		Composite comp = new Composite(shell, SWT.NONE);
		comp.setLayout(new FillLayout());
		GLData data = new GLData ();
		
		
		final GLCanvas canvas = new GLCanvas(comp, SWT.NONE, data);

		canvas.setCurrent();
		
		
		try {
			GLContext.useContext(canvas);
//			GLContext.useContext(canvas, true); tried those two too
//			GLContext.useContext(canvas, false);
		} catch (LWJGLException e) { e.printStackTrace(); }
		
		shell.open();
		
		
    	while (!display.isDisposed()) {
    		if (!display.readAndDispatch ())
    			display.sleep ();
    	}
    
    	shell.dispose();
	
	}