PDA

View Full Version : OpenGL -> DirectX Adapter


Frederick
11-13-2006, 03:09 PM
Hi,

I am german cs student, who is interested in indie gamedev, obviously ;)
At the moment I am thinking about deployment, and I guess everyone is aware of OpenGL driver problems. Yes, actually I read about them in this forum :D
My question: is there a wrapper for directx, so that opengl calls are translated to directx ? At least theoretically this should be no problem,
and performance loss shouldn´t be to great. I heared Vista will probably support this, which would be a great idea, if they also support extensions.
Many people write an abstraction layer for opengl/directx, but opengl is already abstract, so it´s doubled work in a way.
All it would need would be a couple of adapter functions, and if it is done once, nobody would really need to write a wrapper again.

I would like to ship my game with such a driver as fallback. I hearedabout GLDirect, but I think the end user has to license it, which is bad. I´d like to ship with the driver. I wonder if there is such a thing, although I fear there is not - I couldn´t find anything about it. I think such a driver would give OpenGL a stronger stand on windows - it would be much more reliable, and make indie dev much simpler.

thank´s,
Frederick

HairyTroll
11-13-2006, 04:11 PM
DirectvX OpenGL wrappers (http://www.google.com/search?client=opera&rls=en&q=opengl+directx+wrapper&sourceid=opera&ie=utf-8&oe=utf-8)

Frederick
11-13-2006, 04:40 PM
Oh no ! I have look at all that already. They are either GLDirect, which looks good, but has per user license, and got some bad reviews.
The other ones do it the wrong direction ! DirectX -> OpenGl direction is more common, they want to port DirectX applications to Linux, which is great, but I want to do Opengl-> DirectX.

Anyone else ?

esmelon
11-14-2006, 01:17 AM
Maybe this is decision for you?
http://www.mesa3d.org/

Bad Sector
11-14-2006, 04:35 AM
I second the Mesa option: it is stable like a pyramid and has a Direct3D driver - and even if no Direct3D is available, it falls back to software rendering (which unlike MS OpenGL, has support for OpenGL 1.5).

Note that it is based on Direct3D 6, so if you ask for something that Direct3D doesn't support, it'll use software rendering.

Frederick
11-14-2006, 08:08 AM
Thank you, I didn´t know that Mesa has real hardware drivers. This looks nice but really dated. The Mesa DirectX Driver was written back in February 1999 :(


Note that it is based on Direct3D 6, so if you ask for something that Direct3D doesn't support, it'll use software rendering.]

Did you try it ? - I found a recent comment on the SDL mailing list:

>>>This has been talked about, off and on, for a long time. It
>>>doesn't exist because nobody seems to want it badly enough to
>>>write it.
>>>
>>Isn't that Mesa?
>>
>Theoretically, yes, and there is indeed a Direct3D driver. Don't know
>how mature it is, and I haven't tried it.
>
The Mesa DirectX driver doesn't work any more because of internal API
changes. Resurecting it should not be too hard, and could make an
interesting project.
Also, Scitech's GLDirect is based on this driver.


Looks bad :( - But maybe you have other experiences ?

Bad Sector
11-14-2006, 08:18 AM
No, i have no experience on using D3D with Mesa, but incidentally yesterday i was discussing with a fellow coder and he told me about Mesa providing a Direct3D driver when i said something like "well, even if Microsoft decides to totally drop OpenGL, someone will make an OpenGL to Direct3D wrapper".

Personally i never used that driver, but i've used Mesa recently since my gfx card has been damaged and the accelerator doesn't work (I/O errors and the such on Linux), so i'm stuck with vesa modes...

What i said comes from my visit to Mesa's site just for providing you some info :-). However the site says that Mesa still supports Direct3D (it's on the feature list).

Frederick
11-15-2006, 07:13 AM
What i said comes from my visit to Mesa's site just for providing you some info :-).

:) Thanks !

Seems there is no really good solution at the moment.. but I will give Mesa a try - I haven´t got a decent gfx card either at the moment.

so good luck for all of you :D
Frederick

P.S: Hey Java is GPL now - everything will gonna be good ;)

DavidL
11-22-2006, 02:39 PM
In addition to GLDirect, I know that GarageGame's Torque engine uses an OpenGL to Direct3D 7 wrapper of some sort. I am not sure how advanced it is though, nor am I sure if their more advanced Torque Shader Engine (a rewrite of the gfx engine for modern video cards) uses a similar model.

Perhaps you could use that, although you'd likely have to purchase Torque licenses to do so, at which point, it might make more sense to use their engine.