-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Add a switch between different render backends #59
Comments
No, i only have Core I5 8250U (1.6ghz, laptop), and 4gb ram so this is why I dual-boot instead of install emulator. I had take a read at Zink but don't know how to create a switch, or set |
And switch between them. |
Hm. I have a better solution. gl4es generates LibGL.a and Zink generates LibGL.a, so we need to (for example):
In C++ you somehow can load libraries dynamically, so this will be a solution. |
Harder than you think, I must add a custom |
Do not use Zink because it's a part of Mesa driver, that can't be embedded into a standalone app. Also, take a look at this https://github.com/p3/regal It's pretty old (last commits made 5 years ago), but it's natively compartible with Android(not as Mesa, which is compartible only with Android-x86) |
Look at the answer of your question
But i will try it. |
Display list is used in 1.14 to make use unable to exit from the startup process. |
I mean: if end user have a very fast CPU and poor GPU, swrast will be a pretty good solution. |
Looks like I have swrast in this video https://youtu.be/LjcD8rK5ic0 After that I install using stable GL4ES and XSDL Xserver (unfortunately, 100% lost image) and the tar.gz i provided is unstable GL4ES Before I noticed something like swrart-dri.so or something not found when trying to run |
In this, i have both CPU and GPU poor, but also by slow sdcard. |
So I managed to get Regal built for Android using latest Android NDK in Android Studio. I'm built it by go to |
If you want binary, get at https://drive.google.com/file/d/1LqjLtptw2hw3y_ghygN9l-0Ucb4RjS1C/view?usp=drivesdk I didin't build for x86-64 because launcher does not have that ABI and takes more times to compile (for each architecture it takes ~20 minutes to complete build). |
|
You need to modify some parameters of Regal. The parameters and its descriptions are on main Regal README. |
glGetString returns something related to OpenGL string statics, like vendor,version , etc... |
Can you send me a log? Also, you can try to download AIDA64 and check the Devices and GPU tab (maybe your device is not comparible vith Vulkan?) |
When will launch the new version of Pojav Launcher |
Now investigating the issues of Vulkan. Maybe there will be an OpenGL 4 compartiblity! |
@khanhduytran0 did you rebuilded native lwjgl and changed all of the includes to Regal's ones? |
i do some quick replace for testing before rebuild everything. seems like Regal need a c++ initialize call. |
anything I will edit to make it work? Also might need to port |
@khanhduytran0 We need to atleast initialize it correctly |
https://github.com/p3/regal/blob/master/README.rst
|
So Regal developer will not have enough time to implement Vulkan. |
...when project looks like abandoned. |
@khanhduytran0 can you give me your Regal's project directory? |
Source code? |
In particular, i only need the generated include directory |
https://github.com/p3/regal/tree/master/include (original) Why generated? |
Because generated includes are linked with adresses inside .so file |
On Regal library?? |
No, still gl4es :( |
Try to FORCE_ES2_CORE_PROFILE and force emulation everything. |
I force to not execute
|
After many force finally it run with black screen, using Regal together with gl4es. |
It's blackscreening because Regal needs to share context between libraries |
Also I made LWJGL never getting error by return |
That's not a good way. |
It's only good for debugging, not for release. |
I made it for testing what will work, then I will back to getting real state. |
This is not pushed. |
I got a different error with Regal: Out of memory (1285) |
Vendor string returning:
|
I just have one question: why out of memory? |
Try to search an issue with that error, or tracking app memory usage. |
How can I do that? |
You could take a look at https://developer.android.com/studio/profile/memory-profiler |
Bug found. That fu.. freaking display lists. |
Try disable ES2 profile. |
How can I disable core ES2 profile when the only thing available on Android is core ES2 profile? |
I think we need to stay with GL4ES for the moment, or look for a fork with displayList compartiblity |
Hmm... modify MainActivity.java and |
The main problem is: Regal attaches directly to OpenGLES .so file so there's no easy way. |
|
Look in the log
Find a way to disable it by set property or put in Android.mk. |
This means we're using OpenGLES v2, not OpenGL etc... |
Also Regal doesn't support any kind of display list emulation. That's bad. |
Because Regal is unusable so closing. |
fu..... freaking moment |
I have an idea: because ~40% of Android 7 devices are supplied with Vulkan drivers, and in some cases Vulkan will be more performant than OpenGL ES, you would try to create a switch, that will change wrappers:
Current GL4ES or
Zink (as Mesa driver) or
Software rasterizer (if your device is Core i9-9900k witk VGA 256-color GPU and Android-x86)
I can try to help you with adding Mesa(for Zink) natively to your project, but i don't know how to implement a switch.
If you're heard about Mesa only as a software rasterizer, you can read the Mesa's wiki.
Zink is an efficent Vulkan-to-GL wrapper written in a form of Mesa driver. It emulates OpenGL 3(!), and knows how to convert shaders. Zhuowei Zhang already tested it with Boardwalk,
but that version was never released.
The text was updated successfully, but these errors were encountered: