Graphics chip maker ATI Technologies has released HLSL2GLSL, an open source application designed to help programmers convert graphics code optimized for Windows’ DirectX 9 Application Programming Interface to OpenGL, which is used on the Mac. Binaries for Mac OS X and Windows are available for download.
Would be nice if it actually worked well, but the possible performance loss from moving from optimized DX9 code to unoptimized machine generated opengl code would mean even more people would think opengl sucks
Would be cool to play Half Life 2 opengl though, hehe.
Browser: Links (0.99; Linux 2.6.13 i686; 95×35)
Half-Life 2 already runs on OpenGL:
http://transgaming.org/gamesdb/games/view.mhtml?game_id=3189
…and this is not native supported OpenGL, but actually a runtime emulation of Direct3D using OpenGL! So you see, this already has been done before.
What ATI provides is only about the used hardware shaders. And wether you use HLSL or GLSL you have high similarities in your code. There are some basic functions and most times there are not that many possibilites how they could be designed, so they are basically the same. So the “optimized” code should stay optimized within the conversion.
This strikes me as particularly hilarious since ATI does not yet have an OpenGL driver available for Windows Vista — the past three releases (albeit it /was/ only a Beta OS) have lacked OGL, sadly.
However, if this gets more games on to Linux or Mac, hey, more power to ’em. But I’ll agree with situation: Unoptimized code that’s been converted is bound to not run particularly well at all.
This is similar to SciTech’s GLDirect. GLDirect lets users run OpenGL applications on video cards that have poor on non-existant OpenGL support by providing an emulation or translation layer. The OpenGL calls get converted to DirectX calls on-the-fly.
//The OpenGL calls get converted to DirectX calls on-the-fly.//
This code is apparently the other way around, “DirectX 9 Application Programming Interface to OpenGL”.
Hmmmm, it is “an open source application”.
Hello Wine, goodbye Cedega, is about the only comment that comes to mind.
Wine already itself has support for Direct 3D and you can also run HL2 on it (but not as fine as with Cedega).
I would love to see Wine and ReactOS do something similar in order to get better directx support.
I am also happy that ATI are slowly warming up on open sourcing code maybe due to AMD been in charge.
ummmm they already are.
HLSL2GLSL is a developer tool, and is not similar to GLDirect or Cedega in any way, as it does no runtime conversion. It is merely for converting existing shaders, so it means nothing to an end user.
I’d also bank on there being very little, if any performance difference from conversion, since highly vectorized GPU routines are limited in scope compared to code from less specialized API’s.
Edited 2006-11-11 00:21
ati opengl driver is very bad…..
Haha!
Now we all know how they wrote their Linux driver! They took the freaking HLSL2GLSL, used it on their directX driver and shazam: you have the X.org driver, that why it sucked so much!
Naa I am joking of course… am I?
“ati opengl driver is very bad…..”
On Windows? Who cares? The (main) point of this tool is using it to port games to Mac, and ATI’s Mac OpenGL driver is in good shape.
on win, linux, mac
Wow… If this is true and it’s actually WORKING, think of the possibilities! How about porting DirectX optimized games to OpenGL platforms? How about DOOM III running on an old DOS box through MESA or on Linux? Oh well, one can dream, right? :o)
Doom3 already has a native port for linux using OpenGL.
Actually Doom 3 used OpenGL for the rendering engine on Windows as well…. the only difference was that Linux used SDL for input and sound (i think) whereas Doom3 on windows used DirectInput and DirectAudio….. The render was still OpenGL….
Just thought I would correct you on that.
…OpenGL, which is used on the Mac…
Not to mention the PlayStation 2 and 3, as well as the Nintendo Gamecube, DS and Wii, and Java for mobile devices, which combined represent like 90% of all game sales.
Edited 2006-11-11 01:45
HLSL2GLSL does not convert DirectX to OpenGL. It converts GPU programs (e.g. pixel and vertex shaders) from HLSL (high-level shader language) to GLSL (GL shader language).
You’ll still have to write an entire rendering framework and 3D engine in OpenGL. If that engine is written to use pixel and vertex shaders then you can save some time from taking some HLSL shaders and converting them.
HLSL, GLSL, and CG (nVidia’s shader language) are so extremely similar to one another that converting between them is trivial, even if you do it by hand. HLSL2GLSL is nothing extraordinary and it’s no panacea for porting DirectX games to OpenGL.
HLSL2GLSL does not convert DirectX to OpenGL
Yep. This has got to be one of the most misleading titles I’ve ever seen.
I wonder where this could fit in with Wine and its DirectX -> OpenGL Translation layer – its not just MacOS X that’ll benefit but all *NIX’s that need applications, and lazy applications seem to be ignorant to the rest of the universe.
This won’t benefit wine in any way. HLSL2GLSL is a compile-time app, it doesn’t run in real-time. Besides, wine already has support for shaders.
if i could only get:
> Medieval 2: Total War
> Warhammer: Mark of Chaos
> Armed Assault
> Gothic 3
> Oblivion
to run natively on linux,
then i could completely abandon windows
It ONLY converts shader programs – it’s not an API wrapper …. so it’s useless for gamers anyway.
yes! how lovely it is to compromise your freedom for a few distractions..
if only i could get china-like propaganda in a FREE country, then i might move. but oh well.. i dont mind tyranny
“to OpenGL, which is used on the Mac”
Well, I think a little also between that is and used wouldn’t have hurt. Or would it.
… which was emulating DirectX 8 gfx API calls thru OpenGL.
http://www.realtech-vr.com/directx/index.html
Yes, and it’s been opened some years ago:
http://sourceforge.net/projects/dxglwrap