Mercurial > projects > dwt2
diff org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.d @ 112:9f4c18c268b2
Update to compile and execute with dmd 2.052.
author | kntroh |
---|---|
date | Wed, 16 Mar 2011 21:53:53 +0900 |
parents | 69b1fa94a4a8 |
children | 536e43f63c81 |
line wrap: on
line diff
--- a/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.d Sat Nov 13 14:15:51 2010 +0100 +++ b/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet174.d Wed Mar 16 21:53:53 2011 +0900 @@ -39,7 +39,11 @@ import derelict.opengl.gl; import derelict.opengl.glu; -import Math = tango.math.Math; +version(Tango){ + import Math = tango.math.Math; +} else { // Phobos + import Math = std.algorithm; +} public static void main() { @@ -52,7 +56,7 @@ shell.setLayout(new FillLayout()); GLData data = new GLData(); data.doubleBuffer = true; - final GLCanvas canvas = new GLCanvas(shell, SWT.NO_BACKGROUND, data); + GLCanvas canvas = new GLCanvas(shell, SWT.NO_BACKGROUND, data); canvas.addControlListener(new class ControlAdapter { public void controlResized(ControlEvent e) { resize(canvas);