caps = new GLCapabilities(GLProfile.get(GLProfile.GL2GL3));
caps.setDoubleBuffered(true);
caps.setHardwareAccelerated(true);
- caps.setSampleBuffers(false);
- caps.setNumSamples(4);
+ caps.setSampleBuffers(true);
+ caps.setRedBits(8);
+ caps.setGreenBits(8);
+ caps.setBlueBits(8);
caps.setAlphaBits(8);
+ caps.setDepthBits(24);
+ caps.setStencilBits(8);
+
+// caps.setAccumRedBits(8);
+// caps.setAccumGreenBits(8);
+// caps.setAccumBlueBits(8);
+// caps.setAccumAlphaBits(8);
+//
+// caps.setBitmap(true);
+// caps.setOnscreen(true);
+
+
+ //caps.setPBuffer(true);
+ //caps.setFBO(true);
+ caps.setNumSamples(4);
+
+
return caps;
}
this.removeListener(SWT.Close, this);
this.removeListener(SWT.Dispose, this);
this.removeListener(SWT.Resize, this);
+
+ if (parent != null) {
+ parent.getRenderer().DrawOff();
+ parent.Delete();
+ vtkObject.JAVA_OBJECT_MANAGER.gc(false);
+ parent = null;
+ }
- if (getContext().isCurrent()) {
+ if (getContext() != null && getContext().isCurrent()) {
getContext().release();
}
+
super.dispose();
}
vtkObject.JAVA_OBJECT_MANAGER.gc(false);
break;
case SWT.Close:
- // System.out.println("closing");
break;
case SWT.Resize:
parent.setSize(getClientArea().width, getClientArea().height);