VOGONS

Common searches


directx / opengl / whatever wrappers and 3d vision

Topic actions

First post, by Sol_HSA

User metadata
Rank Member
Rank
Member

So I went and bought nvidia 3dvision setup and I feel totally ripped off due to the functionality they've omitted.

Basically, old directx applications as well as all opengl applications won't work with it, for no apparent reason (apart from possible support hassle, but it's not as if they're offering too much support in any case).

Old 3d vision stuff (back when we had CRT displays with VGA cables and ELSA wired shitter glasses) worked with OpenGL without problems, as well as directx. New stuff only seems to support directx9. The official word is, there's not enough opengl games being done, which is a rather silly excuse.

So anyway, I found GLDirect: http://sourceforge.net/projects/gldirect/ which wraps OpenGL calls (opengl32.dll) to DirecX9. Dropping this to a folder with an OpenGL 1.x demo of mine let me watch it with the shutter glasses, and it was downright beautiful (apart from a few z-order issues, but that's minor).

Now then, I have Crimson Skies, a game I played a bit with the wired glasses back in the day, and loved it. It's a directx7 game. And naturally it doesn't work with 3d vision.

So. Does anyone know if there's a directx7 -> directx9 wrapper project, or a directx7 -> opengl 1.x wrapper, as a game that old won't be harmed too much by going through a couple of wrappers..

Now, I've done a couple wrapper projects before (VESA and DirectDraw), but I don't think I'd want to start another one, especially since DirectX7->DirectX9 is a way more complex thing than the DirectDraw->OpenGL one was.. in fact, DX7 would include ddraw too.

Last edited by Sol_HSA on 2013-05-01, 04:44. Edited 1 time in total.

http://iki.fi/sol - my schtuphh

Reply 2 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
leileilol wrote:

Older versions of GLDirect 😀
However time is making them becoming more elusive to find (Along with their freeware registration codes)

When I was googling around, the older GLDirects seem to be "up to" dx6 😒

http://iki.fi/sol - my schtuphh

Reply 3 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Keep an eye on DXGL:

DXGL is a project to create a DirectDraw/Direct3D version 1 to 7 implementation that runs on OpenGL 2.x. It is intended to alleviate some of the graphics glitches inherent with using legacy DirectX interfaces on modern video cards. The API will be 100% binary compatible with the system ddraw.dll file. DXGL is currently in an alpha stage, but several applications and games already work.

http://www.williamfeely.info/wiki/DXGL
We've a thread about it here:
DXGL (DDraw\D3D wrapper to OGL)

WineD3D on Windows also:
http://wiki.winehq.org/WineD3DOnWindows
although it's currently D3D8 and 9-only, with some fairly unstable D3D7 support.

There's also this ancient wrapper for D3D8.1->OpenGL
http://realtech-vr.com/directx/

None of this seems especially helpful for you, since you need to wrap it back to D3D9.

As far as D3D7 and below-wrapping goes, DXGL seems farthest along.

Last edited by Stiletto on 2013-04-30, 03:37. Edited 1 time in total.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 5 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

BTW, lots of interesting info:
http://ctrlaltstudio.com/blog/2013/03/31/revi … stereoscopic-3d
http://www.mtbs3d.com/phpbb/viewtopic.php?f=105&t=16310
http://www.mtbs3d.com/phpbb/viewtopic.php?f=105&t=16849
http://www.badlogicgames.com/wordpress/?p=1326
http://3dvision-blog.com/tag/quad-buffer-opengl-stereo/
https://sites.google.com/site/snippetsanddrib … OpenglDxInterop
http://users.csc.calpoly.edu/~zwood/teaching/ … inal11/rsomers/
https://forums.virtualbox.org/viewtopic.php?f=6&t=25939
https://gl2dx.codeplex.com/
http://timeslip.users.sourceforge.net/b_10.html

Let us know if you work out a solution.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 6 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Thanks, Stiletto, I bow to your google-fu.

So yeah, the latest (or about a month old now) nvidia drivers do support quad-buffered opengl apps with 3d vision, but no "auto 3d vision" like with direct3d. Why this is a mystery to me; it used to work in 2008, apparently.

So, only way to get opengl apps in stereo-3d with nvidia drivers at the moment is to write one on purpose to use quad framebuffers.. so old games without binaries are out. Unless, of course, one would write an opengl-to-opengl wrapper which does frame capture on the framebuffer calls and then does some matrix hackery and renders the frame twice, or something. I'd bet before I got the above working, folk at nvidia will change one compile option and we'd get auto-3d on opengl apps again..

Some people have managed to use the wine-on-windows-ddraw-to-opengl hack to get some games working (rename wine's ddraw.dll to fdraw.dll, hex edit game to use fdraw.dll instead of ddraw.dll; this is because opengl32.dll uses ddraw.dll, which would lead to an infinite loop..). -> pre-dx8 stuff piped to OpenGL.

Unfortunately, crimson skies apparently uses some ddraw/d3d functionality that wine folk haven't touched, and the game crashes at null pointer exception (or, without debugger, dies silently). Which means I'd need to debug the wine ddraw.. which is still way better than starting from scratch.

dxgl (http://www.williamfeely.info/wiki/DXGL) won't help because it outputs to OpenGL 2.x, which, before nvidia supports auto-3d on opengl apps, won't be pipeable to gldirect..

Haven't been able to dig up gldirect4 or even information about it yet.

http://iki.fi/sol - my schtuphh

Reply 7 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Sol_HSA wrote:

Thanks, Stiletto, I bow to your google-fu.

No problem. Always happy to help. 😁

Sol_HSA wrote:

So yeah, the latest (or about a month old now) nvidia drivers do support quad-buffered opengl apps with 3d vision, but no "auto 3d vision" like with direct3d. Why this is a mystery to me; it used to work in 2008, apparently.

And apparently the pro Quadro cards with 3D Vision support (a few thousand USD) have supported OpenGL all along. Do they "auto 3D vision" too? That might be a permanent solution, if however extremely costly.

Sol_HSA wrote:

Some people have managed to use the wine-on-windows-ddraw-to-opengl hack to get some games working (rename wine's ddraw.dll to fdraw.dll, hex edit game to use fdraw.dll instead of ddraw.dll; this is because opengl32.dll uses ddraw.dll, which would lead to an infinite loop..). -> pre-dx8 stuff piped to OpenGL.

Unfortunately, crimson skies apparently uses some ddraw/d3d functionality that wine folk haven't touched, and the game crashes at null pointer exception (or, without debugger, dies silently). Which means I'd need to debug the wine ddraw.. which is still way better than starting from scratch.

dxgl (http://www.williamfeely.info/wiki/DXGL) won't help because it outputs to OpenGL 2.x, which, before nvidia supports auto-3d on opengl apps, won't be pipeable to gldirect..

Yeah, like I said - gave you all that info but I found it all fruitless.

But since dxgl is an active project, maybe you can ask if there's a way it could be re-targeted to OpenGL 1.x.

Alternatively, depending on how different OpenGL 2.x is to OpenGL ES 2.x, you may be able to use that "Angle" wrapper mentioned in the above links, with dxgl.

Hacking on dxgl, hacking on WineD3D, either way it's heavy lifting. But the community overall, not just 3DVision users, will profit if it gets closer to a DirectX7.0-and-lower generic wrapper.

Sol_HSA wrote:

Haven't been able to dig up gldirect4 or even information about it yet.

http://web.archive.org/web/20080131162727/htt … irect-4.0.1.exe

21 day demo... with SciTech out of business, you'll need a crack or find a full version.

Info: http://web.archive.org/web/20031004024807/htt … nt/gld_home.php

I don't understand why you wouldn't just use the free final 5.02 though
http://web.archive.org/web/20080131162727/htt … -5.0.2-full.exe
http://web.archive.org/web/20080131162727/htt … direct-code.txt

or the Sourceforge version.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 8 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
Stiletto wrote:

And apparently the pro Quadro cards with 3D Vision support (a few thousand USD) have supported OpenGL all along. Do they "auto 3D vision" too? That might be a permanent solution, if however extremely costly.

Nope. I have found that the mobile version does include "auto 3d vision"; I really do believe the desktop version is just a compile option away =)

Stiletto wrote:

But since dxgl is an active project, maybe you can ask if there's a way it could be re-targeted to OpenGL 1.x.

I seriously doubt it, and if done, it would be at cost of functionality (as some stuff either has to be done in software, or in shaders).

Stiletto wrote:

Alternatively, depending on how different OpenGL 2.x is to OpenGL ES 2.x, you may be able to use that "Angle" wrapper mentioned in the above links, with dxgl.

GL2 and ES2 differ mostly in that with GL2 the fixed pipe is still available, alongside shaders, while ES2 is a "cleaner" API. I've written GL2 stuff that compiles to ES2 as is.. (and vice versa). So, depends. =)

Stiletto wrote:

Hacking on dxgl, hacking on WineD3D, either way it's heavy lifting. But the community overall, not just 3DVision users, will profit if it gets closer to a DirectX7.0-and-lower generic wrapper.

I feel that in the long run, work on wine would be more beneficial.. although I have no idea what level of opengl it outputs =)

Anyway, dxgl is at least worth looking into. At least it seems to be actively developed at the moment, unlike wine's dx1-7 support.. and having an integrated quad buffer support in either would be useful (at least until nvidia decides to flip that compile option..)

Stiletto wrote:

I don't understand why you wouldn't just use the free final 5.02 though

or the Sourceforge version.

I do use the sourceforge version =). Someone claimed somewhere that an earlier version of gldirect would also convert old versions of directx; hence the interest. I haven't found any information that supports this claim however, but it kinda makes sense, with their background with displaydoctor etc..

I did send mail to the author of gldirect (not the company, the person), he hasn't answered yet. He has posted a couple times on the nvidia 3dvision forum as well, so he knows (and was surprised) that his work is used to enable old games to use 3dvision.

http://iki.fi/sol - my schtuphh

Reply 9 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Sol_HSA wrote:

I do use the sourceforge version =). Someone claimed somewhere that an earlier version of gldirect would also convert old versions of directx; hence the interest.

I think that was a misunderstanding by leileilol, I'm pretty sure GLDirect never translated an older Direct3D to a newer Direct3D - just OpenGL to Direct3D, hence the name.

I think he thought you were wanting to translate OpenGL to an earlier version of Direct3D, which is why he suggested that.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 10 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

I got a reply from SiO2, and he pointed me at the ddfix for thief2.. if it does the dx7->dx9 translation, it's all I really need. I'll look into it.. =)

http://iki.fi/sol - my schtuphh

Reply 12 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

Hah, found yet another project that attempts this - DXTweaker or directx tweaker, last updated around 2005; describes dx7 support as "in an early state".

http://iki.fi/sol - my schtuphh

Reply 13 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member

..apparently an older version of the ddfix DOES convert dx7 calls to dx9 calls; it doesn't work as is with crimson skies, but at least it's a solid starting point.

http://iki.fi/sol - my schtuphh

Reply 14 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++

Back on the OpenGL-to-Direct3D wrapper topic, alternatives to GLDirect:

Qindie GL (OpenGL 1.x-Direct3D 9):
http://code.google.com/p/qindie-gl/

TitaniumGL (OpenGL 1.4-Direct3D 9?, closed source):
http://titaniumgl.tk/
http://devmaster.net/forums/topic/13035-titan … re-soft-render/

GL2DX (OpenGL to DirectX Wrapper Library - would require sourcecode to recompile I believe)
https://gl2dx.codeplex.com/

ANGLE (WebGL/OpenGL ES 2.0-to-Direct3D 9.0) as mentioned above
http://code.google.com/p/angleproject/

The positively ancient Mesa 3.0 Direct3D driver (wraps to Direct3D 6, later versions 7 - this inspired the work on GLDirect)
http://homepage.ntlworld.com/neal.tringham/Op … d.html#altoglv2
http://web.archive.org/web/20021210092355/htt … esadriver.htm&2
http://web.archive.org/web/20050207225342/htt … gl-directx.html

A current sourcetree of Mesa includes GLDirect, or so I'm told. I wonder if TitaniumGL and QindieGL are simply forks of Mesa/GLDirect.

There's also the antique GLQuake-Direct3D wrappers, which could maybe be externalized:
http://mhquake.blogspot.com/2009/12/direct3d- … ke-engines.html
http://forums.inside3d.com/viewtopic.php?f=3& … =3415&view=next

--------------------

Also, I mentioned this already, this is the sourcecode for the Direct3D 8.1-to-OpenGL wrapper
http://sourceforge.net/projects/dxglwrap/

Also here's a weird beastie: Direct3D 8.0-to-Direct3D 9.0 wrapper
http://enbdev.com/download_convertor_dx8todx9.htm
he mentions plans for also wrapping OpenGL-to-Direct3D 9.0 and Direct3D 5.0/6.0/7.0-to-Direct3D 9.0 but his purposes are for adding shader effects, not for compatibility purposes.

--------------------

ApiTrace might be an interesting wrapper development tool - supports OpenGL 2.x-3.x-4.x and Direct3D 8.0-9.0-10.0
http://www.geeks3d.com/20110428/download-apit … r-and-analyzer/
https://github.com/apitrace
Not useful in this case though

--------------------

Got a feeling that the people who conquer this (Direct5.0-6.0-7.0-to-OpenGL-1.X, Direct5.0-6.0-7.0-to-OpenGL-2.X, Direct5.0-6.0-7.0-to-Direct3D-9.0+) will have websites like gog.com beating down their door.

That's why this has been suggested to nGlide authors multiple times
http://www.zeus-software.com/forum/viewtopic.php?f=9&t=446
http://www.zeus-software.com/forum/viewtopic.php?f=11&t=80
http://www.zeus-software.com/forum/viewtopic.php?f=9&t=35
given their Windows game compatibility hacking abilities, their target of Direct3D and their partnership with gog.com. Sadly they are not currently interested.

Last edited by Stiletto on 2013-05-01, 19:59. Edited 1 time in total.

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 16 of 63, by Stiletto

User metadata
Rank l33t++
Rank
l33t++
Sol_HSA wrote:

Hey, even I have been contacted by gog due to ddhack =)

Yes, and thanks for ddhack (and solVBE)!

That's why I have faith that if I instigate enough, you or nGlide authors will kick off a Direct3D version of DXGL/WineD3D 😁

(updated last post)

"I see a little silhouette-o of a man, Scaramouche, Scaramouche, will you
do the Fandango!" - Queen

Stiletto

Reply 18 of 63, by Sol_HSA

User metadata
Rank Member
Rank
Member
Stiletto wrote:

That's why I have faith that if I instigate enough, you or nGlide authors will kick off a Direct3D version of DXGL/WineD3D 😁

I'm kinda tempted. DXGL apparently already handles creating of all the dx objects, so that part of the work is done there..

There's other problems than just patching directx calls from one api version to another, though, including the fact that old games do all sorts of strange things like mess with gdi =) Naturally there's also stuff like video replay which may be dependent on a specific directx version..

..but at the least I might get the ball rolling. Who knows.

http://iki.fi/sol - my schtuphh