[Mono-osx] Tao.Sdl on OSX

alwin alwin at spiet.ath.cx
Wed Jun 8 20:13:06 EDT 2005


On May 25, 2005, at 4:18 AM, Ok Lab wrote:

>
> Hmmm... shouldn't this sort of thing be handled in the Tao.Sdl  
> library?
> or is it a typical thing to have to write lots of if/then dependencies
> per platform in mono?
>
>

i thought this question came up before, if there is somewhere i can  
put a little example
we never get this question again (it's not a dumb question, tao is a  
pain in the ass to get
up and running)

and yes, tao should do this stuff for you

alwin

some relevant code :

#if MACOSX
using Apple.Foundation;
using System.Runtime.InteropServices;
#endif

using System;
using System.Collections;
using Tao.OpenGl;
using Tao.Sdl;

public class Video {
#if MACOSX
         [DllImport("/System/Library/Frameworks/Cocoa.framework/ 
Cocoa", EntryPoint="NSApplicationLoad")]
         public static extern void NSApplicationLoad();
         static NSAutoreleasePool pool;
#endif

   public Video() {
#if MACOSX
                 pool = new NSAutoreleasePool();
                 pool.init();

                 NSApplicationLoad();
#endif

              // do sdl/opengl stuff after this point as usual
         }
}


More information about the Mono-osx mailing list