예제 #1
0
        private static void ExtractAndLoadEmbeddedDependency(string targetDir, string fqn)
        {
            var actualFileName = ResourceNameToFileName(fqn);

            using var fs = new FileStream(Path.Combine(targetDir, actualFileName), FileMode.Create);
            using var ms = EmbeddedResources.GetResourceStream(fqn);
            ms.CopyTo(fs);

            Console.WriteLine(actualFileName);
            WinApi.LoadLibrary(actualFileName);
        }
예제 #2
0
파일: Game.cs 프로젝트: ElijahZAwesome/Iris
        private void InitializeRenderingSystem()
        {
            RenderWindow = new RenderWindow(
                GraphicsSettings.VideoMode,
                Window.Title,
                GraphicsSettings.WindowStyle,
                GraphicsSettings.ContextSettings
                );

            RenderWindow.SetMouseCursorGrabbed(Window.CaptureCursor);
            RenderWindow.SetMouseCursorVisible(Window.ShowCursor);

            RenderWindow.SetActive(true);

            Window.Icon = new Graphics.Texture(
                EmbeddedResources.GetResourceStream(
                    EmbeddedResources.IconResourceString
                    )
                );

            ConnectWindowEvents();
            RenderContext = new RenderContext(RenderWindow);
        }