AntTweakBar.Tw.Init C# (CSharp) Метод

Init() публичный статический Метод

This function initializes the AntTweakBar library. It must be called once at the beginning of the program, just after graphic mode is initialized.
public static Init ( GraphicsAPI graphicsAPI, IntPtr device ) : void
graphicsAPI GraphicsAPI This parameter specifies which graphic API is used: OpenGL, OpenGL core profile (3.2 and higher), Direct3D 9, Direct3D 10 or Direct3D 11.
device System.IntPtr Pointer to the Direct3D device, or IntPtr.Zero for OpenGL.
Результат void
        public static void Init(GraphicsAPI graphicsAPI, IntPtr device)
        {
            if (graphicsAPI == GraphicsAPI.Unspecified) {
                throw new ArgumentOutOfRangeException("graphicsAPI");
            }

             if (!NativeMethods.TwInit(graphicsAPI, device)) {
                 throw new AntTweakBarException("TwInit failed.");
             }
        }