Description:
Drop ImPlot. Finalize my use of my own graphing code by dropping ImPlot.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r651:4cb1b76c4747 -

@@ -25,7 +25,6
25
25
26 using ImGuiNET.SampleProgram.XNA;
26 using ImGuiNET.SampleProgram.XNA;
27 using ImGuiNET;
27 using ImGuiNET;
28 using ImPlotNET;
29 using TraceryNet;
28 using TraceryNet;
30 using Encompass;
29 using Encompass;
31 using Ink.Runtime;
30 using Ink.Runtime;
@@ -5,7 +5,6
5 using System.Collections.Generic;
5 using System.Collections.Generic;
6 using System.Runtime.InteropServices;
6 using System.Runtime.InteropServices;
7
7
8 using ImPlotNET;
9
8
10 namespace ImGuiNET.SampleProgram.XNA
9 namespace ImGuiNET.SampleProgram.XNA
11 {
10 {
@@ -45,9 +44,6
45 {
44 {
46 var context = ImGui.CreateContext();
45 var context = ImGui.CreateContext();
47 ImGui.SetCurrentContext(context);
46 ImGui.SetCurrentContext(context);
48 var plotContext = ImPlot.CreateContext();
49 ImPlot.SetCurrentContext(plotContext);
50 ImPlot.SetImGuiContext(context);
51
47
52 _game = game ?? throw new ArgumentNullException(nameof(game));
48 _game = game ?? throw new ArgumentNullException(nameof(game));
53 _graphicsDevice = game.GraphicsDevice;
49 _graphicsDevice = game.GraphicsDevice;
@@ -1,7 +1,6
1 using System;
1 using System;
2 using System.Collections.Generic;
2 using System.Collections.Generic;
3 using ImGuiNET;
3 using ImGuiNET;
4 using ImPlotNET;
5 using ImGuiNET.SampleProgram.XNA;
4 using ImGuiNET.SampleProgram.XNA;
6
5
7 using Num = System.Numerics;
6 using Num = System.Numerics;
@@ -37,7 +36,6
37 private Texture2D _xnaTexture;
36 private Texture2D _xnaTexture;
38 private IntPtr _imGuiTexture;
37 private IntPtr _imGuiTexture;
39 private bool show_test_window;
38 private bool show_test_window;
40 private bool show_implot_test_window;
41
39
42 public ImFontPtr monoFont;
40 public ImFontPtr monoFont;
43 public ImFontPtr italicFont;
41 public ImFontPtr italicFont;
@@ -190,7 +188,6
190 float f = 0.0f;
188 float f = 0.0f;
191
189
192 bool show_test_window = false;
190 bool show_test_window = false;
193 bool show_implot_test_window = false;
194 bool show_another_window = false;
191 bool show_another_window = false;
195 Num.Vector3 clear_color = new Num.Vector3(114f / 255f, 144f / 255f, 154f / 255f);
192 Num.Vector3 clear_color = new Num.Vector3(114f / 255f, 144f / 255f, 154f / 255f);
196 byte[] _textBuffer = new byte[100];
193 byte[] _textBuffer = new byte[100];
@@ -204,7 +201,6
204 ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty);
201 ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty);
205 ImGui.ColorEdit3("clear color", ref clear_color);
202 ImGui.ColorEdit3("clear color", ref clear_color);
206 if (ImGui.Button("Test Window")) show_test_window = !show_test_window;
203 if (ImGui.Button("Test Window")) show_test_window = !show_test_window;
207 if (ImGui.Button("Implot Test Window")) show_implot_test_window = !show_implot_test_window;
208 if (ImGui.Button("Another Window")) show_another_window = !show_another_window;
204 if (ImGui.Button("Another Window")) show_another_window = !show_another_window;
209 ImGui.Text(string.Format("Application average {0:F3} ms/frame ({1:F1} FPS)", 1000f / ImGui.GetIO().Framerate, ImGui.GetIO().Framerate));
205 ImGui.Text(string.Format("Application average {0:F3} ms/frame ({1:F1} FPS)", 1000f / ImGui.GetIO().Framerate, ImGui.GetIO().Framerate));
210
206
@@ -251,9 +247,6
251 this.show_test_window = !this.show_test_window;
247 this.show_test_window = !this.show_test_window;
252 }
248 }
253
249
254 if (ImGui.Button("Implot Test Window")) {
255 show_implot_test_window = !show_implot_test_window;
256 }
257 if (ImGui.Button("Test Logging"))
250 if (ImGui.Button("Test Logging"))
258 {
251 {
259 Logging.Log(LogLevel.Critical, "Test");
252 Logging.Log(LogLevel.Critical, "Test");
@@ -325,10 +318,6
325 ImGui.SetNextWindowPos(new Num.Vector2(650, 20), ImGuiCond.FirstUseEver);
318 ImGui.SetNextWindowPos(new Num.Vector2(650, 20), ImGuiCond.FirstUseEver);
326 ImGui.ShowDemoWindow(ref show_test_window);
319 ImGui.ShowDemoWindow(ref show_test_window);
327 }
320 }
328 if (this.show_implot_test_window)
329 {
330 ImPlot.ShowDemoWindow(ref this.show_implot_test_window);
331 }
332 }
321 }
333 }
322 }
334 }
323 }
@@ -6,7 +6,6
6 using System.Collections.Generic;
6 using System.Collections.Generic;
7
7
8 using ImGuiNET;
8 using ImGuiNET;
9 using ImPlotNET;
10
9
11 using JM.LinqFaster;
10 using JM.LinqFaster;
12
11
@@ -387,31 +386,6
387 ImGui.Checkbox("##Logarithmic", ref logarithmic);
386 ImGui.Checkbox("##Logarithmic", ref logarithmic);
388 #endif
387 #endif
389
388
390
391 #if DEBUG
392 ImPlot.PushStyleVar(ImPlotStyleVar.LineWeight, 2.0f);
393 ImPlot.PushStyleVar(ImPlotStyleVar.MinorAlpha, 0.0f);
394
395 ImPlot.SetNextPlotLimits(totals.Count()-periods, totals.Count(), min, max, ImGuiCond.Always);
396 if (ImPlot.BeginPlot("My Plot", null, null, new Num.Vector2(-1,0), ImPlotFlags.NoLegend | ImPlotFlags.NoMousePos )) {
397 foreach (var key in keys) {
398 var show = data_sets_show[key];
399 var data = data_sets[key];
400 var data_array = data_sets[key].ToArray();
401 if (data_array.Length > 0 && show)
402 {
403 ImPlot.PlotLine(key, ref data_array[0], data_array.Length);
404 ImPlot.AnnotateClamped(data_array.Length-1, data_array[data_array.Length-1],
405 new Num.Vector2(5, -10), StyleSets.grey, key);
406 }
407 }
408
409 ImPlot.EndPlot();
410 }
411
412 ImPlot.PopStyleVar(2);
413 #endif
414
415 ImGui.End();
389 ImGui.End();
416 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left;
390 ImGui.GetStyle().WindowMenuButtonPosition = ImGuiDir.Left;
417 StyleSets.defaultSet.pop();
391 StyleSets.defaultSet.pop();
@@ -31,8 +31,6
31 <!-- <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" /> -->
31 <!-- <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" /> -->
32 <ProjectReference Include="..\SpriteFontPlus\src\SpriteFontPlus.FNA.Core.csproj" />
32 <ProjectReference Include="..\SpriteFontPlus\src\SpriteFontPlus.FNA.Core.csproj" />
33 <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" />
33 <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj" />
34 <ProjectReference Include="..\ImPlot.NET\ImPlot.NET.csproj">
35 <!-- <Name>ImPlot.NET</Name> -->
36 </ProjectReference>
34 </ProjectReference>
37 <ProjectReference Include="..\ImGui.NET\ImGui.NET.csproj">
35 <ProjectReference Include="..\ImGui.NET\ImGui.NET.csproj">
38 <!-- <Name>ImGui.NET</Name> -->
36 <!-- <Name>ImGui.NET</Name> -->
@@ -75,9 +75,6
75 <Name>ImGui.NET</Name>
75 <Name>ImGui.NET</Name>
76 <HintPath>..\packages\ImGui.NET.1.78.0\lib\netstandard2.0\ImGui.NET.dll</HintPath>
76 <HintPath>..\packages\ImGui.NET.1.78.0\lib\netstandard2.0\ImGui.NET.dll</HintPath>
77 </ProjectReference>
77 </ProjectReference>
78 <ProjectReference Include="..\ImPlot.NET\ImPlot.NET.csproj">
79 <Name>ImPlot.NET</Name>
80 </ProjectReference>
81 <!-- </ProjectReference>\
78 <!-- </ProjectReference>\
82 -->
79 -->
83 <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj">
80 <ProjectReference Include="..\encompass-cs\encompass-cs\encompass-cs.csproj">
@@ -126,8 +123,6
126 <Content Include="cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" />
123 <Content Include="cimgui/win-x64/cimgui.dll" CopyToOutputDirectory="PreserveNewest" />
127 <Content Include="cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.dylib" />
124 <Content Include="cimgui/osx-x64/cimgui.dylib" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.dylib" />
128 <Content Include="cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.so" />
125 <Content Include="cimgui/linux-x64/cimgui.so" CopyToOutputDirectory="PreserveNewest" Link="libcimgui.so" />
129 <Content Include="cimplot/win-x64/cimplot.dll" CopyToOutputDirectory="PreserveNewest" />
130 <Content Include="cimplot/linux-x64/cimplot.so" CopyToOutputDirectory="PreserveNewest" Link="libcimplot.so" />
131 <None Include="fnalibs\README.txt" />
126 <None Include="fnalibs\README.txt" />
132 <None Include="fnalibs\lib64\libFAudio.so.0" />
127 <None Include="fnalibs\lib64\libFAudio.so.0" />
133 <None Include="fnalibs\lib64\libmojoshader.so" />
128 <None Include="fnalibs\lib64\libmojoshader.so" />
You need to be logged in to leave comments. Login now