Fixing Creation of wxGLCanvas on iOS
This commit is contained in:
parent
9e88518eb2
commit
3063ea6ca9
@ -158,6 +158,15 @@ public:
|
||||
// implementation-only from now on
|
||||
|
||||
protected:
|
||||
#if wxOSX_USE_IPHONE
|
||||
bool DoCreate(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name);
|
||||
|
||||
#endif
|
||||
WXGLPixelFormat m_glFormat;
|
||||
wxGLAttributes m_GLAttrs;
|
||||
|
||||
|
@ -501,9 +501,14 @@ bool wxGLCanvas::Create(wxWindow *parent,
|
||||
// Make a copy of attributes. Will use at wxGLContext ctor
|
||||
m_GLAttrs = dispAttrs;
|
||||
|
||||
#if wxOSX_USE_IPHONE
|
||||
if ( !wxGLCanvas::DoCreate(parent,id,pos,size,style,name) )
|
||||
return false;
|
||||
#else
|
||||
if ( !wxWindow::Create(parent, id, pos, size, style, name) )
|
||||
return false;
|
||||
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,10 @@ void WXGLDestroyPixelFormat( WXGLPixelFormat pixelFormat )
|
||||
}
|
||||
|
||||
|
||||
WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList)
|
||||
WXGLPixelFormat WXGLChoosePixelFormat(const int *GLAttrs,
|
||||
int n1,
|
||||
const int *ctxAttrs,
|
||||
int n2)
|
||||
{
|
||||
#if 0
|
||||
NSOpenGLPixelFormatAttribute data[512];
|
||||
@ -349,7 +352,7 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList)
|
||||
|
||||
return [[NSOpenGLPixelFormat alloc] initWithAttributes:(NSOpenGLPixelFormatAttribute*) attribs];
|
||||
#endif
|
||||
return NULL;
|
||||
return @"dummy";
|
||||
}
|
||||
|
||||
bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
|
||||
@ -364,14 +367,12 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
|
||||
|
||||
#define USE_SEPARATE_VIEW 1
|
||||
|
||||
bool wxGLCanvas::Create(wxWindow *parent,
|
||||
bool wxGLCanvas::DoCreate(wxWindow *parent,
|
||||
wxWindowID id,
|
||||
const wxPoint& pos,
|
||||
const wxSize& size,
|
||||
long style,
|
||||
const wxString& name,
|
||||
const int *attribList,
|
||||
const wxPalette& WXUNUSED(palette))
|
||||
const wxString& name)
|
||||
{
|
||||
/*
|
||||
m_glFormat = WXGLChoosePixelFormat(attribList);
|
||||
|
Loading…
Reference in New Issue
Block a user