Mercurial > projects > dstep
comparison dstep/quartzcore/CAOpenGLLayer.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | |
children | b9de51448c6b |
comparison
equal
deleted
inserted
replaced
15:7ff919f595d5 | 16:19885b43130e |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Sep 24, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.quartzcore.CAOpenGLLayer; | |
8 | |
9 import dstep.objc.bridge.Bridge; | |
10 import dstep.objc.objc; | |
11 import dstep.opengl.OpenGL; | |
12 import dstep.quartzcore.CALayer; | |
13 import dstep.quartzcore.CVBase; | |
14 | |
15 class CAOpenGLLayer : CALayer | |
16 { | |
17 mixin (ObjcWrap); | |
18 | |
19 bool isAsynchronous () | |
20 { | |
21 return invokeObjcSelf!(bool, "isAsynchronous"); | |
22 } | |
23 | |
24 void setAsynchronous (bool arg0) | |
25 { | |
26 return invokeObjcSelf!(void, "setAsynchronous:", bool)(arg0); | |
27 } | |
28 | |
29 alias setAsynchronous isAsynchronous; | |
30 | |
31 bool canDrawInCGLContext (CGLContextObj ctx, CGLPixelFormatObj pf, double t, CVTimeStamp* ts) | |
32 { | |
33 return invokeObjcSelf!(bool, "canDrawInCGLContext:pixelFormat:forLayerTime:displayTime:", CGLContextObj, CGLPixelFormatObj, double, CVTimeStamp*)(ctx, pf, t, ts); | |
34 } | |
35 | |
36 void drawInCGLContext (CGLContextObj ctx, CGLPixelFormatObj pf, double t, CVTimeStamp* ts) | |
37 { | |
38 return invokeObjcSelf!(void, "drawInCGLContext:pixelFormat:forLayerTime:displayTime:", CGLContextObj, CGLPixelFormatObj, double, CVTimeStamp*)(ctx, pf, t, ts); | |
39 } | |
40 | |
41 CGLPixelFormatObj copyCGLPixelFormatForDisplayMask (uint mask) | |
42 { | |
43 return invokeObjcSelf!(CGLPixelFormatObj, "copyCGLPixelFormatForDisplayMask:", uint)(mask); | |
44 } | |
45 | |
46 void releaseCGLPixelFormat (CGLPixelFormatObj pf) | |
47 { | |
48 return invokeObjcSelf!(void, "releaseCGLPixelFormat:", CGLPixelFormatObj)(pf); | |
49 } | |
50 | |
51 CGLContextObj copyCGLContextForPixelFormat (CGLPixelFormatObj pf) | |
52 { | |
53 return invokeObjcSelf!(CGLContextObj, "copyCGLContextForPixelFormat:", CGLPixelFormatObj)(pf); | |
54 } | |
55 | |
56 void releaseCGLContext (CGLContextObj ctx) | |
57 { | |
58 return invokeObjcSelf!(void, "releaseCGLContext:", CGLContextObj)(ctx); | |
59 } | |
60 } | |
61 |