Mercurial > projects > dwt-mac
diff dwt/opengl/GLCanvas.d @ 135:04928add86e6
Fixed crash in opengl snippet
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 24 May 2009 22:24:42 +0200 |
parents | 580596d83ac4 |
children |
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: