mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
support the OpenGL driver in the metal build by delegating the view initialization to the ApplePlatform delegate (metal build only for now)
This commit is contained in:
parent
b1a718d8c5
commit
271ac7f925
@ -831,6 +831,10 @@ static void *cocoagl_gfx_ctx_init(void *video_driver)
|
||||
{
|
||||
#if defined(HAVE_COCOATOUCH)
|
||||
case GFX_CTX_OPENGL_ES_API:
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
// the metal build supports both the OpenGL and Metal video drivers
|
||||
[apple_platform setViewType:APPLE_VIEW_TYPE_OPENGL_ES];
|
||||
#endif
|
||||
// setViewType is not (yet?) defined for iOS
|
||||
// [apple_platform setViewType:APPLE_VIEW_TYPE_OPENGL_ES];
|
||||
break;
|
||||
|
@ -1005,7 +1005,7 @@ static const ui_companion_driver_t *ui_companion_drivers[] = {
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
&ui_companion_win32,
|
||||
#endif
|
||||
#if !defined(HAVE_COCOATOUCH) && (defined(HAVE_COCOA) || defined(HAVE_COCOA_METAL))
|
||||
#if TARGET_OS_OSX
|
||||
&ui_companion_cocoa,
|
||||
#endif
|
||||
#ifdef HAVE_COCOATOUCH
|
||||
|
@ -352,9 +352,9 @@ enum
|
||||
}
|
||||
break;
|
||||
|
||||
case APPLE_VIEW_TYPE_OPENGL:
|
||||
case APPLE_VIEW_TYPE_OPENGL_ES:
|
||||
{
|
||||
_renderView = [CocoaView get];
|
||||
_renderView = (BRIDGE GLKView*)glkitview_init();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user