gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
778 stars 180 forks source link

GLXBadFBConfig on Raspberry PI 4 #2111

Open bullghost opened 5 years ago

bullghost commented 5 years ago

hi i have unable to use this plugin , after i build successful.

using Raspberry PI 4, raspbian OS, X11, SDL2

here the cmake config `-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version "1.2.11") -- Found PNG: /usr/lib/arm-linux-gnueabihf/libpng.so (found version "1.6.36") -- Found Freetype: /usr/lib/arm-linux-gnueabihf/libfreetype.so (found version "2.9.1") CMake Warning (dev) at /usr/share/cmake-3.13/Modules/FindOpenGL.cmake:270 (message): Policy CMP0072 is not set: FindOpenGL prefers GLVND by default when available. Run "cmake --help-policy CMP0072" for policy details. Use the cmake_policy command to set the policy and suppress this warning.

FindOpenGL found both a legacy GL library:

OPENGL_gl_LIBRARY: /usr/lib/arm-linux-gnueabihf/libGL.so

and GLVND libraries for OpenGL and GLX:

OPENGL_opengl_LIBRARY: /usr/lib/arm-linux-gnueabihf/libOpenGL.so
OPENGL_glx_LIBRARY: /usr/lib/arm-linux-gnueabihf/libGLX.so

OpenGL_GL_PREFERENCE has not been set to "GLVND" or "LEGACY", so for compatibility with CMake 3.10 and below the legacy GL library will be used. Call Stack (most recent call first): CMakeLists.txt:326 (find_package) This warning is for project developers. Use -Wno-dev to suppress it.

-- Found OpenGL: /usr/lib/arm-linux-gnueabihf/libOpenGL.so -- Configuring done -- Generating done -- Build files have been written to: /home/odroid/source/GLideN64/projects/lmake odroid@raspberrypi:~/source/GLideN64/projects/lmake $ `

here the Error when using the plugin : `INFO - __ | \/ | __ / / | || | | | | | |\/| | | | | ' \ / \ ' | ' | || || |_) | | | | / | | | | | || | |) | / | | | (_) | _| /| | || _ \ || ||_,| ./ _|| ||_/ || || ||_,_|__/ || https://mupen64plus.org/ Mupen64Plus Console User-Interface Version 2.5.9

UI-Console: attached to core library 'Mupen64Plus Core' version 2.5.9 UI-Console: Includes support for Dynamic Recompiler. Core: Using full mem base Core: Goodname: Extreme-G (U) [!] Core: Name: extremeg Core: MD5: 3E660D3F991C0529E90BFEC0244DB31A Core: CRC: FDA245D2 A74A3D47 Core: Imagetype: .v64 (byteswapped) Core: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits) Core: Version: 1444 Core: Manufacturer: Nintendo Core: Country: USA UI-Console Status: Cheat codes disabled. UI-Console: using Video plugin: 'GLideN64' v2.0.0 UI-Console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v2.5.9 Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' UI-Console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v2.5.9 UI-Console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v2.5.9 Core: input plugin did not specify a render callback; there will be no on screen display by the input plugin. Input: 1 SDL joysticks were found. Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' Input: N64 Controller #1: Using auto-config with SDL joystick 0 ('STK-7004X') Input: 1 controller(s) found, 1 plugged in and usable in the emulator Input Warning: Couldn't open rumble support for joystick #1 Input Warning: Couldn't open rumble support for joystick #2 Input Warning: Couldn't open rumble support for joystick #3 Input Warning: Couldn't open rumble support for joystick #4 Input: Mupen64Plus SDL Input Plugin version 2.5.9 initialized. RSP: RSP Fallback disabled ! Core: Using video capture backend: dummy Core: Game controller 0 (Standard controller) has a Memory pak plugged in Core: Game controller 1 (Standard controller) has nothing plugged in Core: Game controller 2 (Standard controller) has nothing plugged in Core: Game controller 3 (Standard controller) has nothing plugged in Core: Using CIC type X102 (II) Setting video mode 1280x720... Core: Setting video mode: 1280x720 Core Error: SDL_SetVideoMode failed: Could not create GL context: GLXBadFBConfig Core Status: Rom closed. `

gonetz commented 5 years ago

Core Error: SDL_SetVideoMode failed: Could not create GL context: GLXBadFBConfig

Have you tried other graphics plugins? And what about that "Policy CMP0072"?

bullghost commented 5 years ago

Have you tried other graphics plugins? And what about that "Policy CMP0072"?

i build the mupen64plus with this command ./m64p_build.sh NEON=1 VFP_HARD=1 PIC=1 its build all from core to video plugin, the video plugin is Glide64mk2 and rice, both of them is working fine.

here is example of Glide64mk2 : ` __ | \/ | __ / / | || | | | | | |\/| | | | | ' \ / \ ' | ' | || || |_) | | | | / | | | | | || | |) | / | | | (_) | _| /| | || _ \ || ||_,| ./ _|| ||_/ || || ||_,_|__/ || https://mupen64plus.org/ Mupen64Plus Console User-Interface Version 2.5.9

UI-Console: attached to core library 'Mupen64Plus Core' version 2.5.9 UI-Console: Includes support for Dynamic Recompiler. Core: Using full mem base Core: Goodname: Extreme-G (U) [!] Core: Name: extremeg Core: MD5: 3E660D3F991C0529E90BFEC0244DB31A Core: CRC: FDA245D2 A74A3D47 Core: Imagetype: .v64 (byteswapped) Core: Rom size: 8388608 bytes (or 8 Mb or 64 Megabits) Core: Version: 1444 Core: Manufacturer: Nintendo Core: Country: USA UI-Console Status: Cheat codes disabled. UI-Console: using Video plugin: 'Glide64mk2 Video Plugin' v2.5.9 UI-Console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v2.5.9 Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' Input Warning: missing 'plugged' parameter from config section AutoConfig0. Setting to 1 (true). Input Warning: missing config key 'DPad R' for controller 1 button 0 Input Warning: missing config key 'DPad L' for controller 1 button 1 Input Warning: missing config key 'DPad D' for controller 1 button 2 Input Warning: missing config key 'DPad U' for controller 1 button 3 Input Warning: missing config key 'Start' for controller 1 button 4 Input Warning: missing config key 'Z Trig' for controller 1 button 5 Input Warning: missing config key 'B Button' for controller 1 button 6 Input Warning: missing config key 'A Button' for controller 1 button 7 Input Warning: missing config key 'C Button R' for controller 1 button 8 Input Warning: missing config key 'C Button L' for controller 1 button 9 Input Warning: missing config key 'C Button D' for controller 1 button 10 Input Warning: missing config key 'C Button U' for controller 1 button 11 Input Warning: missing config key 'R Trig' for controller 1 button 12 Input Warning: missing config key 'L Trig' for controller 1 button 13 Input Warning: missing config key 'Mempak switch' for controller 1 button 14 Input Warning: missing config key 'Rumblepak switch' for controller 1 button 15 Input Warning: missing config key 'X Axis' for controller 1 axis 0 Input Warning: missing config key 'Y Axis' for controller 1 axis 1 UI-Console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v2.5.9 UI-Console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v2.5.9 Video: opening /home/odroid/share/system/configs/mupen64/Glide64mk2.ini

Core: input plugin did not specify a render callback; there will be no on screen display by the input plugin. Input: 0 SDL joysticks were found. Input: N64 Controller #1: Forcing default keyboard configuration Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' Input Warning: missing 'plugged' parameter from config section AutoConfig0. Setting to 1 (true). Input Warning: missing config key 'DPad R' for controller 1 button 0 Input Warning: missing config key 'DPad L' for controller 1 button 1 Input Warning: missing config key 'DPad D' for controller 1 button 2 Input Warning: missing config key 'DPad U' for controller 1 button 3 Input Warning: missing config key 'Start' for controller 1 button 4 Input Warning: missing config key 'Z Trig' for controller 1 button 5 Input Warning: missing config key 'B Button' for controller 1 button 6 Input Warning: missing config key 'A Button' for controller 1 button 7 Input Warning: missing config key 'C Button R' for controller 1 button 8 Input Warning: missing config key 'C Button L' for controller 1 button 9 Input Warning: missing config key 'C Button D' for controller 1 button 10 Input Warning: missing config key 'C Button U' for controller 1 button 11 Input Warning: missing config key 'R Trig' for controller 1 button 12 Input Warning: missing config key 'L Trig' for controller 1 button 13 Input Warning: missing config key 'Mempak switch' for controller 1 button 14 Input Warning: missing config key 'Rumblepak switch' for controller 1 button 15 Input Warning: missing config key 'X Axis' for controller 1 axis 0 Input Warning: missing config key 'Y Axis' for controller 1 axis 1 Input: 1 controller(s) found, 1 plugged in and usable in the emulator Input Warning: Couldn't open rumble support for joystick #1 Input Warning: Couldn't open rumble support for joystick #2 Input Warning: Couldn't open rumble support for joystick #3 Input Warning: Couldn't open rumble support for joystick #4 Input: Mupen64Plus SDL Input Plugin version 2.5.9 initialized. RSP: RSP Fallback disabled ! Core: Using video capture backend: dummy Core: Game controller 0 (Standard controller) has a Memory pak plugged in Core: Game controller 1 (Standard controller) has nothing plugged in Core: Game controller 2 (Standard controller) has nothing plugged in Core: Game controller 3 (Standard controller) has nothing plugged in Core: Using CIC type X102 Video: Using TEXUMA extension.

&ConfigOpenSection is 0x8c8e8018 (II) Setting video mode 1280x720... Core: Setting video mode: 1280x720 packed pixels extension used NPOT extension used use_fbo 1 Video: InitCombine() Video: extensions Video: initialized. Video:

Audio: Using resampler trivial Audio: Initializing SDL audio subsystem... Input Warning: Couldn't open rumble support for joystick #1 Input Warning: Couldn't open rumble support for joystick #2 Input Warning: Couldn't open rumble support for joystick #3 Input Warning: Couldn't open rumble support for joystick #4 Core: Initializing 4 RDRAM modules for a total of 8 MB Core: Starting R4300 emulator: Dynamic Recompiler Core: Init new dynarec Core: ARM CPU Features:, Half, Thumb, FastMult, VFP, ESDP, NEON, VFPv3, TLS, VFPv4, IDIVa, IDIVt Audio: Initializing SDL audio subsystem... Core Status: Stopping emulation. Core: R4300 emulator finished. Core Status: Rom closed. ` and about "Policy CMP0072" its fine in build PPSSPP i also have this warning message. and PPSSPP is working fine

gonetz commented 5 years ago

So, it can be a problem with GL context. GLideN64 minimal requirements are OpenGL 3.3 or GL ES 2.0 GLideN64 can dump information about OpenGL context into gliden64.log, but you need to change log level first. Open src/Log.h and change

define LOG_LEVEL LOG_WARNING

to

define LOG_LEVEL LOG_VERBOSE

Rebuild the plugin and run again. The log will be in the same folder, where mupen64plus keeps saves, screeshots etc.

bullghost commented 5 years ago

LOG_VERBOSE hi gonetz , here is the log from plugin

2019/10/27,13:57:36.753,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/10/27,14:21:10.839,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/10/27,15:18:43.592,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/10/27,15:44:48.954,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/10/27,16:27:02.144,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/11/01,15:29:13.960,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/01,15:29:14.330,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/11/01,15:46:54.640,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/01,15:46:54.988,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/11/01,15:47:30.569,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/01,15:47:30.835,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720" 2019/11/01,15:48:26.278,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/01,15:48:26.575,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1024x720" 2019/11/01,15:49:13.257,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/01,15:49:13.520,mupen64plus_DisplayWindow.cpp:92,ERROR, "Error setting videomode 1280x720"

gonetz commented 5 years ago

CoreVideo_SetVideoMode failed. I need more info. I made commit a87f7c4022 for that. Please update master branch, rebuild and run again. Please clean gliden64.log before the run.

acidnine commented 4 years ago

Same issue here from the current master.

2019/11/19,11:32:56.253,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/19,11:32:56.254,mupen64plus_DisplayWindow.cpp:187,ERROR, "Failed to get display size" 2019/11/19,11:32:56.254,mupen64plus_DisplayWindow.cpp:94,VERBOSE, "Setting video mode 800x480"

The desktop goes fullscreen black, closes then drops to 800x600. When running with window mode and a set resolution of 320x240 a windows flashes then closes, similar log output (minus the 'Failed to get display size') just referencing the new resolution.

Mupen64plus 2.5.9 outputs this at the very end: * failed to add service - already in use?

Making with either -DNEON_Opt=On/-DCRC_ARMV8=On errors out as well with Error 2... not really useful and I can extract the output if needed but since mupen64plus is compiled with neon I figured I'd start building with potential options. My builds that completed were done using the default cmake -DMUPENPLUSAPI=On .. and cmake -DCMAKE_BUILD_TYPE=Debug -DMUPENPLUSAPI=On ...

Mupen64plus was built with sudo CFLAGS='-mfpu=neon -mtune=cortex-a72 -march=armv8-a' ./m64p_build.sh NEON=1 USE_GLES=1 VFP_HARD=1 NEW_DYNAREC=1.

gonetz commented 4 years ago

@acidnine "Failed to get display size" means that graphics_get_display_size failed. I corrected error output in 27128fe5052. Please update and re-run to get error code returned by graphics_get_display_size. As I understand it is a system function. If it does not work in RPI 4, a working alternative should be found. I don't use RPI, so this task is up to users.

acidnine commented 4 years ago

Thanks @gonetz I just rebuilt and got this error: 2019/11/20,13:23:32.550,mupen64plus_DisplayWindow.cpp:188,ERROR, "Failed to get display size. Error code: -1"

Update: Looking more into it and I see other places mentioning needing to call bcm_host_init(); before calling graphics_get_display_size() so I added it after line 182 (after the if m_bFullscreen) in src/Graphics/OpenGLContext/mupen64plus/mupen64plus_DisplayWindow.cpp. Now I'm getting this (which is the correct resolution):

2019/11/20,14:11:12.285,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/11/20,14:11:12.287,mupen64plus_DisplayWindow.cpp:191,VERBOSE, "Display size 1280x1024" 2019/11/20,14:11:12.287,mupen64plus_DisplayWindow.cpp:94,VERBOSE, "Setting video mode 1280x1024"

However, mupen64plus is still exiting with the * failed to add service - already in use?

Update 2: I got it working... somehow. It was how I was building things so I'm still not sure if the bcm_host_init(); is even required but it at least the information was pushed through correctly.

Build for Mupen64plus-bundle-2.5.9: sudo CFLAGS='-mfpu=neon-fp-armv8 -mtune=cortex-a72 -march=armv8-a' ./m64p_build.sh USE_GLES=1 VFP_HARD=1 NEW_DYNAREC=1

Build for GLideN64: cmake -DVEC4_OPT=On -DMESA=On -DUSE_SYSTEM_LIBS=On -DMUPENPLUSAPI=On .. (not sure if some are invalid because I was referring to other repo's).

@bullghost will you test when you get a chance?

gonetz commented 4 years ago

@acidnine thanks! cmake options for for GLideN64 look correct to me.

I'm still not sure if the bcm_host_init(); is even required

Have you tried to revert your changes and rebuild?

acidnine commented 4 years ago

@gonetz I've tried both ways and it doesn't make a difference in the log output per verbose mode. Hopefully @bullghost can confirm if the build options fix their issue.

Launching with --fullscreen from mupen gives this error in gliden64.log 2019/11/21,16:40:10.909,mupen64plus_DisplayWindow.cpp:156,ERROR, "Error setting videomode 1280x1024 in fullscreen mode" (launching windowed has no errors), however everything runs now so I may try looking into this part later.

bullghost commented 4 years ago

@gonetz, @acidnine clean pull today from master branch , here is the test result :

`| \/ | _ / / | || | | | | _ | |\/| | | | | ' \ / \ ' | ' | || || |) | | | | / | | | | | || | |) | _/ | | | () | _| /| | || _ \ || ||_,| ./ _|| ||_/ || || ||_,_|__/ || https://mupen64plus.org/ Mupen64Plus Console User-Interface Version 2.5.9

UI-Console: attached to core library 'Mupen64Plus Core' version 2.5.9 UI-Console: Includes support for Dynamic Recompiler. Core: Using full mem base Core: Goodname: Gex 64 - Enter the Gecko (U) [!] Core: Name: GEX: ENTER THE GECKO Core: MD5: 47F9D900C97ECE154BB40A9C6DCCD3FD Core: CRC: 89FED774 CAAFE21B Core: Imagetype: .v64 (byteswapped) Core: Rom size: 16777216 bytes (or 16 Mb or 128 Megabits) Core: Version: 1449 Core: Manufacturer: Nintendo Core: Country: USA UI-Console Status: Cheat codes disabled. UI-Console: using Video plugin: 'GLideN64' v2.0.0 UI-Console: using Audio plugin: 'Mupen64Plus SDL Audio Plugin' v2.5.9 Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' Input Warning: missing 'plugged' parameter from config section AutoConfig0. Setting to 1 (true). Input Warning: missing config key 'DPad R' for controller 1 button 0 Input Warning: missing config key 'DPad L' for controller 1 button 1 Input Warning: missing config key 'DPad D' for controller 1 button 2 Input Warning: missing config key 'DPad U' for controller 1 button 3 Input Warning: missing config key 'Start' for controller 1 button 4 Input Warning: missing config key 'Z Trig' for controller 1 button 5 Input Warning: missing config key 'B Button' for controller 1 button 6 Input Warning: missing config key 'A Button' for controller 1 button 7 Input Warning: missing config key 'C Button R' for controller 1 button 8 Input Warning: missing config key 'C Button L' for controller 1 button 9 Input Warning: missing config key 'C Button D' for controller 1 button 10 Input Warning: missing config key 'C Button U' for controller 1 button 11 Input Warning: missing config key 'R Trig' for controller 1 button 12 Input Warning: missing config key 'L Trig' for controller 1 button 13 Input Warning: missing config key 'Mempak switch' for controller 1 button 14 Input Warning: missing config key 'Rumblepak switch' for controller 1 button 15 Input Warning: missing config key 'X Axis' for controller 1 axis 0 Input Warning: missing config key 'Y Axis' for controller 1 axis 1 UI-Console: using Input plugin: 'Mupen64Plus SDL Input Plugin' v2.5.9 UI-Console: using RSP plugin: 'Hacktarux/Azimer High-Level Emulation RSP Plugin' v2.5.9 Core: input plugin did not specify a render callback; there will be no on screen display by the input plugin. Input: 0 SDL joysticks were found. Input: N64 Controller #1: Forcing default keyboard configuration Input: Using auto-config file at: '/home/odroid/share/system/configs/mupen64/InputAutoCfg.ini' Input Warning: missing 'plugged' parameter from config section AutoConfig0. Setting to 1 (true). Input Warning: missing config key 'DPad R' for controller 1 button 0 Input Warning: missing config key 'DPad L' for controller 1 button 1 Input Warning: missing config key 'DPad D' for controller 1 button 2 Input Warning: missing config key 'DPad U' for controller 1 button 3 Input Warning: missing config key 'Start' for controller 1 button 4 Input Warning: missing config key 'Z Trig' for controller 1 button 5 Input Warning: missing config key 'B Button' for controller 1 button 6 Input Warning: missing config key 'A Button' for controller 1 button 7 Input Warning: missing config key 'C Button R' for controller 1 button 8 Input Warning: missing config key 'C Button L' for controller 1 button 9 Input Warning: missing config key 'C Button D' for controller 1 button 10 Input Warning: missing config key 'C Button U' for controller 1 button 11 Input Warning: missing config key 'R Trig' for controller 1 button 12 Input Warning: missing config key 'L Trig' for controller 1 button 13 Input Warning: missing config key 'Mempak switch' for controller 1 button 14 Input Warning: missing config key 'Rumblepak switch' for controller 1 button 15 Input Warning: missing config key 'X Axis' for controller 1 axis 0 Input Warning: missing config key 'Y Axis' for controller 1 axis 1 Input: 1 controller(s) found, 1 plugged in and usable in the emulator Input Warning: Couldn't open rumble support for joystick #1 Input Warning: Couldn't open rumble support for joystick #2 Input Warning: Couldn't open rumble support for joystick #3 Input Warning: Couldn't open rumble support for joystick #4 Input: Mupen64Plus SDL Input Plugin version 2.5.9 initialized. RSP: RSP Fallback disabled ! Core: Using video capture backend: dummy Core: Game controller 0 (Standard controller) has a Memory pak plugged in Core: Game controller 1 (Standard controller) has nothing plugged in Core: Game controller 2 (Standard controller) has nothing plugged in Core: Game controller 3 (Standard controller) has nothing plugged in Core: Using CIC type X102 Core: Setting video mode: 1280x720 Core Error: SDL_SetVideoMode failed: Could not initialize OpenGL / GLES library Core Status: Rom closed. `

debug log : `2019/12/24,06:15:30.195,mupen64plus_DisplayWindow.cpp:53,VERBOSE, "_setAttributes" 2019/12/24,06:15:30.196,mupen64plus_DisplayWindow.cpp:94,VERBOSE, "Setting video mode 1280x720" 2019/12/24,06:15:30.201,mupen64plus_DisplayWindow.cpp:98,ERROR, "Error setting videomode 1280x720. Error code: 12"

` still got error, with different issue from previous i encounter ,

gonetz commented 4 years ago

@bullghost CoreVideo_SetVideoMode returned error code 12 Error code: 12 means M64ERR_SYSTEM_FAIL, / A system function call, such as an SDL or file operation, failed /

This is what we see in core log: Core Error: SDL_SetVideoMode failed: Could not initialize OpenGL / GLES library

As you said, Glide64mk2 can run at this resolution. We need to check, which attributes it sets before calling CoreVideo_SetVideoMode. For example, GLideN64 sets:

    FunctionWrapper::CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_PROFILE_MASK, M64P_GL_CONTEXT_PROFILE_CORE);
    FunctionWrapper::CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MAJOR_VERSION, 3);
    FunctionWrapper::CoreVideo_GL_SetAttribute(M64P_GL_CONTEXT_MINOR_VERSION, 3);

It hardly will work if you are using GLES.

FunctionWrapper::CoreVideo_GL_SetAttribute(M64P_GL_BUFFER_SIZE, 32); also can break initialization if 32bit color is not supported by the hardware.