Cross Platform Programming

In de Voodoo Extreme GrandMaster B van vandaag een vraag over cross platform programming (een actuele kwestie nu id Quake Arena gaat uitbrengen de Mac).

Een stukkie (de rest staat hier):

Cross platform programming is easy to do once you get the hang of it.  It requires a certain degree of planning and strong design, and a lot of experience dealing with typical cross platform snafus.  Understanding where the various layers of abstraction need to be placed is very important.

There are various levels of portability.  Probably the easiest is going from one CPU to another on the same OS, e.g. WinNT for Intel and WinNT for Alpha.  In this type of situation you don't have to worry about endianess, operating system, file storage, and other issues, you basically have to watch for code generation bugs and make sure you didn't do anything stupid like assume that random memory cast to a float would still work.   In this case very little abstraction is necessary, if any.

Another type of portability is going from one compiler to another on the same platform -- this is actually very complicated once you start using compiler specific features like pragmas, inline assembler, and reserved keywords.  Sometimes an abstraction is necessary, but often you can get away with portability just by well placed #ifdefs.

Door Femme Taken

UX Designer

06-01-1999 • 15:37

0

Bron: Voodooextreme

Lees meer

Reacties

0
0
0
0
0
0
Wijzig sortering

Er zijn nog geen reacties geplaatst

Op dit item kan niet meer gereageerd worden.