Esempio n. 1
0
        public void InitNew(int width, int height, ImageDataFORMAT format)
        {
            int[] arg = { width, height, (int)format };
            fixed(int *ptr = arg)
            {
                IntPtr retval = IntPtr.Zero;

                GameEngine.InvokeMemberFn(m_instanceId, "CreateNew", (IntPtr)ptr, out retval);
            }

            RefreshCachedProperties();
        }
Esempio n. 2
0
        public void Save(Uri ur)
        {
            if (!ur.IsAbsoluteUri)
            {
                throw new ArgumentException("uri must be absolute");
            }
            string localPath = ur.LocalPath;

            fixed(char *ptr = localPath)
            {
                IntPtr retval = IntPtr.Zero;

                GameEngine.InvokeMemberFn(m_instanceId, "SaveToFile", (IntPtr)ptr, out retval);
            }
        }
Esempio n. 3
0
 public void InvokeFunction(string fn, IntPtr arg, out IntPtr retval)
 {
     GameEngine.InvokeMemberFn(InstanceId, fn, arg, out retval);
 }