MacOS platform support.

This commit is contained in:
RexTimmy 2016-09-28 11:09:48 +10:00
parent 57dfeb829a
commit dd64004eaf
89 changed files with 1228 additions and 5098 deletions

View file

@ -155,12 +155,12 @@ void GFXGLDevice::enumerateVideoModes()
void GFXGLDevice::init( const GFXVideoMode &mode, PlatformWindow *window )
{
AssertFatal(window, "GFXGLDevice::init - no window specified, can't init device without a window!");
PlatformWindowSDL* x11Window = dynamic_cast<PlatformWindowSDL*>(window);
AssertFatal(x11Window, "Window is not a valid PlatformWindowSDL object");
PlatformWindowSDL* sdlWindow = dynamic_cast<PlatformWindowSDL*>(window);
AssertFatal(sdlWindow, "Window is not a valid PlatformWindowSDL object");
// Create OpenGL context
mContext = PlatformGL::CreateContextGL( x11Window );
PlatformGL::MakeCurrentGL( x11Window, mContext );
mContext = PlatformGL::CreateContextGL( sdlWindow );
PlatformGL::MakeCurrentGL( sdlWindow, mContext );
loadGLCore();
loadGLExtensions(0);
@ -226,4 +226,9 @@ void GFXGLWindowTarget::_setupNewMode()
{
}
void GFXGLWindowTarget::_makeContextCurrent()
{
PlatformGL::MakeCurrentGL(mWindow, mContext);
}
#endif