HowToC:OpenGLCB

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 23:44, 13 December 2007
Dbarnes (Talk | contribs)

← Previous diff
Revision as of 23:44, 13 December 2007
Dbarnes (Talk | contribs)

Next diff →
Line 2: Line 2:
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: 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:
 +
 +<code><pre>
 +
 +</pre></code>

Revision as of 23:44, 13 December 2007

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: