I wrote a sample Hot code reloading with GLFW. I placed it on gist because I 
think the source code is too long to put in this forum. 
[https://gist.github.com/demotomohiro/64050496bb615c50fa608d7105509a53](https://gist.github.com/demotomohiro/64050496bb615c50fa608d7105509a53)

It seems there are bugs related to hot code reloading.

  * compile: "foo.c" pragma cause link time error when \--hotcodereloading:on 
option is used



So I used -d:glfwDLL option to avoid that pragma and use glfw3.dll.

  * [Official opengl module](https://github.com/nim-lang/opengl) doesn't work 
when \--hotcodereloading:on option is used.



Program crash when loadExtensions() is called. This module use undocumented 
'dynlib' feature and I think that doesn't work with hotcodereloading.

So I used nimgl/opengl in the sample code. It doesn't use that feature and load 
OpenGL functions only using documented feature. (But it loads all available 
OpenGL functions even if it is not used in the program.)

Reply via email to