modules/graphics/src/main/native-glass/mac/GlassOffscreen.m
Print this page
*** 41,50 ****
--- 41,51 ----
@end
@implementation GlassOffscreen
- (id)initWithContext:(CGLContextObj)ctx
+ andIsSwPipe:(BOOL)isSwPipe;
{
self = [super init];
if (self != nil)
{
self->_ctx = CGLRetainContext(ctx);
*** 60,69 ****
--- 61,71 ----
if (self->_offscreen == nil)
{
// TODO: implement PBuffer if needed
//self->_offscreen = [[GlassPBuffer alloc] init];
}
+ [(GlassFrameBufferObject*)self->_offscreen setIsSwPipe:(BOOL)isSwPipe];
}
[self unsetContext];
}
return self;
}
*** 137,146 ****
--- 139,154 ----
- (void)bindForWidth:(GLuint)width andHeight:(GLuint)height
{
[self setContext];
[self->_offscreen bindForWidth:width andHeight:height];
+ }
+
+ - (void)unbind
+ {
+ assert(CGLGetCurrentContext() == self->_ctx);
+ [self->_offscreen unbind];
[self unsetContext];
}
- (void)blit
{