What kind of API is used ?

You are viewing a static copy of the old 2DBoy forum, which closed in 2010. It is preserved here for historical interest, but it is not possible to reply to topics. For more recent discussion about World of Goo, visit our new forum.
What kind of API is used ?MarijnStevens12/03/2008 - 07:02

The game is so smooth. I wonder what kind of graphics API is used.

For windows that can be Direct3D ( I saw that somebody's game didnt run without it ), but what API is used for Wii and the upcoming Linux version ?

Re: What kind of API is used ?spliter12/03/2008 - 07:18

I would say it uses SDL and OpenGL (Definitely not Direct3D since it was made to be portable for other platforms)

Re: What kind of API is used ?The Happy Friar12/03/2008 - 09:52

I thought it was said it was D3D for Windows.  The game doesn't look like it uses any fancy shader's & what not so i'm sure it's easily portable between OGL & D3D.

Re: What kind of API is used ?Soultaker12/03/2008 - 10:59

The game definitely uses SDL, which to me would suggest they probably use OpenGL for display rendering. (OpenGL works well with SDL; on the other hand, if you use DirectX for rendering, there is little need to use SDL at all.)

Re: What kind of API is used ?Mashandar12/04/2008 - 21:48

SDL+OpenGL seems very likely.

I don't see why they would need to use directx/direct3d when opengl still
works on windows and if they did it purely with opengl very little code
would need to be rewritten.

of course, I could be wrong, it did take them a fair while to
come out with the mac port.

Re: What kind of API is used ?kyle12/04/2008 - 21:57

Windows uses directx. Mac/Linux use opengl. Wii uses magic.

SDL was used only for unglamorous cross platform threading.

Re: What kind of API is used ?The Happy Friar12/04/2008 - 23:39

any reason you used dx vs ogl for windows?

Re: What kind of API is used ?Blµb12/05/2008 - 14:00

I can imagine GL support on VISTA being rather... bad...
I'd say, given the many strange windoze versions in existance now, using DX is just more reliable?
(If I cared about windows I'd use it too I guess... not sure... maybe not... windows even has gl3 support... but the credits for it go to nvidia, not M$...)

[conspiracy theory mode]
Maybe they used it to make sure the linux/mac ports take longer?
[/conspiracy theory mode]

hrhr :D

Re: What kind of API is used ?The Happy Friar12/05/2008 - 21:41

[quote author=Blµb link=topic=945.msg6847#msg6847 date=1228503658]
I can imagine GL support on VISTA being rather... bad...

OGL games work fine on my wife's vista laptop.

Re: What kind of API is used ?DtD12/05/2008 - 21:58

OGL VS DX depends alot of the graphics card too.

For instance:
On my laptop, which has a Intel 965 Express Chipset Family (AKA The crappy cheapest one Lenovo offered) seems to work best with OpenGL when it comes to DtDTD2 (a game I'm working on)
In contrast, on my desktop, which has a super-nice (well it was more-so when I bought it long long ago) ATI Radeon X1600, OpenGL runs TERRIBLY, so I use DirectX instead.


Re: What kind of API is used ?draeath12/06/2008 - 00:16

You realize that under the cover, it all ends up openGL anyways? The cards don't talk DirectX, they talk GL and GLSL. DirectX is just a wrapper with all sorts of other neat tools with it (input, netplay, etc).

That vanilla OpenGL runs poorly on your given video card and operating system, lends itself to problems with the driver (which translates those calls) or operating system vendor (hmm, why on earth would they want to lock you into DirectX?

My evidence? Running games in Wine, which takes DirectX and translates it to OpenGL itself... works better in some cases, and not much worse in others. Don't forget all the other overhead that's going on here. Also, that's not to speak of native OpenGL ports... those tend to run worlds faster.

Just some food for thought.

Re: What kind of API is used ?Mashandar12/06/2008 - 04:38

OpenGL is no longer the faster of the API's, it used to be, but since then
graphics cards have changed and directx has been able to keep up,
while opengl has slagged behind. hopefully this will be fixed with opengl 3.1 *prays*

cards do not talk GL, GLSL or DirectX, cards have their own interfaces, the driver
converts the opengl or directx calls to the driver interface, directx is as much
of a wrapper as opengl is.

it is true that opengl runs poorly due to drivers (not a very good implementation in
the driver), the reason why running games in wine would give good performance is simply
because of the fact that the linux driver you are using has a good opengl implementation.

Re: What kind of API is used ?The Happy Friar12/06/2008 - 21:29

OGL runs faster then DX on a mac.  :D

They're both pretty much equal now.  Many dev's say DX is now the easier of the two to use but I'd say that's because MS put hundreds of thousands in to DX development vs OGL's lack of a single decision maker.

Re: What kind of API is used ?Boudin12/06/2008 - 22:01

The big problem with openGL is that some of the companies that takes part of the corsortium are keeping it from evolving to keep a complete compatibility with old OpenGL 1.2 apps. It's not really a question of witch is faster or not but rather wich allow hi-end 3D functionalities and wich is more adapted to current used programing languages.