Ejemplo n.º 1
0
        internal static void aglSetDrawable(AGLContext ctx, AGLDrawable draw)
        {
            byte retval = _aglSetDrawable(ctx, draw);

            if (retval == 0)
            {
                AglError err = GetError();
                throw new Exception(ErrorString(err));
            }
        }
Ejemplo n.º 2
0
        internal static void aglSetFullScreen(AGLContext ctx, int width, int height, int freq, int device)
        {
            byte retval = _aglSetFullScreen(ctx, width, height, freq, device);

            if (retval == 0)
            {
                AglError err = GetError();
                Debug.Print("AGL Error: {0}", err);
                Debug.Indent();
                Debug.Print(ErrorString(err));
                Debug.Unindent();
                throw new MacOSException(err, ErrorString(err));
            }
        }
Ejemplo n.º 3
0
        internal static void CheckReturnValue(byte code, string function)
        {
            if (code != 0)
            {
                return;
            }
            AglError errCode = aglGetError();

            if (errCode == AglError.NoError)
            {
                return;
            }

            string error = new String((sbyte *)aglErrorString(errCode));

            throw new MacOSException((OSStatus)errCode, String.Format(
                                         "AGL Error from function {0}: {1}  {2}",
                                         function, errCode, error));
        }
 internal static string ErrorString(AglError code)
 {
     return(Marshal.PtrToStringAnsi(_aglErrorString(code)));
 }
 private static extern IntPtr _aglErrorString(AglError code);
Ejemplo n.º 6
0
 [DllImport(agl, EntryPoint = "aglErrorString")] static extern IntPtr _aglErrorString(AglError code);
Ejemplo n.º 7
0
 internal static string ErrorString(AglError code)
 {
     return Marshal.PtrToStringAnsi(_aglErrorString(code));
 }
Ejemplo n.º 8
0
 [DllImport(agl,EntryPoint="aglErrorString")] static extern IntPtr _aglErrorString(AglError code);
Ejemplo n.º 9
0
 [DllImport(agl)] static extern IntPtr aglErrorString(AglError code);
Ejemplo n.º 10
0
 static extern IntPtr aglErrorString(AglError code);