HowToC:OpenGLCB
From S2PLOT
How to use an OpenGL callback function
S2PLOT allows you to register a function which is called every refresh cycle, after most other geometry has been drawn, but before the screen buffers are swapped. You can use this function to call explicit OpenGL functions if you like. This is an advanced feature, but very easy to use. Here's an example of an OpenGL callback function that draws a plane: