diff --git a/src/Graphics_GL2.c b/src/Graphics_GL2.c index 398ac8dfc..577f30720 100644 --- a/src/Graphics_GL2.c +++ b/src/Graphics_GL2.c @@ -546,6 +546,14 @@ static void GLBackend_Init(void) { glGetIntegerv(_GL_MAJOR_VERSION, &major); glGetIntegerv(_GL_MINOR_VERSION, &minor); customMipmapsLevels = major >= 3 && minor >= 2; + + static const cc_string bgra_ext = String_FromConst("EXT_texture_format_BGRA8888"); + static const cc_string bgra_apl = String_FromConst("APPLE_texture_format_BGRA8888"); + cc_string extensions = String_FromReadonly((const char*)_glGetString(GL_EXTENSIONS)); + + cc_bool has_ext_bgra = String_CaselessContains(&extensions, &bgra_ext); + cc_bool has_apl_bgra = String_CaselessContains(&extensions, &bgra_apl); + Platform_Log2("BGRA support - Ext: %t, Apple: %t", &has_ext_bgra, &has_apl_bgra); #else customMipmapsLevels = true; const GLubyte* ver = glGetString(GL_VERSION); diff --git a/src/_WindowBase.h b/src/_WindowBase.h index 8e2fb0bb1..266a4e51a 100644 --- a/src/_WindowBase.h +++ b/src/_WindowBase.h @@ -114,7 +114,7 @@ static cc_uintptr ctx_visualID; static void GLContext_InitSurface(void); // replacement in Window_Switch.c for handheld/docked resolution fix #else static void GLContext_InitSurface(void) { - void* window = Window_Main.Handle.ptr; + EGLNativeWindowType window = (EGLNativeWindowType)Window_Main.Handle.ptr; if (!window) return; /* window not created or lost */ ctx_surface = eglCreateWindowSurface(ctx_display, ctx_config, window, NULL);