LWJGL
February 07, 2012, 04:56:51 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: LWJGL 2.8.3 released!
 
   Home   Help Search Login Register  



Pages: [1]
  Print  
Author Topic: Creating a DirectX binding  (Read 18695 times)
Matzon
Administrator
Demigod
*****
Posts: 2163



« on: July 09, 2007, 09:17:31 »

There have been some discussions about creating a DirectX binding for LWJGL on JGO, see this thread:
http://www.javagaming.org/forums/index.php?topic=16985

CaptainJester mentioned that he was already working on this.

LWJGL will be happy to donate to the project, and I encourage people to discuss this some more and help CaptainJester.
We can also provide SVN access.

Naturally there will be some integration work, that we will have to tackle - and this will be a win32 only binding (sans wine). However some people have talked about doing an OGL wrapper on top.
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
CaptainJester
Talks Too Much
***
Posts: 175



« Reply #1 on: July 09, 2007, 11:18:10 »

Hopefully I will have something preliminary to show in a couple of weeks.  Maybe just getting a triangle on the screen.
Logged

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities.  We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)
Cool
princec
Nerdus Imperius
*****
Posts: 1751



WWW
« Reply #2 on: July 09, 2007, 11:36:55 »

Would like to explain to everyone that writing an OGL->Direct3D wrapper is really, really, really f*cking difficult Smiley SciTech basically couldn't manage it and they're pretty much experts. Well, they did one, but it was far from reliable.

Cas Smiley
Logged

elias4444
Nerdus Imperius
*****
Posts: 636



WWW
« Reply #3 on: July 11, 2007, 10:40:16 »

I would definitely stay clear of an OGL -> D3D wrapper... I don't think it's worth the immense amount of work.

Would it be better to create a separate project (apart from LWJGL) for a D3D binding? I'm worried that by including D3D alongside the OGL bindings you might introduce platform inconsistencies throughout the project.

Is there some benefit of including D3D that I'm missing? I know Vista has had some issues with OGL, but they seem to be clearing up slowly, but surely.
Logged

=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com
Matzon
Administrator
Demigod
*****
Posts: 2163



« Reply #4 on: July 11, 2007, 11:14:39 »

I dont expect many issues with supporting both opengl and directx with a similar Display. As for packaging and distribution we might want to split it up into lwjgl_ogl.jar / lwjgl_dx.jar or something like that - but lets worry about that further down the line.

The main benefit of having dx support is basically much better driver support on the primary win32 platform. Supporting dx on linux/mac could perhaps be done using wine - but I am very unsure about that.
Logged

http://certusgames.com (Free Online Multiplayer Java Games)
http://lwjgl.org (OpenGL/OpenAL for Java)
erikd
Newbie
*
Posts: 21



WWW
« Reply #5 on: July 11, 2007, 11:38:40 »

I would definitely stay clear of an OGL -> D3D wrapper... I don't think it's worth the immense amount of work.

Yes, the more I think about it, the less it makes sense. Apart from being difficult, it would never be the optimal solution. It's probably better to use a D3D binding in higher level libs like Slick and jME.
Logged
Nero
Newbie
*
Posts: 2


« Reply #6 on: July 11, 2007, 14:16:25 »

As for packaging and distribution we might want to split it up into lwjgl_ogl.jar / lwjgl_dx.jar or something like that - but lets worry about that further down the line.
I think this will probably the best solution to avoid any performance issues.

We should remember that people needs to upgrade their drivers to have good performance with OpenGL in Windows Vista. MS drivers only supports emulated OpenGL with DirectX. Average Joe probably won´t go to their video card website and get the lastest driver.
 
Logged
Evil-Devil
Prolific Timewaster
****
Posts: 266



WWW
« Reply #7 on: July 13, 2007, 02:49:58 »

I think there should be no OGL -> D3D -> OGL Wrapper. Distribute both APIs as single packages and let the programmer handle how they like to use it. It is like writing an engine for LWJGL and JOGL (i never did, but some ppl i know did), setting up base abstract classes and doing the final stuff in specialiced classes. Thats the way I'd like to go with DX to, if I would use it in any project besides OGL.
Logged
publicminx
Newbie
*
Posts: 1


« Reply #8 on: April 11, 2009, 04:07:30 »

hello folx Wink

i detected some times ago a nice java-direct3d wrapper ...

link: http://sourceforge.net/projects/java-direct3d

supports directx 9/direct3d and 64 bit (!) ...
sources (c++) are availiable ...
appears not to be under further development ;(

anyway: the result (in some quick/dirty tests) were: between twice and more times as fast as LWJGL ...
or better: this will most likely the case for most ATI/Catalyst users ... like me (i have a 4830 card)

the reason for that is the bad OpenGL implementation of AMDs/ATIs Catalyst Drivers ...
you can see that in "everyone-realworld-applications" like SecondLife, Ogre, ActiveWorlds and/or generally if you test Software which offers both: Directx/Direct3D and OpenGL or test on the same/similar systems with different Graphic cards ...

a nice Example is also this Engine/Demo: http://unigine.com/download/
(let you benchmark OpenGL, different Direct3D versions)

general: for ATI/Catalyst/OpenGL the most likely result is:
- Nvidia/Geforce is usually about twice as fast as ATI/Catalyst (or much much more in some situations)
- ATI/Catalyst Direct3D is about twice as fast asa ATI/Catalyst OpenGL (or much much more in some situations)

this also means: Ogre/Java (there is a binding) and Direct3D beats by far everything you can do with LWJGL/JMonkey in performance for ATI/Catalyst cards ...
because of the bad OpenGL Permance (extraordinary bad, not the typically result of the "more focus of the industry on Direct3d"!)

The main problems with the Catalyst OpenGL implementation seems to be in the Texture (Mem) Handling not in GPU-related stuff ...

In most typical "patched" Gamebenches or Synthetic Tests you cannot see that, because they run only with Opengl or Direct3d or tests statically stuf which has not much to do with what i call "Everyones Realworld Stuff" like SDL, SFML, Ogre, JWJGL, Jogl, JMonkey, Irrlicht, Second Life, all that OpenSim stories and so on and so on ...
all of them have to handle usually much more flexible structures, general texture handling etc.

so, Direct3D would make sense for much more concrete reasons...

(but please no odd name like "LWJGL" as base... better to rename both. show ppl the LWJGL page and talk about what it does and later ask them how the name was then you know what i mean)

Logged
bobjob
Prolific Timewaster
****
Posts: 335


LWJGL: WOW SO GOOD


« Reply #9 on: April 12, 2009, 16:07:01 »

Ok, Im sorry I really couldnt help myself.  Tongue


hello folx Wink
hi

Quote
i detected some times ago a nice java-direct3d wrapper ...
link: http://sourceforge.net/projects/java-direct3d
congrats!

Quote
general: for ATI/Catalyst/OpenGL the most likely result is:
- Nvidia/Geforce is usually about twice as fast as ATI/Catalyst (or much much more in some situations)
- ATI/Catalyst Direct3D is about twice as fast asa ATI/Catalyst OpenGL (or much much more in some situations)
thanx for the official stats.

Quote
(but please no odd name like "LWJGL" as base... better to rename both. show ppl the LWJGL page and talk about what it does and later ask them how the name was then you know what i mean)
sure thing boss.
Logged

LWJGL Benchmark online test:
http://have2chat.net/benchmark/
http://have2chat.net/benchmark/fullpage.html (run full OpenGL webpage)
Evil-Devil
Prolific Timewaster
****
Posts: 266



WWW
« Reply #10 on: April 14, 2009, 04:43:13 »

Since when does the GL in LWJGL stands for (Open GL)? Cheesy
Anyway, a feasible D3D binding would be cool, tho the overhead for any recent lwjgl/jogl based engine.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines
SMFAds for Free Forums
Valid XHTML 1.0! Valid CSS!