Archived

This topic is now archived and is closed to further replies.

CoolAcid

Cross Platform Dev

Recommended Posts

I have a few questions. 1: Is there a DirectX Wrapper available for Linux/UNIX? Meaning I could write DirectX stuff in windows, and easily port it for UNIX? 2: what is the best (In your opinion) cross platform API? I want to be able to build software that ports easily to Linux/Win32. Thanks, Jason

Share this post


Link to post
Share on other sites
quote:
Original post by CoolAcid
1: Is there a DirectX Wrapper available for Linux/UNIX? Meaning I could write DirectX stuff in windows, and easily port it for UNIX?

Short answer: No.
quote:
Original post by CoolAcid
2: what is the best (In your opinion) cross platform API? I want to be able to build software that ports easily to Linux/Win32.

Use SDL with OpenGL (and possibly OpenAL also, although SDL can do sound). It''s what I''m doing, and it works without changing any of my code.


[Resist Windows XP''s Invasive Production Activation Technology!]

Share this post


Link to post
Share on other sites
I''m using ClanLib. It''s similar in most ways to SDL but its a bit more "high level" API. That means it has more functionality that may or may not be useful for you. An important difference for you might be that ClanLib is straightly OOP while SDL uses procedural programming.
I haven''t seen much of SDL but I got the impression its easier to use at first. But ClanLib has more functionality imho and once you understood it it makes perfectly sense and provides you with all . I especially like the slot system (you can connect your class member functions with any events like keypresses etc).

The best two things that are (afaik) unique for ClanLib are resource definition files and a decent gui.
The resource thing means that you make a file that lists all of the games resources and gives them a unique name. Then the program can load its resources (mostly files but also strings and constants) using only the name of the resource without needing to know where the data is. That means you can place your files in a data dir and then compile the whole thing into one large data file without changing a single line of code.
The gui is a graphical user interface featuring many controls you know from your favourite OS. It uses the slot system so any of your classes can handle events. You can define your gui from a gui definition file create it on the fly. The look can easily be changed and you can use custom graphics for your controls and also you can add your own controls. Its still not completly done but can already used perfectly.

One main drawback of ClanLib is that it only has ports to Windows, Linux and BeOS, yet and that its limited to C++.

I recommend trying both and then deciding which one you prefer.

hth

Jan Rehders
http://www.turtlegame.f2s.com - my 2D Platformer
Editors available now !

Share this post


Link to post
Share on other sites