Linked by Eugenia Loli on Fri 10th Nov 2006 22:54 UTC
3D News, GL, DirectX 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.
Order by: Score:
Too good to be true?
by situation on Fri 10th Nov 2006 22:56 UTC
Member since:

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; 95x35)

Reply Score: 4

RE: Too good to be true?
by Ford Prefect on Fri 10th Nov 2006 23:18 UTC in reply to "Too good to be true?"
Ford Prefect Member since:

Half-Life 2 already runs on OpenGL:

...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.

Reply Score: 5

by jrronimo on Fri 10th Nov 2006 23:13 UTC
Member since:

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.

Reply Score: 5

Similar to SciTech GLDirect
by ferrels on Fri 10th Nov 2006 23:20 UTC
Member since:

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.

Reply Score: 1

RE: Similar to SciTech GLDirect
by hal2k1 on Fri 10th Nov 2006 23:25 UTC in reply to "Similar to SciTech GLDirect"
hal2k1 Member since:

//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.

Reply Score: 4

Ford Prefect Member since:

Wine already itself has support for Direct 3D and you can also run HL2 on it (but not as fine as with Cedega).

Reply Score: 1

DirectX 2 opengl
by mindpixel on Fri 10th Nov 2006 23:48 UTC
Member since:

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.

Reply Score: 3

RE: DirectX 2 opengl
by Milo_Hoffman on Sat 11th Nov 2006 00:12 UTC in reply to "DirectX 2 opengl"
Milo_Hoffman Member since:

ummmm they already are.

Reply Score: 3

Not for end users
by schmedly on Sat 11th Nov 2006 00:21 UTC
Member since:

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

Reply Score: 5

very bad
by collinm on Sat 11th Nov 2006 01:08 UTC
Member since:

ati opengl driver is very bad.....

Reply Score: 3

RE: very bad
by bouh on Sat 11th Nov 2006 01:34 UTC in reply to "very bad"
bouh Member since:


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 driver, that why it sucked so much!

Naa I am joking of course... am I?

Reply Score: 5

RE: very bad
by PowerMacX on Sat 11th Nov 2006 20:50 UTC in reply to "very bad"
PowerMacX Member since:

"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.

Reply Score: 1

RE[2]: very bad
by collinm on Sun 12th Nov 2006 22:30 UTC in reply to "RE: very bad"
collinm Member since:

on win, linux, mac

Reply Score: 1

by Fennec_Fox on Sat 11th Nov 2006 01:10 UTC
Member since:

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)

Reply Score: 1

RE: Possibilities...
by flasher on Sat 11th Nov 2006 01:57 UTC in reply to "Possibilities..."
flasher Member since:

Doom3 already has a native port for linux using OpenGL.

Reply Score: 3

RE[2]: Possibilities...
by timbobsteve on Sat 11th Nov 2006 04:02 UTC in reply to "RE: Possibilities..."
timbobsteve Member since:

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.

Reply Score: 3

OpenGL is way bigger
by rover on Sat 11th Nov 2006 01:41 UTC
Member since:

...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

Reply Score: 5

This is being very misrepresented
by Odwalla on Sat 11th Nov 2006 01:56 UTC
Member since:

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.

Reply Score: 5

smitty Member since:

HLSL2GLSL does not convert DirectX to OpenGL

Yep. This has got to be one of the most misleading titles I've ever seen.

Reply Score: 5

Sounds nice...
by kaiwai on Sat 11th Nov 2006 06:14 UTC
Member since:

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.

Reply Score: 1

RE: Sounds nice...
by WereCatf on Sat 11th Nov 2006 08:47 UTC in reply to "Sounds nice..."
WereCatf Member since:

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.

Reply Score: 2

nice move
by REMF on Sat 11th Nov 2006 10:56 UTC
Member since:

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

Reply Score: 1

RE: nice move
by agentj on Sat 11th Nov 2006 11:22 UTC in reply to "nice move"
agentj Member since:

It ONLY converts shader programs - it's not an API wrapper .... so it's useless for gamers anyway.

Reply Score: 3

v RE: nice move
by Redeeman on Sat 11th Nov 2006 11:29 UTC in reply to "nice move"
"to OpenGL, which is used on the Mac"
by l3v1 on Sat 11th Nov 2006 13:12 UTC
Member since:

"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.

Reply Score: 1

There was also RealTech-VR wrapper...
by ahwayakchih on Sat 11th Nov 2006 13:28 UTC
Member since:

... which was emulating DirectX 8 gfx API calls thru OpenGL.

Reply Score: 1

mmu_man Member since:

Yes, and it's been opened some years ago:

Reply Score: 2