Horde3D

Next-Generation Graphics Engine
It is currently 19.03.2024, 11:50

All times are UTC + 1 hour




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: OpenGLES2 and D3D11 port
PostPosted: 21.05.2013, 06:41 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
I'm working on an OpenGLES2 and D3D11 port on github: https://github.com/attilaz/horde3d-x/tree/gles2_d3d11
I've used parts of the Horde3D_IOS branch in community SVN, thanks for anyone who worked on it.

The ports are still work in progress, there are still major features missing (like render to texture/shadow support in d3d11) so please don't report bugs.

I'm trying to change as less as possible on the API and pipeline. Documentation of the changes is in https://github.com/attilaz/horde3d-x/wiki/GLES2-and-D3D11-port.
I made some breaking changes so any comment/criticism is appreciated. I'm open for any suggestions to make it better and suitable for the whole community.


Attachments:
File comment: Here is a screenshot of the knight sample on d3d11
knight_d3d11.jpg
knight_d3d11.jpg [ 74.04 KiB | Viewed 81820 times ]
Top
 Profile  
Reply with quote  
PostPosted: 21.05.2013, 20:38 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
First of all, congratulations to the first working D3D rendering backend for Horde3D.

Regarding your changes I totally aggree that dynamic texture compression is something that should be probably avoided anyway and may be done in a preprocessing step or moved to a separate utility library that creates compressed textures on the fly and pass those to horde (e.g. when using a custom h3dutLoadResourcesFromDisk version or something like that).

I also agree that it's proably better to switch to RGBA8888 that is available on all platforms instead of using BGRA. I never noticed any measurable difference in speed and for texture streaming maybe PBOs would make a bigger difference, but are currently not used by Horde3D.
As a lot of the ES2.0 devices do not support BGRA, I think switching to RGBA by default would make a lot of sense.

I never did any shader programming on D3D, so regarding your shader definition changes I'm probably not the right person for giving advises. But maybe we should use the D3D names in lowercase by default. So in OpenGL vertPos becomes position0, normal => normal0, etc.

That would make mapping a bit more easier I guess.


Top
 Profile  
Reply with quote  
PostPosted: 22.05.2013, 21:24 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
Volker wrote:
First of all, congratulations to the first working D3D rendering backend for Horde3D.

Thanks and thanks for the feedback.

Volker wrote:
Regarding your changes I totally aggree that dynamic texture compression is something that should be probably avoided anyway and may be done in a preprocessing step or moved to a separate utility library that creates compressed textures on the fly and pass those to horde (e.g. when using a custom h3dutLoadResourcesFromDisk version or something like that).

Moving compression to h3dutLoadResourcesFromDisk is a clever idea. With some compression method this could be usable (eg. realtime dxt compression). Our pvrtc and etc compression method on best quality takes minutes for 1024x1024 textures so obviously we convert it in preprocessing. I will remove "compression on upload" related flags from h3d and update the docs on github.

Volker wrote:
I also agree that it's proably better to switch to RGBA8888 that is available on all platforms instead of using BGRA. I never noticed any measurable difference in speed and for texture streaming maybe PBOs would make a bigger difference, but are currently not used by Horde3D.
As a lot of the ES2.0 devices do not support BGRA, I think switching to RGBA by default would make a lot of sense.

Thanks for the info about your experience about bgra/rgba upload. Then I think it is better to switch rgba8888 on all backend.

Volker wrote:
I never did any shader programming on D3D, so regarding your shader definition changes I'm probably not the right person for giving advises. But maybe we should use the D3D names in lowercase by default. So in OpenGL vertPos becomes position0, normal => normal0, etc.
That would make mapping a bit more easier I guess.

To be honest this is my first d3d11 project (I used d3d9 only). As renaming attributes in opengl backends is a quite large change I postpone this till the backends are mature enough and there is no better solution.


Top
 Profile  
Reply with quote  
PostPosted: 23.06.2013, 09:07 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
Here is a new screenshot of the current status of d3d11 renderer on github.
Attachment:
knight_d3d11_v2.jpg
knight_d3d11_v2.jpg [ 91.64 KiB | Viewed 81646 times ]

Shadowing and 'render to target'/posteffect are working now.

Documentation is updated on github's wiki.

Future work:
GLES2 shadowing support is still not working, and I would like to support rt rendering without depth texture support for hardwares like tegra3.
After that I will work on a test framework as the features (especially the d3d11 renderer and ktx format support) are hardly tested.

I would like to focus on windows version now. Using native GL,D3D11. For GLES2 using emulation with ANGLE.
Any help is appreciated with porting to other platforms (iOS, android, ...).


Top
 Profile  
Reply with quote  
PostPosted: 25.06.2013, 14:53 
Offline

Joined: 21.08.2008, 11:44
Posts: 354
Very nice, good work :)


Top
 Profile  
Reply with quote  
PostPosted: 06.09.2013, 17:51 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
Thanks Volker for mentioning the github branch in the news.

On win32 the examples(es2, d3d11) work on my machine, but on iOS and android they are still not working perfectly.
Probably the shaders needs some fixing, and they are still trying to load dds/dxtc textures instead of pvr/etc.

For platform support I chose to use a slightly modified cocos2d-x/platform framework. maybe this is not the best solution.
Other alternative could be using SDL(SFML?) but this is a large dependency and I am not sure if they supports every platform that cocos2d-x/platform supports.
Or implement our own platform framework which is much more work, and as I don't have access to every platform can't do it alone.
I am open for suggestions.


Top
 Profile  
Reply with quote  
PostPosted: 22.09.2013, 13:58 
Offline

Joined: 09.02.2012, 22:38
Posts: 26
SDL 2.0 has support for quite a bunch of platforms:
Quote:
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.

Plus its supported by Emscripten (Horde3D for Firefox/Chrome anyone? :) )


Top
 Profile  
Reply with quote  
PostPosted: 03.10.2013, 14:44 
Offline

Joined: 09.02.2012, 22:38
Posts: 26
Need some help with fastmath and gles2_d3d11? I can test these patches for you on Windows 7 (VS2012/VS2013) and Mac OS X (Clang 3.2) and create a pull request (in your name using your gmail address, as its your work). Any objections?


Top
 Profile  
Reply with quote  
PostPosted: 04.10.2013, 15:46 
Offline

Joined: 26.08.2008, 18:48
Posts: 120
Christoph wrote:
Need some help with fastmath and gles2_d3d11? I can test these patches for you on Windows 7 (VS2012/VS2013) and Mac OS X (Clang 3.2) and create a pull request (in your name using your gmail address, as its your work). Any objections?


Any help is appreciated in testing/bug fixing. Feel free to use it/create a patch. Currently I'm busy with finishing our next game, after that I will probably have some time finishing the es2 port. I am not planning to do further work on the d3d11 port in the near future. Instead I will focus on #ifdef-able shader/fx, it is more important for us, I could halve our shader count, as we are using different shaders for opaque/alphatest(tiled renderers needs this optimization)/alphablend materials.


Top
 Profile  
Reply with quote  
PostPosted: 09.10.2013, 14:35 
Offline

Joined: 08.01.2008, 14:57
Posts: 66
Do we simply take in account the idea to use ANGLE project to have a D3D11 backend for free (more or less)?

So we can focus on OpenGL ES backend and then re-use it also for D3D11 support (of course it's all a performance matters, but for now could be a simple solution...).


Top
 Profile  
Reply with quote  
PostPosted: 25.11.2013, 20:37 
Offline

Joined: 27.03.2011, 08:40
Posts: 47
Location: Fi
I know H3D can/is be used in iPhone but have anyone compiled it for android? And how, is there some manual/help-file how to do it?

I would like to test my little tests on my galaxy mini, but havent much experience when compiling c++ to android (I have installed android ndk but what else I need?)


Last edited by mikel on 26.01.2014, 09:52, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: 26.11.2013, 20:44 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
In my former job I compiled it using the NDK, but there are currently no out-of-the-box makefiles available for Android. It shouldn't be to difficult to create one based on the examples shipped with the NDK. But you also have to add JNI bindings in case you don't develope a NativeActivity


Top
 Profile  
Reply with quote  
PostPosted: 21.01.2014, 14:45 
Offline

Joined: 21.01.2014, 11:45
Posts: 1
Location: Germany
I am doing my Android NDK (NativeActivity) development with on Windows 8 with Visual Studio 2010 Pro and the great NVIDIA Tegra Android Development Pack.
It comes bundles with everything and on installer downloads and installs it all.

I am very much interested in any progress with Direct3D 11 (because of Windows Phone 8) and OpenGL ES for Android and iOS.
Is it still being worked on?

Since I am going to take on a new game project, and my own framework does not provide any 3D support, I am looking around for 3D rendering engines to use. I could not find many engines with OpenGL ES and DirectX support, and some force you to use their own framework (game engines) which won't work with my multiplatform framework.

Of course, I am happy to help with the development of Horde if I am going to use it.


Top
 Profile  
Reply with quote  
PostPosted: 15.02.2014, 22:12 
Offline

Joined: 27.03.2011, 08:40
Posts: 47
Location: Fi
Finally I got Horde3D+Gameplay3D working together, and succesfully build these to android emulator.
I will (try to) share my codes and projects soon.

[edit] Ok, now it works with emulator and galaxy mini phone (with shadows).


Last edited by mikel on 19.02.2014, 13:15, edited 4 times in total.

Top
 Profile  
Reply with quote  
PostPosted: 17.02.2014, 04:51 
Offline

Joined: 08.01.2008, 14:57
Posts: 66
Could you open a new thread (maybe in showcase) where you explain your goal and your approach to integrate Horde3D with Gameplay, please?

It would be very interesting!

Thank you!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group