Render() 공개 정적인 메소드

public static Render ( ) : void
리턴 void
예제 #1
0
        public unsafe void EndFrame()
        {
            ImGui.Render();

            DrawData *data = ImGui.GetDrawData();

            RenderImDrawData(data);
        }
예제 #2
0
 /// <summary>
 /// Renders the ImGui draw list data.
 /// This method requires a <see cref="GraphicsDevice"/> because it may create new DeviceBuffers if the size of vertex
 /// or index data has increased beyond the capacity of the existing buffers.
 /// A <see cref="CommandList"/> is needed to submit drawing and resource update commands.
 /// </summary>
 public unsafe void Render(GraphicsDevice gd, CommandList cl)
 {
     if (_frameBegun)
     {
         _frameBegun = false;
         ImGui.Render();
         RenderImDrawData(ImGui.GetDrawData(), gd, cl);
     }
 }
예제 #3
0
        /// <summary>
        /// Updates ImGui input and IO configuration state.
        /// </summary>
        public void Update(float deltaSeconds, InputSnapshot snapshot)
        {
            if (_frameBegun)
            {
                ImGui.Render();
            }

            SetPerFrameImGuiData(deltaSeconds);
            UpdateImGuiInput(snapshot);

            _frameBegun = true;
            ImGui.NewFrame();
        }
예제 #4
0
        unsafe void Render()
        {
            io.DisplaySize             = new System.Numerics.Vector2(window.Width, window.Height);
            io.DisplayFramebufferScale = new System.Numerics.Vector2(window.Width / setting.Width);
            io.DeltaTime = setting.DesiredFrameRate;

            control.Update();

            ImGui.NewFrame();
            DrawUI();
            ImGui.Render();
            RenderImDrawData(ImGui.GetDrawData());
        }
        /// <summary>
        /// Updates ImGui input and IO configuration state.
        /// </summary>
        public void Update(float deltaSeconds, InputSnapshot snapshot)
        {
            if (_frameBegun)
            {
                ImGui.Render();
                ImGui.UpdatePlatformWindows();
            }

            SetPerFrameImGuiData(deltaSeconds);
            UpdateImGuiInput(snapshot);
            UpdateMonitors();

            _frameBegun = true;
            ImGui.NewFrame();

            ImGui.Text($"Main viewport Position: {ImGui.GetPlatformIO().MainViewport.Pos}");
            ImGui.Text($"Main viewport Size: {ImGui.GetPlatformIO().MainViewport.Size}");
            ImGui.Text($"MoouseHoveredViewport: {ImGui.GetIO().MouseHoveredViewport}");
        }
예제 #6
0
        private unsafe void RenderFrame()
        {
            IO io = ImGui.GetIO();

            io.DisplaySize             = new System.Numerics.Vector2(_nativeWindow.Width, _nativeWindow.Height);
            io.DisplayFramebufferScale = new System.Numerics.Vector2(_scaleFactor);
            io.DeltaTime = (1f / 60f);

            UpdateImGuiInput(io);

            ImGui.NewFrame();

            SubmitImGuiStuff();

            ImGui.Render();

            DrawData *data = ImGui.GetDrawData();

            RenderImDrawData(data);
        }
        /// <summary>
        /// Renders the ImGui draw list data.
        /// This method requires a <see cref="GraphicsDevice"/> because it may create new DeviceBuffers if the size of vertex
        /// or index data has increased beyond the capacity of the existing buffers.
        /// A <see cref="CommandList"/> is needed to submit drawing and resource update commands.
        /// </summary>
        public void Render(GraphicsDevice gd, CommandList cl)
        {
            if (_frameBegun)
            {
                _frameBegun = false;
                ImGui.Render();
                RenderImDrawData(ImGui.GetDrawData(), gd, cl);

                // Update and Render additional Platform Windows
                if ((ImGui.GetIO().ConfigFlags & ImGuiConfigFlags.ViewportsEnable) != 0)
                {
                    ImGui.UpdatePlatformWindows();
                    ImGuiPlatformIOPtr platformIO = ImGui.GetPlatformIO();
                    for (int i = 1; i < platformIO.Viewports.Size; i++)
                    {
                        ImGuiViewportPtr   vp     = platformIO.Viewports[i];
                        VeldridImGuiWindow window = (VeldridImGuiWindow)GCHandle.FromIntPtr(vp.PlatformUserData).Target;
                        cl.SetFramebuffer(window.Swapchain.Framebuffer);
                        RenderImDrawData(vp.DrawData, gd, cl);
                    }
                }
            }
        }
예제 #8
0
        /// <summary>
        /// Asks ImGui for the generated geometry data and sends it to the graphics pipeline, should be called after the UI is drawn using ImGui.** calls
        /// </summary>
        public virtual void AfterLayout()
        {
            ImGui.Render();

            unsafe { RenderDrawData(ImGui.GetDrawData()); }
        }
예제 #9
0
 public static void Render()
 {
     ImGui.Render();
     RenderDrawLists(ImGui.GetDrawData(), ImGui.GetIO());
 }
예제 #10
0
 public static void Render(RenderTarget target)
 {
     target.ResetGLStates();
     ImGui.Render();
     RenderDrawLists(ImGui.GetDrawData(), ImGui.GetIO());
 }