-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenTK implimentation? #2
Comments
Fixed previous issue but..
using DearImguiSharp;
//using GLFWWindow = OpenTK.Windowing.GraphicsLibraryFramework.Window;
using (var window = new Window(1080, 720, "Zeal"))
{
var _context = ImGui.CreateContext(null);
ImGui.StyleColorsDark(null);
unsafe { ImGui.ImGuiImplGlfwInitForOpenGL(new GLFWwindow(window.ID.ToPointer()), true); }
float[] vertices =
{
-0.5f, -0.5f, 0.0f,
+0.5f, -0.5f, 0.0f,
+0.0f, +0.5f, 0.0f
};
while (window.IsRunning(0x0000ffff))
{
var open = false;
ImGui.ImGuiImplOpenGL2NewFrame();
ImGui.ShowDemoWindow(ref open);
ImGui.ImGuiImplOpenGL2RenderDrawData(ImGui.GetDrawData());
}
ImGui.ImGuiImplOpenGL2Shutdown();
ImGui.DestroyContext(_context);
window.Dispose();
} |
I also did a objdump here for your cimgui |
I don't write native code often but if I were to have a guess it's down to the GLFW code in the wrapper not being properly configured for dynamic linking. When I added the bindings, I did the minimal required work to get CI/CD working over at NativeBuilds which uses my fork of cimgui, and I've never gotten around to testing anything other than DirectX (which is always dynamically linked since it is based on COM). If I were to guess you might need to add some GLFW related defines in the cimgui fork, then see how goes: They appear to be defined around there 👆 |
Is there a way to implement this with opentk both through GameWindow and GLFW?
I tried doing it the GLFW way and it won't let me cast my void pointer to your GLFWWindow class
The text was updated successfully, but these errors were encountered: