예제 #1
0
파일: VxContext.cs 프로젝트: mellinoe/Vx
        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);
            }
        }
예제 #2
0
파일: Vx.cs 프로젝트: mellinoe/Vx
 public static void Terminate() => VxContext.Terminate();
예제 #3
0
파일: Vx.cs 프로젝트: mellinoe/Vx
 public static void Initialize() => VxContext.Initialize();