OpenGL is a great framework for hardware-accelerated rendering. Before losing any more word about it, let's consider a more basic rendering setup to draw a 3D sphere to a floating window, as shown in the following screenshot:
So what we have here are as follows:
A
jit.window
object that provides us with rendering destination or rendering context. Its name is referenced by the other OpenGL objects.A
jit.gl.render
object that controls and drives our rendering. We need to send a bang to it to draw the next frame. But before that, we send it the message erase, so the last frame is overwritten with the background color. Anerase_color
message with 4 numbers sets up a new background color. If this color has an alpha value smaller than 1, the last frame will still be partly visible, causing feedback-like effects. Play around with it to get a better understanding of the erase message and the process of drawing a frame!A
jit.gl.gridshape
object that contains the data for a spherical...