Esempio n. 1
0
        public DevModeOverlay(
            GraphicsDevice graphicsDevice,
            Framebuffer framebuffer,
            LogEventRecorder logEventRecorder)
        {
            Framebuffer mainFramebuffer = framebuffer;

            _imguiRenderer = new ImGuiRenderer(
                graphicsDevice,
                mainFramebuffer.OutputDescription,
                (int)mainFramebuffer.Width,
                (int)mainFramebuffer.Height
                );

            ImGui.EndFrame();

            ImGuiIOPtr io = ImGui.GetIO();

            io.Fonts.Clear();
            io.Fonts.AddFontFromFileTTF(
                "Fonts/NotoSansCJKjp-Regular.ttf",
                16, null, io.Fonts.GetGlyphRangesJapanese()
                );
            _imguiRenderer.RecreateFontDeviceTexture(graphicsDevice);
            ImGui.NewFrame();

            _gd          = graphicsDevice;
            _cl          = _gd.ResourceFactory.CreateCommandList();
            _framebuffer = mainFramebuffer;

            _logView = new LogView(logEventRecorder);
        }
Esempio n. 2
0
 public LogView(LogEventRecorder logEventRecorder)
 {
     _logEventRecorder = logEventRecorder;
 }