Could we use ANGLE?

First of all, please excuse me if I am talking nonsense here, because I am not that familiar with the low-level GL stuff… but it looks interesting enough to at least ask those of you that know what they’re talking about :slight_smile:



I came across this today http://code.google.com/p/angleproject/wiki/DevSetup

Basically, it claims to allow OpenGL ES 2.0 to run on Windows by translating to DirectX.



What I am wondering is, would it be possible/easy to make a JME3 renderer for this based on the Android renderer?

I figure that the OpenGL ES renderer is already there in com.jme3.renderer.android so it might be not be too much of a leap to make it work with ANGLE?



There are 3 reasons I can see for trying this:


  1. It makes it much easier to develop a cross platform game that will work the same on Windows and Android and behave the same way.
  2. For people like myself that suffer with terrible Intel OpenGL performance on their laptop, this could be a much easier way to get things running in DirectX than writing and maintaining a specific JME DirectX renderer or a LWJGL DirectX renderer and might seriously boost performance.
  3. It should allow the code to run natively in Chrome using WebGL

Jme should run in the android emulator if im not wrong or?



Webgl would be intresting I agree, but I guess a seperate renderer would be a better aproach here.

@monkeychops said:
2) For people like myself that suffer with terrible Intel OpenGL performance on their laptop, this could be a much easier way to get things running in DirectX than writing and maintaining a specific JME DirectX renderer or a LWJGL DirectX renderer and might seriously boost performance.


What makes you think performance going from OpenGL ES -> DirectX -> Video card would improve. I haven't checked the link (about to go to bed), but I would imagine that if you have to translate (on the fly) from one standard to another... This might actually worsen things by a wide margin.

Then again maybe what I'm understanding from what you wrote is wrong. Sorry if that's the case.
1 Like

Well the idea is to make a single version of the game that runs on all platforms, with the exact same renderer. Also for me, the opengl performance is a serious problem, intel graphics seem about 10x slower in opengl than directx and render loads of the shaders incorrectly… some way to get jme3 using directx without having to write a whole renderer and translate the shaders by hand could really be a big win. For example, a terrain on JME runs about 5fps on my laptop but easily 100fps in XNA - and it’s nothing wrong with java or the terramonkey code imo, it’s the poor GL performance of the intel graphics.

@madjack said:
What makes you think performance going from OpenGL ES -> DirectX -> Video card would improve. I haven't checked the link (about to go to bed), but I would imagine that if you have to translate (on the fly) from one standard to another... This might actually worsen things by a wide margin.


I don't know for sure, but I do know the opengl implementation is so poor, it renders things wrong, shaders break, and similar code can run as much as 10 times slower if its in opengl rather than directx. The intel hardware and drivers are just geared to do directx stuff with hardly any regard to opengl. I think that at the very least, the ANGLE translation could support GL better than Intel do, and possibly the overheads might not be as awful either :P

Well to speak clear, jme is targeted more at gaming hardware, while intel chips does not really qualify as those.



Jme also uses only shader materials, XNA not as far as i know. There is your performance problem, intel shader units simply suck.



If it were not a laptop i would tell you to get a real graficcard if you want to develop games, but i guess you already know that anyway.

@EmpirePhoenix said:
Well to speak clear, jme is targeted more at gaming hardware, while intel chips does not really qualify as those.

Jme also uses only shader materials, XNA not as far as i know. There is your performance problem, intel shader units simply suck.

If it were not a laptop i would tell you to get a real graficcard if you want to develop games, but i guess you already know that anyway.



Hehe, yes... unfortunately the laptop belongs to my work, and they only allow business models, and business models only contain intel sucky graphics. I will get a new laptop some day but actually low-end directx games and XNA dev stuff works fine, its just opengl that sucks so much sadly.

Well the only thingh left to you is to thread it like I thread my workpc (with a semi crappy intel card as well :().



A challenge to optimization skills. :slight_smile: