blob: 554a3d0776196343c6159892a9158588c85aa3b3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Force GLES context similar to box86 implementation
Hello.
I'm looking to add functionality to box64, similar to what's in box86, which forces a GLES context. I believe it will help getting some games running on the Odroid Go Ultra and clones with the JELOS firmware. I've done a POC forcing the ES context by modifying SDL2, which resolves the initial issue of not being able to find a GL context, but then has a Rubiks cube effect, breaking things further along I think. The modification on box86 was made by JonnyOnFlame and can be found here:
https://github.com/ptitSeb/box86/pull/455/commits/fb79a9eb2297cf2f819e1f60757b64586d37959e
I've given it a go with some basic adaptions but I'm no C programmer. There are a couple of issues when it comes to compilation.
The first one is the following line. It's commented out elsewhere in the box64 codebase so I think it's globally defined now and can be removed?
`sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2;`
Error is:
`error: \u2018library_t\u2019 {aka \u2018struct library_s\u2019} has no member named \u2018priv\u2019
594 | sdl2_my_t *my = (sdl2_my_t *)emu->context->sdl2lib->priv.w.p2;`
The second one I'm not sure what to do with and hoping you could give some insight:
`int (*SDL_GL_SetAttribute_p)(uint32_t, int) = dlsym(emu->context->sdl2lib->priv.w.lib, "SDL_GL_SetAttribute");`
Error is:
`error: \u2018library_t\u2019 {aka \u2018struct library_s\u2019} has no member named \u2018priv\u2019
613 | int (*SDL_GL_SetAttribute_p)(uint32_t, int) = dlsym(emu->context->sdl2lib->priv.w.lib, "SDL_GL_SetAttribute");`
Thanks for taking the time and I appreciate your work, it's an absolute marvel!
|