At 05:22 pm 31/05/99 +0200, you wrote:
>>We can use DirectDraw for speed if necessary.
>> (...)
>>The Microsoft Foundation Classes (heavily built-in Visual C++) provide
>>wrapper classes for all win32 functions.
>
>Dylan,
>
> both DirectDraw and the MFC are Windows-centric. They are not available
>for Unix or Macintosh, that's why we need to write our own wrappers around
>them. I'm currently investigating wxWindows (www.wxwindows.org) which is an
>OpenSource solution that is supposed to do exactly this for window
>management, drawing and file access. I think it even wraps networking.
>
>>Basically what your saying is that we create
>>a back-end of functions (one set identically named for each platform) and
>>the main code calls these.
>
> Yes. If I can get wxWindows to compile on my Mac, we can use that. Sadly,
>there's a resource file missing from their distribution and I just
>requested that from the author of the Mac port.


Uli, 

That is totally _not_ what I meant.  I write _my_ wrappers around MFC and
DirectDraw, so the function names are exactly the same as the function
names made for the Mac version and the Unix version. 

eg The main code needs a function called roundRect ...

I would write a roundRect funcion which calls CDC::RoundRect with the right
parameters.

Someone else would write a roundRect function on the Mac.

We would all use the same main program.

Each platform needs a layer of abstraction between the main code and the
API set/OS we are using.  Kinda like a VM.

Dylan

Reply via email to