How can I use EGL on Android with FireMonkey?


I am building a FireMonkey app in C++Builder 10.2 Tokyo. This app has multiple components that use OpenGL, and so needs an interface between OpenGL and the native windowing system, like EGL on Android. To use EGL, I need to get a handle of the native window. This is simple when using the Android NDK, since it is passed in as an argument to the android_main function, but how can I get a reference to the window with FireMonkey? (Or, barring that, what is the proper way to use OpenGL and/or EGL with FireMonkey?)

Edit: An alternative to using EGL directly would be to use the context already made current by the TForm3D component; however, this is a top-level component and so would not allow multiple TForm3D components on the same window (in a sense, TForm3D is the window). Is there something similar to TForm3D that would support multiple components running with separate GL contexts?

Comments are closed.