changeset 135:04928add86e6

Fixed crash in opengl snippet
author Jacob Carlborg <doob@me.com>
date Sun, 24 May 2009 22:24:42 +0200
parents 623ff6db5f1d
children 1a0129cab08e
files dwt/opengl/GLCanvas.d
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/opengl/GLCanvas.d	Sun May 24 22:21:00 2009 +0200
+++ b/dwt/opengl/GLCanvas.d	Sun May 24 22:24:42 2009 +0200
@@ -131,7 +131,16 @@
     glView.setAutoresizingMask(OS.NSViewWidthSizable | OS.NSViewHeightSizable);
     parent.view.addSubview(glView);
 
-    Listener listener = new class () Listener {
+    Listener listener = new class (glView, pixelFormat) Listener {
+        NSOpenGLView glView;
+        NSOpenGLPixelFormat pixelFormat;
+        
+        this (NSOpenGLView glView, NSOpenGLPixelFormat pixelFormat)
+        {
+            this.glView = glView;
+            this.pixelFormat = pixelFormat;
+        }
+        
         public void handleEvent (Event event) {
             switch (event.type) {
                 case DWT.Dispose: