#include "wx/osx/private.h"
-
WXGLContext WXGLCreateContext( WXGLPixelFormat pixelFormat, WXGLContext shareContext )
{
WXGLContext context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext: shareContext];
{
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAMinimumPolicy,
- NSOpenGLPFAColorSize,8,
- NSOpenGLPFAAlphaSize,0,
- NSOpenGLPFADepthSize,8,
+ NSOpenGLPFAColorSize,(NSOpenGLPixelFormatAttribute)8,
+ NSOpenGLPFAAlphaSize,(NSOpenGLPixelFormatAttribute)0,
+ NSOpenGLPFADepthSize,(NSOpenGLPixelFormatAttribute)8,
(NSOpenGLPixelFormatAttribute)nil
};
case WX_GL_AUX_BUFFERS:
data[p++] = NSOpenGLPFAAuxBuffers;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_MIN_RED:
data[p++] = NSOpenGLPFAColorSize;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_MIN_GREEN:
case WX_GL_MIN_ALPHA:
data[p++] = NSOpenGLPFAAlphaSize;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_DEPTH_SIZE:
data[p++] = NSOpenGLPFADepthSize;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_STENCIL_SIZE:
data[p++] = NSOpenGLPFAStencilSize;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_MIN_ACCUM_RED:
data[p++] = NSOpenGLPFAAccumSize;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
case WX_GL_MIN_ACCUM_GREEN:
}
data[p++] = NSOpenGLPFASampleBuffers;
- if ( (data[p++] = attribList[arg++]) == true )
+ if ( (data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++]) == true )
{
// don't use software fallback
data[p++] = NSOpenGLPFANoRecovery;
}
data[p++] = NSOpenGLPFASamples;
- data[p++] = attribList[arg++];
+ data[p++] = (NSOpenGLPixelFormatAttribute) attribList[arg++];
break;
}
}
attribs = data;
}
- return [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs];
+ return [[NSOpenGLPixelFormat alloc] initWithAttributes:(NSOpenGLPixelFormatAttribute*) attribs];
}
bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
@interface wxNSCustomOpenGLView : NSView
{
- wxWidgetImpl* impl;
+ WXCOCOAIMPL_COMMON_MEMBERS
NSOpenGLContext* context;
}
- (id)initWithFrame:(NSRect)frame;
-- (void)setImplementation: (wxWidgetImpl *) theImplementation;
-- (wxWidgetImpl*) implementation;
-- (BOOL) isFlipped;
+
+WXCOCOAIMPL_COMMON_INTERFACE
@end
return self;
}
-- (void)setImplementation: (wxWidgetImpl *) theImplementation
-{
- impl = theImplementation;
-}
-
-- (wxWidgetImpl*) implementation
-{
- return impl;
-}
-
-- (BOOL) isFlipped
-{
- return YES;
-}
+WXCOCOAIMPL_COMMON_IMPLEMENTATION
- (BOOL)isOpaque
{