Wow, that thread has grown quickly.
First off, I really like the idea of having an ES port of horde. I think that fits very well to the small size of the engine and the fact that it is very OGL centric. Furthermore, it would help to make horde more mature since several multi-platform related challenges have to be solved. Also, it will be required to optimize the resource usage due to the limitations of mobile devices (hard memory limit, in-order CPUs, etc.) which are actually not so different from those of consoles. And, considering the amount of mobile games that are currently produced, I could imagine that a lot of people would be interested in a modern graphics engine for these platforms, especially since the "competition" there is not yet too strong.
A few comments:
Volker wrote:
Another problem is that we have to add some kind of compiled shader resource for the ES backend, but that shouldn't be a problem, should it?
Actually it is better to use precompiled shaders that are stored in some sort of cache. It is a pity that those are not available for desktop GL.
DarkAngel wrote:
I recently did a project where we had to use a fixed-function GPU (no shaders!
), so as "the next best thing" we made a text file format that let you configure the texture-environment (multi-texturing unit), tex-coord generators, lighting channels, etc in data, instead of hard-coding different material types. We even called these text files "shaders" even though they weren't HLSL/CG/GLSL
Something like this might be handy for pre-GLSL phones.
I think that is a good approach. I guess I would do the same (in fact I proposed something similar when people asked about support for non-shader hardware). That approach would require the least modifications to the way horde is currently working.
MistaED wrote:
I was thinking in my head that an offline tool to build assets based on the target platform might be the ideal solution for a multiplatform app (maybe not horde itself), for instance, on ARM/PowerVR SGX hardware you'd vouch for using PVR texture compression wherever possible, but on the snapdragon/AMD hardware you'd use AMD-supplied extensions for texture compression methods like 3Dc or what have you.
I agree, for a multi-platform engine an asset/resource/content compiler/conditioner (however you want to call it) is almost a requirement. ColladaConv is already close to that but it could become part of a centralized tool which can do fully automated content builds (platform-specific texture conversion, animation compression, endian conversion, etc.).
MistaED wrote:
Another thing which comes to mind, in the materials xml files is there already a way for the engine to auto-detect which texture file to load or could an order of preference be set which can choose in order which textue file to use? For instance, you have a materials.xml file which points to myTexture.tga but you also have myTexture.dds or myTexture.pvr in that directory. Can you make the engine detect the right one by passing a certain preference value or would you rather make an offline tool which can modify the xml file at build time for a given platform? This can get complicated fast DDd, you're right!
I would say that usually, you don't have different platform-specific versions of a single asset in the same folder (only one, depending on the platform your build is targeted at). I would always reference the source assets in the materials (e.g. tga textures) and the engine would have some platform-specific rules and always find the right target asset (e.g. dds instead of tga). If the dds is not found or outdated, it could even be created on demand by the engine calling the asset compiler (gives hot reloading support, shorter iteration times for artists). More of a challenge is where the meta information is stored for an asset (for a texture, that would be compression, sRGB space, mip map settings, etc.) .