glumpy.gloo layer is the heart of glumpy and is responsible for talking
to the GPU throught buffers, textures and programs. This is done quite
transparently thanks to the numpy interface (and the GPU data object which is a
subclassed numpy array).
This example displays a simple yellow quad.
This example shows a rotating, colored & outlined cube. It uses transformation matrices to translate, rotate and finally project the cube on the window framebuffer.
Note that there are easier ways to do the same using transforms.
This example shows how to upload and display a 1-dimensional texture.
This example shows how to upload and display a 2-dimensional texture.
This examples shows how to display an image, without control of the aspect ratio though.
This example does not enforce image aspect ratio when window size is changed.
This examples show how to use the on-screen console that should never fails.
The console is fairly limited and must be used for debugging purposes only.
This examples show a more complete terminal that is able to scroll and to display an extended set of characters (just scroll to see them). It is very fast and can be used for quick’n’dirty input/output.
The terminal uses a dedicated technique to ensure rendering speed. For better text output, one must used a glyph collection.
This example shows how to use a texture atlas object that allow to store different texture into a single one.
This examples shows how to used the framebuffer. The scene is first rendered into a texture using ut-of bound color values (10) and the resulting texture is displayed on screen and correct the color value such as to display a gray quad.
This example shows a rotating 3d scatter plots made of a million antialiased points. It should run smoothly on any recent hardware.
This example illustrates stroke, filled and outline antialiased shaders that are used in a number of different places throughout glumpy.
This is an example of what can be done using dedicated shaders. In this example, each arrow is a point but is draw as an antialiased arrow in the fragment shader using signed distance field.
You can read more on these techniques in this article of the Journal of Graphics Techniques (which is also a good source of knowledge).
This example show various antialiased markers made using signed-distance functions.
This examples displays a 2D scatter plot and is zoomed dynamically around the mouse pointer thanks to the shaders.
This example simulates rain drops using growing and fading circles and shows how to update a vertex buffer.
This example shows mouse trails using growing and fadind discs. It illustrate how to use mouse interactions to update a vertex buffer.
This example show how to perform object picking using colors. When pick mode is active (mouse press), each object is rendered using a unique color and the color under the mouse is used to compute the object id.
This example displays several signals that slowly fade out. The trick is to not clear the framebuffer and to draw a quasi transparent quad over the whole scene, making older signals to slowly vanish.