mikke89 / RmlUi

RmlUi - The HTML/CSS User Interface library evolved
https://mikke89.github.io/RmlUiDoc/
MIT License
2.87k stars 312 forks source link

Support for Android #309

Closed paulocoutinhox closed 2 months ago

paulocoutinhox commented 2 years ago

Hi,

Im trying compile for Android, but get this error:

In file included from /Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/nativium/game/ApplicationCoreImpl.cpp:10:
In file included from /Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/shell/include/ShellRenderInterfaceOpenGL.h:33:
/Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/shell/include/ShellOpenGL.h:44:10: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
         ^~~~~~~~~~

Can you add support for it?

Thanks for the great project.

mikke89 commented 2 years ago

Hi, yeah, it shouldn't be too much trouble to add an Android backend. There are plenty of people already using the library on Android, but it would be nice to have support for the included samples.

It would be great with a contribution, maybe you could add support for this @paulocoutinhox?

In any case it would make sense to add it as a new backend in the backends branch targeting RmlUi 5.0, see #307 and the existing backends.

paulocoutinhox commented 2 years ago

Hi,

Im trying make a sample for all platforms (including android), but the error is about opengl dependency:

In file included from /Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/nativium/game/ApplicationCoreImpl.cpp:10:
In file included from /Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/shell/include/ShellRenderInterfaceOpenGL.h:33:
/Users/paulo/Developer/workspaces/cpp/nativium-rmlui/nativium/modules/game/implementation/cpp/shell/include/ShellOpenGL.h:44:10: fatal error: 'GL/glx.h' file not found
#include <GL/glx.h>
         ^~~~~~~~~~
paulocoutinhox commented 2 years ago

The most problem is with SHELL.

I think that Shell need be compatible with GLES/Vulkan/Metal/Etc.

hero-clashes commented 2 years ago

I was able to use Rml on android using raylib and some custom backend for the rendering and it was easy enough

mikke89 commented 2 months ago

In the time since this issues was reported, we have completely reworked our CMake implementation, and other changes making the initial post not fully relevant anymore. We also have reports of it working fine on Android. Thus, I am closing this one. Any related issues on the newest version of RmlUi should be posted in new issues.