Example #1
0
        public static void Initialize()
        {
            lock (s_initializationLock)
            {
                if (s_instance != null)
                {
                    throw new VxException("VxContext has already been initialized.");
                }

                WindowCreateInfo      wci     = new WindowCreateInfo(50, 50, 1280, 720, WindowState.Normal, Assembly.GetEntryAssembly().GetName().Name);
                GraphicsDeviceOptions options = new GraphicsDeviceOptions(false, PixelFormat.R16_UNorm, true, ResourceBindingModel.Improved, true, true);
                VeldridStartup.CreateWindowAndGraphicsDevice(wci, options, out Sdl2Window window, out GraphicsDevice gd);
                s_instance = new VxContext(gd, window);
            }
        }
Example #2
0
File: Vx.cs Project: mellinoe/Vx
 public static void Terminate() => VxContext.Terminate();
Example #3
0
File: Vx.cs Project: mellinoe/Vx
 public static void Initialize() => VxContext.Initialize();