setOpenGLContext:
NSOpenGLContextをセットします
-(void)setOpenGLContext:(NSOpenGLContext*)context:
解説
NSOpenGLContextをセットします。
返り値
( void )
なし
引数
( NSOpenGLContext* )context
フレームワーク
ApplicationKit
クラス
NSOpenGLView
Instance Methods
使用可能
10.0
参照
- clearGLContext
- openGLContext
例文
#import "MyObject.h" @implementation MyObject - (IBAction)myAction:(id)sender { NSOpenGLContext *glContext =[NSOpenGLContext currentContext]; NSOpenGLContext *glContext2; NSOpenGLView* glView = [[NSOpenGLView alloc] initWithFrame:NSMakeRect(0,0,100,100) pixelFormat:[NSOpenGLView defaultPixelFormat]]; [glView setOpenGLContext:glContext]; glContext2 = [glView openGLContext]; NSLog([glContext2 description]); } @end