*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
NSRect f = [self bounds];
backbuffer_size.width = (int) (s * f.size.width);
backbuffer_size.height = (int) (s * f.size.height);
NSRect f = [self bounds];
backbuffer_size.width = (int) (s * f.size.width);
backbuffer_size.height = (int) (s * f.size.height);
[ctx setValues:&r forParameter:NSOpenGLCPSwapInterval];
// check_gl_error ("NSOpenGLCPSwapInterval"); // SEGV sometimes. Too early?
[ctx setValues:&r forParameter:NSOpenGLCPSwapInterval];
// check_gl_error ("NSOpenGLCPSwapInterval"); // SEGV sometimes. Too early?
- // #### "Build and Analyze" says that ctx leaks, because it doesn't
- // seem to realize that makeCurrentContext retains it (right?)
- // Not sure what to do to make this warning go away.
+ // #### Analyze says: "Potential leak of an object stored into "ctx"
+ // But makeCurrentContext retains it (right?)
eagl_layer.opaque = TRUE;
eagl_layer.drawableProperties =
[NSDictionary dictionaryWithObjectsAndKeys:
eagl_layer.opaque = TRUE;
eagl_layer.drawableProperties =
[NSDictionary dictionaryWithObjectsAndKeys:
- kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
- [NSNumber numberWithBool:!dbuf_p], kEAGLDrawablePropertyRetainedBacking,
- nil];
+ kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat,
+ [NSNumber numberWithBool:!dbuf_p], kEAGLDrawablePropertyRetainedBacking,
+ nil];
// Without this, the GL frame buffer is half the screen resolution!
eagl_layer.contentsScale = [UIScreen mainScreen].scale;
// Without this, the GL frame buffer is half the screen resolution!
eagl_layer.contentsScale = [UIScreen mainScreen].scale;