✅ ImGui.NET and OpenTK
hello, i tried to render a basic imgui window on my opentk window, but it just dont works and crash with an exception
35 Replies
ah yes good thing im here cuz i did make it work
but that error seems new to me
Shouldnt you have an instance of a
ImGuiController
?ImGuiController is not definied on ImGui.NET bro
never said it does
its from github or smth?
is there a way to make without?
let me check
actually imguicontroller is there
GitHub
GitHub - ImGuiNET/ImGui.NET: An ImGui wrapper for .NET.
An ImGui wrapper for .NET. Contribute to ImGuiNET/ImGui.NET development by creating an account on GitHub.
did you follow the tutorial?
there's an example project there
called SampleProgram
try running it
ok
yeah but i dont wanna paste it bro i wanna write myself
the controller?
how do we actually use it
cause i see also Memory.cs
MemoryEditor
this is specialized for opentk https://github.com/aybe/DearImGui
GitHub
GitHub - aybe/DearImGui: imgui & implot for .NET & OpenTK
imgui & implot for .NET & OpenTK. Contribute to aybe/DearImGui development by creating an account on GitHub.
there is no way to use the normal ImGui.NET library?
how do u do for example on ur projects
ah yes sorry this is the one im actually using https://github.com/NogginBops/ImGui.NET_OpenTK_Sample
GitHub
GitHub - NogginBops/ImGui.NET_OpenTK_Sample: A sample project showi...
A sample project showing an ImGui (using ImGui.NET) renderer for OpenTK in C# - NogginBops/ImGui.NET_OpenTK_Sample
i copy the controller and how i use it on my code?
to be safe use this ^ project because its the one im using
so it'd probably be easier to help u
the project has an example it should give you an idea how to
this is working but that just look rly weird, and i cannot interacte the imgui menu with keys
use $paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
the color of my windows does not infect the imgui menu
why this is grey
and dont resize
bro
did you check the sample?
where is this method
yes fr
but what is ClientSize where did he got that variable form
its in the sample
its a property defined in the
GameWindow
class
in your case it would be gameWindow.ClientSize.X
oh ok
sorry
thats works but i cannot change the background color and its always grey
$paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
BlazeBin - ahsxjyzdlcjj
A tool for sharing your source code with the world!
show image?
@
@R like the screen here the same color
but it scale well
i just want to change color
so its all grey?
yes
but imgui windows work well
what color is this?
GL.ClearColor(new Color4(0.0f, 0.3f, 0.5f, 1.0f));
also wow this code
super lags my game
i just use GameWindowSettings.Default
like the sample does
hmm ur right
i ran the sample, it doesnt change the color lol
it does change in my game, ill see why
found the culprit
comment this line ImGui.DockSpaceOverViewport();
ok
that work well thanks
!close
Closed!