Will JME ever work with DirectX?

Hello all,

I was just curious if we will ever see DirectX as an option for building JME games.

I’ve seen games with both OpenGL and Direct X, so I’m not sure if they developed it all together, or what, so I’m curious about that…

However if this is blasphemy, to our Sacred OpenGL, then please delete (and don’t ban me) :stuck_out_tongue:

Thanks all :slight_smile:

In theory it is of course possible to implement a DirectX renderer for JME. But I don’t think anyone is able and willing to put in the many hours to maintain it over several years. In practice, no.

1 Like

Thanks :slight_smile: .

I did find this though DirectX to J3O Converter

seems to just convert to J3O, but in a sense this could be implemented to work with the engine I would assume?

I’m really not sure what exactly goes in the bare bone of all of this, and how it all works together, but would be different with DirectX vs OpenGL…??

Thanks!

EDIT: Looks like the importer development got halted sadly… I should bump it >)

The two APIs are very different. There was already a really long thread on this.

It’s really like the difference between C and Java. DirectX makes you do so much by hand managing memory allocation, upload to the card, etc… at least that’s my recollection. Bunches of different nasty version specific data structures and such.

OpenGL is a higher level abstraction that manages a lot of that for you. So while in theory it’s possible, in practice everything would have to change… even much of the JME API would be a little odd when translating the in-built OpenGL-isms to DirectXisms (BlendModes, etc.). Not to mention that all shaders would be completely incompatible. An entirely different syntax.

The thread you reference is about converting a file format to j3o. DirectX has its own mesh file format. That has nothing to do with running the engine on DirectX.

1 Like

Thanks for the information, I’ll try to find the thread if you don’t happen to have it handy?

Sounds like a lot of work I guess :P.

This new Vulkan api is supposed to be lower level too, I’m assuming JME wouldn’t see integration with it? I’m not sure if we discussed this in the other thread, but pretty tired atm…

Yeah, I realize it’s only a DirectX file, but thought it was interesting :smile:

thanks

An understatement. It’s likely a complete engine redesign with a rendering back-end abstraction in mind. I will not be working on that project. I don’t wish DirectX development on my worst enemies.

As I already said in the other thread, it is very likely that OpenGL would be reimplemented on top of it if it’s worth using at all. It wouldn’t surprise me if drivers are written to handle Vulkan internally and then just auto-translate the calls. Especially if the shader language is the same. Seems pretty likely.

But since none of it really ‘exists’ yet and since we already have people griping about losing OpenGL1, I suspect it will be at least 3-4 years before we have to worry about it.

So you’re basically saying you would rather continue supporting OpenGL 1, than implement DirectX :stuck_out_tongue: ?

Thanks, sounds interesting, so we shalll see.

Nooo OpenGL 1, not that, anything but that >(.

I think it’s time to give Intel a call and tell them that it’s time they start shipping up to date CPUs to the market… I don’t even get why it would have such a low version on the Integrated side… Makes no sense… Wow much bigger is 4 than 1 (I’m assuming a space issue by including it), and what would it even be for… What supports 1??

Thanks :slight_smile:

Absolutely without question. But I don’t have to support either… so I won’t.

Haha… Yeah for sure, was just seeing :stuck_out_tongue:

Down with OpenGL 1!!!

So DirectX is that bad huh…

What about CUDA or Mantle Programming? :stuck_out_tongue:

I dont think it worth the time to implement directx for this reasons :

  1. DirectX is just for windows, jme is multiplataform.
  2. Players dont care witch implementation is beeing used by the game, if opengl or directx.
  3. There is no performance gain, you could say about new directx12, but its also relative and on that you should compare to vulkan that must probally will be implemented on jme.
  4. Requires the right directx version to be installed just getting headckes to your players and for you.
  5. I know this is not exactly a reason, but : I allways run away from microsoft tecnology, I hate it :wink:

Adding to that :

3 Likes

You can see more discussions about it just here.

Hi

If you really want to use Direct3D under the hood somehow with JMonkeyEngine 3, use the JOGL backend and enable ANGLE.

Thanks, I’ll check it out :smile:

Thanks for the tips, I actually don’t need to enable it, more of a curious thing.

Just wondering as OP mentioned, some games can switch renderers. I’ve recently seen it in Rebel Galaxy where you can choose to use OpenGL, DirectX9 or DirectX11 in the launcher (with no graphical or performance difference for me). As you said it’s a lot of work to support both, so why in the world would you do such a thing?

It probably has to do with GPU support. SOme GPUs don’t seem to support a platform for some reason, so if you have issues, the other platform is open. For instance, “ATI” Radeon cards used to be very bad for OpenGL, as we’ve seen many people here complain about issues with AMD/ATI cards and JME.

Also, FWIW, DirectX is a “Windows” thing (I believe this is true anyways), while OpenGL is a “cross platform” language/set of bindings, w/e you want to call it…

If the game supports Mac or Linux, or even a mobile device, you will need OpenGL. Direct X probably works on Windows Phones though… So, if the game is cross platform, then both choices will be offered for windows devices.

One game I play has both DirectX and OpenGL, and I notice it has clients for both mac, and Linux.

The thing is, I find it odd people would even want to use DirectX, when it limits you to windows… Granted Windows machines are the ones that most people play games on…

But now with things like “Steam OS” and other OS’s coming out, I wonder how DX will fare.

It most likely is the case that DX is able to perform better than OpenGL, which ios why people prefer it for games, but I could be wrong, in which case I wonder whypeople would even use DX then…

To me, something is used because it’s better, or can do something better, especially if a “Cross-platform” option is available.

That might be the thing, but the only time I’ve seen AMD cards have problems with OpenGL it was with JME, so I would assume these are JME specific problems.

That’s right, which makes it kind of pointless to use DirectX nowadays.

I’ve only heard bad things about Steam Machines, so imho they won’t make a significant impact on anything really. And right now the percentage of people that use linux for gaming is laughably small.

Well, @pspeed spoke about a time about 10 years ago when driver support was awful for OpenGL with ATI Radeon. He said things I believe about Shaders specifically having issues.

Yeah, but yet most games are probably programmed with DirectX, moreso than OpenGL. Maybe the new “Vulkan” API will give DirectX a run for it’s money, though I do not see why “OpenGL” is a bad alternative to DX…

Interesting about Steam Machines, what is the issue exactly? I don’t exactly understand what Steam is/was trying to do. Is it trying to make a “gaming only computer” by having an OS built around that? Is Steam OS only for “Steam” or can other server systems, like “Battle.net” work as well?

As for Linux/Mac Gaming, I understand it’s smaller than windows, especially since Mac has a 9% PC share, and Linux has 1.6% of the total PC Shares

Granted if you check out the “Devices shipped” Android comes up at almost 50%, while Windows is 15$…

So these mobile devices is where OpenGL will shine, but it’s only OpenGL ES, so there is that issue too… It seems that Vulkan is trying to stop this problem by having 1 API across the board. I’m not sure why exactly OpenGL ES is a thing, and why OpenGL itself cannot be fully ported over… I’m sure someone else here could explain why with some nice details for us though :slight_smile: