On Wednesday, 22 November 2017 at 15:23:58 UTC, Tim Hsu wrote:
   m_window = glfwCreateWindow();
   glfwSetWindowUserPointer(m_window, cast(void *)(&this));

That that & out of there!

glfwSetWindowUserPointer(m_window, cast(void *)(this));

without the &, you are fine.


Then, on the other side, you cast back. Again, do NOT dereference it, just cast it:

App app = cast(App) user_ptr;

Reply via email to