-
Notifications
You must be signed in to change notification settings - Fork 77
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
Can glfm provide an OpenGL context for Android in purely native code? #2
Comments
GLFM for Android doesn't require developers to write any Java code, although AFAIK you'll need to build GLFM Android apps with the gradle toolchain. |
I'm not sure 😄 I'll try to clarify. The usual simple "hello world" console app:
can be compiled via the NDK and run on an Android device in
Are you aware of something in particular that requires Gradle? I can try it out. Thanks! |
Follow up: http://stackoverflow.com/a/39820460 |
Building the APK. Maybe it's possible to make an APK without gradle, but I do not know. I think the question is: can it run as a plain executable and not an APK? I have no idea. If you're trying to automate a test process via the command line (build, upload to device, and execute), yes, this is possible via gradle and the adb tools. |
I'm able to build and launch your Android sample with the help of the CMake android_create_apk script in the Hunter package manager (originally from Pixellight): https://github.com/headupinclouds/glfm/blob/hunter/example/CMakeLists.txt#L43-L71 If you have any interest in this, I can make this optional, add documentation, and submit a PR. FWIW, I'm interested in using this to automate OpenGL ES 2.0 shader testing via GTest.
For the GTest use case, I believe the main gotcha will be differences between APK and standard I'll go ahead and close this. Thanks. |
Thanks for pointing out Hunter. I tried the branch you created, but could not create a build (errors involving the toolchain). Perhaps I can take a look later, but it's not a priority right now. |
Sure, here is the toolchain I tested:
Install APK vis adb or use Makefile launch target:
This launches the app with the rainbow triangle.
FWIW, and in case anyone else stumbles onto this, apparently you can perform off screen rendering in Android with a standard For iOS you can create your
|
FYI: https://github.com/ruslo/hunter/issues/808 Thanks! |
I'm interested primarily in supporting OpengL ES 2.0 unit tests (GTest, etc) from CMake without the need for Java wrappers. This would entail building NDK native apps and running in
/data/local/tmp/
https://github.com/brackeen/glfm/blob/master/src/glfm_platform_android.c
The text was updated successfully, but these errors were encountered: