Is it crazy to think about making such combo?
Any body volunteers to create a binding to Directx 9.0?
What are the difficulties associated with such attempts?
Discuss 
well, there are some glaring problems:
1 - win32 only (unless you go the path of wine et al)
2 - seriously weird conversion which will hurt performance due to the excessive amounts of structures
3 - versioning troubles, particularly different sized structs
and probably a lot more stuff, that more enlightened people may prod with.
Well I think it’s a good idea - even though I rarely use Windows. If the same xith3d code would work on both Linux/OpenGL and Windows/DirectX that would be awesome.
It is also the ultimate proof of concept.
In the same sense that Java is awesome because it works on Windows - even if you are coding in Linux.
As DirectX is often better setup/uptodate on Windows boxen - this would be great.
As for help, I’m afraid I wouldn’t be much good.
Will.
[quote]Is it crazy to think about making such combo?
[/quote]
What is your target here? I think most of us want to do things with Java and can bear the underlying native components (like Jogl, Joal, LWJGL, (add more here) etc.), as long as they offer some extraordinary functionality.
If you need DX9 3D Library that you can use with Java, why not select existing good native 3D library (not Xith) and create Java bindings for that. Of course this is not a solution if you want to use Xith API. I’m just pointing this alternative out because this might be easier solution.
Creating Java bindings for high level native librariers can be done quite automatically (like in Odejava), of course ymmw. Put here any DX9 3D library that is ready now and contains extraordinary functionality. You can get most of the API automatically, of course some areas are best to be written by hand just to get it work properly or for performance reasons.
Creating Java bindings for low level DX9 + plugging it to Xith nicely co-existing with OpenGL bindings might be harder solution. But I’m not too familiar of low level 3D API’s or Xith internals. I assume this would consume main Xith developers time, I’d personally like Xith developers focused on getting Xith “1.0” out first.
Cheers, Jani!
I guess it would be a nice addition if a Xith3D application could run on either OpenGL or DirectX - a bit like Ogre.
Sure you app might have to have some DirectX or OpenGL specific code if you want some fancy effects but the base stuff would “just work”.
Personally I prefer OpenGL too - but as I understand it many windows users have DirectX setup a lot better than OpenGL (just talk to Cas).
Will.
[quote]I guess it would be a nice addition if a Xith3D application could run on either OpenGL or DirectX - a bit like Ogre.
[/quote]
Yes, this would be nice. But what are the costs?
Any new functionality takes resources away from the current focus, I feel DX9 support for Xith is quite a big task. Again, I’m not expert on this area, but I feel getting Xith3D good on OpenGL first would be the first priority before adding dual support for OGL+DX9.
Well, if it’s not too hard to do then I’d be sweet!
Wouldn’t the proper solution be making sure end users have updated their drivers? That’s what most games readme.txt state, let it be DX9 only game or OGL only game. Same solution, update your graphics drivers and make sure you got latest DX9 pack installed, usually the end product even contains DX9 pack as an optional install because some computer users might not even understand what DirectX means, they just want to play the game 
Cheers, Jani!
Absolutely. Please let’s first make Xith3d a stable and well documented 3d engine, this will be a long way anyway, and only then think about supporting something like DX or whatever.
But… even if DX should come one day in the future, please no extra fancy stuff which just runs on Windows Xith3d apps or such, because that really woukd suck. Rather like Java3d does: it can use OpenGL or DirectX as low level API but this is sperated entirely from the Java3d API.
[quote]Wouldn’t the proper solution be making sure end users have updated their drivers? That’s what most games readme.txt state, let it be DX9 only game or OGL only game.
[/quote]
Of course. Some days ago the Valve survey has been mentioned here on the forums, too, and it says that many Windows players use OpenGL. Add to this the forthcoming Doom3 (spring?): it uses OpenGL, so naturally all the useful 3d cards for PC will support OpenGL. (I think it’s the reason ATI improved their OpenGL drivers during the last half year and continues to do so, “just” because of the forthcoming Doom3).
Thankfully OpenGL has some high profile applications - cross platform gaming still has a chance 
If you assume everyone has good 3D cards then yes I agree - tell them to update their drivers.
Alas this is not always the case - many laptops (mine included) have sh*t cards. It can run DX fine and assocated games e.g. Warcraft and even BF1942 but only OpenGL 1.2 so it can’t even run Xith! This is a SiS 32MB card we are talking about, but still.
I totally agree that good OpenGL support is our prime goal. But - the wider the support the better.
Will.
I do not recommend spending time on DX9 support. It’s the law of diminishing returns; you will spend at least 100% more time making the API but only gain about 20% more systems. Spend that 100% more time on making Xith utterly awesome. The cost effective solution is to ensure that users can get OpenGL drivers quickly and easily when Xith detects that they don’t have GL drivers.
Cas 
I know I am new here but I think adding Dx9 support would not be wise. It would not just take away development from the current API but it would also break the JAVA system. By supporting Dx 9, there would be a potential problem of things working in Dx9 but not in the current setup. This is why I got into JAVA in the first place. I hated C because everything changes from system to system.
Well, I’ll put it this way - its not worth the effort. If you take a look at how Xith rendering works and its RenderAtoms and the like - building it isn’t that difficult, but is a fair amount of wasted energy.
It’s something that would be a nice addition in the future, I personally dont use Windows much so DX isn’t high on my list either.
But if someone just went off and created it (lets say they were releasing a commercial game and cared about the extra 20% target audiance) then I can’t see any reason not to use it. I was impressed when I ran an ogre program (in windows) recently and was given the choice of OpenGL or DirectX. Apart from anything else it means that if one fails you can try it on the other.
but I agree, we don’t want to divert any attention at the moment!
Will.