horde3d / Horde3D

Horde3D is a small 3D rendering and animation engine. It is written in an effort to create an engine being as lightweight and conceptually clean as possible.
http://horde3d.org/
1.55k stars 308 forks source link

Sample framework for multiple platforms #134

Closed algts closed 4 years ago

algts commented 5 years ago

Hello. Currently, the engine itself should pretty much support android and ios, only build system is not yet adapted. The problem lies with samples. Current sample framework was not designed to work on mobile platforms (like ios) and in web (emscripten), partly because glfw does not support them.

Here are a few suggestions how the sample framework could be adapted: 1) Adapt sample framework to use glfw for desktops and glfm (link) for mobile and probably web (glfw works well in emscripten) 2) Switch to SDL (works everywhere, but heavy) 3) Make a somewhat combined sample framework that uses glfw and has special code for android/ios

Any ideas on what path to take?

horde3d commented 5 years ago

I haven't used SDL for quite some time and have no experience with emscripten. So I can't suggest anything. But if we can make SDL a part of the CMake toolchain as we did it for GLFW (check if available and if not download it automatically) it might not be a big issue from a Horde3D user point of view. So depending on what dependencies are available on the system (android/ios SDK) one could enable the platform's targets. But as mentioned I haven't done anything with SDL for a long time and the last time I did something for Android and IOS there was no Gradle on Android and no swift on IOS. So maybe its not that easy.

algts commented 5 years ago

Ok, if there are no other suggestions, I'll try to modify the sample framework to use either glfw or SDL then.

jcmonnin commented 5 years ago

I have some patches that affect the render back-end code. I would like to check the samples with all back-ends before sending a PR.

On today's develop branch, is it possible to run the samples in GLES3 mode on windows? If so, please let me know in which direction to investigate. Currently, it's failing to include the GLES3 headers, but I haven't really investigated the options for GLES3 on the desktop.

algts commented 5 years ago

@jcmonnin You'll have to install either powervr or mali emulator, it will provide necessary headers and libraries (libEGL, libGLESv2). You can also download AMD GLES package, but it is rather buggy and slow (and the download seems to be taken down). Links: https://www.imgtec.com/developers/powervr-sdk-tools/pvrvframe/ https://developer.arm.com/products/software-development-tools/graphics-development-tools/opengl-es-emulator

jcmonnin commented 5 years ago

@algts Thanks for the hints. I've not yet had time to check this out. I've nevertheless sent the PR for review; I'm running out of time to check it properly, however I don't expect my commit breaks GLES3.

algts commented 5 years ago

First part of modifications have landed. Now samples can be built with GLFW or SDL2. Next is Android support.

algts commented 4 years ago

Closing the issue as SDL is now used for Android and will be used for IOS.