Problems with NVidia drivers

Started by Delirium, August 12, 2008, 09:47:56

Previous topic - Next topic

Delirium

Hi everyone!
I've got GeForce 8600GT video card, win vista and some problems with SWT GLCanvas.
When creating one openGL canvas in a window, everything going not so bad, when rendering in a cycle canvas seems working, but if i add a 50mills it will become grey.
Adding second canvas to the same window crashes rendering. Canvases changing once about 5 seconds or even not .
Uninstalling video drivers helped me, but other openGL programs not working anymore.
Same problem and solution was on the other computer with GeForce 8600GTX card. Tried previous driver versions but result was the same.
I've used both 1.4 and 2.0rc1 lwjgl packages, SWT 3.2 and 3.4 versions.
Here is the code i used for test:
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.opengl.GLCanvas;
import org.eclipse.swt.opengl.GLData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GLContext;

public class Test {
	static Display display;
	static float f = 0;
	static float op = 1.0f;

	public static void main(String [] args) {
		display = new Display();
		Shell shell = new Shell(display);
		shell.setLayout(new FillLayout());
		Composite comp = new Composite(shell, SWT.NONE);
		comp.setLayout(new FillLayout());
		GLData data = new GLData ();
		data.doubleBuffer = true;
		GLCanvas canvasR = new GLCanvas(comp, SWT.NONE, data);
		GLCanvas canvasG = new GLCanvas(comp, SWT.NONE, data);
		GLCanvas canvasB = new GLCanvas(comp, SWT.NONE, data);
		final GLCanvas[] canvases = new GLCanvas[]{canvasR, canvasG, canvasB};

		shell.setText("SWT/LWJGL Example");
		shell.setSize(640, 480);
		shell.open();
		display.asyncExec(new Runnable() {
			public void run() {
				f = f + 0.01f*op;
	            if (f > 1.0f || f < 0) {
	                op *= -1.0f;
	            }
				for(int k=0;k<canvases.length;k++) {
					GLCanvas canvas = canvases[k];
					float[] c = new float[] {0,0,0};
					c[k] = f;
					if(!canvas.isDisposed()) {
			            canvas.setCurrent();
			            try {
							GLContext.useContext(canvas);
						} catch (LWJGLException e) {
							e.printStackTrace();
						}
						GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
						GL11.glClearColor(c[0], c[1], c[2], 1.0f);
						canvas.swapBuffers();
					}
				}
				display.asyncExec(this);
			}
		});
		
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}
	
}

Can anyone help me solve this problem?

Matzon

This may very well be an SWT issue - please attach a stacktrace and a crash log

Delirium

Program not crashes, but slows down, like nextGen game on old videocard, or not rendering at all;

Delirium

Seems like it realy SWT bug, example view from http://www.eclipse.org/swt/opengl/ doesn't work;