Catakig/Source/Misc/MU-OpenGLContext.m

24 lines
655 B
Mathematica
Raw Normal View History

2006-10-17 22:05:05 +00:00
#import "MyUtils.h"
@implementation NSOpenGLContext (MyUtils)
//---------------------------------------------------------------------------
- (void)SetSwapInterval:(long)interval
{ [self setValues:&interval forParameter:NSOpenGLCPSwapInterval]; }
//---------------------------------------------------------------------------
- (NSOpenGLContext*)MakeCurrentContext
2006-10-27 23:03:01 +00:00
{/*
Makes this context the current one, returning whatever was the previous
current context.
*/
2006-10-17 22:05:05 +00:00
NSOpenGLContext* prev = [NSOpenGLContext currentContext];
[self makeCurrentContext];
return prev;
}
//---------------------------------------------------------------------------
@end