http://www.perlmonks.org?node_id=329504


in reply to Inline::C *back* into Perl

Ok...new findings.

One. Even with freeglut, using perlcall techniques to hop back in from OpenGL are very unstable (still). It appears to work well for simple things, but inside any sort of loop the memory requirements quickly spiral out of control. My original answer using perlcall doesn't appear to be a good one.

Two. Looking at examples on the web, using GLX instead of GLUT will allow for Perl to own the event loop and still use Inline. GLX isn't horribly clean, but it is very fast...and all of the event stuff I need is still there. That's what is important. I know GLX doesn't have a loop since the body of the sample app in front of me is coded with a while(1). This is what I want.

This means the engine approach would not be required, we can go back to using something like Inline::C and mapping into GLX calls.

Yes, I know, more reinvented wheels...much can be learned from wheel-making though -- especially when all of this is for fun and on your own time.