in reply to Coding for OpenGL "live"

for fun, remove the "no warnings" line. You'll see that you are continually calling the perl complier

I futzed with this for a bit, refactoring the code in sample to just require (|| die) the drawframe.pl code. I added a sub (do draw) around the loose code in drawframe and called it after the require.

Im not thinking you need to recompile several times/sec

Replies are listed 'Best First'.
Re^2: Coding for OpenGL "live"
by SuicideJunkie (Vicar) on Feb 24, 2014 at 19:38 UTC

    Its been a while, but to clarify:

    require is not terribly useful because it will only load the draw code once.

    The code DOES need to recompile repeatedly in order to incorporate changes to the drawframe code as soon as they are saved to disk. (This being the entire point of live coding.) An enhancement could be made to only recompile the code if the file on disk has been changed since the last frame, but reloading it every frame is simple and effective.

Re^2: Coding for OpenGL "live"
by Anonymous Monk on Oct 18, 2011 at 09:54 UTC
    Maybe you could've provided the code since you refactored it ..