(Apple) Reimplement apple_gfx_ctx_bind_api

This commit is contained in:
Twinaphex 2014-10-03 21:09:58 +02:00
parent a4f4951081
commit bbfdf52632

View File

@ -3,7 +3,6 @@
#include "../../gfx/gl_common.h" #include "../../gfx/gl_common.h"
#ifdef IOS #ifdef IOS
#define GLAPIType GFX_CTX_OPENGL_ES_API
#define GLFrameworkID CFSTR("com.apple.opengles") #define GLFrameworkID CFSTR("com.apple.opengles")
#define RAScreen UIScreen #define RAScreen UIScreen
@ -25,7 +24,6 @@
- (float) scale { return 1.0f; } - (float) scale { return 1.0f; }
@end @end
#define GLAPIType GFX_CTX_OPENGL_API
#define GLFrameworkID CFSTR("com.apple.opengl") #define GLFrameworkID CFSTR("com.apple.opengl")
#define RAScreen NSScreen #define RAScreen NSScreen
#endif #endif
@ -139,8 +137,13 @@ static void apple_gfx_ctx_destroy(void *data)
static bool apple_gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) static bool apple_gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor)
{ {
(void)data; (void)data;
if (api != GLAPIType) #if defined(IOS)
if (api != GFX_CTX_OPENGL_ES_API)
return false; return false;
#elif defined(OSX)
if (api != GFX_CTX_OPENGL_API)
return false;
#endif
g_minor = minor; g_minor = minor;
g_major = major; g_major = major;