public void Begin() { ImGuiController.ImGui_ImplOpenGL3_NewFrame(); ImGuiController.ImGui_ImplGlfw_NewFrame(); ImGui.NewFrame(); ImGuizmo.BeginFrame(); }
internal void Init() { Main = this; Engine.MainWindow.TextInput += TextInput; IntPtr context = ImGui.CreateContext(); ImGui.SetCurrentContext(context); ImGuizmo.SetImGuiContext(context); ImGuiIOPtr io = ImGui.GetIO(); io.Fonts.AddFontFromFileTTF(Path.Combine(AppContext.BaseDirectory, "EditorAssets/Fonts/Inconsolata.ttf"), 16); io.BackendFlags |= ImGuiBackendFlags.HasMouseCursors | ImGuiBackendFlags.RendererHasVtxOffset; io.ConfigFlags |= ImGuiConfigFlags.DockingEnable | ImGuiConfigFlags.NavEnableKeyboard; io.ConfigWindowsResizeFromEdges = true; SetStyle(); CreateDeviceResources(); SetKeyMappings(); SetPerFrameImGuiData(0.166666f); ImGui.NewFrame(); ImGuizmo.BeginFrame(); frameBegun = true; }
public void BeginFrame() { #if DEBUG using Profiler fullProfiler = new Profiler(GetType()); #endif frameBegun = true; ImGui.NewFrame(); ImGuizmo.BeginFrame(); }
public static unsafe void BeforeFrame() { if (!Initialised) { throw new Exception("Tried to call BeforeFrame before initialising."); } SetContext(); ImGui.NewFrame(); ImGuizmo.BeginFrame(); NewFrame = true; }
internal void Update(float dt) { if (frameBegun) { ImGui.Render(); } SetPerFrameImGuiData(dt); UpdateImGuiInput(); frameBegun = true; ImGui.NewFrame(); ImGuizmo.BeginFrame(); }