Hi guys,
I've recently started working on porting the Horde3D engine to GLES2. I've managed to get it working (most of it) and I would like to share with you the code maybe someone could help me making it fully functional.
I've taken a different approach for the build system as I'm more comfortable with Qt so the port is using Qt5's toolchain and I've also believed it is more easily to build the engine on different platforms.
I've changed a little bit the implementation to provide a generic interface for the RenderDevice in order to support multiple rendering backends. Right now OpenGL and OpenGL ES 2.0 is supported.
I don't say that the way I've done it is the best way to go but it's working pretty well for me.
You can enable different backends by commenting or un-commenting out some defines from the horde3dengine.pro project file like this:
DEFINES += \
USE_OPENGLES_RENDERER \
# USE_OPENGL_RENDERER \
USE_TERRAIN_EXT
The project file are by no means complete or properly done but at least on Win32 should work out of the box.
The GLES2 sample projects are using PowerVr's PVRShell instead of glfw for setting the GL context and for input (which is not the best implemented atm.). Also didn't had time to properly separate GLES and GL pipelines and shaders so I've overwritten the GL ones directly. So the GL render backend might not work out of the box, but you can always take them from the svn repository.
So what's working on GLES:
-
knightPvr - forward pipeline working ok
- hdr pipeline has some issue, i think some framebuffer is not properly cleared
-
chicagoPvr - forward pipeline working ok, except shadows. There are some issues with the shadows from the shader, I suppose the depth test is not properly done (I'm not that experienced with shaders, but I'm catching up). They appear and disappear depending on the distance from the camera something to do with the cascaded shadows.
- deferred pipeline is disabled completely as we don't have support for MRTs. I wanted to implement them like in the PowerVr SDK3 sample but didn't had time.
I've tested the engine on Raspberry Pi and part of it is working (I had to disable everything regarding shadows as the pi doesn't support depth textures). I'll be back later with some screen shots, maybe a video (I'm writing from work
).
Unfortunately on RPI the framerate is rather low (~15fps) it seems that it gets cpu bound, animations are pretty fast but the rest it's killing the cpu. Probably with some help from you guys we might make this engine a good one for mobile platforms, I see a lot of potential in this engine.
So please take the code from here (
https://www.dropbox.com/s/jv6qzyqz5pjh1mn/horde3dqt.7z) and any suggestions or ideas are welcome. Probably if the guys managing the engine agree we might merge it with the main repository after some polish.
I've already set up a repository on Bitbucket which is at the moment private but if anyone wants to contribute I'll open it up to the world or as I said maybe we could merge it with the official repository.
Cheers,
Catalin Moldovan