aboutsummaryrefslogtreecommitdiff
path: root/Gem/examples
diff options
context:
space:
mode:
authorTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-14 20:32:26 +0000
committerTravis CI <zmoelnig@travis-ci.umlaeute.mur.at>2015-03-14 20:32:26 +0000
commitc6030846f5c1e34048774d60ca4c15e804bee839 (patch)
treefb75f89275a78ea383c0fd64e8fe5b3ae57cc898 /Gem/examples
Gem linux/amd64
built '' for linux/amd64
Diffstat (limited to 'Gem/examples')
-rw-r--r--Gem/examples/01.basic/01.redSquare.pd63
-rw-r--r--Gem/examples/01.basic/02.blueRectangle.pd65
-rw-r--r--Gem/examples/01.basic/03.disk.pd59
-rw-r--r--Gem/examples/01.basic/04.PrimTri.pd65
-rw-r--r--Gem/examples/01.basic/05.cube.pd44
-rw-r--r--Gem/examples/01.basic/06.sphere.pd55
-rw-r--r--Gem/examples/01.basic/07.cylinder.pd62
-rw-r--r--Gem/examples/01.basic/08.model.pd61
-rw-r--r--Gem/examples/01.basic/09.yelloTeapot.pd65
-rw-r--r--Gem/examples/02.advanced/00.gemwin-subpatch.pd61
-rw-r--r--Gem/examples/02.advanced/01.Separator.pd143
-rw-r--r--Gem/examples/02.advanced/02.Ortho.pd87
-rw-r--r--Gem/examples/02.advanced/03.View.pd85
-rw-r--r--Gem/examples/02.advanced/03.View_OSD.pd317
-rw-r--r--Gem/examples/02.advanced/04.Fog.pd99
-rw-r--r--Gem/examples/02.advanced/05.Stereo.pd97
-rw-r--r--Gem/examples/02.advanced/06.StereoParticle.pd88
-rw-r--r--Gem/examples/02.advanced/07.Snapshot1.pd87
-rw-r--r--Gem/examples/02.advanced/08.Snapshot2.pd138
-rw-r--r--Gem/examples/02.advanced/09.SnapshotSave.pd145
-rw-r--r--Gem/examples/02.advanced/09.SnapshotSaveHD.pd44
-rw-r--r--Gem/examples/02.advanced/10.LinearPath.pd87
-rw-r--r--Gem/examples/02.advanced/11.SplinePath.pd87
-rw-r--r--Gem/examples/02.advanced/12.Hsv.pd105
-rw-r--r--Gem/examples/02.advanced/13.ModelRescale.pd107
-rw-r--r--Gem/examples/02.advanced/14.RenderOrder.pd149
-rw-r--r--Gem/examples/02.advanced/15.GemWin.pd73
-rw-r--r--Gem/examples/02.advanced/16.vertex_program.pd189
-rw-r--r--Gem/examples/02.advanced/17.fragment_program.pd126
-rw-r--r--Gem/examples/02.advanced/18.gl_shading_language.pd182
-rw-r--r--Gem/examples/02.advanced/19.pointer.pd217
-rw-r--r--Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd184
-rw-r--r--Gem/examples/02.advanced/21.basic_LSystem.pd138
-rw-r--r--Gem/examples/02.advanced/22.double-iterative.pd118
-rw-r--r--Gem/examples/02.advanced/23.SplitScreen.pd342
-rw-r--r--Gem/examples/02.advanced/snapshotHD.pd114
-rw-r--r--Gem/examples/03.lighting/01.world_light.pd84
-rw-r--r--Gem/examples/03.lighting/02.light.pd96
-rw-r--r--Gem/examples/03.lighting/03.controlLights.pd97
-rw-r--r--Gem/examples/03.lighting/04.moveSpheres.pd128
-rw-r--r--Gem/examples/03.lighting/05.materials.pd86
-rw-r--r--Gem/examples/04.pix/01.image.pd60
-rw-r--r--Gem/examples/04.pix/02.multiimage.pd49
-rw-r--r--Gem/examples/04.pix/04.ImageInPlace.pd64
-rw-r--r--Gem/examples/04.pix/05.film.pd121
-rw-r--r--Gem/examples/04.pix/05.movie.pd89
-rw-r--r--Gem/examples/04.pix/06.PixRect.pd88
-rw-r--r--Gem/examples/04.pix/07.PixSet.pd69
-rw-r--r--Gem/examples/04.pix/08.PixDump.pd64
-rw-r--r--Gem/examples/04.pix/09.Histogram.pd89
-rw-r--r--Gem/examples/04.pix/10.PixDataSimple.pd90
-rw-r--r--Gem/examples/04.pix/11.PixDataComplex.pd117
-rw-r--r--Gem/examples/04.pix/12.add.pd52
-rw-r--r--Gem/examples/04.pix/12.blending.pd173
-rw-r--r--Gem/examples/04.pix/12.composite.pd54
-rw-r--r--Gem/examples/04.pix/12.pix_multiply.pd55
-rw-r--r--Gem/examples/04.pix/13.maskDancer.pd55
-rw-r--r--Gem/examples/04.pix/14.takeAlpha.pd64
-rw-r--r--Gem/examples/04.pix/15.pix_alpha.pd82
-rw-r--r--Gem/examples/04.pix/16.alphaGrey.pd78
-rw-r--r--Gem/examples/04.pix/16.pix_2grey.pd45
-rw-r--r--Gem/examples/04.pix/17.pix_gain.pd72
-rw-r--r--Gem/examples/04.pix/18.Curves.pd180
-rw-r--r--Gem/examples/04.pix/19.colorMatrix.pd60
-rw-r--r--Gem/examples/04.pix/20.convolve.pd106
-rw-r--r--Gem/examples/04.pix/22.biquad.pd108
-rw-r--r--Gem/examples/04.pix/23.gravity.pd108
-rw-r--r--Gem/examples/04.pix/24.time-filtering.pd102
-rw-r--r--Gem/examples/04.pix/25.buffer.pd137
-rw-r--r--Gem/examples/04.pix/26.framebuffer_readback.pd88
-rw-r--r--Gem/examples/04.pix/27.bitmap_font.pd152
-rw-r--r--Gem/examples/04.video/00.SimpleVideo.pd87
-rw-r--r--Gem/examples/04.video/01.VideoPaint.pd123
-rw-r--r--Gem/examples/04.video/02.VideoSphere.pd99
-rw-r--r--Gem/examples/04.video/03.movement_detection.pd87
-rw-r--r--Gem/examples/04.video/04.videoRTX.pd101
-rw-r--r--Gem/examples/04.video/05.buffer_rtx.pd109
-rw-r--r--Gem/examples/04.video/06.frame_diff_tracking.pd184
-rw-r--r--Gem/examples/04.video/07.bg_subtract_tracking.pd184
-rw-r--r--Gem/examples/04.video/08.color_classification.pd109
-rw-r--r--Gem/examples/05.text/01.Text.pd120
-rw-r--r--Gem/examples/05.text/01.TextNoLoadBang.pd112
-rw-r--r--Gem/examples/05.text/03.ChangeText.pd102
-rw-r--r--Gem/examples/05.text/03.ChangeTextNoLoadBang.pd92
-rw-r--r--Gem/examples/05.text/vera.ttfbin0 -> 65932 bytes
-rw-r--r--Gem/examples/06.particle/01.simple.pd69
-rw-r--r--Gem/examples/06.particle/02.fountain.pd86
-rw-r--r--Gem/examples/06.particle/03.orbit.pd88
-rw-r--r--Gem/examples/06.particle/04.combo.pd104
-rw-r--r--Gem/examples/06.particle/05.twoSrc.pd173
-rw-r--r--Gem/examples/06.particle/06.target.pd74
-rw-r--r--Gem/examples/06.particle/07.render.pd86
-rw-r--r--Gem/examples/06.particle/08.info.pd117
-rw-r--r--Gem/examples/06.particle/09.sink.pd100
-rw-r--r--Gem/examples/07.texture/01.texture.pd60
-rw-r--r--Gem/examples/07.texture/02.TexCoord.pd70
-rw-r--r--Gem/examples/07.texture/04.moveImages.pd153
-rw-r--r--Gem/examples/07.texture/05.newWave.pd201
-rw-r--r--Gem/examples/07.texture/06.ripple.pd114
-rw-r--r--Gem/examples/07.texture/07.feedback.pd92
-rw-r--r--Gem/examples/07.texture/08.MotionBlur.pd130
-rw-r--r--Gem/examples/07.texture/09.sharedTextures.pd79
-rw-r--r--Gem/examples/07.texture/10.framebuffer.pd195
-rw-r--r--Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd116
-rw-r--r--Gem/examples/08.io/01.Mouse.pd84
-rw-r--r--Gem/examples/08.io/02.Tablet.pd124
-rw-r--r--Gem/examples/08.io/03.Orb.pd51
-rw-r--r--Gem/examples/08.io/04.UseOrb.pd86
-rw-r--r--Gem/examples/09.openGL/01.primQuad.pd107
-rw-r--r--Gem/examples/09.openGL/02.displayList.pd185
-rw-r--r--Gem/examples/09.openGL/03.stencilBuffer.pd251
-rw-r--r--Gem/examples/09.openGL/04.clearZ.pd27
-rw-r--r--Gem/examples/09.openGL/05.load_identity_matrix.pd74
-rw-r--r--Gem/examples/10.glsl/01.simple_texture.pd124
-rw-r--r--Gem/examples/10.glsl/02.primitive_distortion.pd125
-rw-r--r--Gem/examples/10.glsl/03.texture_distortion.pd144
-rw-r--r--Gem/examples/10.glsl/04.game_of_life.pd138
-rw-r--r--Gem/examples/10.glsl/05.multitexture.pd201
-rw-r--r--Gem/examples/10.glsl/05.multitexture_bis.pd200
-rw-r--r--Gem/examples/10.glsl/06.rectangle_multitexture.pd199
-rw-r--r--Gem/examples/10.glsl/07.framebuffer_and_shader.pd418
-rw-r--r--Gem/examples/10.glsl/08.multi_pass_rendering.pd341
-rw-r--r--Gem/examples/10.glsl/09.vertex_texture_fetching.pd142
-rw-r--r--Gem/examples/10.glsl/10.GPGPU_Physical_model.pd1246
-rw-r--r--Gem/examples/10.glsl/11.geometry.pd123
-rw-r--r--Gem/examples/10.glsl/12.tri2fan.pd157
-rw-r--r--Gem/examples/10.glsl/13.panoramique.pd525
-rw-r--r--Gem/examples/10.glsl/14.blur.pd177
-rw-r--r--Gem/examples/10.glsl/15.bicubic_image_interpolation.pd63
-rw-r--r--Gem/examples/10.glsl/GLSL_mix.frag35
-rw-r--r--Gem/examples/10.glsl/GLSL_mix.vert9
-rw-r--r--Gem/examples/10.glsl/P_distord.frag19
-rw-r--r--Gem/examples/10.glsl/P_distord.vert21
-rw-r--r--Gem/examples/10.glsl/T_distord.frag31
-rw-r--r--Gem/examples/10.glsl/T_distord.vert9
-rw-r--r--Gem/examples/10.glsl/_glsl.pd73
-rw-r--r--Gem/examples/10.glsl/bicubic_interpolation.frag90
-rw-r--r--Gem/examples/10.glsl/bicubic_interpolation.vert8
-rw-r--r--Gem/examples/10.glsl/blur.frag18
-rw-r--r--Gem/examples/10.glsl/blur.vert9
-rw-r--r--Gem/examples/10.glsl/cam1.jpgbin0 -> 311441 bytes
-rw-r--r--Gem/examples/10.glsl/cam2.jpgbin0 -> 395309 bytes
-rw-r--r--Gem/examples/10.glsl/cam3.jpgbin0 -> 323041 bytes
-rw-r--r--Gem/examples/10.glsl/cam4.jpgbin0 -> 326880 bytes
-rw-r--r--Gem/examples/10.glsl/fetching.frag8
-rw-r--r--Gem/examples/10.glsl/fetching.vert15
-rw-r--r--Gem/examples/10.glsl/fetching2.frag56
-rw-r--r--Gem/examples/10.glsl/fetching2.vert21
-rw-r--r--Gem/examples/10.glsl/game.frag30
-rw-r--r--Gem/examples/10.glsl/game.vert14
-rw-r--r--Gem/examples/10.glsl/geo.frag8
-rw-r--r--Gem/examples/10.glsl/geo.geom28
-rw-r--r--Gem/examples/10.glsl/geo.vert7
-rw-r--r--Gem/examples/10.glsl/img1.jpgbin0 -> 156747 bytes
-rw-r--r--Gem/examples/10.glsl/img2.jpgbin0 -> 152179 bytes
-rw-r--r--Gem/examples/10.glsl/img3.jpgbin0 -> 193808 bytes
-rw-r--r--Gem/examples/10.glsl/interpol.frag13
-rw-r--r--Gem/examples/10.glsl/link.frag164
-rw-r--r--Gem/examples/10.glsl/link.vert10
-rw-r--r--Gem/examples/10.glsl/mass.frag34
-rw-r--r--Gem/examples/10.glsl/mass.vert10
-rw-r--r--Gem/examples/10.glsl/multitexture.frag13
-rw-r--r--Gem/examples/10.glsl/multitexture.vert11
-rw-r--r--Gem/examples/10.glsl/multitexture_rect.frag15
-rw-r--r--Gem/examples/10.glsl/multitexture_rect.vert11
-rw-r--r--Gem/examples/10.glsl/normal.frag37
-rw-r--r--Gem/examples/10.glsl/normal.vert10
-rw-r--r--Gem/examples/10.glsl/panoramique.frag28
-rw-r--r--Gem/examples/10.glsl/panoramique.vert5
-rw-r--r--Gem/examples/10.glsl/single_blur.pd55
-rw-r--r--Gem/examples/10.glsl/texture.frag16
-rw-r--r--Gem/examples/10.glsl/texture.vert8
-rw-r--r--Gem/examples/10.glsl/texture_rect.frag16
-rw-r--r--Gem/examples/10.glsl/tri2fan.frag6
-rw-r--r--Gem/examples/10.glsl/tri2fan.geom51
-rw-r--r--Gem/examples/10.glsl/tri2fan.vert6
-rw-r--r--Gem/examples/10.glsl/vague.frag23
-rw-r--r--Gem/examples/10.glsl/wave.frag40
-rw-r--r--Gem/examples/11.obj-exporter/obj_cube.pd152
-rw-r--r--Gem/examples/11.obj-exporter/obj_exporter-help.pd87
-rw-r--r--Gem/examples/11.obj-exporter/obj_exporter.pd96
-rw-r--r--Gem/examples/11.obj-exporter/obj_primTri.pd87
-rw-r--r--Gem/examples/11.obj-exporter/obj_rectangle.pd123
-rw-r--r--Gem/examples/11.obj-exporter/obj_square.pd108
-rw-r--r--Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd30
-rw-r--r--Gem/examples/12.multi_screen_projection/02.nfp-help.pd46
-rw-r--r--Gem/examples/12.multi_screen_projection/config.txt70
-rw-r--r--Gem/examples/12.multi_screen_projection/flat_projection.pd454
-rw-r--r--Gem/examples/12.multi_screen_projection/grid.jpgbin0 -> 211659 bytes
-rw-r--r--Gem/examples/12.multi_screen_projection/load_save.pd40
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_22.frag18
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_22.vert26
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_33.frag18
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_33.vert37
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_curved_wall.pd413
-rw-r--r--Gem/examples/12.multi_screen_projection/nfp_flat_wall.pd313
-rw-r--r--Gem/examples/12.multi_screen_projection/save_system-help.pd20
-rw-r--r--Gem/examples/12.multi_screen_projection/saved.pd24
-rw-r--r--Gem/examples/12.multi_screen_projection/soft_edge.frag62
-rw-r--r--Gem/examples/13.recursion/01.repetition_is_futile.pd61
-rw-r--r--Gem/examples/13.recursion/02.iteration_is_insufficient.pd33
-rw-r--r--Gem/examples/13.recursion/03.recursive_spiral.pd71
-rw-r--r--Gem/examples/13.recursion/04.binary_tree.pd98
-rw-r--r--Gem/examples/13.recursion/05.n-ary_tree.pd81
-rw-r--r--Gem/examples/13.recursion/06.breaking_symmetry.pd384
-rw-r--r--Gem/examples/13.recursion/README23
-rw-r--r--Gem/examples/13.recursion/nnrepeat-help.pd28
-rw-r--r--Gem/examples/13.recursion/nnrepeat-test.pd55
-rw-r--r--Gem/examples/13.recursion/nnrepeat.pd27
-rw-r--r--Gem/examples/13.recursion/nrepeat-help.pd25
-rw-r--r--Gem/examples/13.recursion/nrepeat-test.pd46
-rw-r--r--Gem/examples/13.recursion/nrepeat.pd49
-rw-r--r--Gem/examples/13.recursion/stack-help.pd20
-rw-r--r--Gem/examples/13.recursion/stack.pd38
-rw-r--r--Gem/examples/13.recursion/xform-gui.pd120
-rw-r--r--Gem/examples/14.multiple_windows/01.basic_example.pd29
-rw-r--r--Gem/examples/14.multiple_windows/02.switch_context.pd28
-rw-r--r--Gem/examples/14.multiple_windows/03.texture_sharing.pd38
-rw-r--r--Gem/examples/99.games/puzzle.pd158
-rw-r--r--Gem/examples/data/64shade.tifbin0 -> 472 bytes
-rw-r--r--Gem/examples/data/COPYING.txt89
-rw-r--r--Gem/examples/data/Toon.frag61
-rw-r--r--Gem/examples/data/Toon.vert54
-rw-r--r--Gem/examples/data/alea.mpgbin0 -> 239214 bytes
-rw-r--r--Gem/examples/data/anim-1.movbin0 -> 572406 bytes
-rw-r--r--Gem/examples/data/bitmap_font_6x8.bmpbin0 -> 3798 bytes
-rw-r--r--Gem/examples/data/blob0.tifbin0 -> 516 bytes
-rw-r--r--Gem/examples/data/blob1.tifbin0 -> 516 bytes
-rw-r--r--Gem/examples/data/blob2.tifbin0 -> 516 bytes
-rw-r--r--Gem/examples/data/dancer.JPGbin0 -> 10054 bytes
-rw-r--r--Gem/examples/data/ducks.pngbin0 -> 161330 bytes
-rw-r--r--Gem/examples/data/fractal.JPGbin0 -> 54817 bytes
-rw-r--r--Gem/examples/data/fractalAlpha.TIFbin0 -> 271676 bytes
-rw-r--r--Gem/examples/data/homer.avibin0 -> 197178 bytes
-rw-r--r--Gem/examples/data/random.fp111
-rw-r--r--Gem/examples/data/temp0.JPGbin0 -> 10054 bytes
-rw-r--r--Gem/examples/data/temp1.JPGbin0 -> 54817 bytes
-rw-r--r--Gem/examples/data/temp2.JPGbin0 -> 18421 bytes
-rw-r--r--Gem/examples/data/toon.vp36
-rw-r--r--Gem/examples/data/valcolor.tab6
-rw-r--r--Gem/examples/data/valmotion.tab8
-rw-r--r--Gem/examples/data/venus.mtl9
-rw-r--r--Gem/examples/data/venus.obj2147
-rw-r--r--Gem/examples/data/vera.ttfbin0 -> 65932 bytes
244 files changed, 23486 insertions, 0 deletions
diff --git a/Gem/examples/01.basic/01.redSquare.pd b/Gem/examples/01.basic/01.redSquare.pd
new file mode 100644
index 0000000..c64e4a2
--- /dev/null
+++ b/Gem/examples/01.basic/01.redSquare.pd
@@ -0,0 +1,63 @@
+#N canvas 139 83 602 502 10;
+#X obj 240 186 gemhead;
+#X floatatom 348 258 0 0 0 0 - - -;
+#X obj 240 246 color;
+#X msg 342 191 1 1 1;
+#X msg 342 156 1 0 0;
+#X obj 240 339 square;
+#X text 109 26 this demonstrates how to create a red square;
+#X text 328 119 change the color;
+#X text 341 226 rotate the square;
+#X msg 343 302 draw line;
+#X msg 343 322 draw fill;
+#X msg 346 375 width 1;
+#X msg 347 395 width 10;
+#X obj 240 297 rotate;
+#X obj 20 59 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 65 t b b;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 103 pd gemwin;
+#X msg 25 79 create;
+#X text 21 59 Create window and render;
+#X text 386 157 red;
+#X text 389 192 white;
+#X text 379 260 (in degree);
+#X connect 0 0 2 0;
+#X connect 1 0 13 1;
+#X connect 2 0 13 0;
+#X connect 3 0 2 1;
+#X connect 4 0 2 1;
+#X connect 9 0 5 0;
+#X connect 10 0 5 0;
+#X connect 11 0 5 0;
+#X connect 12 0 5 0;
+#X connect 13 0 5 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
diff --git a/Gem/examples/01.basic/02.blueRectangle.pd b/Gem/examples/01.basic/02.blueRectangle.pd
new file mode 100644
index 0000000..5d522bc
--- /dev/null
+++ b/Gem/examples/01.basic/02.blueRectangle.pd
@@ -0,0 +1,65 @@
+#N canvas 396 160 600 500 10;
+#X obj 350 159 gemhead;
+#X obj 350 337 rotate;
+#X floatatom 409 275 0 0 0 0 - - -;
+#X msg 452 144 1 1 1;
+#X text 438 92 change the color;
+#X msg 237 313 draw line;
+#X msg 237 346 draw fill;
+#X text 111 28 this demonstrates how to create a blue rectangle;
+#X obj 350 379 rectangle 2 1;
+#X text 382 260 rotate the rectangle;
+#X msg 452 169 0 0 1;
+#X floatatom 427 336 0 0 0 0 - - -;
+#X floatatom 482 337 0 0 0 0 - - -;
+#X text 419 314 width;
+#X text 477 313 height;
+#X obj 20 59 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 65 t b b;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 103 pd gemwin;
+#X msg 25 79 create;
+#X text 21 59 Create window and render;
+#X text 504 170 blue;
+#X text 495 146 white;
+#X obj 350 219 color 0 0 1;
+#X text 422 221 (blue);
+#X connect 0 0 21 0;
+#X connect 1 0 8 0;
+#X connect 2 0 1 1;
+#X connect 3 0 21 1;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 10 0 21 1;
+#X connect 11 0 8 1;
+#X connect 12 0 8 2;
+#X connect 16 0 17 0;
+#X connect 17 0 16 0;
+#X connect 21 0 1 0;
diff --git a/Gem/examples/01.basic/03.disk.pd b/Gem/examples/01.basic/03.disk.pd
new file mode 100644
index 0000000..e65fbf8
--- /dev/null
+++ b/Gem/examples/01.basic/03.disk.pd
@@ -0,0 +1,59 @@
+#N canvas 28 208 601 392 10;
+#X obj 274 138 gemhead;
+#X floatatom 350 169 0 0 0 0 - - -;
+#X obj 22 325 world_light;
+#X obj 22 283 gemhead 1;
+#X text 369 251 change the number of slices;
+#X msg 421 269 15;
+#X obj 274 207 rotateXYZ 26 26 0;
+#X floatatom 299 277 0 1 4 2 size - -;
+#X floatatom 400 330 0 0 0.9 2 inner_radius - -;
+#X obj 274 356 disk 2 5 1;
+#X msg 384 269 10;
+#X obj 30 59 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 65 t b b;
+#X msg 59 94 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 35 103 pd gemwin;
+#X msg 35 79 create;
+#X text 31 59 Create window and render;
+#X connect 0 0 6 0;
+#X connect 1 0 6 1;
+#X connect 1 0 6 2;
+#X connect 3 0 2 0;
+#X connect 5 0 9 2;
+#X connect 6 0 9 0;
+#X connect 7 0 9 1;
+#X connect 8 0 9 3;
+#X connect 10 0 9 2;
+#X connect 12 0 13 0;
+#X connect 13 0 12 0;
diff --git a/Gem/examples/01.basic/04.PrimTri.pd b/Gem/examples/01.basic/04.PrimTri.pd
new file mode 100644
index 0000000..98de642
--- /dev/null
+++ b/Gem/examples/01.basic/04.PrimTri.pd
@@ -0,0 +1,65 @@
+#N canvas 173 -28 667 537 12;
+#X obj 306 137 gemhead;
+#X obj 306 248 rotate;
+#X floatatom 372 194 0 0 0 0 - - -;
+#X msg 124 207 draw line;
+#X msg 142 240 draw fill;
+#X obj 306 431 primTri;
+#X text 48 23 this demonstrates how to create a triangle primitive
+;
+#X text 337 172 rotate the triangle;
+#X msg 561 306 1 0 0;
+#X msg 561 342 0 1 0;
+#X msg 561 378 0 0 1;
+#X text 555 270 colors;
+#X text 420 264 vertices;
+#X msg 423 286 1 1 0;
+#X msg 422 357 -1 1 0;
+#X msg 423 322 1 -2 0;
+#X text 192 52 the colors can be RGB or RGBA;
+#X obj 30 109 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 35 153 pd gemwin;
+#X msg 35 129 create;
+#X text 31 109 Create window and render;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 2 0 1 1;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 8 0 5 4;
+#X connect 9 0 5 5;
+#X connect 10 0 5 6;
+#X connect 13 0 5 1;
+#X connect 14 0 5 3;
+#X connect 15 0 5 2;
+#X connect 18 0 19 0;
+#X connect 19 0 18 0;
diff --git a/Gem/examples/01.basic/05.cube.pd b/Gem/examples/01.basic/05.cube.pd
new file mode 100644
index 0000000..dd5d72e
--- /dev/null
+++ b/Gem/examples/01.basic/05.cube.pd
@@ -0,0 +1,44 @@
+#N canvas 361 165 602 280 10;
+#X obj 372 91 gemhead;
+#X floatatom 416 122 0 -4.5 4.5 0 - - -;
+#X obj 372 197 cube;
+#X obj 372 159 translateXYZ;
+#X obj 30 109 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 35 153 pd gemwin;
+#X msg 35 129 create;
+#X text 31 109 Create window and render;
+#X connect 0 0 3 0;
+#X connect 1 0 3 1;
+#X connect 1 0 3 2;
+#X connect 3 0 2 0;
+#X connect 5 0 6 0;
+#X connect 6 0 5 0;
diff --git a/Gem/examples/01.basic/06.sphere.pd b/Gem/examples/01.basic/06.sphere.pd
new file mode 100644
index 0000000..9117bf7
--- /dev/null
+++ b/Gem/examples/01.basic/06.sphere.pd
@@ -0,0 +1,55 @@
+#N canvas 393 222 603 394 10;
+#X obj 275 174 gemhead;
+#X floatatom 319 205 0 0 0 0 - - -;
+#X obj 275 317 sphere;
+#X obj 22 325 world_light;
+#X obj 22 283 gemhead 1;
+#X text 377 279 change the number of slices;
+#X obj 275 242 rotateXYZ;
+#X msg 340 280 15;
+#X msg 303 280 5;
+#X obj 31 53 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X msg 51 75 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 36 97 pd gemwin;
+#X msg 36 73 create;
+#X text 32 53 Create window and render;
+#X connect 0 0 6 0;
+#X connect 1 0 6 1;
+#X connect 1 0 6 2;
+#X connect 4 0 3 0;
+#X connect 6 0 2 0;
+#X connect 7 0 2 2;
+#X connect 8 0 2 2;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
diff --git a/Gem/examples/01.basic/07.cylinder.pd b/Gem/examples/01.basic/07.cylinder.pd
new file mode 100644
index 0000000..fcc9bfe
--- /dev/null
+++ b/Gem/examples/01.basic/07.cylinder.pd
@@ -0,0 +1,62 @@
+#N canvas 393 222 603 394 10;
+#X obj 274 138 gemhead;
+#X floatatom 318 169 0 0 0 0 - - -;
+#X obj 22 325 world_light;
+#X obj 22 283 gemhead 1;
+#X text 369 251 change the number of slices;
+#X msg 421 269 15;
+#X msg 384 269 5;
+#X obj 274 356 cylinder;
+#X obj 274 207 rotateXYZ 26 26 0;
+#X floatatom 299 303 0 0 0 2 size - -;
+#X obj 31 53 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X msg 51 75 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 36 97 pd gemwin;
+#X msg 36 73 create;
+#X text 32 53 Create window and render;
+#X obj 94 325 world_light;
+#X obj 94 283 gemhead 1;
+#X obj 94 302 rotateXYZ 12 54 20;
+#X connect 0 0 8 0;
+#X connect 1 0 8 1;
+#X connect 1 0 8 2;
+#X connect 3 0 2 0;
+#X connect 5 0 7 2;
+#X connect 6 0 7 2;
+#X connect 8 0 7 0;
+#X connect 9 0 7 1;
+#X connect 11 0 12 0;
+#X connect 12 0 11 0;
+#X connect 15 0 16 0;
+#X connect 16 0 14 0;
diff --git a/Gem/examples/01.basic/08.model.pd b/Gem/examples/01.basic/08.model.pd
new file mode 100644
index 0000000..882095e
--- /dev/null
+++ b/Gem/examples/01.basic/08.model.pd
@@ -0,0 +1,61 @@
+#N canvas 348 152 673 462 12;
+#X floatatom 460 79 0 0 0 0 - - -;
+#X obj 385 44 gemhead;
+#X floatatom 446 179 0 0 0 0 - - -;
+#X obj 212 283 gemhead 1;
+#X obj 212 321 world_light;
+#X text 185 21 load in a model file;
+#X obj 33 85 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 165 79 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X obj 167 38 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X msg 54 75 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 5 0;
+#X connect 3 1 1 0;
+#X connect 4 0 5 0;
+#X connect 5 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 38 129 pd gemwin;
+#X msg 38 105 create;
+#X text 34 85 Create window and render;
+#X text 69 378 Gem can load 3d-models in the alias|wavefront .obj format
+;
+#X obj 385 255 model ../data/venus.obj;
+#X obj 385 205 rotate 0 0 1 0;
+#X obj 385 134 translate 0 0 0 1;
+#X obj 460 103 / 100;
+#X connect 0 0 14 0;
+#X connect 1 0 13 0;
+#X connect 2 0 12 1;
+#X connect 3 0 4 0;
+#X connect 7 0 8 0;
+#X connect 8 0 7 0;
+#X connect 12 0 11 0;
+#X connect 13 0 12 0;
+#X connect 14 0 13 1;
diff --git a/Gem/examples/01.basic/09.yelloTeapot.pd b/Gem/examples/01.basic/09.yelloTeapot.pd
new file mode 100644
index 0000000..328e9b8
--- /dev/null
+++ b/Gem/examples/01.basic/09.yelloTeapot.pd
@@ -0,0 +1,65 @@
+#N canvas 56 98 635 502 12;
+#X obj 350 226 gemhead;
+#X floatatom 458 298 0 0 0 0 - - -;
+#X obj 350 286 color;
+#X msg 452 231 1 1 1;
+#X text 438 159 change the color;
+#X obj 350 379 teapot;
+#X obj 350 337 rotateXYZ;
+#X obj 29 398 gemhead;
+#X obj 29 420 world_light;
+#X msg 452 196 1 1 0;
+#X text 109 29 this demonstrates how to create a yellow teapot;
+#X text 449 277 rotate the teapot;
+#X msg 456 365 draw line;
+#X msg 453 395 draw fill;
+#X obj 31 73 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 59 26 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X obj 59 45 t b b;
+#X msg 51 75 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 36 117 pd gemwin;
+#X msg 36 93 create;
+#X text 32 73 Create window and render;
+#X text 32 261 this is the famous;
+#X text 52 294 utah teapot;
+#X connect 0 0 2 0;
+#X connect 1 0 6 1;
+#X connect 1 0 6 2;
+#X connect 2 0 6 0;
+#X connect 3 0 2 1;
+#X connect 6 0 5 0;
+#X connect 7 0 8 0;
+#X connect 9 0 2 1;
+#X connect 12 0 5 0;
+#X connect 13 0 5 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
diff --git a/Gem/examples/02.advanced/00.gemwin-subpatch.pd b/Gem/examples/02.advanced/00.gemwin-subpatch.pd
new file mode 100644
index 0000000..5f0fc8f
--- /dev/null
+++ b/Gem/examples/02.advanced/00.gemwin-subpatch.pd
@@ -0,0 +1,61 @@
+#N canvas 0 0 725 412 10;
+#N canvas 95 194 290 179 Gem.init 0;
+#X obj 83 30 loadbang;
+#X msg 83 67 reset;
+#X obj 83 107 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 100 115 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 100 134 pd gemwin;
+#X text 247 146 just enable the toggle labeled "rendering" to create
+a window and start rendering \; switching the toggle off will destroy
+the window;
+#X text 260 60 by now we assume that you know how to control a Gem-window
+;
+#X text 252 268 apart from that \, the subpatch is really the same
+as [gemwin] itself \; e.g. you can send any message to it that [gemwin]
+understands.;
+#X text 249 204 thus you don't have to click on [create( and then [1(
+anymore...;
+#X text 249 113 for the sake of simplicity \, from now on the examples
+will use the subpatch on the left side to control the Gem-window.;
+#X connect 0 0 1 0;
diff --git a/Gem/examples/02.advanced/01.Separator.pd b/Gem/examples/02.advanced/01.Separator.pd
new file mode 100644
index 0000000..06d4c7a
--- /dev/null
+++ b/Gem/examples/02.advanced/01.Separator.pd
@@ -0,0 +1,143 @@
+#N canvas 215 32 781 537 10;
+#X obj 607 137 separator;
+#X msg 697 200 1;
+#X msg 734 199 0;
+#X text 206 264 on;
+#X text 243 262 off;
+#X msg 19 288 1;
+#X msg 55 290 0;
+#X msg 200 290 1;
+#X msg 238 290 0;
+#X obj 276 308 gemhead 1;
+#X obj 482 240 int 0;
+#X obj 534 241 + 2;
+#X floatatom 646 302 0 0 0 0 - - -;
+#X obj 607 464 sphere;
+#X obj 488 19 gemhead;
+#X floatatom 482 273 0 0 0 0 - - -;
+#X obj 97 350 world_light;
+#X obj 97 295 gemhead 1;
+#X obj 443 418 sphere;
+#X obj 646 275 int 0;
+#X obj 276 364 light;
+#X msg 644 431 20;
+#X msg 480 388 5;
+#X text 31 246 global light;
+#X text 242 236 local light;
+#X text 25 266 on;
+#X text 55 267 off;
+#X obj 482 206 metro 50;
+#X msg 482 176 1;
+#X msg 519 178 0;
+#X obj 646 241 metro 100;
+#X obj 708 273 + 1;
+#X obj 443 142 separator;
+#X obj 443 338 translateXYZ 2 0 0;
+#X obj 443 301 rotate 0 1 0;
+#X obj 607 341 rotate 1 0 0;
+#X obj 607 374 translateXYZ 0 2 0;
+#X obj 607 179 color 0 1 0;
+#X obj 644 401 r initstuff;
+#X obj 480 362 r initstuff;
+#X obj 94 473 s initstuff;
+#X obj 94 443 loadbang;
+#X obj 488 99 translateXYZ;
+#X floatatom 540 62 0 0 0 0 - - -;
+#X text 582 60 change this number;
+#N canvas 95 194 290 179 Gem.init 0;
+#X obj 83 30 loadbang;
+#X msg 161 76 reset;
+#X obj 45 107 outlet;
+#X msg 45 75 dimen 300 300;
+#X obj 88 51 t b b;
+#X connect 0 0 4 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 4 1 1 0;
+#X restore 230 117 pd Gem.init;
+#X msg 100 102 lighting \$1;
+#X text 89 60 turn lighting on/off;
+#X obj 100 78 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 100 134 pd gemwin;
+#X connect 0 0 37 0;
+#X connect 1 0 30 0;
+#X connect 2 0 30 0;
+#X connect 2 0 19 0;
+#X connect 5 0 16 0;
+#X connect 6 0 16 0;
+#X connect 7 0 20 0;
+#X connect 8 0 20 0;
+#X connect 9 0 20 0;
+#X connect 10 0 11 0;
+#X connect 10 0 15 0;
+#X connect 11 0 10 1;
+#X connect 12 0 35 1;
+#X connect 14 0 42 0;
+#X connect 15 0 34 1;
+#X connect 17 0 16 0;
+#X connect 19 0 12 0;
+#X connect 19 0 31 0;
+#X connect 21 0 13 2;
+#X connect 22 0 18 2;
+#X connect 27 0 10 0;
+#X connect 28 0 27 0;
+#X connect 29 0 27 0;
+#X connect 29 0 10 0;
+#X connect 30 0 19 0;
+#X connect 31 0 19 1;
+#X connect 32 0 34 0;
+#X connect 33 0 18 0;
+#X connect 34 0 33 0;
+#X connect 35 0 36 0;
+#X connect 36 0 13 0;
+#X connect 37 0 35 0;
+#X connect 38 0 21 0;
+#X connect 39 0 22 0;
+#X connect 41 0 40 0;
+#X connect 42 0 32 0;
+#X connect 42 0 0 0;
+#X connect 43 0 42 2;
+#X connect 45 0 49 0;
+#X connect 46 0 49 0;
+#X connect 48 0 46 0;
diff --git a/Gem/examples/02.advanced/02.Ortho.pd b/Gem/examples/02.advanced/02.Ortho.pd
new file mode 100644
index 0000000..329b2f8
--- /dev/null
+++ b/Gem/examples/02.advanced/02.Ortho.pd
@@ -0,0 +1,87 @@
+#N canvas 396 100 600 500 10;
+#X obj 358 140 gemhead;
+#X floatatom 377 222 0 0 0 0 - - -;
+#X obj 358 256 rotateXYZ;
+#X obj 150 135 gemhead 60;
+#X obj 150 162 ortho;
+#X obj 150 314 colorRGB 0 1 0;
+#X obj 358 332 model ../data/venus.obj;
+#X obj 150 347 model ../data/venus.obj;
+#X obj 12 257 gemhead 1;
+#X obj 12 296 world_light;
+#X floatatom 169 213 0 0 0 0 - - -;
+#X obj 150 249 rotateXYZ;
+#X obj 358 182 translateXYZ 1 0 0;
+#X obj 150 189 translateXYZ -1 0 0;
+#X obj 358 301 scale 3;
+#X obj 150 282 scale 3;
+#X text 168 6 display two models;
+#X text 136 85 rotate the two models to see the effect;
+#N canvas 22 20 213 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 43 61 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 18 95 pd gemwin;
+#X text 142 32 one model is in "perspective" mode;
+#X text 159 54 the other is in "orthographic" mode;
+#X connect 0 0 12 0;
+#X connect 1 0 2 1;
+#X connect 2 0 14 0;
+#X connect 3 0 4 0;
+#X connect 4 0 13 0;
+#X connect 5 0 7 0;
+#X connect 8 0 9 0;
+#X connect 10 0 11 1;
+#X connect 11 0 15 0;
+#X connect 12 0 2 0;
+#X connect 13 0 11 0;
+#X connect 14 0 6 0;
+#X connect 15 0 5 0;
+#X connect 18 0 19 0;
diff --git a/Gem/examples/02.advanced/03.View.pd b/Gem/examples/02.advanced/03.View.pd
new file mode 100644
index 0000000..835e551
--- /dev/null
+++ b/Gem/examples/02.advanced/03.View.pd
@@ -0,0 +1,85 @@
+#N canvas 55 43 729 499 10;
+#X obj 309 426 gemhead;
+#X obj 179 426 gemhead 1;
+#X obj 179 464 world_light;
+#X obj 309 464 model ../data/venus.obj;
+#X msg 240 111 view 0 0 \$1;
+#X floatatom 240 85 0 0 0 0 - - -;
+#X text 344 85 move the camera;
+#X msg 240 183 view 0 0 4 \$1;
+#X floatatom 240 147 0 0 0 0 - - -;
+#X text 343 106 default is 0 \, 0 \, 4;
+#X text 370 168 turn left and right;
+#X floatatom 236 220 0 0 0 0 - - -;
+#X msg 236 256 view 0 0 4 0 \$1;
+#X text 363 237 turn up and down;
+#X floatatom 237 294 0 0 0 0 - - -;
+#X msg 237 330 view 0 0 4 \$1 \$1;
+#X text 296 301 turn left and right and up and down;
+#N canvas 22 20 213 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 29 176 pd Gem.init;
+#X text 185 21 change the view-point;
+#X msg 542 107 view x y z;
+#X msg 547 184 view x y z phi;
+#X msg 550 267 view x y z phi theta;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 29 200 pd gemwin;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 4 0 22 0;
+#X connect 5 0 4 0;
+#X connect 7 0 22 0;
+#X connect 8 0 7 0;
+#X connect 11 0 12 0;
+#X connect 12 0 22 0;
+#X connect 14 0 15 0;
+#X connect 15 0 22 0;
+#X connect 17 0 22 0;
diff --git a/Gem/examples/02.advanced/03.View_OSD.pd b/Gem/examples/02.advanced/03.View_OSD.pd
new file mode 100644
index 0000000..e376276
--- /dev/null
+++ b/Gem/examples/02.advanced/03.View_OSD.pd
@@ -0,0 +1,317 @@
+#N canvas 50 151 946 464 10;
+#N canvas 50 173 290 229 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X msg 155 164 lighting 0;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X restore 48 98 pd Gem.init;
+#X obj 249 195 cube;
+#X msg 249 121 set \$1;
+#X floatatom 249 98 5 0 0 0 - - -;
+#X obj 249 169 translateXYZ 1 2 -3;
+#X obj 77 130 r view_mess;
+#N canvas 298 685 450 300 lighting 0;
+#X obj 214 196 world_light;
+#X obj 214 136 gemhead 1;
+#X obj 65 157 world_light;
+#X obj 65 105 gemhead 1;
+#X msg 278 97 0.5 0.8 0.6;
+#X obj 271 67 loadbang;
+#X obj 65 129 rotateXYZ -104 160 0;
+#X obj 214 164 rotateXYZ 104 -100 0;
+#X msg 137 98 1 1 1;
+#X obj 65 44 - 1;
+#X obj 65 18 inlet;
+#X msg 65 68 set \$1;
+#X connect 1 0 7 0;
+#X connect 3 0 6 0;
+#X connect 4 0 0 1;
+#X connect 5 0 8 0;
+#X connect 5 0 4 0;
+#X connect 6 0 2 0;
+#X connect 7 0 0 0;
+#X connect 8 0 2 1;
+#X connect 9 0 11 0;
+#X connect 10 0 9 0;
+#X connect 11 0 3 0;
+#X connect 11 0 1 0;
+#X restore 604 108 pd lighting;
+#X obj 271 291 translateXYZ 0 -2 -2;
+#X obj 271 265 gemhead -50;
+#X obj 550 108 gemhead;
+#X obj 550 131 model ../data/venus.obj;
+#X obj 249 145 gemhead -50;
+#X obj 271 315 text2d;
+#N canvas 6 51 381 205 textinit 0;
+#X obj 85 140 outlet;
+#X obj 94 63 loadbang;
+#X msg 100 107 text press left button and move mouse;
+#X msg 82 86 font ../data/vera.ttf;
+#X connect 1 0 3 0;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X restore 469 297 pd textinit;
+#X obj 249 56 tgl 15 0 empty stay_cube empty 0 -6 0 8 -262144 -1 -1
+0 100;
+#X obj 249 76 - 50;
+#X text 125 6 change the view-point \, but keep some objects at a fixed
+position;
+#X text 307 120 set the priority for rendering;
+#X text 431 188 a priority<0 will be rendered AFTER all other things
+\, and with viewpoint set to the origin! (objects will not be affected
+by a change of view);
+#X text 431 240 this is good for displaying logos \, help messages
+and cetera...;
+#X obj 588 282 gemhead -50;
+#N canvas 108 327 419 265 textinit 0;
+#X obj 82 198 outlet;
+#X obj 78 82 loadbang;
+#X msg 97 165 text occasionally press right button;
+#X obj 225 10 gemhead -1;
+#X obj 225 80 spigot;
+#X obj 225 39 t b b;
+#X obj 225 102 t b f;
+#X obj 264 60 f 1;
+#X msg 225 126 font ../data/vera.ttf;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 4 0;
+#X connect 5 1 7 0;
+#X connect 6 0 8 0;
+#X connect 6 1 7 1;
+#X connect 7 0 4 1;
+#X connect 8 0 0 0;
+#X restore 786 389 pd textinit;
+#X obj 588 407 text3d;
+#X obj 588 380 rotateXYZ;
+#X obj 588 332 render_trigger;
+#X obj 634 353 i;
+#X obj 687 353 % 360;
+#X obj 660 353 - 5;
+#X obj 588 308 translateXYZ 0 -7 -10;
+#N canvas 231 652 445 426 mousemove 0;
+#X obj 129 8 gemmouse;
+#X obj 136 88 pack;
+#X obj 136 110 spigot;
+#X obj 136 131 unpack;
+#X obj 136 196 t f f;
+#X obj 36 16 gemkeyname;
+#X obj 36 39 pack 0 s;
+#X obj 36 62 route 1;
+#X msg 36 107 0;
+#X msg 136 365 view \$2 \$3 \$1 0 0 0 0 1 0;
+#X obj 136 173 +;
+#X obj 136 221 * -1;
+#X obj 201 237 t f f;
+#X obj 201 174 +;
+#X obj 201 262 * -1;
+#X obj 36 129 t f f f;
+#X obj 136 388 s view_mess;
+#X text 61 106 reset;
+#N canvas 292 198 304 356 coordinates 0;
+#X obj 89 52 inlet;
+#X obj 94 331 outlet;
+#X obj 193 62 atan;
+#X msg 193 41 1;
+#X obj 193 84 / 45;
+#X obj 193 20 loadbang;
+#X text 94 29 r phi theta;
+#X obj 89 78 unpack 0 0 0;
+#X obj 128 123 *;
+#X obj 168 123 *;
+#X obj 120 197 cos;
+#X obj 150 198 sin;
+#X obj 120 166 t f f;
+#X obj 183 198 cos;
+#X obj 213 199 sin;
+#X obj 183 167 t f f;
+#X obj 120 230 *;
+#X obj 150 231 *;
+#X obj 85 275 *;
+#X obj 125 275 *;
+#X obj 174 277 *;
+#X obj 66 242 t f f f;
+#X obj 91 308 pack 0 0 0;
+#X connect 0 0 7 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 4 0 9 1;
+#X connect 4 0 8 1;
+#X connect 5 0 3 0;
+#X connect 7 0 21 0;
+#X connect 7 1 8 0;
+#X connect 7 2 9 0;
+#X connect 8 0 12 0;
+#X connect 9 0 15 0;
+#X connect 10 0 16 0;
+#X connect 11 0 17 0;
+#X connect 12 0 10 0;
+#X connect 12 1 11 0;
+#X connect 13 0 16 1;
+#X connect 13 0 17 1;
+#X connect 14 0 20 1;
+#X connect 15 0 13 0;
+#X connect 15 1 14 0;
+#X connect 16 0 18 1;
+#X connect 17 0 19 1;
+#X connect 18 0 22 0;
+#X connect 19 0 22 1;
+#X connect 20 0 22 2;
+#X connect 21 0 18 0;
+#X connect 21 1 19 0;
+#X connect 21 2 20 0;
+#X connect 22 0 1 0;
+#X restore 136 310 pd coordinates;
+#X obj 136 249 t b f;
+#X obj 136 289 pack 4 0 0;
+#X obj 177 46 t f f;
+#X obj 177 67 -;
+#X obj 136 45 t f f;
+#X obj 136 66 -;
+#X obj 278 57 s stay_cube;
+#X obj 278 35 select 1;
+#X obj 201 151 * 0.5;
+#X obj 136 153 * 0.5;
+#X obj 201 209 clip -90 90;
+#N canvas 1020 394 450 300 space 0;
+#X obj 42 13 inlet;
+#X obj 42 35 symbol;
+#X obj 42 87 select space;
+#X obj 123 111 select space;
+#X obj 204 87 makefilename %c;
+#X msg 204 59 32;
+#X obj 42 57 t s b;
+#X obj 42 159 t b;
+#X obj 42 181 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 6 0;
+#X connect 2 0 7 0;
+#X connect 2 1 3 0;
+#X connect 3 0 7 0;
+#X connect 4 0 3 1;
+#X connect 5 0 4 0;
+#X connect 6 0 2 0;
+#X connect 6 1 5 0;
+#X connect 7 0 8 0;
+#X restore 36 85 pd space;
+#X connect 0 0 23 0;
+#X connect 0 1 21 0;
+#X connect 0 2 2 1;
+#X connect 0 4 26 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 28 0;
+#X connect 3 1 27 0;
+#X connect 4 0 11 0;
+#X connect 4 1 10 1;
+#X connect 5 0 6 0;
+#X connect 5 1 6 1;
+#X connect 6 0 7 0;
+#X connect 7 0 30 0;
+#X connect 8 0 15 0;
+#X connect 9 0 16 0;
+#X connect 10 0 4 0;
+#X connect 11 0 19 0;
+#X connect 12 0 14 0;
+#X connect 12 1 13 1;
+#X connect 13 0 29 0;
+#X connect 14 0 20 2;
+#X connect 15 0 10 0;
+#X connect 15 1 10 1;
+#X connect 15 1 13 0;
+#X connect 15 2 13 1;
+#X connect 18 0 9 0;
+#X connect 19 0 20 0;
+#X connect 19 1 20 1;
+#X connect 20 0 18 0;
+#X connect 21 0 22 1;
+#X connect 21 1 22 0;
+#X connect 22 0 1 1;
+#X connect 23 0 24 1;
+#X connect 23 1 24 0;
+#X connect 24 0 1 0;
+#X connect 26 0 25 0;
+#X connect 27 0 13 0;
+#X connect 28 0 10 0;
+#X connect 29 0 12 0;
+#X connect 30 0 8 0;
+#X restore 731 34 pd mousemove;
+#X text 275 48 0...[cube] is rendered OSD;
+#X text 275 60 1...[cube] is rendered at "view";
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 48 204 pd gemwin;
+#X obj 604 88 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 2
+2;
+#X text 632 87 <- should the view affect light position or not;
+#X connect 0 0 32 0;
+#X connect 2 0 11 0;
+#X connect 3 0 2 0;
+#X connect 4 0 1 0;
+#X connect 5 0 32 0;
+#X connect 7 0 12 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 11 0 4 0;
+#X connect 13 0 12 0;
+#X connect 14 0 15 0;
+#X connect 15 0 3 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 23 0 22 0;
+#X connect 24 0 23 0;
+#X connect 24 1 25 0;
+#X connect 25 0 27 0;
+#X connect 25 0 23 1;
+#X connect 26 0 25 1;
+#X connect 27 0 26 0;
+#X connect 28 0 24 0;
+#X connect 33 0 6 0;
diff --git a/Gem/examples/02.advanced/04.Fog.pd b/Gem/examples/02.advanced/04.Fog.pd
new file mode 100644
index 0000000..28991af
--- /dev/null
+++ b/Gem/examples/02.advanced/04.Fog.pd
@@ -0,0 +1,99 @@
+#N canvas 275 99 721 506 10;
+#X floatatom 414 85 0 0 0 0 - - -;
+#X obj 385 44 gemhead;
+#X floatatom 403 165 0 0 0 0 - - -;
+#X obj 268 149 gemhead 1;
+#X obj 268 187 world_light;
+#X obj 385 279 model ../data/venus.obj;
+#X obj 385 134 translateXYZ;
+#X obj 385 205 rotateXYZ;
+#X obj 385 238 scale 3;
+#X obj 40 198 r fogmess;
+#X msg 335 395 \; fogmess fogmode 2 \; fogmess fog 0.1;
+#X msg 11 394 \; fogmess fogmode 0;
+#X msg 172 393 \; fogmess fogmode 1 \; fogmess fog 0.7;
+#X text 39 349 no fog;
+#X text 190 354 linear fog;
+#X text 371 353 exp fog;
+#X text 520 357 exp^2 fog;
+#X msg 485 399 \; fogmess fogmode 3 \; fogmess fog 0.1;
+#X text 184 21 various fog types;
+#X obj 522 132 gemhead;
+#X floatatom 458 97 5 0 0 0 - - -;
+#X obj 522 170 rotateXYZ 0 -117 0;
+#X obj 522 189 square 5;
+#X obj 522 151 translateXYZ -3.5 0 -6.57;
+#X obj 385 22 tgl 15 1 empty empty empty 20 8 0 8 -262144 -1 -1 1 1
+;
+#X obj 522 113 tgl 15 1 empty empty empty 20 8 0 8 -262144 -1 -1 1
+1;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X msg 131 165 fogcolor 1 0 0;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X restore 59 219 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 40 258 pd gemwin;
+#X connect 0 0 6 3;
+#X connect 1 0 6 0;
+#X connect 2 0 7 1;
+#X connect 3 0 4 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 5 0;
+#X connect 9 0 27 0;
+#X connect 19 0 23 0;
+#X connect 20 0 6 1;
+#X connect 21 0 22 0;
+#X connect 23 0 21 0;
+#X connect 24 0 1 0;
+#X connect 25 0 19 0;
+#X connect 26 0 27 0;
diff --git a/Gem/examples/02.advanced/05.Stereo.pd b/Gem/examples/02.advanced/05.Stereo.pd
new file mode 100644
index 0000000..8fc351e
--- /dev/null
+++ b/Gem/examples/02.advanced/05.Stereo.pd
@@ -0,0 +1,97 @@
+#N canvas 631 50 600 504 10;
+#X obj 426 54 gemhead;
+#X floatatom 464 134 0 0 0 0 - - -;
+#X obj 464 307 gemhead 1;
+#X obj 464 332 world_light;
+#X obj 426 181 model ../data/venus.obj;
+#X text 185 21 load in a model file;
+#X obj 426 81 translateXYZ 0 0 2;
+#X obj 426 157 rotateXYZ;
+#X text 149 40 and display it stereoscopically;
+#X msg 221 130 stereoSep \$1;
+#X msg 318 129 stereoFoc \$1;
+#X floatatom 221 92 0 0 0 0 - - -;
+#X floatatom 318 87 0 0 0 0 - - -;
+#X text 23 295 The default stereoSep is -15;
+#X text 23 315 The model may appear inside out depending on what viewing
+method you use.;
+#X text 23 350 If it does \, change the stereoSep to 15;
+#N canvas 30 60 290 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X msg 148 165 stereo 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X restore 58 173 pd Gem.init;
+#X msg 271 206 stereo 1;
+#X msg 271 228 stereo 2;
+#X msg 271 271 stereo 0;
+#X text 335 207 2 separate images;
+#X text 338 230 red/green stereo;
+#X text 336 273 no stereo;
+#X msg 271 248 stereo 3;
+#X text 338 250 crystal eyes stereo;
+#X text 32 402 NOTE: you need special hardware to use "crystal eyes
+stereo";
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 58 207 pd gemwin;
+#X connect 0 0 6 0;
+#X connect 1 0 7 2;
+#X connect 2 0 3 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 9 0 26 0;
+#X connect 10 0 26 0;
+#X connect 11 0 9 0;
+#X connect 12 0 10 0;
+#X connect 16 0 26 0;
+#X connect 17 0 26 0;
+#X connect 18 0 26 0;
+#X connect 19 0 26 0;
+#X connect 23 0 26 0;
diff --git a/Gem/examples/02.advanced/06.StereoParticle.pd b/Gem/examples/02.advanced/06.StereoParticle.pd
new file mode 100644
index 0000000..80b1f06
--- /dev/null
+++ b/Gem/examples/02.advanced/06.StereoParticle.pd
@@ -0,0 +1,88 @@
+#N canvas 396 160 600 500 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 136 part_color;
+#X obj 198 447 part_draw;
+#X msg 335 69 0 1 0;
+#X text 329 37 set the color range;
+#X obj 198 331 part_gravity 0 -0.01 0;
+#X obj 198 206 part_velsphere 0 0.2 0 0.2;
+#X text 310 269 set the number per frame;
+#X text 310 378 set the age to kill at;
+#X text 366 327 gravity to affect the particles;
+#X text 408 174 the velocity domain;
+#X text 406 191 a sphere at 0 \, 0.2 \, 0;
+#X msg 219 413 draw line;
+#X msg 298 413 draw point;
+#X msg 393 69 1 0 0;
+#X obj 198 270 part_source 25;
+#X obj 198 381 part_killold 45;
+#X text 406 208 radius = 0.2;
+#X msg 31 131 stereoSep 15;
+#X obj 198 174 part_size 2;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 stereo 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 87 170 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 31 187 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 20 0;
+#X connect 4 0 2 1;
+#X connect 6 0 17 0;
+#X connect 7 0 16 0;
+#X connect 13 0 3 0;
+#X connect 14 0 3 0;
+#X connect 15 0 2 2;
+#X connect 16 0 6 0;
+#X connect 17 0 3 0;
+#X connect 19 0 22 0;
+#X connect 20 0 7 0;
+#X connect 21 0 22 0;
diff --git a/Gem/examples/02.advanced/07.Snapshot1.pd b/Gem/examples/02.advanced/07.Snapshot1.pd
new file mode 100644
index 0000000..55b7776
--- /dev/null
+++ b/Gem/examples/02.advanced/07.Snapshot1.pd
@@ -0,0 +1,87 @@
+#N canvas 396 100 600 375 10;
+#X obj 210 252 gemhead;
+#X obj 210 312 model ../data/venus.obj;
+#X text 117 4 snap a portion of the graphics window into a texture
+;
+#X obj 210 278 translateXYZ 0 0 2;
+#X obj 423 193 gemhead;
+#X obj 423 255 pix_texture;
+#X msg 294 88 snap;
+#X msg 275 56 bang;
+#X msg 355 148 bang;
+#X msg 328 120 bang;
+#X obj 423 226 pix_snap 0 0 256 256;
+#X obj 423 284 rotateXYZ 0 45 25;
+#X obj 423 317 square 4;
+#X text 327 54 draw the model;
+#X text 348 87 snap the frame buffer;
+#X text 390 120 clear the frame buffer;
+#X text 407 146 draw the snapped texture;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 dimen 256 256;
+#X msg 179 165 buffer 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X restore 30 120 pd Gem.init;
+#X text 123 20 notice that this is using single buffered (see Gem.init)
+drawing!;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 30 137 pd gemwin;
+#X connect 0 0 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 10 0;
+#X connect 5 0 11 0;
+#X connect 6 0 10 0;
+#X connect 7 0 0 0;
+#X connect 8 0 4 0;
+#X connect 9 0 19 0;
+#X connect 10 0 5 0;
+#X connect 11 0 12 0;
+#X connect 17 0 19 0;
diff --git a/Gem/examples/02.advanced/08.Snapshot2.pd b/Gem/examples/02.advanced/08.Snapshot2.pd
new file mode 100644
index 0000000..ef84f34
--- /dev/null
+++ b/Gem/examples/02.advanced/08.Snapshot2.pd
@@ -0,0 +1,138 @@
+#N canvas 389 0 635 537 10;
+#X obj 64 405 gemhead;
+#X obj 64 509 model ../data/venus.obj;
+#X text 115 2 snap a portion of the graphics window into a texture
+;
+#X obj 399 365 pix_texture;
+#X obj 399 430 rotateXYZ;
+#X floatatom 500 399 0 0 0 0 - - -;
+#X msg 339 350 snap;
+#X msg 110 370 0;
+#X obj 399 256 render_trigger;
+#X obj 399 329 pix_snap 0 0 256 256;
+#X obj 399 219 gemhead 60;
+#X obj 399 453 square 3;
+#X msg 34 94 \; render 1;
+#X msg 32 50 \; render 0;
+#X obj 18 181 r render;
+#X obj 180 360 r render;
+#X obj 295 322 t b b;
+#X obj 295 197 r render;
+#X msg 295 260 clear;
+#X obj 295 229 sel 1;
+#X obj 233 400 gemhead;
+#X obj 233 510 model ../data/venus.obj;
+#X obj 233 472 color 1 0 0;
+#X obj 64 478 color 0 1 0;
+#X obj 233 432 translateXYZ 1 0 1;
+#X obj 64 438 translateXYZ -1 0 1;
+#X text 369 155 notice that we use render_trigger;
+#X text 369 172 to make sure that we snap before;
+#X text 373 190 the square is drawn;
+#X text 126 42 you may need to turn rendering off \, then on;
+#X text 128 59 to get the snap to work right. This is because;
+#X text 127 77 the first time rendering is turned on \, we might;
+#X text 128 95 have garbage in the frame buffer;
+#X text 127 126 rotate the square to see the texture;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 dimen 256 256;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 84 181 pd Gem.init;
+#N canvas 0 0 450 300 oneshot 0;
+#X obj 93 82 inlet;
+#X obj 187 148 bang;
+#X msg 187 167 1;
+#X obj 93 214 spigot;
+#X msg 155 168 0;
+#X obj 93 172 t a b;
+#X obj 93 240 t a b;
+#X obj 136 192 i 1;
+#X obj 93 107 route clear;
+#X obj 93 262 outlet;
+#X connect 0 0 8 0;
+#X connect 1 0 2 0;
+#X connect 2 0 7 1;
+#X connect 3 0 6 0;
+#X connect 4 0 7 1;
+#X connect 5 0 3 0;
+#X connect 5 1 7 0;
+#X connect 6 0 9 0;
+#X connect 6 1 4 0;
+#X connect 7 0 3 1;
+#X connect 8 0 1 0;
+#X connect 8 1 5 0;
+#X restore 295 287 pd oneshot;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 18 206 pd gemwin;
+#X connect 0 0 25 0;
+#X connect 3 0 4 0;
+#X connect 4 0 11 0;
+#X connect 5 0 4 2;
+#X connect 6 0 9 0;
+#X connect 7 0 0 0;
+#X connect 7 0 20 0;
+#X connect 8 0 9 0;
+#X connect 8 1 35 0;
+#X connect 9 0 3 0;
+#X connect 10 0 8 0;
+#X connect 14 0 36 0;
+#X connect 15 0 0 0;
+#X connect 15 0 20 0;
+#X connect 16 0 7 0;
+#X connect 16 1 6 0;
+#X connect 17 0 19 0;
+#X connect 18 0 35 0;
+#X connect 19 0 18 0;
+#X connect 20 0 24 0;
+#X connect 22 0 21 0;
+#X connect 23 0 1 0;
+#X connect 24 0 22 0;
+#X connect 25 0 23 0;
+#X connect 34 0 36 0;
+#X connect 35 0 16 0;
diff --git a/Gem/examples/02.advanced/09.SnapshotSave.pd b/Gem/examples/02.advanced/09.SnapshotSave.pd
new file mode 100644
index 0000000..92bc2eb
--- /dev/null
+++ b/Gem/examples/02.advanced/09.SnapshotSave.pd
@@ -0,0 +1,145 @@
+#N canvas 54 216 940 412 10;
+#N canvas 338 262 290 225 Gem.init 0;
+#X obj 83 30 loadbang;
+#X msg 161 76 reset;
+#X obj 45 184 outlet;
+#X obj 88 51 t b b;
+#X msg 45 75 dimen 128 128;
+#X msg 71 109 lighting 1;
+#X msg 127 171 color 0.5 0.3 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 0 6 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X connect 6 0 2 0;
+#X restore 51 96 pd Gem.init;
+#X obj 255 118 gemhead;
+#X obj 255 144 render_trigger;
+#X obj 332 256 + 1;
+#X obj 362 256 % 360;
+#X obj 255 279 rotateXYZ;
+#X obj 255 359 pix_texture;
+#X obj 62 265 gemhead;
+#X obj 62 291 world_light;
+#X obj 652 251 gemhead 99;
+#X obj 548 154 savepanel;
+#X msg 673 293 file \$1;
+#X obj 420 182 symbol /tmp/gemshot;
+#X obj 420 110 bng 30 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 420 280 makefilename %s00000.tif;
+#X msg 420 308 open \$1;
+#X obj 255 387 square 4;
+#X obj 255 334 pix_image;
+#X msg 134 269 list 1 1 0.4;
+#X obj 255 306 color 1 0.3 1;
+#X obj 134 248 loadbang;
+#X obj 420 210 t b s b s;
+#X obj 420 258 symbol;
+#X obj 420 234 del 500;
+#X obj 301 188 spigot;
+#X obj 338 165 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X floatatom 301 238 5 0 0 0 - - -;
+#X obj 301 216 i;
+#X obj 548 134 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 338 123 loadbang;
+#X text 186 22 similar to the previous example: [pix_write] gets the
+current output window and writes it not into a texture but into a file
+(TIFF or JPEG);
+#X text 492 364 mind the 99: [pix_write] has to be called late \, to
+ensure that all that you want is already rendered onto the screen.
+;
+#X msg 789 285 auto \$1;
+#X obj 793 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 51 113 pd gemwin;
+#X obj 60 321 gemhead;
+#X obj 60 341 translate 1 0 1 0;
+#X obj 60 362 color 0 1 0;
+#X obj 60 382 sphere 0.5;
+#X obj 652 326 pix_write;
+#X connect 0 0 34 0;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 24 0;
+#X connect 3 0 4 0;
+#X connect 4 0 27 1;
+#X connect 5 0 19 0;
+#X connect 6 0 16 0;
+#X connect 7 0 8 0;
+#X connect 9 0 39 0;
+#X connect 10 0 12 1;
+#X connect 11 0 39 0;
+#X connect 12 0 21 0;
+#X connect 13 0 12 0;
+#X connect 14 0 15 0;
+#X connect 15 0 17 0;
+#X connect 17 0 6 0;
+#X connect 18 0 8 1;
+#X connect 19 0 17 0;
+#X connect 20 0 18 0;
+#X connect 21 0 23 0;
+#X connect 21 1 22 1;
+#X connect 21 2 39 0;
+#X connect 21 3 11 0;
+#X connect 22 0 14 0;
+#X connect 23 0 22 0;
+#X connect 24 0 27 0;
+#X connect 25 0 24 1;
+#X connect 26 0 3 0;
+#X connect 26 0 5 1;
+#X connect 26 0 5 2;
+#X connect 26 0 5 3;
+#X connect 27 0 26 0;
+#X connect 28 0 10 0;
+#X connect 29 0 25 0;
+#X connect 32 0 39 0;
+#X connect 33 0 32 0;
+#X connect 35 0 36 0;
+#X connect 36 0 37 0;
+#X connect 37 0 38 0;
diff --git a/Gem/examples/02.advanced/09.SnapshotSaveHD.pd b/Gem/examples/02.advanced/09.SnapshotSaveHD.pd
new file mode 100644
index 0000000..b14083b
--- /dev/null
+++ b/Gem/examples/02.advanced/09.SnapshotSaveHD.pd
@@ -0,0 +1,44 @@
+#N canvas 73 51 832 392 10;
+#X msg 26 26 create \, 1;
+#X msg 39 53 destroy;
+#X obj 340 29 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 151 29 gemhead;
+#X text 256 220 <- the scene you want to save in the given resolution
+;
+#X text 359 29 <- save the scene in the given resolution;
+#X obj 26 77 gemwin;
+#X text 147 283 [snapshotHD] gives the possibility to capture a scene
+in a defined resolution. You can see the proportion of the capture
+in the GEM window with the white rectangle edge.;
+#X obj 151 170 t a b;
+#X obj 151 220 accumrotate;
+#X obj 151 241 teapot;
+#X msg 193 196 1;
+#X obj 151 72 s \$0-gemhead;
+#X obj 151 125 gemreceive \$0-gemhead;
+#X obj 151 145 separator;
+#X text 303 136 <-- a [gemhead] replacement;
+#X text 407 50 1st and 2nd arguments : resolution (here : 3000x2000
+pixels);
+#X obj 151 52 snapshotHD 4000 2000 /tmp/myPic.tif;
+#X text 410 68 3rd argument : TIFF file name (here : /tmp/myPic.tif)
+;
+#X text 152 333 [snapshotHD] uses openGL-framebuffers. thus the maximum
+resolution is limited by your openGL-implementation!;
+#X msg 342 90 symbol /tmp/foo.tif;
+#X text 485 93 <- save as another imagefile.;
+#X connect 0 0 6 0;
+#X connect 1 0 6 0;
+#X connect 2 0 17 1;
+#X connect 3 0 17 0;
+#X connect 8 0 9 0;
+#X connect 8 1 11 0;
+#X connect 9 0 10 0;
+#X connect 11 0 9 2;
+#X connect 11 0 9 3;
+#X connect 11 0 9 1;
+#X connect 13 0 14 0;
+#X connect 14 0 8 0;
+#X connect 17 0 12 0;
+#X connect 20 0 17 1;
diff --git a/Gem/examples/02.advanced/10.LinearPath.pd b/Gem/examples/02.advanced/10.LinearPath.pd
new file mode 100644
index 0000000..1a75686
--- /dev/null
+++ b/Gem/examples/02.advanced/10.LinearPath.pd
@@ -0,0 +1,87 @@
+#N canvas 372 134 624 496 10;
+#X floatatom 481 249 0 0 0 0 - - -;
+#X msg 422 21 1;
+#X msg 455 21 0;
+#X floatatom 451 172 0 0 0 0 - - -;
+#X obj 350 184 gemhead;
+#X obj 350 240 color;
+#X obj 350 364 square;
+#N canvas 21 297 600 400 arrays 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array array2 15 float 0;
+#X array array3 24 float 0;
+#X coords 0 1 15 -1 400 300 1;
+#X restore 63 4 graph;
+#X restore 38 447 page arrays;
+#X obj 422 124 line;
+#X msg 422 95 0 \, 1 2000;
+#X obj 350 334 translate 1 0 0 0;
+#X msg 39 347 \; array2 resize 15 \; array2 read ../data/valcolor.tab
+\; array3 resize 24 \; array3 read ../data/valmotion.tab;
+#X obj 422 63 metro 2000;
+#X obj 422 213 linear_path 3 array2;
+#X obj 464 300 linear_path 3 array3;
+#X text 109 29 this demonstrates the linear_path object;
+#X obj 39 313 loadbang;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 68 196 outlet;
+#X obj 68 86 loadbang;
+#X msg 68 136 reset;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X restore 54 134 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 54 151 pd gemwin;
+#X connect 0 0 14 0;
+#X connect 1 0 12 0;
+#X connect 2 0 12 0;
+#X connect 3 0 13 0;
+#X connect 4 0 5 0;
+#X connect 5 0 10 0;
+#X connect 8 0 13 0;
+#X connect 8 0 14 0;
+#X connect 9 0 8 0;
+#X connect 10 0 6 0;
+#X connect 12 0 9 0;
+#X connect 13 0 5 1;
+#X connect 14 0 10 2;
+#X connect 16 0 11 0;
+#X connect 17 0 18 0;
diff --git a/Gem/examples/02.advanced/11.SplinePath.pd b/Gem/examples/02.advanced/11.SplinePath.pd
new file mode 100644
index 0000000..3938ed8
--- /dev/null
+++ b/Gem/examples/02.advanced/11.SplinePath.pd
@@ -0,0 +1,87 @@
+#N canvas 355 106 641 505 10;
+#X floatatom 492 288 0 0 0 0 - - -;
+#X msg 421 55 1;
+#X msg 461 55 0;
+#X floatatom 463 210 0 0 0 0 - - -;
+#X obj 350 226 gemhead;
+#X obj 350 289 color;
+#X obj 350 403 square;
+#N canvas 21 297 600 400 arrays 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array array2 18 float 0;
+#X array array3 24 float 0;
+#X coords 0 1 15 -1 400 300 1;
+#X restore 63 4 graph;
+#X restore 26 474 page arrays;
+#X obj 421 254 spline_path 3 array2;
+#X obj 421 163 line;
+#X msg 421 129 0 \, 1 2000;
+#X obj 350 351 translate 1 0 0 0;
+#X obj 464 320 spline_path 3 array3;
+#X obj 421 98 metro 2000;
+#X text 109 29 this demonstrates the spline_path object;
+#X obj 28 345 loadbang;
+#X msg 28 380 \; array2 resize 18 \; array2 read ../data/valcolor.tab
+\; array3 resize 24 \; array3 read ../data/valmotion.tab;
+#N canvas 26 40 290 300 Gem.init 0;
+#X obj 68 196 outlet;
+#X obj 68 86 loadbang;
+#X msg 68 136 reset;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X restore 33 148 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 33 171 pd gemwin;
+#X connect 0 0 12 0;
+#X connect 1 0 13 0;
+#X connect 2 0 13 0;
+#X connect 3 0 8 0;
+#X connect 4 0 5 0;
+#X connect 5 0 11 0;
+#X connect 8 0 5 1;
+#X connect 9 0 8 0;
+#X connect 9 0 12 0;
+#X connect 10 0 9 0;
+#X connect 11 0 6 0;
+#X connect 12 0 11 2;
+#X connect 13 0 10 0;
+#X connect 15 0 16 0;
+#X connect 17 0 18 0;
diff --git a/Gem/examples/02.advanced/12.Hsv.pd b/Gem/examples/02.advanced/12.Hsv.pd
new file mode 100644
index 0000000..28379a2
--- /dev/null
+++ b/Gem/examples/02.advanced/12.Hsv.pd
@@ -0,0 +1,105 @@
+#N canvas 433 87 762 506 12;
+#X obj 248 352 gemhead;
+#X obj 248 412 color;
+#X msg 559 202 1 1 1;
+#X msg 524 156 1 0 0;
+#X obj 248 441 square;
+#X text 396 19 change the color;
+#X text 2 90 create and destroy the graphics window;
+#X obj 524 266 rgb2hsv;
+#X obj 379 303 hsv2rgb;
+#X obj 379 330 unpack 0 0 0;
+#X floatatom 379 363 0 0 0 3 red - -;
+#X floatatom 431 361 0 0 0 3 green - -;
+#X floatatom 490 361 0 0 0 3 blue - -;
+#X obj 541 327 unpack 0 0 0;
+#X floatatom 541 416 0 0 0 3 hue - -;
+#X floatatom 593 391 0 0 0 3 saturation - -;
+#X floatatom 632 353 0 0 0 3 value - -;
+#X msg 612 246 0 1 0;
+#X floatatom 379 85 0 0 1 2 hue #0-hue -;
+#X floatatom 400 121 0 0 1 2 saturation #0-saturation -;
+#X obj 399 174 t b f;
+#X floatatom 437 148 0 0 1 2 value #0-value -;
+#X obj 437 174 t b f;
+#X text 526 139 red;
+#X text 559 185 white;
+#X text 614 224 green;
+#X obj 379 203 pack 0 1 1;
+#N canvas 30 60 290 300 Gem.init 0;
+#X obj 68 196 outlet;
+#X obj 68 86 loadbang;
+#X msg 68 136 reset;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X restore 26 133 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 26 162 pd gemwin;
+#X obj 532 52 hsl 128 15 0 1 0 0 \$0-hue empty hue -2 -8 0 10 -262144
+-1 -1 0 1;
+#X obj 532 82 hsl 128 15 0 1 0 0 \$0-saturation empty saturation -2
+-8 0 10 -262144 -1 -1 0 1;
+#X obj 532 112 hsl 128 15 0 1 0 0 \$0-value empty value -2 -8 0 10
+-262144 -1 -1 0 1;
+#X connect 0 0 1 0;
+#X connect 1 0 4 0;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 0 13 0;
+#X connect 8 0 1 1;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 11 0;
+#X connect 9 2 12 0;
+#X connect 13 0 14 0;
+#X connect 13 1 15 0;
+#X connect 13 2 16 0;
+#X connect 17 0 7 0;
+#X connect 18 0 26 0;
+#X connect 19 0 20 0;
+#X connect 20 0 26 0;
+#X connect 20 1 26 1;
+#X connect 21 0 22 0;
+#X connect 22 0 26 0;
+#X connect 22 1 26 2;
+#X connect 26 0 8 0;
+#X connect 27 0 28 0;
diff --git a/Gem/examples/02.advanced/13.ModelRescale.pd b/Gem/examples/02.advanced/13.ModelRescale.pd
new file mode 100644
index 0000000..3da2927
--- /dev/null
+++ b/Gem/examples/02.advanced/13.ModelRescale.pd
@@ -0,0 +1,107 @@
+#N canvas 8 40 682 502 12;
+#X floatatom 241 220 0 0 0 0 - - -;
+#X obj 208 268 translate;
+#X msg 275 220 0 0 1;
+#X obj 208 178 gemhead;
+#X floatatom 237 304 0 0 0 0 - - -;
+#X obj 43 357 gemhead 1;
+#X obj 43 395 world_light;
+#X msg 285 307 open ../data/venus.obj;
+#X floatatom 511 227 0 0 0 0 - - -;
+#X obj 478 275 translate;
+#X msg 545 227 0 0 1;
+#X obj 478 185 gemhead;
+#X msg 521 321 0 1 0;
+#X obj 478 346 rotate;
+#X floatatom 499 298 0 0 0 0 - - -;
+#X obj 478 396 model ../data/venus.obj;
+#X obj 208 339 scaleXYZ;
+#X obj 327 149 loadbang;
+#X msg 271 187 -10;
+#X msg 325 246 0.1;
+#X obj 333 278 t b b;
+#X text 224 34 notice that the 'rescale 0' message is sent;
+#X text 227 90 notice the size difference due to the scale and;
+#X text 229 109 translate objects on the left chain;
+#N canvas 22 20 213 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 34 98 pd Gem.init;
+#X msg 289 347 rescale 0;
+#X obj 208 389 model;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 124 pd gemwin;
+#X text 228 51 before the 'open' occurs;
+#X connect 0 0 1 1;
+#X connect 1 0 16 0;
+#X connect 2 0 1 2;
+#X connect 3 0 1 0;
+#X connect 4 0 16 1;
+#X connect 4 0 16 2;
+#X connect 4 0 16 3;
+#X connect 5 0 6 0;
+#X connect 7 0 26 0;
+#X connect 8 0 9 1;
+#X connect 9 0 13 0;
+#X connect 10 0 9 2;
+#X connect 11 0 9 0;
+#X connect 12 0 13 2;
+#X connect 13 0 15 0;
+#X connect 14 0 13 1;
+#X connect 16 0 26 0;
+#X connect 17 0 2 0;
+#X connect 17 0 18 0;
+#X connect 17 0 19 0;
+#X connect 17 0 20 0;
+#X connect 18 0 0 0;
+#X connect 19 0 4 0;
+#X connect 20 0 7 0;
+#X connect 20 1 25 0;
+#X connect 24 0 27 0;
+#X connect 25 0 26 0;
diff --git a/Gem/examples/02.advanced/14.RenderOrder.pd b/Gem/examples/02.advanced/14.RenderOrder.pd
new file mode 100644
index 0000000..a199d0b
--- /dev/null
+++ b/Gem/examples/02.advanced/14.RenderOrder.pd
@@ -0,0 +1,149 @@
+#N canvas 0 0 986 385 10;
+#X text 276 35 Blue Sphere;
+#N canvas 95 194 290 179 Gem.init 0;
+#X obj 118 18 loadbang;
+#X msg 201 78 reset;
+#X obj 118 113 outlet;
+#X obj 118 45 t b b;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 1 1 0;
+#X restore 72 145 pd Gem.init;
+#X obj 265 98 color 0 0 1 0.5;
+#X obj 265 229 pix_texture;
+#X obj 265 182 pix_image ../data/dancer.JPG;
+#X obj 265 251 alpha;
+#X obj 265 207 pix_alpha;
+#X obj 265 68 gemhead 50;
+#X obj 681 244 alpha;
+#X obj 681 173 gemhead 50;
+#X obj 681 197 color 0 1 0 0.5;
+#X obj 681 222 translateXYZ 0 -0.5 -1;
+#X obj 849 123 int 0;
+#X obj 891 123 + 1;
+#X obj 849 100 metro 50;
+#X obj 923 122 % 50;
+#X obj 849 81 tgl 15 0 empty render_onoff empty 0 -6 0 8 -262144 -1
+-1 0 1;
+#X obj 849 146 / 25;
+#X obj 849 168 - 1;
+#X msg 681 124 set \$1;
+#X floatatom 681 101 5 0 0 0 - - -;
+#X msg 679 9 40;
+#X msg 696 32 60;
+#X obj 849 191 t f f;
+#X msg 709 54 auto;
+#N canvas 189 208 450 300 set-priority 0;
+#X obj 103 59 inlet;
+#X obj 94 277 outlet;
+#X obj 103 96 route auto;
+#X obj 352 59 inlet;
+#X obj 352 88 < 0;
+#X obj 352 112 change;
+#X obj 352 135 select 1 0;
+#X msg 327 169 40;
+#X msg 363 170 60;
+#X obj 94 247 spigot;
+#X obj 168 120 t f b;
+#X msg 198 145 0;
+#X msg 103 117 10;
+#X obj 103 138 t f f;
+#X connect 0 0 2 0;
+#X connect 2 0 12 0;
+#X connect 2 1 10 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 6 1 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 9 0;
+#X connect 9 0 1 0;
+#X connect 10 0 1 0;
+#X connect 10 1 11 0;
+#X connect 11 0 9 1;
+#X connect 12 0 13 0;
+#X connect 13 0 9 1;
+#X connect 13 1 5 0;
+#X restore 693 76 pd set-priority;
+#X obj 265 272 square 3;
+#X obj 681 266 square 3;
+#X text 866 81 movement on/off;
+#X text 736 9 priority 40 (<50);
+#X text 735 28 priority 60 (>50);
+#X text 748 51 dynamic ordering;
+#X text 218 299 the rendering order does matter \, when doing things
+like alpha-blending: alpha-blending only works if the semi-transparent
+(alpha<1) object is rendered AFTER the objects that shine through;
+#X text 596 291 this turns out to be a problem in dynamic scenes (eg:
+with moving objects/viewpoint):: if a semi-transparent object used
+to be "in front" of another semi-transparent object \, but suddenly
+becomes "behind" \, the rendering order has to be changed. do this
+\, by giving the [gemhead] a "set" message;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 72 168 pd gemwin;
+#X connect 1 0 34 0;
+#X connect 2 0 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 26 0;
+#X connect 6 0 3 0;
+#X connect 7 0 2 0;
+#X connect 8 0 27 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 8 0;
+#X connect 12 0 13 0;
+#X connect 12 0 17 0;
+#X connect 13 0 15 0;
+#X connect 14 0 12 0;
+#X connect 15 0 12 1;
+#X connect 16 0 14 0;
+#X connect 17 0 18 0;
+#X connect 18 0 23 0;
+#X connect 19 0 9 0;
+#X connect 20 0 19 0;
+#X connect 21 0 25 0;
+#X connect 22 0 25 0;
+#X connect 23 0 11 3;
+#X connect 23 1 25 1;
+#X connect 24 0 25 0;
+#X connect 25 0 20 0;
diff --git a/Gem/examples/02.advanced/15.GemWin.pd b/Gem/examples/02.advanced/15.GemWin.pd
new file mode 100644
index 0000000..a414b15
--- /dev/null
+++ b/Gem/examples/02.advanced/15.GemWin.pd
@@ -0,0 +1,73 @@
+#N canvas 51 56 650 553 10;
+#X obj 53 224 gemwin;
+#X obj 38 397 gemmouse;
+#X obj 109 206 r gemwin_mess;
+#X obj 63 459 s gemwin_mess;
+#X obj 63 418 del 100;
+#X msg 63 439 destroy;
+#X obj 15 86 cnv 15 100 100 empty empty empty 20 12 0 14 -24198 -66577
+0;
+#X msg 53 105 create;
+#X msg 26 143 destroy;
+#X obj 238 3 cnv 15 400 480 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#X obj 14 296 cnv 15 180 80 empty empty cursor 20 0 0 14 -195568 -66577
+0;
+#X msg 20 327 \; gemwin_mess cursor \$1;
+#X obj 20 308 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
+;
+#X text 39 306 show/hide cursor;
+#X text 32 484 press the left-mouse-button to kill the gem-window;
+#X obj 247 36 cnv 15 380 120 empty empty title-bar 20 0 0 14 -233017
+-66577 0;
+#X msg 253 49 title Graphic's_Environment_for_Multimedia;
+#X msg 286 94 title \$1;
+#X symbolatom 286 72 10 0 0;
+#X text 359 94 type your own title;
+#X obj 253 125 s gemwin_mess;
+#X obj 247 259 cnv 15 380 120 empty empty dimensions+positioning 20
+0 0 14 -233017 -66577 0;
+#X obj 253 348 s gemwin_mess;
+#X obj 248 167 cnv 15 380 80 empty empty window-decorations 20 0 0
+14 -233017 -66577 0;
+#X obj 258 185 tgl 15 1 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X msg 258 204 \; gemwin_mess border \$1;
+#X msg 253 285 dimen 500 500;
+#X msg 273 315 dimen 200 421;
+#X obj 417 347 s gemwin_mess;
+#X msg 417 284 offset 0 0;
+#X msg 437 314 offset 500 70;
+#X text 277 183 with/out borders;
+#X text 534 282 offset might;
+#X text 540 298 work only;
+#X text 552 315 without;
+#X text 548 330 borders !;
+#X obj 247 391 cnv 15 380 80 empty empty full-screen 20 0 0 14 -233017
+-66577 0;
+#X obj 257 409 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+1;
+#X msg 257 428 \; gemwin_mess fullscreen \$1;
+#X text 276 407 fullscreen/windowed;
+#X text 11 14 how to control the GEM-window;
+#X text 291 7 use these BEFORE creating the window!;
+#X text 466 398 titles \, borders \,;
+#X text 458 415 dimensions & offsets;
+#X text 468 432 mean nothing in;
+#X text 463 448 fullscreen mode !;
+#X connect 1 2 4 0;
+#X connect 2 0 0 0;
+#X connect 4 0 5 0;
+#X connect 5 0 3 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 12 0 11 0;
+#X connect 16 0 20 0;
+#X connect 17 0 20 0;
+#X connect 18 0 17 0;
+#X connect 24 0 25 0;
+#X connect 26 0 22 0;
+#X connect 27 0 22 0;
+#X connect 29 0 28 0;
+#X connect 30 0 28 0;
+#X connect 37 0 38 0;
diff --git a/Gem/examples/02.advanced/16.vertex_program.pd b/Gem/examples/02.advanced/16.vertex_program.pd
new file mode 100644
index 0000000..3d940b4
--- /dev/null
+++ b/Gem/examples/02.advanced/16.vertex_program.pd
@@ -0,0 +1,189 @@
+#N canvas 27 90 540 557 10;
+#X obj 404 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 235 42 gemhead;
+#X obj 235 111 pix_texture;
+#X obj 235 497 rotateXYZ;
+#X obj 106 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 167 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 395 250 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 -0.25 256;
+#X obj 425 267 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0.5 256;
+#X obj 458 285 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0.2 256;
+#X obj 425 304 t b f;
+#X obj 462 304 t b f;
+#X obj 303 413 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 34336 256;
+#X obj 371 355 nbx 5 14 -1e+37 1e+37 0 0 empty empty parameter# 0 -6
+0 10 -262144 -1 -1 0 256;
+#X obj 440 324 pack 0 0 0 0;
+#X obj 235 431 GEMglProgramEnvParameter4fvARB;
+#X obj 242 358 loadbang;
+#X obj 242 390 GLdefine GL_VERTEX_PROGRAM_ARB;
+#X text 253 374 GL_VERTEX_PROGRAM_ARB = 34336;
+#X msg 188 136 print;
+#X text 382 23 open a texture;
+#X text 343 123 open a vertex-program;
+#X text 420 469 open a model;
+#N canvas 0 0 450 300 defaults 0;
+#X obj 112 43 loadbang;
+#X msg 102 121 0;
+#X obj 102 186 outlet;
+#X obj 102 84 t b b;
+#X obj 164 156 unpack 0 0 0;
+#X obj 168 188 outlet;
+#X obj 217 189 outlet;
+#X obj 263 189 outlet;
+#X text 101 208 param#;
+#X text 205 216 param-values;
+#X obj 179 44 inlet;
+#X msg 161 122 -0.25 0.5 0.2;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 1 0;
+#X connect 3 1 11 0;
+#X connect 4 0 5 0;
+#X connect 4 1 6 0;
+#X connect 4 2 7 0;
+#X connect 10 0 3 0;
+#X connect 11 0 4 0;
+#X restore 371 228 pd defaults;
+#X msg 371 211 default;
+#X obj 235 531 model ../data/venus.obj;
+#X obj 235 82 pix_image ../data/64shade.tif;
+#N canvas 0 0 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 347 141 pd open;
+#X obj 418 46 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 0 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 361 45 pd open;
+#X msg 361 65 open ../data/64shade.tif;
+#X obj 434 495 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 0 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 377 494 pd open;
+#X msg 377 514 open ../data/venus.obj;
+#X obj 44 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X msg 66 313 bang;
+#X text 60 294 2nd click me;
+#X obj 143 330 t b b b;
+#X text 54 448 3rd play me;
+#X text 79 18 1st click me;
+#X text 295 275 4th play me;
+#X msg 347 161 open ../data/toon.vp;
+#X obj 235 178 vertex_program ../data/toon.vp;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 54 83 pd gemwin;
+#X connect 0 0 26 0;
+#X connect 1 0 25 0;
+#X connect 2 0 41 0;
+#X connect 3 0 24 0;
+#X connect 4 0 3 2;
+#X connect 5 0 3 3;
+#X connect 6 0 13 0;
+#X connect 7 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 13 0;
+#X connect 9 1 13 1;
+#X connect 10 0 13 0;
+#X connect 10 1 13 2;
+#X connect 11 0 14 1;
+#X connect 12 0 14 2;
+#X connect 13 0 14 3;
+#X connect 14 0 3 0;
+#X connect 15 0 16 0;
+#X connect 16 0 11 0;
+#X connect 18 0 41 0;
+#X connect 22 0 12 0;
+#X connect 22 1 6 0;
+#X connect 22 2 7 0;
+#X connect 22 3 8 0;
+#X connect 23 0 22 0;
+#X connect 25 0 2 0;
+#X connect 26 0 40 0;
+#X connect 27 0 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 25 0;
+#X connect 30 0 31 0;
+#X connect 31 0 32 0;
+#X connect 32 0 24 0;
+#X connect 33 0 3 1;
+#X connect 34 0 36 0;
+#X connect 36 0 32 0;
+#X connect 36 1 40 0;
+#X connect 36 2 29 0;
+#X connect 40 0 41 0;
+#X connect 41 0 14 0;
diff --git a/Gem/examples/02.advanced/17.fragment_program.pd b/Gem/examples/02.advanced/17.fragment_program.pd
new file mode 100644
index 0000000..2b1ce3b
--- /dev/null
+++ b/Gem/examples/02.advanced/17.fragment_program.pd
@@ -0,0 +1,126 @@
+#N canvas 27 90 540 557 10;
+#X obj 404 142 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 235 42 gemhead;
+#X obj 235 497 rotateXYZ;
+#X obj 106 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 167 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X msg 188 136 print;
+#X text 343 123 open a vertex-program;
+#X text 420 469 open a model;
+#X obj 235 531 model ../data/venus.obj;
+#N canvas 0 0 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 347 141 pd open;
+#X obj 434 495 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 0 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 377 494 pd open;
+#X msg 377 514 open ../data/venus.obj;
+#X obj 44 467 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X msg 66 313 bang;
+#X text 60 294 2nd click me;
+#X obj 143 330 t b b b;
+#X text 54 448 3rd play me;
+#X msg 347 161 open ../data/random.fp;
+#X floatatom 318 49 5 0 0 0 - - -;
+#X obj 235 85 colorRGB 1 1 1;
+#X obj 66 247 world_light;
+#X obj 60 214 gemhead 1;
+#X obj 235 178 fragment_program ../data/random.fp;
+#X text 362 48 play me;
+#X obj 380 390 gemhead;
+#X obj 380 412 translateXYZ -2 0 0;
+#X obj 235 416 translateXYZ 2 0 0;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 70 126 pd gemwin;
+#N canvas 0 0 450 300 Gem.init 0;
+#X obj 85 239 outlet;
+#X msg 85 215 reset \, lighting 1;
+#X obj 85 192 loadbang;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X restore 70 104 pd Gem.init;
+#X connect 0 0 9 0;
+#X connect 1 0 20 0;
+#X connect 2 0 8 0;
+#X connect 3 0 2 2;
+#X connect 4 0 2 3;
+#X connect 5 0 23 0;
+#X connect 9 0 18 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 8 0;
+#X connect 13 0 2 1;
+#X connect 14 0 16 0;
+#X connect 16 0 12 0;
+#X connect 16 1 18 0;
+#X connect 18 0 23 0;
+#X connect 19 0 20 2;
+#X connect 20 0 23 0;
+#X connect 22 0 21 0;
+#X connect 23 0 27 0;
+#X connect 25 0 26 0;
+#X connect 26 0 2 0;
+#X connect 27 0 2 0;
+#X connect 29 0 28 0;
diff --git a/Gem/examples/02.advanced/18.gl_shading_language.pd b/Gem/examples/02.advanced/18.gl_shading_language.pd
new file mode 100644
index 0000000..2562b27
--- /dev/null
+++ b/Gem/examples/02.advanced/18.gl_shading_language.pd
@@ -0,0 +1,182 @@
+#N canvas 54 22 842 789 10;
+#X obj 225 24 gemhead 1;
+#X obj 225 47 world_light;
+#X obj 77 112 gemhead;
+#X obj 77 171 glsl_vertex;
+#X obj 148 131 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 170 129 open a vertex-program;
+#N canvas 0 22 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 91 130 pd open;
+#X msg 35 142 print;
+#X obj 77 733 rotateXYZ;
+#X obj 126 714 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 126 697 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 126 680 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X obj 206 25 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 77 576 glsl_program;
+#X obj 150 393 pack 0 0;
+#X obj 143 246 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 22 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 86 245 pd open;
+#X text 164 244 open a fragment-program;
+#X msg 34 266 print;
+#X obj 171 373 t b f;
+#X msg 335 92 bang;
+#X obj 77 753 teapot;
+#X obj 171 328 change;
+#X obj 149 190 change;
+#X msg 150 433 link \$1 \$2;
+#X msg 33 486 print;
+#X msg 266 546 Phong \$1;
+#X obj 269 508 hsl 128 15 -1 1 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 0 1;
+#X floatatom 266 528 5 0 0 0 - - -;
+#X obj 77 612 t a b;
+#X obj 107 632 spigot;
+#X obj 144 614 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 107 652 i;
+#X obj 135 652 + 1;
+#X obj 163 652 % 360;
+#X text 435 96 click here to load both the vertex- and the fragment-shader
+;
+#X text 165 172 the vertex shader;
+#X obj 77 308 glsl_fragment;
+#X text 191 311 the fragment shader;
+#X text 222 395 whenever either the fragment-shader ID or the vertex-shader
+ID has changed \, we trigger the linking of the 2 modules;
+#X floatatom 171 354 2 0 0 0 ID - -;
+#X floatatom 149 213 2 0 0 0 ID - -;
+#X obj 168 454 print linking;
+#X text 264 441 order of module IDs does not matter...;
+#X text 96 487 after linking \, click "print" to get some info about
+the compiled shader program;
+#X text 330 550 the Toon-shader has a unifom variable "Phong" (see
+"print") \, which we can change to modify the effect.;
+#X text 213 264 pd's search path is searched for the given filename
+\; just add the examples/data folder to your path options and this
+example should work;
+#X obj 335 133 t s s;
+#X msg 91 150 open \$1.vert;
+#X msg 86 265 open \$1.frag;
+#X symbolatom 381 93 0 0 0 0 - - -;
+#X obj 335 114 symbol ../data/Toon;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 39 51 pd gemwin;
+#X msg 39 29 lighting \$1;
+#X obj 39 10 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X connect 0 0 1 0;
+#X connect 2 0 3 0;
+#X connect 3 0 37 0;
+#X connect 3 1 23 0;
+#X connect 4 0 6 0;
+#X connect 6 0 48 0;
+#X connect 7 0 3 0;
+#X connect 8 0 21 0;
+#X connect 9 0 8 3;
+#X connect 10 0 8 2;
+#X connect 11 0 8 1;
+#X connect 12 0 0 0;
+#X connect 13 0 29 0;
+#X connect 14 0 24 0;
+#X connect 15 0 16 0;
+#X connect 16 0 49 0;
+#X connect 18 0 37 0;
+#X connect 19 0 14 0;
+#X connect 19 1 14 1;
+#X connect 20 0 51 0;
+#X connect 22 0 40 0;
+#X connect 23 0 41 0;
+#X connect 24 0 13 0;
+#X connect 24 0 42 0;
+#X connect 25 0 13 0;
+#X connect 26 0 13 0;
+#X connect 27 0 28 0;
+#X connect 28 0 26 0;
+#X connect 29 0 8 0;
+#X connect 29 1 30 0;
+#X connect 30 0 32 0;
+#X connect 31 0 30 1;
+#X connect 32 0 33 0;
+#X connect 32 0 11 0;
+#X connect 32 0 10 0;
+#X connect 32 0 9 0;
+#X connect 33 0 34 0;
+#X connect 34 0 32 1;
+#X connect 37 0 13 0;
+#X connect 37 1 22 0;
+#X connect 40 0 19 0;
+#X connect 41 0 14 0;
+#X connect 47 0 48 0;
+#X connect 47 1 49 0;
+#X connect 48 0 3 0;
+#X connect 49 0 37 0;
+#X connect 50 0 51 0;
+#X connect 51 0 47 0;
+#X connect 53 0 52 0;
+#X connect 54 0 53 0;
diff --git a/Gem/examples/02.advanced/19.pointer.pd b/Gem/examples/02.advanced/19.pointer.pd
new file mode 100644
index 0000000..7db5c4f
--- /dev/null
+++ b/Gem/examples/02.advanced/19.pointer.pd
@@ -0,0 +1,217 @@
+#N canvas 102 54 864 638 10;
+#X obj 209 223 gemhead;
+#X obj 241 277 t a a a;
+#X obj 264 320 cube 1;
+#X obj 238 66 world_light;
+#X obj 238 41 gemhead;
+#X obj 37 226 gemhead;
+#X obj 37 321 sphere 1.3 33;
+#X obj 287 300 rotateXYZ 60 30 0;
+#X obj 37 300 rotateXYZ 60 30 0;
+#X text 36 184 #1:;
+#X text 209 181 #2:;
+#X obj 37 428 sphere 1.3 33;
+#X obj 37 407 rotateXYZ 60 30 0;
+#X obj 209 248 t a a;
+#X obj 595 288 gemlist;
+#X obj 595 223 gemhead;
+#X obj 595 250 t b b a;
+#X obj 37 202 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 209 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 595 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 37 342 translateXYZ 2 0 0;
+#X obj 37 449 translateXYZ 2 0 0;
+#X obj 241 341 translateXYZ 2 0 0;
+#X obj 209 386 t a a a;
+#X obj 232 429 cube 1;
+#X obj 255 409 rotateXYZ 60 30 0;
+#X obj 209 450 translateXYZ 2 0 0;
+#X obj 595 410 rotateXYZ 60 30 0;
+#X obj 595 452 translateXYZ 2 0 0;
+#X obj 595 431 sphere 1.6 4;
+#X text 29 498 example #1 is the usual way to use Gem \, but the technique
+shown in example #2 can be more flexible...;
+#N canvas 186 321 446 463 more_interating_1 0;
+#X obj 22 64 gemhead;
+#X obj 22 351 rotateXYZ 0 0 12;
+#X obj 22 274 scaleXYZ 0.97 0.9 1;
+#X obj 22 296 translateXYZ 0.5 0 0;
+#X obj 22 376 circle 0.2;
+#X floatatom 131 331 5 0 0 0 - - -;
+#X obj 22 226 gemlist;
+#X obj 22 204 until;
+#X msg 22 180 100;
+#X obj 22 158 t b a;
+#X obj 22 111 translateXYZ -3 0 0;
+#X obj 22 43 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X text 85 198 "repeat" 100 times the same "gemlist";
+#X connect 0 0 10 0;
+#X connect 1 0 4 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 5 0 1 3;
+#X connect 6 0 2 0;
+#X connect 7 0 6 0;
+#X connect 8 0 7 0;
+#X connect 9 0 8 0;
+#X connect 9 1 6 1;
+#X connect 10 0 9 0;
+#X connect 11 0 0 0;
+#X restore 32 561 pd more_interating_1;
+#N canvas 178 159 464 582 more_interating_2 0;
+#X obj 22 69 gemhead;
+#X obj 22 377 scaleXYZ 0.97 0.9 1;
+#X obj 22 505 circle 0.2;
+#X obj 22 235 gemlist;
+#X obj 22 213 until;
+#X msg 22 189 100;
+#X obj 22 167 t b a;
+#X obj 185 322 f;
+#X obj 277 309 random 1000;
+#X obj 22 480 rotateXYZ 0 0 0;
+#X obj 185 420 *;
+#X obj 22 132 t a b;
+#X obj 22 264 t a b b;
+#X msg 277 283 seed \$1;
+#X obj 277 256 f;
+#X floatatom 295 234 5 0 0 0 - - -;
+#X obj 277 334 - 500;
+#X obj 185 441 / 1000;
+#X obj 22 400 translateXYZ -0.5 0 0;
+#X obj 22 103 translateXYZ 3 0 0;
+#X obj 22 42 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X text 343 233 <- change random;
+#X text 276 356 rotation angle is random;
+#X text 200 390 amplitude decrease;
+#X msg 203 296 100;
+#X obj 222 351 - 1;
+#X connect 0 0 19 0;
+#X connect 1 0 18 0;
+#X connect 3 0 12 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 5 0;
+#X connect 6 1 3 1;
+#X connect 7 0 25 0;
+#X connect 7 0 10 0;
+#X connect 8 0 16 0;
+#X connect 9 0 2 0;
+#X connect 10 0 17 0;
+#X connect 11 0 6 0;
+#X connect 11 1 24 0;
+#X connect 11 1 14 0;
+#X connect 12 0 1 0;
+#X connect 12 1 7 0;
+#X connect 12 2 8 0;
+#X connect 13 0 8 0;
+#X connect 14 0 13 0;
+#X connect 15 0 14 1;
+#X connect 16 0 10 1;
+#X connect 17 0 9 3;
+#X connect 18 0 9 0;
+#X connect 19 0 11 0;
+#X connect 20 0 0 0;
+#X connect 24 0 7 1;
+#X connect 25 0 7 1;
+#X restore 32 581 pd more_interating_2;
+#X obj 445 223 gemhead;
+#X obj 445 198 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 443 178 #3:;
+#X obj 445 410 rotateXYZ 60 30 0;
+#X obj 445 452 translateXYZ 2 0 0;
+#X obj 445 271 t a a;
+#X text 593 178 #4:;
+#X text 611 314 [gemlist] stores the current state;
+#X text 613 330 and outputs it when banged;
+#X text 30 528 The example #4 can easily be extended to use many primitives.
+;
+#X text 31 122 [gemhead]'s output is a special message describing the
+"state" of the system. This state is changed by the GEM objects. This
+means that the examples below are equivalent:;
+#X obj 445 431 teapot 1;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 44 55 pd gemwin;
+#N canvas 0 0 450 300 Gem.init 0;
+#X obj 94 232 outlet;
+#X obj 94 183 loadbang;
+#X msg 94 208 lighting 1;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X restore 44 36 pd Gem.init;
+#X connect 0 0 13 0;
+#X connect 1 0 22 0;
+#X connect 1 1 2 0;
+#X connect 1 2 7 0;
+#X connect 4 0 3 0;
+#X connect 5 0 8 0;
+#X connect 6 0 20 0;
+#X connect 8 0 6 0;
+#X connect 11 0 21 0;
+#X connect 12 0 11 0;
+#X connect 13 0 23 0;
+#X connect 13 1 1 0;
+#X connect 14 0 27 0;
+#X connect 15 0 16 0;
+#X connect 16 0 14 0;
+#X connect 16 1 14 0;
+#X connect 16 2 14 1;
+#X connect 17 0 5 0;
+#X connect 18 0 0 0;
+#X connect 19 0 15 0;
+#X connect 20 0 12 0;
+#X connect 23 0 26 0;
+#X connect 23 1 24 0;
+#X connect 23 2 25 0;
+#X connect 27 0 29 0;
+#X connect 29 0 28 0;
+#X connect 33 0 38 0;
+#X connect 34 0 33 0;
+#X connect 36 0 44 0;
+#X connect 38 0 36 0;
+#X connect 38 1 36 0;
+#X connect 44 0 37 0;
+#X connect 46 0 45 0;
diff --git a/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd b/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd
new file mode 100644
index 0000000..518e853
--- /dev/null
+++ b/Gem/examples/02.advanced/20.double-gemhead_vs_repeat.pd
@@ -0,0 +1,184 @@
+#N canvas 265 100 742 519 10;
+#X obj 93 144 gemhead;
+#X obj 93 205 b;
+#X obj 93 124 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 93 336 gemhead;
+#X msg 25 305 0;
+#X obj 25 285 loadbang;
+#X obj 93 260 t b a;
+#X obj 156 336 unpack 0 0 0;
+#X obj 93 385 translateXYZ 0 -2 0;
+#X msg 93 225 0 -2 0 \, 0 2 0;
+#X text 203 225 two messages in one;
+#X text 151 144 [gemhead]-"metro";
+#X obj 93 426 circle 0.2;
+#X text 40 25 the "double [gemhead] idiom" vs. [repeat];
+#X obj 438 146 gemhead;
+#X obj 438 128 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 479 375 unpack 0 0 0;
+#X text 525 206 two messages in one;
+#X obj 438 425 square 0.2;
+#X obj 479 307 select 0 1;
+#X obj 479 284 f;
+#X obj 438 404 translateXYZ 0 0 0;
+#X obj 354 341 loadbang;
+#X msg 354 368 draw line;
+#X obj 438 206 t a a b;
+#X obj 438 229 separator;
+#X obj 438 257 t a b;
+#X msg 497 259 0;
+#X msg 479 328 0 -2 0;
+#X msg 511 348 0 2 0;
+#X obj 508 284 + 1;
+#X text 258 65 The gemhead object resets the states for OpenGL and
+also some pix_ settings. Anything after it is starts as a clean state
+similar to combining [separator] and [pix_separator]. (cc);
+#N canvas 220 0 701 555 more_on_the_"repeat"_technics 0;
+#X obj 21 54 gemhead;
+#X obj 21 281 separator;
+#X obj 21 128 t a b;
+#X msg 118 270 seed 1;
+#X obj 21 445 translateXYZ;
+#X obj 21 470 circle 0.1;
+#X obj 118 354 random 200;
+#X obj 199 354 random 200;
+#X obj 118 376 - 100;
+#X obj 199 377 - 100;
+#X obj 199 398 / 30;
+#X obj 118 397 / 30;
+#X msg 199 270 seed 2;
+#X obj 21 310 t a b b;
+#X obj 118 313 spigot 0;
+#X obj 199 312 spigot 0;
+#X obj 278 276 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 311 274 <- if you reset the random at the begining of each
+frame \, then all frames look the same.;
+#X obj 21 101 scaleXYZ 1 1 1;
+#X floatatom 52 80 5 0 0 0 - - -;
+#X floatatom 95 80 5 0 0 0 - - -;
+#X obj 21 230 gemlist;
+#X obj 21 208 until;
+#X msg 21 184 100;
+#X obj 21 162 t b a;
+#X text 23 504 This patch shows how to draw the same primitive with
+the a single [gemhead] many times;
+#X obj 21 35 tgl 15 1 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X connect 0 0 18 0;
+#X connect 1 0 13 0;
+#X connect 2 0 24 0;
+#X connect 2 1 3 0;
+#X connect 2 1 12 0;
+#X connect 3 0 14 0;
+#X connect 4 0 5 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 11 0;
+#X connect 9 0 10 0;
+#X connect 10 0 4 2;
+#X connect 11 0 4 1;
+#X connect 12 0 15 0;
+#X connect 13 0 4 0;
+#X connect 13 1 6 0;
+#X connect 13 1 7 0;
+#X connect 14 0 6 0;
+#X connect 15 0 7 0;
+#X connect 16 0 14 1;
+#X connect 16 0 15 1;
+#X connect 18 0 2 0;
+#X connect 19 0 18 1;
+#X connect 20 0 18 2;
+#X connect 21 0 1 0;
+#X connect 22 0 21 0;
+#X connect 23 0 22 0;
+#X connect 24 0 23 0;
+#X connect 24 1 21 1;
+#X connect 26 0 0 0;
+#X restore 370 469 pd more_on_the_"repeat"_technics;
+#X obj 93 186 translateXYZ;
+#X floatatom 120 168 5 0 0 0 - - -;
+#X text 168 167 <- fun!;
+#X obj 438 187 translateXYZ;
+#X floatatom 465 169 5 0 0 0 - - -;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 53 69 pd gemwin;
+#X connect 0 0 33 0;
+#X connect 1 0 9 0;
+#X connect 2 0 0 0;
+#X connect 3 0 8 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 3 0;
+#X connect 6 1 7 0;
+#X connect 7 0 8 1;
+#X connect 7 1 8 2;
+#X connect 7 2 8 3;
+#X connect 8 0 12 0;
+#X connect 9 0 6 0;
+#X connect 14 0 36 0;
+#X connect 15 0 14 0;
+#X connect 16 0 21 1;
+#X connect 16 1 21 2;
+#X connect 16 2 21 3;
+#X connect 19 0 28 0;
+#X connect 19 1 29 0;
+#X connect 20 0 19 0;
+#X connect 20 0 30 0;
+#X connect 21 0 18 0;
+#X connect 22 0 23 0;
+#X connect 23 0 18 0;
+#X connect 24 0 25 0;
+#X connect 24 1 25 0;
+#X connect 24 2 27 0;
+#X connect 25 0 26 0;
+#X connect 26 0 21 0;
+#X connect 26 1 20 0;
+#X connect 27 0 20 1;
+#X connect 28 0 16 0;
+#X connect 29 0 16 0;
+#X connect 30 0 20 1;
+#X connect 33 0 1 0;
+#X connect 34 0 33 1;
+#X connect 36 0 24 0;
+#X connect 37 0 36 1;
diff --git a/Gem/examples/02.advanced/21.basic_LSystem.pd b/Gem/examples/02.advanced/21.basic_LSystem.pd
new file mode 100644
index 0000000..301b09a
--- /dev/null
+++ b/Gem/examples/02.advanced/21.basic_LSystem.pd
@@ -0,0 +1,138 @@
+#N canvas 515 27 647 743 10;
+#X obj 15 16 gemhead;
+#X obj 76 483 GEMglPushMatrix;
+#X obj 96 462 GEMglPopMatrix;
+#X floatatom 353 502 5 0 0 0 - - -;
+#X obj 15 63 rotateXYZ 0 0 90;
+#X floatatom 201 508 5 0 0 0 - - -;
+#X floatatom 201 486 5 0 0 0 - - -;
+#X obj 262 35 gemhead;
+#X obj 262 61 world_light;
+#X obj 15 607 translateXYZ 0.05 0 0;
+#X obj 15 140 route F;
+#X text 271 163 <- rule 1;
+#X obj 15 187 route F;
+#X msg 15 211 F \, [ \, - \, F \, F \, ] \, F \, [ \, + \, F \, ] \,
+F;
+#X obj 15 235 route F;
+#X text 272 209 <- rule 2;
+#X text 271 257 <- rule 3;
+#X msg 15 110 F;
+#X obj 15 85 t b a;
+#X obj 15 558 translateXYZ 0.05 0 0;
+#X obj 15 583 rectangle 0.1 0.01;
+#X obj 15 41 translateXYZ 0 -3 0;
+#X obj 35 530 rotateXYZ 0 0 50;
+#X obj 54 506 rotateXYZ 0 0 -40;
+#X obj 353 521 / 100;
+#X msg 353 479 10;
+#X obj 353 456 loadbang;
+#X text 243 485 <- try this;
+#X text 125 310 <- create the primitive according to the Lsystem;
+#X text 270 276 These rules create an Lsystem;
+#X text 152 381 <- Store the current state sent by [gemhead] and distribute
+it to the corresponding primitives;
+#X text 397 502 <- size of the system;
+#X msg 15 164 F \, [ \, - \, F \, ] \, F \, [ \, + \, F \, ] \, F;
+#X text 12 640 This is a basic implementation of Lindenmayer System
+(LSystem) in GEM. Wikipedia is a good place for informations about
+Lsystems;
+#X obj 15 351 gemlist;
+#X obj 47 110 s \$0-gemlist;
+#X obj 35 372 gemlist;
+#X obj 54 395 gemlist;
+#X obj 76 417 gemlist;
+#X obj 96 438 gemlist;
+#X obj 142 330 r \$0-gemlist;
+#X obj 15 309 route F + - [ ];
+#X msg 15 259 F \, [ \, - \, F \, F \, ] \, F \, [ \, + \, F \, ] \,
+F;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 377 62 pd gemwin;
+#N canvas 0 0 450 300 Gem.init 0;
+#X obj 67 72 loadbang;
+#X msg 67 93 lighting 1;
+#X obj 67 114 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 377 40 pd Gem.init;
+#X connect 0 0 21 0;
+#X connect 3 0 24 0;
+#X connect 4 0 18 0;
+#X connect 5 0 22 3;
+#X connect 6 0 23 3;
+#X connect 7 0 8 0;
+#X connect 10 0 32 0;
+#X connect 10 1 12 0;
+#X connect 12 0 13 0;
+#X connect 12 1 14 0;
+#X connect 13 0 14 0;
+#X connect 14 0 42 0;
+#X connect 14 1 41 0;
+#X connect 17 0 10 0;
+#X connect 18 0 17 0;
+#X connect 18 1 35 0;
+#X connect 19 0 20 0;
+#X connect 20 0 9 0;
+#X connect 21 0 4 0;
+#X connect 24 0 9 1;
+#X connect 24 0 19 1;
+#X connect 24 0 20 1;
+#X connect 25 0 3 0;
+#X connect 26 0 25 0;
+#X connect 32 0 12 0;
+#X connect 34 0 19 0;
+#X connect 36 0 22 0;
+#X connect 37 0 23 0;
+#X connect 38 0 1 0;
+#X connect 39 0 2 0;
+#X connect 40 0 34 1;
+#X connect 40 0 36 1;
+#X connect 40 0 37 1;
+#X connect 40 0 38 1;
+#X connect 40 0 39 1;
+#X connect 41 0 34 0;
+#X connect 41 1 36 0;
+#X connect 41 2 37 0;
+#X connect 41 3 38 0;
+#X connect 41 4 39 0;
+#X connect 42 0 41 0;
+#X connect 44 0 43 0;
diff --git a/Gem/examples/02.advanced/22.double-iterative.pd b/Gem/examples/02.advanced/22.double-iterative.pd
new file mode 100644
index 0000000..218c30f
--- /dev/null
+++ b/Gem/examples/02.advanced/22.double-iterative.pd
@@ -0,0 +1,118 @@
+#N canvas 0 0 473 588 10;
+#X obj 32 103 gemhead;
+#X obj 106 235 gemlist;
+#X msg 106 192 20;
+#X obj 106 213 until;
+#X obj 32 149 route gem_state;
+#X obj 32 171 route float;
+#X obj 32 127 t a a;
+#X obj 106 259 rotateXYZ 10 20 30;
+#X obj 180 413 gemlist;
+#X msg 180 370 20;
+#X obj 180 391 until;
+#X obj 106 327 route gem_state;
+#X obj 106 349 route float;
+#X obj 106 305 t a a;
+#X obj 180 437 rotateXYZ 10 20 30;
+#X obj 180 497 cube 0.1;
+#X obj 106 280 separator;
+#N canvas 0 0 450 300 light 0;
+#X obj 225 45 gemhead 10;
+#X floatatom 258 78 5 0 0 0 - - -;
+#X floatatom 299 77 5 0 0 0 - - -;
+#X floatatom 341 78 5 0 0 0 - - -;
+#X msg 319 150 1 0 0;
+#X obj 225 227 world_light;
+#X msg 333 173 0.4 0.4 0.4;
+#X msg 309 127 0 0 0;
+#X obj 228 160 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X msg 228 181 debug \$1;
+#X obj 225 103 rotateXYZ 0 30 0;
+#X obj 27 51 gemhead 10;
+#X floatatom 60 84 5 0 0 0 - - -;
+#X floatatom 101 83 5 0 0 0 - - -;
+#X floatatom 143 84 5 0 0 0 - - -;
+#X msg 121 156 1 0 0;
+#X obj 27 233 world_light;
+#X msg 130 173 0.4 0.4 0.4;
+#X msg 111 133 0 0 0;
+#X obj 30 166 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X msg 30 187 debug \$1;
+#X obj 27 109 rotateXYZ 0 -90 0;
+#X msg 362 225 0.8 0.8 0.8;
+#X msg 144 199 0.7 0.7 0.7;
+#X msg 346 198 0.6 0.6 0.6;
+#X obj 408 87 loadbang;
+#X connect 0 0 10 0;
+#X connect 1 0 10 1;
+#X connect 2 0 10 2;
+#X connect 3 0 10 3;
+#X connect 4 0 5 1;
+#X connect 6 0 5 1;
+#X connect 7 0 5 1;
+#X connect 8 0 9 0;
+#X connect 9 0 5 0;
+#X connect 10 0 5 0;
+#X connect 11 0 21 0;
+#X connect 12 0 21 1;
+#X connect 13 0 21 2;
+#X connect 14 0 21 3;
+#X connect 15 0 16 1;
+#X connect 17 0 16 1;
+#X connect 18 0 16 1;
+#X connect 19 0 20 0;
+#X connect 20 0 16 0;
+#X connect 21 0 16 0;
+#X connect 22 0 5 1;
+#X connect 23 0 16 1;
+#X connect 24 0 5 1;
+#X connect 25 0 23 0;
+#X connect 25 0 24 0;
+#X restore 300 152 pd light;
+#X obj 300 131 gemwin;
+#X msg 300 104 lighting 1 \, create \, 1;
+#X obj 180 477 translateXYZ 0.3 0 0;
+#X floatatom 252 414 5 0 0 0 - - -;
+#X floatatom 292 415 5 0 0 0 - - -;
+#X floatatom 334 415 5 0 0 0 - - -;
+#X floatatom 254 456 5 0 0 0 - - -;
+#X floatatom 300 456 5 0 0 0 - - -;
+#X floatatom 342 457 5 0 0 0 - - -;
+#X floatatom 176 236 5 0 0 0 - - -;
+#X floatatom 216 237 5 0 0 0 - - -;
+#X floatatom 258 237 5 0 0 0 - - -;
+#X text 309 238 <- fun 1;
+#X text 386 416 <- fun 2;
+#X text 389 457 <- fun 3;
+#X text 136 30 double iterative process;
+#X connect 0 0 6 0;
+#X connect 1 0 7 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 5 0;
+#X connect 5 1 2 0;
+#X connect 6 0 4 0;
+#X connect 6 1 1 1;
+#X connect 7 0 16 0;
+#X connect 8 0 14 0;
+#X connect 9 0 10 0;
+#X connect 10 0 8 0;
+#X connect 11 0 12 0;
+#X connect 12 1 9 0;
+#X connect 13 0 11 0;
+#X connect 13 1 8 1;
+#X connect 14 0 20 0;
+#X connect 16 0 13 0;
+#X connect 19 0 18 0;
+#X connect 20 0 15 0;
+#X connect 21 0 14 1;
+#X connect 22 0 14 2;
+#X connect 23 0 14 3;
+#X connect 24 0 20 1;
+#X connect 25 0 20 2;
+#X connect 26 0 20 3;
+#X connect 27 0 7 1;
+#X connect 28 0 7 2;
+#X connect 29 0 7 3;
diff --git a/Gem/examples/02.advanced/23.SplitScreen.pd b/Gem/examples/02.advanced/23.SplitScreen.pd
new file mode 100644
index 0000000..8c8a237
--- /dev/null
+++ b/Gem/examples/02.advanced/23.SplitScreen.pd
@@ -0,0 +1,342 @@
+#N canvas 26 51 799 698 10;
+#N canvas 22 50 213 300 Gem.init 0;
+#X obj 71 191 outlet;
+#X obj 71 81 loadbang;
+#X msg 101 134 reset;
+#X obj 71 109 t b b;
+#X msg 71 164 lighting 1;
+#X connect 1 0 3 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X restore 24 75 pd Gem.init;
+#N canvas 330 97 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X obj 350 150 t b b;
+#X msg 418 214 reset \, lighting 1 \, color 0.3 0.3 0.3;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 17 0;
+#X connect 10 1 12 0;
+#X connect 11 0 14 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 0 0;
+#X connect 17 0 11 0;
+#X connect 17 1 18 0;
+#X connect 18 0 7 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 24 99 pd gemwin;
+#X obj 36 576 rotateXYZ;
+#X obj 36 499 t a b;
+#X obj 88 501 i;
+#X obj 141 501 + 1;
+#X obj 141 523 % 360;
+#X obj 36 669 teapot;
+#X obj 142 101 gemhead;
+#X obj 142 123 world_light;
+#X obj 36 417 gemreceive framehead 50;
+#X obj 36 648 scale 1;
+#N canvas 223 51 450 300 scale 0;
+#X obj 114 26 inlet bang;
+#X obj 114 256 outlet scale;
+#X obj 114 48 t b b;
+#X msg 145 116 5 \$1;
+#X obj 114 117 del;
+#X msg 114 159 1 \$1;
+#X msg 114 71 1000;
+#X msg 209 93 stop;
+#X obj 209 115 t a a;
+#X obj 114 138 f;
+#X obj 115 95 t f f f;
+#X obj 114 184 t a a;
+#X obj 114 206 line;
+#X msg 251 53 bang;
+#X connect 0 0 2 0;
+#X connect 2 0 6 0;
+#X connect 2 1 7 0;
+#X connect 3 0 11 0;
+#X connect 4 0 9 0;
+#X connect 5 0 11 0;
+#X connect 6 0 10 0;
+#X connect 7 0 8 0;
+#X connect 8 0 4 0;
+#X connect 9 0 5 0;
+#X connect 10 0 4 0;
+#X connect 10 1 3 0;
+#X connect 10 2 9 1;
+#X connect 11 0 12 0;
+#X connect 12 0 1 0;
+#X connect 13 0 2 0;
+#X restore 120 620 pd scale;
+#X msg 120 595 bang;
+#X obj 88 523 t f f;
+#X obj 88 545 t f f;
+#X obj 120 574 select 0;
+#X obj 36 439 separator;
+#X obj 246 459 separator;
+#X obj 246 525 t a b;
+#X obj 298 527 i;
+#X obj 351 527 + 1;
+#X obj 351 549 % 360;
+#X obj 298 549 t f f;
+#X obj 298 571 t f f;
+#X obj 246 437 gemreceive framehead 60;
+#X obj 246 602 rotateXYZ 45 0 0;
+#X obj 246 481 color 0 0 1;
+#X obj 36 461 color 1 1 1;
+#X obj 423 474 gemreceive framehead 70;
+#X obj 423 496 separator;
+#X obj 423 518 color 0 1 0;
+#X obj 423 642 cube 0.5;
+#X obj 423 562 depth;
+#X obj 423 622 translateXYZ -0.4 -0.4 0.4;
+#N canvas 1 51 450 447 move 0;
+#X obj 128 403 outlet;
+#X obj 128 326 unpack 0 0 0;
+#X obj 128 380 pack 0 0 0;
+#X obj 128 358 * -3.1;
+#X obj 179 358 * -3.1;
+#X obj 235 358 * 3.1;
+#X obj 128 275 line;
+#X obj 128 297 pack 0 0 0;
+#X obj 223 248 line;
+#X obj 223 270 t b f;
+#X obj 297 247 line;
+#X obj 297 269 t b f;
+#X obj 133 159 select 0 1 2 3 4 5;
+#X msg 116 188 1;
+#X msg 152 187 1;
+#X msg 223 189 1;
+#X msg 190 190 0;
+#X msg 255 187 0;
+#X msg 290 185 0;
+#X obj 133 78 loadbang;
+#X obj 202 83 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 133 122 random 6;
+#X obj 133 100 metro 500;
+#X msg 129 251 \$1 1000;
+#X msg 223 223 \$1 1000;
+#X msg 297 222 \$1 1000;
+#X connect 1 0 3 0;
+#X connect 1 1 4 0;
+#X connect 1 2 5 0;
+#X connect 2 0 0 0;
+#X connect 3 0 2 0;
+#X connect 4 0 2 1;
+#X connect 5 0 2 2;
+#X connect 6 0 7 0;
+#X connect 7 0 1 0;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X connect 9 1 7 1;
+#X connect 10 0 11 0;
+#X connect 11 0 7 0;
+#X connect 11 1 7 2;
+#X connect 12 0 13 0;
+#X connect 12 1 14 0;
+#X connect 12 2 16 0;
+#X connect 12 3 15 0;
+#X connect 12 4 17 0;
+#X connect 12 5 18 0;
+#X connect 13 0 23 0;
+#X connect 14 0 24 0;
+#X connect 15 0 25 0;
+#X connect 16 0 24 0;
+#X connect 17 0 23 0;
+#X connect 18 0 25 0;
+#X connect 19 0 22 0;
+#X connect 20 0 22 0;
+#X connect 21 0 12 0;
+#X connect 22 0 21 0;
+#X connect 23 0 6 0;
+#X connect 24 0 8 0;
+#X connect 25 0 10 0;
+#X restore 517 558 pd move;
+#X obj 423 584 translateXYZ;
+#X obj 517 580 unpack 0 0 0;
+#X obj 630 620 sphere;
+#X obj 630 590 color 1 0 0;
+#X obj 630 568 translateXYZ 0 3 0;
+#X obj 630 522 gemreceive framehead1;
+#X obj 630 544 separator;
+#X text 38 23 split-screen;
+#X obj 260 13 cnv 15 500 240 empty empty SplitScreen1 20 12 0 14 -233017
+-66577 0;
+#X obj 260 260 cnv 15 500 140 empty empty SplitScreen2 20 12 0 14 -233017
+-66577 0;
+#X obj 276 286 gemhead 1;
+#X obj 588 346 pix_texture;
+#X obj 276 308 gemframebuffer;
+#X obj 276 372 s framehead;
+#X obj 588 301 gemhead 60;
+#X obj 588 322 translateXYZ 2 0 0;
+#X obj 276 330 rotateXYZ 90 0 0;
+#X obj 276 350 translateXYZ 0 -4 0;
+#X obj 588 368 square 1.9;
+#X obj 277 41 gemhead 1;
+#X obj 588 117 pix_texture;
+#X obj 277 141 translateXYZ 0 0 -4;
+#X obj 588 71 gemhead 50;
+#X obj 588 93 translateXYZ -2 0 0;
+#X obj 309 185 s framehead;
+#N canvas 1 51 450 300 view 0;
+#X obj 89 284 outlet rotate;
+#X obj 237 283 outlet translate;
+#X obj 81 50 inlet;
+#X obj 81 72 route view;
+#X obj 81 124 unpack 0 0 0 0 0;
+#X obj 81 146 pack 0 0 0;
+#X obj 89 245 pack 0 0 0;
+#X obj 81 94 pack 0 0 0 0 0;
+#X obj 89 222 f;
+#X obj 89 199 t b f;
+#X connect 2 0 3 0;
+#X connect 3 0 7 0;
+#X connect 4 0 5 0;
+#X connect 4 1 5 1;
+#X connect 4 2 5 2;
+#X connect 4 3 9 0;
+#X connect 4 4 8 1;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 4 0;
+#X connect 8 0 6 0;
+#X connect 9 0 8 0;
+#X connect 9 1 6 1;
+#X restore 454 64 pd view;
+#X obj 277 63 gemframebuffer;
+#X obj 588 139 square 1.9;
+#X obj 277 163 t a a;
+#X obj 326 121 unpack 0 0 0;
+#X obj 305 82 unpack 0 0 0;
+#X obj 277 102 rotateXYZ 0 0 0;
+#X msg 454 40 view 0 0 -4 \$1;
+#X obj 277 213 s framehead1;
+#X obj 588 50 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 263 17 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 263 263 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 588 278 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 423 540 ortho;
+#X obj 246 664 square 1;
+#X obj 246 503 translateXYZ 3 -2 0;
+#X text 14 161 this will render a single scene;
+#X text 13 189 from two different view-points;
+#X text 13 175 into two framebuffers.;
+#X text 16 224 the red sphere is only rendered;
+#X text 18 240 in the left-hand "screen".;
+#X obj 454 23 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10
+-262144 -1 -1 0 256;
+#X floatatom 141 549 5 0 0 0 - - -, f 5;
+#X connect 0 0 1 0;
+#X connect 2 0 11 0;
+#X connect 3 0 2 0;
+#X connect 3 1 4 0;
+#X connect 4 0 14 0;
+#X connect 5 0 6 0;
+#X connect 6 0 4 1;
+#X connect 8 0 9 0;
+#X connect 10 0 17 0;
+#X connect 11 0 7 0;
+#X connect 12 0 11 1;
+#X connect 13 0 12 0;
+#X connect 14 0 15 0;
+#X connect 14 1 5 0;
+#X connect 15 0 2 1;
+#X connect 15 1 16 0;
+#X connect 16 0 13 0;
+#X connect 17 0 28 0;
+#X connect 18 0 27 0;
+#X connect 19 0 26 0;
+#X connect 19 1 20 0;
+#X connect 20 0 23 0;
+#X connect 21 0 22 0;
+#X connect 22 0 20 1;
+#X connect 23 0 24 0;
+#X connect 23 1 21 0;
+#X connect 24 0 26 3;
+#X connect 25 0 18 0;
+#X connect 26 0 75 0;
+#X connect 27 0 76 0;
+#X connect 28 0 3 0;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 31 0 74 0;
+#X connect 33 0 36 0;
+#X connect 34 0 32 0;
+#X connect 35 0 37 0;
+#X connect 36 0 34 0;
+#X connect 37 0 36 1;
+#X connect 37 1 36 2;
+#X connect 37 2 36 3;
+#X connect 39 0 38 0;
+#X connect 40 0 39 0;
+#X connect 41 0 42 0;
+#X connect 42 0 40 0;
+#X connect 46 0 48 0;
+#X connect 47 0 54 0;
+#X connect 48 0 52 0;
+#X connect 48 1 47 1;
+#X connect 50 0 51 0;
+#X connect 51 0 47 0;
+#X connect 52 0 53 0;
+#X connect 53 0 49 0;
+#X connect 55 0 62 0;
+#X connect 56 0 63 0;
+#X connect 57 0 64 0;
+#X connect 58 0 59 0;
+#X connect 59 0 56 0;
+#X connect 61 0 66 0;
+#X connect 61 1 65 0;
+#X connect 62 0 67 0;
+#X connect 62 1 56 1;
+#X connect 64 0 69 0;
+#X connect 64 1 60 0;
+#X connect 65 0 57 1;
+#X connect 65 1 57 2;
+#X connect 65 2 57 3;
+#X connect 66 0 67 1;
+#X connect 66 1 67 2;
+#X connect 66 2 67 3;
+#X connect 67 0 57 0;
+#X connect 68 0 61 0;
+#X connect 70 0 58 0;
+#X connect 71 0 55 0;
+#X connect 72 0 46 0;
+#X connect 73 0 50 0;
+#X connect 74 0 33 0;
+#X connect 76 0 19 0;
+#X connect 82 0 68 0;
+#X connect 83 0 2 2;
diff --git a/Gem/examples/02.advanced/snapshotHD.pd b/Gem/examples/02.advanced/snapshotHD.pd
new file mode 100644
index 0000000..1e3d1bd
--- /dev/null
+++ b/Gem/examples/02.advanced/snapshotHD.pd
@@ -0,0 +1,114 @@
+#N canvas 143 49 609 575 10;
+#X obj 152 105 gemframebuffer;
+#X obj 179 148 translateXYZ 0 0 -4;
+#X obj 152 126 t a a;
+#X obj 242 181 inlet;
+#X msg 224 84 dimen \$1 \$2;
+#X obj 179 169 outlet;
+#X obj 224 64 t l l;
+#X obj 317 41 /;
+#X obj 317 62 t f f;
+#X obj 317 82 * -1;
+#X obj 317 103 pack f f;
+#X msg 317 126 perspec \$1 \$2 -1 1 1 20;
+#X obj 374 352 pix_texture;
+#X obj 70 16 loadbang;
+#X obj 365 181 * 4;
+#X msg 365 202 \$1 4;
+#X obj 435 181 /;
+#X msg 435 161 4 \$1;
+#X msg 435 202 4 \$1;
+#X obj 365 225 spigot;
+#X obj 435 225 spigot;
+#X obj 402 263 unpack f f;
+#X obj 374 373 rectangle 4 4;
+#X obj 347 394 rectangle 4 4;
+#X obj 295 342 loadbang;
+#X msg 295 363 draw line;
+#X obj 401 202 < 1;
+#X obj 477 202 >= 1;
+#X obj 347 321 t a a;
+#X obj 152 84 inlet;
+#X obj 347 300 gemhead 100000;
+#X msg 225 13 bang;
+#X obj 152 548 pix_buffer \$0-buf 1;
+#X obj 167 432 pix_buffer_write \$0-buf;
+#X msg 313 392 0;
+#X msg 152 521 save \$1 0;
+#X msg 152 474 bang;
+#X obj 152 323 spigot;
+#X msg 185 303 1;
+#X msg 200 323 0;
+#X obj 242 201 route symbol;
+#X obj 242 219 symbol;
+#X obj 242 239 t s b;
+#X obj 294 237 t b;
+#X obj 224 43 pack \$1 \$2;
+#X obj 167 410 pix_snap 0 0 \$1 \$2;
+#X obj 152 501 symbol \$3;
+#X obj 152 343 t b a b b b;
+#X obj 167 374 t a b a;
+#X text 453 523 (c) Jack/RYBN 2011;
+#X connect 0 0 2 0;
+#X connect 0 1 12 1;
+#X connect 1 0 5 0;
+#X connect 2 0 37 0;
+#X connect 2 1 1 0;
+#X connect 3 0 40 0;
+#X connect 4 0 0 0;
+#X connect 6 0 4 0;
+#X connect 6 1 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 8 0 14 0;
+#X connect 8 0 17 0;
+#X connect 8 1 10 1;
+#X connect 8 1 26 0;
+#X connect 8 1 27 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 0 0;
+#X connect 12 0 22 0;
+#X connect 13 0 44 0;
+#X connect 14 0 15 0;
+#X connect 15 0 19 0;
+#X connect 16 0 18 0;
+#X connect 17 0 16 0;
+#X connect 18 0 20 0;
+#X connect 19 0 21 0;
+#X connect 20 0 21 0;
+#X connect 21 0 22 1;
+#X connect 21 0 23 1;
+#X connect 21 1 22 2;
+#X connect 21 1 23 2;
+#X connect 24 0 25 0;
+#X connect 25 0 23 0;
+#X connect 26 0 19 1;
+#X connect 27 0 20 1;
+#X connect 28 0 23 0;
+#X connect 28 1 12 0;
+#X connect 29 0 0 0;
+#X connect 30 0 28 0;
+#X connect 31 0 44 0;
+#X connect 34 0 33 1;
+#X connect 35 0 32 0;
+#X connect 36 0 46 0;
+#X connect 37 0 47 0;
+#X connect 38 0 37 1;
+#X connect 39 0 37 1;
+#X connect 40 0 41 0;
+#X connect 40 1 43 0;
+#X connect 41 0 42 0;
+#X connect 42 0 46 1;
+#X connect 42 1 43 0;
+#X connect 43 0 38 0;
+#X connect 44 0 6 0;
+#X connect 45 0 33 0;
+#X connect 46 0 35 0;
+#X connect 47 0 36 0;
+#X connect 47 1 48 0;
+#X connect 47 3 34 0;
+#X connect 47 4 39 0;
+#X connect 48 0 45 0;
+#X connect 48 1 45 0;
+#X connect 48 2 45 0;
diff --git a/Gem/examples/03.lighting/01.world_light.pd b/Gem/examples/03.lighting/01.world_light.pd
new file mode 100644
index 0000000..8987c38
--- /dev/null
+++ b/Gem/examples/03.lighting/01.world_light.pd
@@ -0,0 +1,84 @@
+#N canvas 139 90 771 570 10;
+#X obj 518 59 gemhead;
+#X msg 86 180 lighting 1;
+#X obj 518 170 rotate;
+#X floatatom 563 132 0 0 0 0 - - -;
+#X obj 318 508 world_light;
+#X obj 318 394 gemhead 1;
+#X msg 86 149 lighting 0;
+#X obj 518 194 sphere;
+#X text 150 38 create a sphere with and without lighting;
+#X text 533 105 rotate the sphere;
+#X text 139 545 creates a light an infinite distance away.;
+#X text 314 341 gemhead has a value of 1 so that it is rendered before
+the sphere is;
+#X text 52 124 you can turn lighting on and off while it is running
+;
+#X msg 457 466 1 1 1;
+#X msg 404 464 1 0 1;
+#X text 508 460 change the lights color;
+#X obj 318 456 rotateXYZ;
+#X floatatom 409 399 0 0 0 0 - - -;
+#X msg 185 424 debug 0;
+#X msg 186 455 debug 1;
+#X text 96 400 figure out where the light is;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 2 0;
+#X connect 1 0 22 0;
+#X connect 2 0 7 0;
+#X connect 3 0 2 1;
+#X connect 5 0 16 0;
+#X connect 6 0 22 0;
+#X connect 13 0 4 1;
+#X connect 14 0 4 1;
+#X connect 16 0 4 0;
+#X connect 17 0 16 2;
+#X connect 18 0 4 0;
+#X connect 19 0 4 0;
+#X connect 21 0 22 0;
diff --git a/Gem/examples/03.lighting/02.light.pd b/Gem/examples/03.lighting/02.light.pd
new file mode 100644
index 0000000..21f8811
--- /dev/null
+++ b/Gem/examples/03.lighting/02.light.pd
@@ -0,0 +1,96 @@
+#N canvas 253 63 751 605 10;
+#X obj 532 45 gemhead;
+#X msg 107 177 lighting 1;
+#X obj 532 156 rotate;
+#X floatatom 580 137 4 0 0 0 - - -;
+#X obj 313 354 gemhead 1;
+#X msg 107 146 lighting 0;
+#X obj 532 177 sphere;
+#X text 150 38 create a sphere with and without lighting;
+#X text 547 91 rotate the sphere;
+#X text 313 314 gemhead has a value of 1 so that it is rendered before
+the sphere is;
+#X text 46 125 you can turn lighting on and off while it is running
+;
+#X msg 398 507 1 1 1;
+#X msg 345 505 1 0 1;
+#X text 449 501 change the lights color;
+#X floatatom 389 355 0 0 0 0 - - -;
+#X msg 185 424 debug 0;
+#X msg 186 455 debug 1;
+#X text 96 400 figure out where the light is;
+#X obj 313 535 light;
+#X text 240 558 creates a local light;
+#X msg 434 436 2;
+#X msg 477 436 3;
+#X msg 390 438 1.1;
+#X text 389 417 change the position of the light;
+#X obj 313 395 rotateXYZ 0 -60 0;
+#X obj 313 475 translateXYZ 2 0 0;
+#X obj 566 118 hsl 128 15 0 360 0 0 empty empty empty -2 -6 0 10 -233472
+-1 -1 0 1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 62 264 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 32 281 pd gemwin;
+#X connect 0 0 2 0;
+#X connect 1 0 28 0;
+#X connect 2 0 6 0;
+#X connect 4 0 24 0;
+#X connect 5 0 28 0;
+#X connect 11 0 18 1;
+#X connect 12 0 18 1;
+#X connect 14 0 24 2;
+#X connect 15 0 18 0;
+#X connect 16 0 18 0;
+#X connect 20 0 25 1;
+#X connect 21 0 25 1;
+#X connect 22 0 25 1;
+#X connect 24 0 25 0;
+#X connect 25 0 18 0;
+#X connect 26 0 2 1;
+#X connect 26 0 3 0;
+#X connect 27 0 28 0;
diff --git a/Gem/examples/03.lighting/03.controlLights.pd b/Gem/examples/03.lighting/03.controlLights.pd
new file mode 100644
index 0000000..04a3dae
--- /dev/null
+++ b/Gem/examples/03.lighting/03.controlLights.pd
@@ -0,0 +1,97 @@
+#N canvas 396 160 600 500 10;
+#X obj 373 75 gemhead;
+#X msg 128 75 lighting 1;
+#X msg 128 107 lighting 0;
+#X obj 373 115 sphere;
+#X obj 148 268 gemhead;
+#X obj 148 424 light;
+#X obj 148 308 rotateXYZ;
+#X floatatom 238 274 0 0 0 0 - - -;
+#X msg 55 355 debug 1;
+#X msg 56 388 debug 0;
+#X msg 178 399 1 0 0;
+#X obj 148 346 translateXYZ 3 0 0;
+#X obj 399 256 gemhead;
+#X obj 399 296 rotateXYZ;
+#X floatatom 489 262 0 0 0 0 - - -;
+#X msg 305 352 debug 1;
+#X msg 306 385 debug 0;
+#X msg 471 396 0 1 0;
+#X obj 399 426 world_light;
+#X obj 471 364 loadbang;
+#X obj 178 370 loadbang;
+#X floatatom 246 305 0 0 0 0 - - -;
+#X text 263 177 notice that translation affects the;
+#X text 261 190 light object \, but not the world_light;
+#X obj 399 336 translateXYZ 3 0 0;
+#X floatatom 476 312 0 0 0 0 - - -;
+#X text 504 311 quite useless;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 148 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 165 pd gemwin;
+#X connect 0 0 3 0;
+#X connect 1 0 28 0;
+#X connect 2 0 28 0;
+#X connect 4 0 6 0;
+#X connect 6 0 11 0;
+#X connect 7 0 6 2;
+#X connect 8 0 5 0;
+#X connect 9 0 5 0;
+#X connect 10 0 5 1;
+#X connect 11 0 5 0;
+#X connect 12 0 13 0;
+#X connect 13 0 24 0;
+#X connect 14 0 13 1;
+#X connect 15 0 18 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 1;
+#X connect 19 0 17 0;
+#X connect 20 0 10 0;
+#X connect 21 0 11 1;
+#X connect 24 0 18 0;
+#X connect 25 0 24 1;
+#X connect 27 0 28 0;
diff --git a/Gem/examples/03.lighting/04.moveSpheres.pd b/Gem/examples/03.lighting/04.moveSpheres.pd
new file mode 100644
index 0000000..b2df9dd
--- /dev/null
+++ b/Gem/examples/03.lighting/04.moveSpheres.pd
@@ -0,0 +1,128 @@
+#N canvas 172 20 824 640 10;
+#X text 745 116 on;
+#X text 782 114 off;
+#X text 557 122 on;
+#X text 594 120 off;
+#X msg 742 143 1;
+#X msg 779 142 0;
+#X text 303 503 on;
+#X text 340 501 off;
+#X msg 116 527 1;
+#X msg 152 529 0;
+#X msg 297 529 1;
+#X msg 335 529 0;
+#X obj 373 547 gemhead 1;
+#X obj 483 231 int 0;
+#X obj 532 231 + 2;
+#X obj 634 118 gemhead;
+#X floatatom 673 252 0 0 0 0 - - -;
+#X obj 444 115 gemhead;
+#X msg 34 171 dimen 300 300;
+#X msg 64 102 lighting 1;
+#X floatatom 483 264 0 0 0 0 - - -;
+#X obj 194 573 world_light;
+#X obj 194 534 gemhead 1;
+#X msg 63 74 lighting 0;
+#X obj 673 225 int 0;
+#X obj 373 584 light;
+#X text 125 480 global light;
+#X text 303 483 local light;
+#X text 122 505 on;
+#X text 152 506 off;
+#X text 13 133 set the window size to 300 x 300;
+#X text 28 48 you can turn lighting on and off while it is running
+;
+#X obj 483 197 metro 50;
+#X msg 555 145 1;
+#X msg 591 146 0;
+#X obj 673 191 metro 100;
+#X obj 735 223 + 1;
+#X obj 444 147 colorRGB 1 0 1;
+#X obj 634 146 colorRGB 0 1 0;
+#X obj 444 301 rotate 0 1 0;
+#X obj 444 342 translate 2 1 0 0;
+#X obj 634 329 translate 2 0 1 0;
+#X obj 634 287 rotate 1 0 0;
+#X text 446 69 Purple sphere;
+#X text 636 74 Green sphere;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X obj 444 424 sphere 1 5;
+#X obj 634 416 sphere 1 20;
+#X connect 4 0 35 0;
+#X connect 5 0 35 0;
+#X connect 8 0 21 0;
+#X connect 9 0 21 0;
+#X connect 10 0 25 0;
+#X connect 11 0 25 0;
+#X connect 12 0 25 0;
+#X connect 13 0 14 0;
+#X connect 13 0 20 0;
+#X connect 14 0 13 1;
+#X connect 15 0 38 0;
+#X connect 16 0 42 1;
+#X connect 17 0 37 0;
+#X connect 18 0 46 0;
+#X connect 19 0 46 0;
+#X connect 20 0 39 1;
+#X connect 22 0 21 0;
+#X connect 23 0 46 0;
+#X connect 24 0 16 0;
+#X connect 24 0 36 0;
+#X connect 32 0 13 0;
+#X connect 33 0 32 0;
+#X connect 34 0 32 0;
+#X connect 35 0 24 0;
+#X connect 36 0 24 1;
+#X connect 37 0 39 0;
+#X connect 38 0 42 0;
+#X connect 39 0 40 0;
+#X connect 40 0 47 0;
+#X connect 41 0 48 0;
+#X connect 42 0 41 0;
+#X connect 45 0 46 0;
diff --git a/Gem/examples/03.lighting/05.materials.pd b/Gem/examples/03.lighting/05.materials.pd
new file mode 100644
index 0000000..9d722f5
--- /dev/null
+++ b/Gem/examples/03.lighting/05.materials.pd
@@ -0,0 +1,86 @@
+#N canvas 253 63 743 597 10;
+#X obj 349 34 gemhead;
+#X obj 349 307 rotate;
+#X floatatom 367 272 0 0 0 0 - - -;
+#X obj 220 436 gemhead 1;
+#X text 83 397 gemhead has a value of 1 so that it is rendered before
+the sphere is;
+#X obj 220 539 light;
+#X text 271 543 creates a local light;
+#X obj 220 507 translateXYZ 3 0 0;
+#X text 150 38 apply materials to a sphere;
+#X obj 349 122 diffuse 0.2 0 0;
+#X obj 349 224 ambientRGB 0 0 0;
+#X obj 349 163 specular 0 0 0.9;
+#X obj 349 78 shininess 128;
+#X obj 349 361 sphere 2;
+#X msg 428 322 50;
+#X msg 469 32 10;
+#X msg 506 32 100;
+#X obj 220 477 rotateXYZ 0 -90 0;
+#N canvas 91 174 290 179 Gem.init 0;
+#X obj 118 18 loadbang;
+#X msg 201 78 reset;
+#X obj 118 113 outlet;
+#X obj 118 45 t b b;
+#X msg 118 79 lighting 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X restore 34 138 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 155 pd gemwin;
+#X connect 0 0 12 0;
+#X connect 1 0 13 0;
+#X connect 2 0 1 1;
+#X connect 3 0 17 0;
+#X connect 7 0 5 0;
+#X connect 9 0 11 0;
+#X connect 10 0 1 0;
+#X connect 11 0 10 0;
+#X connect 12 0 9 0;
+#X connect 14 0 13 2;
+#X connect 15 0 12 1;
+#X connect 16 0 12 1;
+#X connect 17 0 7 0;
+#X connect 18 0 19 0;
diff --git a/Gem/examples/04.pix/01.image.pd b/Gem/examples/04.pix/01.image.pd
new file mode 100644
index 0000000..0abd4a9
--- /dev/null
+++ b/Gem/examples/04.pix/01.image.pd
@@ -0,0 +1,60 @@
+#N canvas 452 108 681 502 12;
+#X text 172 376 click on the pix_image object to display the loaded
+image with imgview;
+#X obj 179 199 gemhead;
+#X obj 179 351 pix_draw;
+#X text 196 18 display an image using pix_draw;
+#X obj 179 227 pix_image ../data/dancer.JPG;
+#X obj 179 309 translateXYZ;
+#X floatatom 315 261 0 0 0 0 - - -;
+#X text 176 177 notice that Z doesn't change the size of the image
+;
+#X text 62 442 On most machines \, pix_draw is MUCH slower than pix_texture.
+However \, pix_draw is easier to use in an example patch.;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X obj 315 284 / 100;
+#X floatatom 264 261 0 0 0 0 - - -;
+#X obj 264 284 / 100;
+#X floatatom 213 261 0 0 0 0 - - -;
+#X obj 213 284 / 100;
+#X connect 1 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 2 0;
+#X connect 6 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
+#X connect 13 0 5 3;
+#X connect 14 0 15 0;
+#X connect 15 0 5 2;
+#X connect 16 0 17 0;
+#X connect 17 0 5 1;
diff --git a/Gem/examples/04.pix/02.multiimage.pd b/Gem/examples/04.pix/02.multiimage.pd
new file mode 100644
index 0000000..5f0c519
--- /dev/null
+++ b/Gem/examples/04.pix/02.multiimage.pd
@@ -0,0 +1,49 @@
+#N canvas 411 137 739 504 12;
+#X msg 345 170 1;
+#X msg 345 202 0;
+#X obj 278 200 gemhead;
+#X msg 344 133 2;
+#X text 206 104 select one of the three images to display;
+#X text 154 29 display images use pix_multiimage;
+#X obj 278 255 pix_multiimage ../data/temp*.JPG 2;
+#X obj 20 209 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 253 pd gemwin;
+#X msg 25 229 create;
+#X text 21 209 Create window and render;
+#X obj 278 313 pix_texture;
+#X obj 278 335 square 3;
+#X connect 0 0 6 1;
+#X connect 1 0 6 1;
+#X connect 2 0 6 0;
+#X connect 3 0 6 1;
+#X connect 6 0 11 0;
+#X connect 8 0 9 0;
+#X connect 9 0 8 0;
+#X connect 11 0 12 0;
diff --git a/Gem/examples/04.pix/04.ImageInPlace.pd b/Gem/examples/04.pix/04.ImageInPlace.pd
new file mode 100644
index 0000000..72e6f0b
--- /dev/null
+++ b/Gem/examples/04.pix/04.ImageInPlace.pd
@@ -0,0 +1,64 @@
+#N canvas 314 61 654 599 12;
+#X msg 489 227 1;
+#X msg 489 259 0;
+#X obj 375 254 gemhead;
+#X msg 488 190 2;
+#X text 254 156 select one of the three images to display;
+#X obj 375 308 pix_imageInPlace;
+#X msg 121 288 download;
+#X msg 124 318 purge;
+#X obj 375 367 square;
+#X text 206 20 display images use pix_imageInPlace;
+#X text 64 389 pix_imageInPlace is slightly different than pix_multiimage.
+When you select an image to display with pix_multiimage \, it copies
+over the image data to the pix_buffer \, which is then used by pix_texture.
+;
+#X text 62 451 This is potentially slow if you are trying to change
+between a lot of images \, but it doesn't use a lot of texture ram.
+;
+#X text 62 503 pix_imageInPlace sends all of the image data to texture
+RAM when the preload message is received. This means that you cannot
+process any of the pixel data \, but it is extremely quick to change
+between the various images.;
+#X msg 119 255 preload ../data/temp*.JPG 2;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 5 1;
+#X connect 1 0 5 1;
+#X connect 2 0 5 0;
+#X connect 3 0 5 1;
+#X connect 5 0 8 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X connect 13 0 5 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
diff --git a/Gem/examples/04.pix/05.film.pd b/Gem/examples/04.pix/05.film.pd
new file mode 100644
index 0000000..601dd7b
--- /dev/null
+++ b/Gem/examples/04.pix/05.film.pd
@@ -0,0 +1,121 @@
+#N canvas 61 44 827 553 12;
+#X obj 90 186 gemhead;
+#X floatatom 220 155 5 0 0 0 - - -;
+#X msg 150 156 auto \$1;
+#X obj 150 137 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+1;
+#X floatatom 124 261 5 0 0 0 - - -;
+#X msg 197 392 -1 -2 -1 -2 8 -2 1 -2 1;
+#X obj 90 467 pix_convolve 3 3;
+#X text 472 233 load and play-back a movie;
+#X text 368 28 win32:;
+#X text 212 134 frame;
+#N canvas 243 65 604 505 README 0;
+#X text 49 38 the pix_film is the same as pix_movie but does not texture
+the movie immediately onto a Geo.;
+#X text 50 77 therefore it is possible to manipulate the frames;
+#X text 48 106 the pix_film object will return the movie in it's (more
+or less) native color-space. most of the times \, this will probably
+be not RGBA but RGB or BGR (on windows machines).;
+#X text 48 153 do not worry about this. however \, most of the pix-manips
+will only work correctly on RGBA-pixes. if this is the case and you
+send it a non-RGBA pixture it will say something like "pix_object cannot
+handle gray image".;
+#X text 49 226 to avoid this \, you can convert your pix-buff to RGBA
+using "pix_rgba". this will be a no-cost operation if the pix_buf already
+is in RGBA.;
+#X text 36 334 you might notice a significant performance-enhancement
+by just turning the [pix_rgba] off (via the toggle). however \, not
+[pix_rgba] is expensive but actually the [pix_convolve] (which appears to do
+nothing when initialized with "0 0 0 0 1 0 0 0 0". When [pix_rgba]
+is "off" \, the [pix_convolve] will be bypassed \, and therefore be
+very fast.;
+#X restore 635 187 pd README;
+#X obj 90 573 square 4;
+#X obj 90 233 pix_film;
+#X floatatom 149 547 5 0 0 0 - - -;
+#X msg 393 48 open ../data/homer.avi;
+#X msg 386 111 open ../data/anim-1.mov;
+#X msg 391 156 open ../data/alea.mpg;
+#X text 247 502 you have to texture the movie by hand;
+#X text 256 466 manipulate the movie (expensive!);
+#X text 26 10 load \, play and manipulate digital videos;
+#X text 423 397 edge detection;
+#X msg 230 424 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125 0.125
+;
+#X text 715 422 smoothing;
+#X obj 289 252 t f;
+#X obj 197 368 loadbang;
+#X obj 110 439 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+1;
+#X obj 90 500 pix_texture;
+#X obj 20 49 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 93 pd gemwin;
+#X msg 25 69 create;
+#X text 21 49 Create window and render;
+#X text 358 91 linux \, os-X:;
+#X text 363 140 linux \, ??:;
+#X obj 345 181 t a;
+#X msg 410 207 open \$1;
+#X obj 410 185 symbol;
+#X obj 471 185 openpanel;
+#X obj 563 185 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 90 309 pix_rgba;
+#X text 178 289 transform the movie into RGBA-space (if the image is
+not RGBA \, [pix_convolve] might not be able to process the image and
+therefore will do nothing \, which will dramatically "increase" performance)
+;
+#X connect 0 0 12 0;
+#X connect 1 0 12 1;
+#X connect 2 0 12 0;
+#X connect 3 0 2 0;
+#X connect 5 0 6 2;
+#X connect 6 0 26 0;
+#X connect 12 0 38 0;
+#X connect 12 1 4 0;
+#X connect 12 2 23 0;
+#X connect 13 0 11 1;
+#X connect 14 0 33 0;
+#X connect 15 0 33 0;
+#X connect 16 0 33 0;
+#X connect 21 0 6 2;
+#X connect 23 0 12 1;
+#X connect 24 0 5 0;
+#X connect 25 0 6 0;
+#X connect 26 0 11 0;
+#X connect 28 0 29 0;
+#X connect 29 0 28 0;
+#X connect 33 0 12 0;
+#X connect 34 0 33 0;
+#X connect 35 0 34 0;
+#X connect 36 0 35 0;
+#X connect 37 0 36 0;
+#X connect 38 0 6 0;
diff --git a/Gem/examples/04.pix/05.movie.pd b/Gem/examples/04.pix/05.movie.pd
new file mode 100644
index 0000000..a6227d3
--- /dev/null
+++ b/Gem/examples/04.pix/05.movie.pd
@@ -0,0 +1,89 @@
+#N canvas 133 25 637 554 12;
+#X obj 157 59 gemhead;
+#X floatatom 336 167 0 0 0 0 - - -;
+#X obj 157 385 rotateXYZ;
+#X obj 157 437 cube;
+#X floatatom 224 359 0 0 0 0 - - -;
+#X obj 224 310 metro 50;
+#X obj 203 412 translateXYZ 2 1 0;
+#X obj 203 438 cube;
+#X obj 157 201 pix_movie;
+#X text 377 167 control which frame;
+#X text 256 436 automatically textures;
+#X obj 177 238 print frames;
+#X msg 287 25 open ../data/homer.avi;
+#X obj 224 290 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+1;
+#X obj 325 282 print done;
+#X msg 336 135 auto \$1;
+#X obj 336 116 tgl 15 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+1;
+#X text 43 486 the texturing is done automatically: there is no need
+to care for the image-size (it doesn't have to be a power of 2). on
+the other hand \, you cannot do image-processing !! use [pix_film]
+for this;
+#X msg 325 259 reached the end !!!;
+#X obj 293 235 t f b;
+#X text 449 13 Win32;
+#X text 461 73 linux;
+#X msg 297 56 open ../data/anim-1.mov;
+#X msg 307 87 open ../data/alea.mpg;
+#X text 8 264 notice: you don't need pix_texture;
+#X text 406 131 play the movie !;
+#X obj 224 335 i;
+#X obj 259 335 + 1;
+#X obj 295 335 % 360;
+#X text 471 42 apple;
+#X obj 505 415 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 142 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 198 112 destroy;
+#X msg 234 221 dimen 500 500;
+#X msg 279 189 dimen 1024 768;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 0 0;
+#X restore 510 453 pd gemwin;
+#X msg 510 430 create;
+#X text 506 413 Create window:;
+#X connect 0 0 8 0;
+#X connect 1 0 8 1;
+#X connect 2 0 3 0;
+#X connect 2 0 6 0;
+#X connect 4 0 2 2;
+#X connect 4 0 2 3;
+#X connect 5 0 26 0;
+#X connect 6 0 7 0;
+#X connect 8 0 2 0;
+#X connect 8 1 11 0;
+#X connect 8 2 19 0;
+#X connect 12 0 8 0;
+#X connect 13 0 5 0;
+#X connect 15 0 8 0;
+#X connect 16 0 15 0;
+#X connect 18 0 14 0;
+#X connect 19 0 8 1;
+#X connect 19 1 18 0;
+#X connect 22 0 8 0;
+#X connect 23 0 8 0;
+#X connect 26 0 27 0;
+#X connect 26 0 4 0;
+#X connect 27 0 28 0;
+#X connect 28 0 26 1;
+#X connect 31 0 32 0;
+#X connect 32 0 31 0;
diff --git a/Gem/examples/04.pix/06.PixRect.pd b/Gem/examples/04.pix/06.PixRect.pd
new file mode 100644
index 0000000..93f5fba
--- /dev/null
+++ b/Gem/examples/04.pix/06.PixRect.pd
@@ -0,0 +1,88 @@
+#N canvas 183 99 635 638 12;
+#X obj 179 176 gemhead;
+#X obj 179 587 pix_texture;
+#X msg 291 536 1 0 0;
+#X obj 179 612 square 3;
+#X floatatom 329 238 0 -10 250 0 - - -;
+#X obj 420 434 t b f;
+#X obj 420 408 + 40;
+#X obj 342 420 + 40;
+#X text 372 182 the position;
+#X text 433 539 the color;
+#X obj 291 513 loadbang;
+#X obj 179 204 pix_image ../data/fractal.JPG;
+#X obj 329 308 t f f;
+#X obj 380 308 t f f;
+#X text 375 241 x-pos;
+#X text 423 269 y-pos;
+#X floatatom 466 304 0 -50 250 0 - - -;
+#X text 512 307 width;
+#X text 560 335 height;
+#X obj 466 374 t b f;
+#X obj 517 374 t b f;
+#X obj 342 443 t b f;
+#X floatatom 380 271 0 -10 250 0 - - -;
+#X floatatom 517 333 0 -50 250 0 - - -;
+#X msg 373 538 0 1 0;
+#X obj 235 488 pack 0 0 40 40;
+#X obj 179 561 pix_rectangle;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X text 118 26 draw a rectangle onto an image;
+#X connect 0 0 11 0;
+#X connect 1 0 3 0;
+#X connect 2 0 26 2;
+#X connect 4 0 12 0;
+#X connect 5 0 25 0;
+#X connect 5 1 25 3;
+#X connect 6 0 5 0;
+#X connect 7 0 21 0;
+#X connect 10 0 2 0;
+#X connect 11 0 26 0;
+#X connect 12 0 25 0;
+#X connect 12 1 7 0;
+#X connect 13 0 6 0;
+#X connect 13 1 25 1;
+#X connect 16 0 19 0;
+#X connect 19 0 7 0;
+#X connect 19 1 7 1;
+#X connect 20 0 6 0;
+#X connect 20 1 6 1;
+#X connect 21 0 25 0;
+#X connect 21 1 25 2;
+#X connect 22 0 13 0;
+#X connect 23 0 20 0;
+#X connect 24 0 26 2;
+#X connect 25 0 26 1;
+#X connect 26 0 1 0;
+#X connect 28 0 29 0;
+#X connect 29 0 28 0;
diff --git a/Gem/examples/04.pix/07.PixSet.pd b/Gem/examples/04.pix/07.PixSet.pd
new file mode 100644
index 0000000..b6deab3
--- /dev/null
+++ b/Gem/examples/04.pix/07.PixSet.pd
@@ -0,0 +1,69 @@
+#N canvas 243 272 754 536 10;
+#X obj 143 110 gemhead;
+#X text 99 37 ========;
+#X msg 149 366 quality 0;
+#X obj 143 409 square 2;
+#X obj 149 343 loadbang;
+#X text 101 487 maybe have a look at;
+#X text 101 24 pix_set;
+#X text 246 23 set the pixles of the image;
+#X msg 279 165 rgb;
+#X msg 279 141 rgba;
+#X msg 279 189 grey;
+#X msg 229 108 0 0.8 0 0 0.9 0 0.1 0 1 1 1 10;
+#X msg 268 227 set 2 4;
+#X text 461 109 a list of pixel-values;
+#X text 331 163 interpret the list as;
+#X text 514 136 r1 g1 b1 a1 r2 g2 b2 a2 r3...;
+#X text 512 165 r1 g1 b1 r2 g2 b2 r3...;
+#X text 512 194 grey1 grey2 grey3...;
+#X text 507 236 set the imagesize to "X Y";
+#X text 306 317 creation arguments :: [X Y] of the image buffer;
+#X msg 265 249 set 1 1;
+#X text 253 487 [pix_dump];
+#X obj 143 243 pix_set 64 64;
+#X obj 143 387 pix_texture;
+#X obj 450 389 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 455 433 pd gemwin;
+#X msg 455 409 create;
+#X text 451 389 Create window and render;
+#X connect 0 0 22 0;
+#X connect 2 0 23 0;
+#X connect 4 0 2 0;
+#X connect 8 0 22 0;
+#X connect 9 0 22 0;
+#X connect 10 0 22 0;
+#X connect 11 0 22 1;
+#X connect 12 0 22 0;
+#X connect 20 0 22 0;
+#X connect 22 0 23 0;
+#X connect 23 0 3 0;
+#X connect 25 0 26 0;
+#X connect 26 0 25 0;
diff --git a/Gem/examples/04.pix/08.PixDump.pd b/Gem/examples/04.pix/08.PixDump.pd
new file mode 100644
index 0000000..a21b273
--- /dev/null
+++ b/Gem/examples/04.pix/08.PixDump.pd
@@ -0,0 +1,64 @@
+#N canvas 53 47 761 536 10;
+#X obj 143 110 gemhead;
+#X obj 143 203 pix_dump;
+#X text 101 24 pix_dump;
+#X text 99 37 ========;
+#X msg 369 184 bang;
+#X obj 143 387 pix_texture;
+#X msg 149 366 quality 0;
+#X obj 143 409 square 2;
+#X obj 149 343 loadbang;
+#X text 412 184 trigger the pix_dump;
+#X text 246 24 dump the pixels of the image;
+#X obj 194 254 print dump;
+#X text 297 265 this produces an output like;
+#X text 292 285 "r1 g1 b1 a1 r2 g2 b2 a2 r3 ...";
+#X text 292 302 (r=red \; g=green \; b=blue \; a=alpha);
+#X obj 474 371 repack;
+#X text 278 369 maybe you would like to use;
+#X text 525 373 (part of zexy);
+#X text 275 389 to excerpt pixel information out of this;
+#X text 101 487 maybe have a look at;
+#X obj 250 487 pix_set;
+#X obj 455 54 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 460 98 pd gemwin;
+#X msg 460 74 create;
+#X text 456 54 Create window and render;
+#X obj 143 135 pix_image ../data/blob2.tif;
+#X connect 0 0 25 0;
+#X connect 1 0 5 0;
+#X connect 1 1 11 0;
+#X connect 4 0 1 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 8 0 6 0;
+#X connect 22 0 23 0;
+#X connect 23 0 22 0;
+#X connect 25 0 1 0;
diff --git a/Gem/examples/04.pix/09.Histogram.pd b/Gem/examples/04.pix/09.Histogram.pd
new file mode 100644
index 0000000..5922a8e
--- /dev/null
+++ b/Gem/examples/04.pix/09.Histogram.pd
@@ -0,0 +1,89 @@
+#N canvas 0 0 764 557 10;
+#N canvas 412 247 681 394 tables 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array red 256 float 0;
+#X coords 0 1 255 0 256 140 1;
+#X restore 95 30 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array green 256 float 0;
+#X coords 0 1 255 0 256 140 1;
+#X restore 399 29 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array blue 256 float 0;
+#X coords 0 1 255 0 256 140 1;
+#X restore 98 214 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array alpha 64 float 0;
+#X coords 0 1 63 0 256 140 1;
+#X restore 396 212 graph;
+#X restore 379 211 pd tables;
+#X obj 34 192 gemhead;
+#X obj 34 476 pix_texture;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array rgb 64 float 0;
+#X coords 0 1 63 0 256 140 1;
+#X restore 287 53 graph;
+#X text 78 8 pix_curve: adjust the colour of an image;
+#X text 451 213 separate tables for r \, g \, b and a;
+#X msg 185 192 1;
+#X msg 155 192 0;
+#X msg 214 192 2;
+#X obj 34 497 square 3;
+#X msg 95 289 set red green blue alpha;
+#X msg 99 325 set red green blue;
+#X msg 99 365 set rgb;
+#X obj 34 395 pix_histo rgb;
+#X msg 564 57 \; rgb resize 32;
+#X msg 565 93 \; rgb resize 64;
+#X msg 564 135 \; rgb normalize 1;
+#X obj 300 367 pix_histo rgb;
+#X obj 303 328 pix_histo red green blue;
+#X obj 302 288 pix_histo red green blue alpha;
+#X text 313 388 one histogramm for all channels (making grey out of
+rgb);
+#X text 326 346 histograms for r \, g \, b;
+#X text 337 306 histograms for r \, g \, b \, a;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X obj 34 217 pix_multiimage ../data/temp*.JPG 2;
+#X connect 1 0 27 0;
+#X connect 2 0 9 0;
+#X connect 6 0 27 1;
+#X connect 7 0 27 1;
+#X connect 8 0 27 1;
+#X connect 10 0 13 0;
+#X connect 11 0 13 0;
+#X connect 12 0 13 0;
+#X connect 13 0 2 0;
+#X connect 24 0 25 0;
+#X connect 25 0 24 0;
+#X connect 27 0 13 0;
diff --git a/Gem/examples/04.pix/10.PixDataSimple.pd b/Gem/examples/04.pix/10.PixDataSimple.pd
new file mode 100644
index 0000000..36bb4e6
--- /dev/null
+++ b/Gem/examples/04.pix/10.PixDataSimple.pd
@@ -0,0 +1,90 @@
+#N canvas 284 93 594 539 10;
+#X obj 46 186 gemwin;
+#X obj 319 173 gemhead;
+#X obj 258 329 pix_data;
+#X msg 244 103 1;
+#X msg 243 128 0;
+#X msg 87 48 create;
+#X msg 114 104 destroy;
+#X msg 319 143 bang;
+#X msg 205 103 bang;
+#X obj 205 73 t b b;
+#X msg 205 54 bang;
+#X obj 233 422 translateXYZ;
+#X obj 233 360 gemhead;
+#X obj 233 449 color;
+#X obj 233 200 t b b b b;
+#X obj 369 328 * 6;
+#X obj 444 328 * 6;
+#X obj 444 348 - 3;
+#X obj 369 348 - 3;
+#X msg 348 42 1;
+#X msg 391 42 0;
+#X obj 84 302 world_light;
+#X obj 84 274 gemhead;
+#X obj 348 93 metro 5;
+#X obj 233 478 sphere 0.1;
+#X text 79 13 click here to begin;
+#X text 320 18 turn on/off the metro;
+#X obj 319 202 pix_image ../data/fractal.JPG;
+#N canvas 95 194 290 179 Gem.init 0;
+#X obj 118 18 loadbang;
+#X msg 201 78 reset;
+#X obj 118 113 outlet;
+#X obj 118 45 t b b;
+#X msg 118 79 lighting 1;
+#X msg 22 77 buffer 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X restore 25 153 pd Gem.init;
+#X text 93 34 1;
+#X text 209 38 2;
+#X obj 337 253 random 1000;
+#X obj 337 270 / 1000;
+#X obj 337 288 t f f;
+#X obj 419 253 random 1000;
+#X obj 419 270 / 1000;
+#X obj 419 288 t f f;
+#X connect 1 0 27 0;
+#X connect 2 1 13 1;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 1 0;
+#X connect 8 0 0 0;
+#X connect 9 0 7 0;
+#X connect 9 0 8 0;
+#X connect 9 1 3 0;
+#X connect 10 0 9 0;
+#X connect 11 0 13 0;
+#X connect 12 0 11 0;
+#X connect 13 0 24 0;
+#X connect 14 0 12 0;
+#X connect 14 1 2 0;
+#X connect 14 1 22 0;
+#X connect 14 2 31 0;
+#X connect 14 3 34 0;
+#X connect 15 0 18 0;
+#X connect 16 0 17 0;
+#X connect 17 0 11 2;
+#X connect 18 0 11 1;
+#X connect 19 0 23 0;
+#X connect 20 0 23 0;
+#X connect 22 0 21 0;
+#X connect 23 0 14 0;
+#X connect 27 0 2 1;
+#X connect 28 0 0 0;
+#X connect 31 0 32 0;
+#X connect 32 0 33 0;
+#X connect 33 0 2 2;
+#X connect 33 1 15 0;
+#X connect 34 0 35 0;
+#X connect 35 0 36 0;
+#X connect 36 0 2 3;
+#X connect 36 1 16 0;
diff --git a/Gem/examples/04.pix/11.PixDataComplex.pd b/Gem/examples/04.pix/11.PixDataComplex.pd
new file mode 100644
index 0000000..cb8d846
--- /dev/null
+++ b/Gem/examples/04.pix/11.PixDataComplex.pd
@@ -0,0 +1,117 @@
+#N canvas 331 86 929 574 10;
+#X obj 30 159 gemwin;
+#X obj 372 135 gemhead;
+#X obj 372 164 pix_image ../data/fractal.JPG;
+#X obj 285 311 pix_data;
+#X msg 183 110 1;
+#X msg 218 110 0;
+#X msg 48 37 create;
+#X msg 49 87 destroy;
+#X msg 372 105 bang;
+#X msg 138 111 bang;
+#X obj 214 61 t b b;
+#X msg 214 36 bang;
+#X obj 206 400 translateXYZ;
+#X obj 206 338 gemhead;
+#X obj 206 436 color;
+#X obj 266 205 t b b b b;
+#X obj 443 313 * 6;
+#X obj 443 339 - 3;
+#X obj 385 341 - 3;
+#X msg 292 30 1;
+#X msg 325 30 0;
+#X obj 84 320 world_light;
+#X obj 84 274 gemhead;
+#X obj 206 471 rotate 1 1 1;
+#X obj 337 397 * 90;
+#X obj 292 114 metro 5;
+#X obj 485 313 pix_data;
+#X obj 501 237 gemhead;
+#N canvas 99 214 290 179 Gem.init 0;
+#X obj 118 18 loadbang;
+#X msg 215 80 reset;
+#X obj 118 113 outlet;
+#X obj 118 45 t b b;
+#X msg 118 79 lighting 1;
+#X msg 34 80 buffer 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X restore 30 125 pd Gem.init;
+#X text 53 22 1;
+#X text 217 19 2;
+#X obj 336 236 random 1000;
+#X obj 336 254 / 1000;
+#X obj 336 272 t f f;
+#X obj 418 236 random 1000;
+#X obj 418 254 / 1000;
+#X obj 418 272 t f f;
+#X floatatom 385 366 5 0 0 0 - - -;
+#X floatatom 443 366 5 0 0 0 - - -;
+#X obj 385 314 * 6;
+#X floatatom 341 429 5 0 0 0 - - -;
+#X obj 206 506 cube 0;
+#X msg 500 197 bang;
+#X obj 501 272 pix_image ../data/dancer.JPG;
+#X floatatom 537 423 5 0 0 0 - - -;
+#X obj 537 473 * 0.2;
+#X obj 537 369 f;
+#X connect 1 0 2 0;
+#X connect 2 0 3 1;
+#X connect 3 1 14 1;
+#X connect 3 2 24 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 1 0;
+#X connect 8 0 27 0;
+#X connect 9 0 0 0;
+#X connect 10 0 8 0;
+#X connect 10 0 9 0;
+#X connect 10 1 4 0;
+#X connect 11 0 10 0;
+#X connect 12 0 14 0;
+#X connect 13 0 12 0;
+#X connect 14 0 23 0;
+#X connect 15 0 13 0;
+#X connect 15 1 3 0;
+#X connect 15 1 22 0;
+#X connect 15 1 26 0;
+#X connect 15 2 31 0;
+#X connect 15 3 34 0;
+#X connect 16 0 17 0;
+#X connect 17 0 12 2;
+#X connect 17 0 38 0;
+#X connect 18 0 12 1;
+#X connect 18 0 37 0;
+#X connect 19 0 25 0;
+#X connect 20 0 25 0;
+#X connect 22 0 21 0;
+#X connect 23 0 41 0;
+#X connect 24 0 23 1;
+#X connect 24 0 40 0;
+#X connect 25 0 15 0;
+#X connect 26 1 46 0;
+#X connect 27 0 43 0;
+#X connect 28 0 0 0;
+#X connect 31 0 32 0;
+#X connect 32 0 33 0;
+#X connect 33 0 3 2;
+#X connect 33 0 26 2;
+#X connect 33 1 39 0;
+#X connect 34 0 35 0;
+#X connect 35 0 36 0;
+#X connect 36 0 3 3;
+#X connect 36 0 26 3;
+#X connect 36 1 16 0;
+#X connect 39 0 18 0;
+#X connect 42 0 27 0;
+#X connect 43 0 26 1;
+#X connect 44 0 45 0;
+#X connect 45 0 41 1;
+#X connect 46 0 44 0;
diff --git a/Gem/examples/04.pix/12.add.pd b/Gem/examples/04.pix/12.add.pd
new file mode 100644
index 0000000..2b5dc7f
--- /dev/null
+++ b/Gem/examples/04.pix/12.add.pd
@@ -0,0 +1,52 @@
+#N canvas 542 198 681 468 10;
+#X obj 270 175 pix_image ../data/dancer.JPG;
+#X obj 270 342 pix_texture;
+#X obj 270 383 square;
+#X msg 329 364 3;
+#X obj 369 209 gemhead 20;
+#X obj 270 142 gemhead;
+#X msg 370 141 open ../data/dancer.JPG;
+#X obj 369 232 pix_image ../data/fractal.JPG;
+#X obj 270 282 pix_add;
+#X obj 20 79 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 123 pd gemwin;
+#X msg 25 106 create;
+#X text 21 79 Create window and render;
+#X text 135 60 blending \, using pixel addition;
+#X connect 0 0 8 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 1;
+#X connect 4 0 7 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 8 1;
+#X connect 8 0 1 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
diff --git a/Gem/examples/04.pix/12.blending.pd b/Gem/examples/04.pix/12.blending.pd
new file mode 100644
index 0000000..473c48e
--- /dev/null
+++ b/Gem/examples/04.pix/12.blending.pd
@@ -0,0 +1,173 @@
+#N canvas 138 0 775 371 10;
+#X obj 254 305 pix_texture;
+#X obj 290 112 gemhead 20;
+#X obj 254 65 gemhead;
+#X text 257 30 various methods for blending images;
+#N canvas 165 295 561 386 blending 0;
+#X obj 28 65 inlet;
+#X obj 191 354 outlet;
+#X obj 173 285 inlet;
+#X obj 320 8 inlet;
+#X obj 28 322 pix_composite;
+#X obj 129 323 pix_add;
+#X obj 285 322 pix_diff;
+#X obj 191 322 pix_subtract;
+#X obj 28 227 pix_alpha;
+#N canvas 445 182 508 174 select 0;
+#X obj 88 35 inlet;
+#X msg 88 98 1;
+#X msg 144 98 2;
+#X msg 201 97 3;
+#X msg 257 97 0;
+#X obj 88 121 outlet;
+#X msg 329 100 4;
+#X obj 88 59 select pix_add pix_subtract pix_diff pix_composite pix_multiply
+;
+#X connect 0 0 7 0;
+#X connect 1 0 5 0;
+#X connect 2 0 5 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 6 0 5 0;
+#X connect 7 0 1 0;
+#X connect 7 1 2 0;
+#X connect 7 2 3 0;
+#X connect 7 3 4 0;
+#X connect 7 4 6 0;
+#X restore 350 82 pd select blending method;
+#X obj 360 324 pix_multiply;
+#N canvas 172 373 450 300 demux5 0;
+#X obj 59 30 inlet;
+#X obj 283 17 inlet;
+#X obj 59 193 outlet;
+#X obj 59 137 spigot;
+#X obj 96 109 == 0;
+#X obj 106 137 spigot;
+#X obj 153 139 spigot;
+#X obj 200 137 spigot;
+#X obj 246 137 spigot;
+#X obj 143 109 == 1;
+#X obj 190 109 == 2;
+#X obj 237 109 == 3;
+#X obj 283 109 == 4;
+#X obj 96 83 loadbang;
+#X obj 59 52 t a a a a a;
+#X obj 106 194 outlet;
+#X obj 153 195 outlet;
+#X obj 200 196 outlet;
+#X obj 246 195 outlet;
+#X obj 283 61 f;
+#X connect 0 0 14 0;
+#X connect 1 0 19 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 1;
+#X connect 5 0 15 0;
+#X connect 6 0 16 0;
+#X connect 7 0 17 0;
+#X connect 8 0 18 0;
+#X connect 9 0 5 1;
+#X connect 10 0 6 1;
+#X connect 11 0 7 1;
+#X connect 12 0 8 1;
+#X connect 13 0 4 0;
+#X connect 14 0 3 0;
+#X connect 14 1 5 0;
+#X connect 14 2 6 0;
+#X connect 14 3 7 0;
+#X connect 14 4 8 0;
+#X connect 19 0 4 0;
+#X connect 19 0 9 0;
+#X connect 19 0 10 0;
+#X connect 19 0 11 0;
+#X connect 19 0 12 0;
+#X restore 28 189 pd demux5;
+#X obj 320 28 t b a;
+#X obj 28 129 pix_buf;
+#X text 26 39 pix1;
+#X text 176 269 pix2;
+#X obj 350 56 symbol;
+#X text 99 232 we need an alpha componenct for 'composite';
+#X text 85 115 [pix_add] and friends will overwrite the original (left)
+image with the blend. [pix_buf] holds a local copy of the original
+image and will refresh the output when banged.;
+#X connect 0 0 13 0;
+#X connect 2 0 5 1;
+#X connect 2 0 4 1;
+#X connect 2 0 7 1;
+#X connect 2 0 6 1;
+#X connect 2 0 10 1;
+#X connect 3 0 12 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 1 0;
+#X connect 8 0 4 0;
+#X connect 9 0 11 1;
+#X connect 10 0 1 0;
+#X connect 11 0 8 0;
+#X connect 11 1 5 0;
+#X connect 11 2 7 0;
+#X connect 11 3 6 0;
+#X connect 11 4 10 0;
+#X connect 12 0 13 0;
+#X connect 12 1 16 0;
+#X connect 13 0 11 0;
+#X connect 16 0 9 0;
+#X restore 254 250 pd blending;
+#X obj 254 328 square 3;
+#X text 461 210 additive blending (likely to get white);
+#X text 461 231 subtractive blending (likely to get black);
+#X text 467 184 alpha blending;
+#X msg 367 281 pix_multiply;
+#X msg 368 256 pix_diff;
+#X msg 366 232 pix_subtract;
+#X msg 366 207 pix_add;
+#X msg 367 184 pix_composite;
+#X text 469 281 multiply 2 images together;
+#X obj 254 87 pix_image ../data/dancer.JPG;
+#X obj 290 136 pix_image ../data/fractal.JPG;
+#X text 465 259 difference;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 5 0;
+#X connect 1 0 16 0;
+#X connect 2 0 15 0;
+#X connect 4 0 0 0;
+#X connect 9 0 4 2;
+#X connect 10 0 4 2;
+#X connect 11 0 4 2;
+#X connect 12 0 4 2;
+#X connect 13 0 4 2;
+#X connect 15 0 4 0;
+#X connect 16 0 4 1;
+#X connect 19 0 20 0;
+#X connect 20 0 19 0;
diff --git a/Gem/examples/04.pix/12.composite.pd b/Gem/examples/04.pix/12.composite.pd
new file mode 100644
index 0000000..ce3a790
--- /dev/null
+++ b/Gem/examples/04.pix/12.composite.pd
@@ -0,0 +1,54 @@
+#N canvas 246 168 681 468 10;
+#X obj 270 175 pix_image ../data/dancer.JPG;
+#X obj 270 338 pix_texture;
+#X obj 270 379 square;
+#X msg 329 360 3;
+#X obj 270 278 pix_composite;
+#X obj 369 209 gemhead 20;
+#X obj 270 142 gemhead;
+#X obj 270 207 pix_alpha;
+#X msg 370 141 open ../data/dancer.JPG;
+#X obj 369 244 pix_image ../data/fractal.JPG;
+#X text 135 60 blending \, using the alpha-mask;
+#X obj 20 79 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 123 pd gemwin;
+#X msg 25 105 create;
+#X text 21 79 Create window and render;
+#X connect 0 0 7 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 1;
+#X connect 4 0 1 0;
+#X connect 5 0 9 0;
+#X connect 6 0 0 0;
+#X connect 7 0 4 0;
+#X connect 8 0 0 0;
+#X connect 9 0 4 1;
+#X connect 12 0 13 0;
+#X connect 13 0 12 0;
diff --git a/Gem/examples/04.pix/12.pix_multiply.pd b/Gem/examples/04.pix/12.pix_multiply.pd
new file mode 100644
index 0000000..1826175
--- /dev/null
+++ b/Gem/examples/04.pix/12.pix_multiply.pd
@@ -0,0 +1,55 @@
+#N canvas 58 175 600 500 10;
+#X obj 288 247 pix_image ../data/dancer.JPG;
+#X obj 270 153 gemhead;
+#X obj 270 188 pix_image ../data/fractal.JPG;
+#X obj 288 214 gemhead 20;
+#X obj 270 278 pix_multiply;
+#X text 296 84 multiply two images together;
+#X text 270 116 the dancer image is just black and white;
+#X text 104 25 blending \, using multiplication;
+#X obj 270 318 pix_texture;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 689 152 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X msg 27 83 color 1 1 1 0;
+#X obj 66 65 t b b;
+#X connect 0 0 4 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 4 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X obj 270 379 square 3;
+#X connect 0 0 4 1;
+#X connect 1 0 2 0;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 8 0;
+#X connect 8 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
diff --git a/Gem/examples/04.pix/13.maskDancer.pd b/Gem/examples/04.pix/13.maskDancer.pd
new file mode 100644
index 0000000..957a941
--- /dev/null
+++ b/Gem/examples/04.pix/13.maskDancer.pd
@@ -0,0 +1,55 @@
+#N canvas 4 20 600 500 10;
+#X obj 270 278 pix_mask;
+#X obj 288 247 pix_image ../data/dancer.JPG;
+#X obj 270 153 gemhead;
+#X obj 270 312 alpha;
+#X obj 270 188 pix_image ../data/fractal.JPG;
+#X obj 270 338 pix_texture;
+#X obj 288 214 gemhead 20;
+#X obj 270 379 square 3;
+#X text 234 59 blending \, using mask;
+#X obj 20 89 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 88 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X msg 25 82 color 1 1 1 0;
+#X obj 88 64 t b b;
+#X connect 0 0 4 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 4 1 1 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 133 pd gemwin;
+#X msg 25 109 create;
+#X text 21 89 Create window and render;
+#X connect 0 0 3 0;
+#X connect 1 0 0 1;
+#X connect 2 0 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 0 0;
+#X connect 5 0 7 0;
+#X connect 6 0 1 0;
+#X connect 10 0 11 0;
+#X connect 11 0 10 0;
diff --git a/Gem/examples/04.pix/14.takeAlpha.pd b/Gem/examples/04.pix/14.takeAlpha.pd
new file mode 100644
index 0000000..535056c
--- /dev/null
+++ b/Gem/examples/04.pix/14.takeAlpha.pd
@@ -0,0 +1,64 @@
+#N canvas 426 68 613 402 10;
+#X obj 257 92 gemhead;
+#X obj 343 168 gemhead;
+#X obj 257 244 pix_takealpha;
+#X text 18 24 takes the alpha-channel of another image;
+#X obj 456 269 pix_texture;
+#X obj 456 336 square;
+#X obj 456 310 translateXYZ 2 0 0;
+#X obj 257 314 translateXYZ -2 0 0;
+#X obj 456 289 alpha;
+#X obj 257 342 square 2;
+#X obj 257 270 pix_texture;
+#X obj 257 290 alpha;
+#X text 403 173 load an image with an alpha-mask;
+#X text 355 245 take the alpha-mask of img2;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X obj 343 210 t a a;
+#X obj 257 125 pix_image ../data/temp2.JPG;
+#X obj 343 190 pix_image ../data/fractalAlpha.TIF;
+#X connect 0 0 19 0;
+#X connect 1 0 20 0;
+#X connect 2 0 10 0;
+#X connect 4 0 8 0;
+#X connect 6 0 5 0;
+#X connect 7 0 9 0;
+#X connect 8 0 6 0;
+#X connect 10 0 11 0;
+#X connect 11 0 7 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
+#X connect 18 0 2 1;
+#X connect 18 1 4 0;
+#X connect 19 0 2 0;
+#X connect 20 0 18 0;
diff --git a/Gem/examples/04.pix/15.pix_alpha.pd b/Gem/examples/04.pix/15.pix_alpha.pd
new file mode 100644
index 0000000..de645f2
--- /dev/null
+++ b/Gem/examples/04.pix/15.pix_alpha.pd
@@ -0,0 +1,82 @@
+#N canvas 78 67 719 587 10;
+#X obj 332 30 gemhead;
+#X obj 332 371 pix_texture;
+#X msg 375 394 4;
+#X obj 332 76 pix_image ../data/fractal.JPG;
+#X obj 332 302 pix_alpha;
+#X obj 332 421 square;
+#X obj 332 336 alpha;
+#X msg 456 166 1 1 1;
+#X msg 459 243 0 0 0;
+#X msg 356 219 0.5;
+#X msg 348 185 1;
+#X msg 457 209 1 0.5 0.5;
+#X msg 362 255 0;
+#X text 212 222 set the alpha value;
+#X text 394 138 set the high threshold;
+#N canvas 12 0 271 246 cube 0;
+#X obj 69 39 gemhead 20;
+#X obj 69 71 translateXYZ 0 0 -4;
+#X obj 69 205 cube;
+#X obj 69 180 rotateXYZ;
+#X obj 69 112 render_trigger;
+#X obj 115 141 i;
+#X obj 145 142 + 1;
+#X obj 180 143 % 360;
+#X connect 0 0 1 0;
+#X connect 1 0 4 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 4 1 5 0;
+#X connect 5 0 6 0;
+#X connect 5 0 3 1;
+#X connect 5 0 3 2;
+#X connect 5 0 3 3;
+#X connect 6 0 7 0;
+#X connect 7 0 5 1;
+#X restore 444 551 pd cube in the back;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 3 0;
+#X connect 1 0 5 0;
+#X connect 2 0 5 1;
+#X connect 3 0 4 0;
+#X connect 4 0 6 0;
+#X connect 6 0 1 0;
+#X connect 7 0 4 3;
+#X connect 8 0 4 3;
+#X connect 9 0 4 1;
+#X connect 10 0 4 1;
+#X connect 11 0 4 3;
+#X connect 12 0 4 1;
+#X connect 17 0 18 0;
+#X connect 18 0 17 0;
diff --git a/Gem/examples/04.pix/16.alphaGrey.pd b/Gem/examples/04.pix/16.alphaGrey.pd
new file mode 100644
index 0000000..9d5405b
--- /dev/null
+++ b/Gem/examples/04.pix/16.alphaGrey.pd
@@ -0,0 +1,78 @@
+#N canvas 28 0 713 500 10;
+#X obj 135 336 pix_texture;
+#X obj 135 393 square 2;
+#X obj 135 171 pix_image ../data/fractalAlpha.TIF;
+#X obj 135 308 pix_a_2grey 0.5;
+#X obj 135 215 translateXYZ -2 0 0;
+#X obj 386 140 gemhead;
+#X obj 386 309 pix_texture;
+#X obj 386 402 square 2;
+#X obj 386 171 pix_image ../data/fractalAlpha.TIF;
+#X obj 386 348 alpha;
+#X obj 386 209 translateXYZ 2 0 0;
+#X obj 228 13 pix_a_2grey;
+#X text 261 55 grey's out all pixels \, of which the alpha-channel
+is above a certain threshold;
+#X obj 240 269 hsl 128 15 -1 1 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 3100 1;
+#X msg 237 246 0;
+#X msg 266 246 0.5;
+#X obj 20 39 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#X text 21 39 Create window and render;
+#X obj 135 139 gemhead;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 28 61 pd gemwin;
+#X floatatom 237 288 5 -1 1 0 - - -;
+#X connect 0 0 1 0;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 3 0;
+#X connect 5 0 8 0;
+#X connect 6 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 7 0;
+#X connect 10 0 6 0;
+#X connect 13 0 20 0;
+#X connect 14 0 13 0;
+#X connect 15 0 13 0;
+#X connect 18 0 2 0;
+#X connect 20 0 3 1;
diff --git a/Gem/examples/04.pix/16.pix_2grey.pd b/Gem/examples/04.pix/16.pix_2grey.pd
new file mode 100644
index 0000000..e2552c1
--- /dev/null
+++ b/Gem/examples/04.pix/16.pix_2grey.pd
@@ -0,0 +1,45 @@
+#N canvas 204 170 691 547 10;
+#X obj 308 140 gemhead;
+#X obj 308 374 pix_texture;
+#X obj 308 402 square 2;
+#X obj 308 171 pix_image ../data/fractalAlpha.TIF;
+#X obj 308 297 pix_2grey;
+#X obj 20 159 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 203 pd gemwin;
+#X msg 25 179 create;
+#X text 21 159 Create window and render;
+#X text 64 81 greys out all pixels (but pixel-values are still in RGBA)
+;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 6 0 7 0;
+#X connect 7 0 6 0;
diff --git a/Gem/examples/04.pix/17.pix_gain.pd b/Gem/examples/04.pix/17.pix_gain.pd
new file mode 100644
index 0000000..3b6ae5e
--- /dev/null
+++ b/Gem/examples/04.pix/17.pix_gain.pd
@@ -0,0 +1,72 @@
+#N canvas 111 106 885 510 10;
+#X floatatom 664 182 0 0 0 0 - - -;
+#X obj 664 210 / 100;
+#X floatatom 610 163 0 0 0 0 - - -;
+#X obj 610 192 / 100;
+#X obj 343 56 gemhead;
+#X obj 343 319 pix_texture;
+#X msg 394 359 4;
+#X floatatom 556 121 0 0 0 0 - - -;
+#X obj 556 149 / 100;
+#X obj 343 268 pix_gain;
+#X obj 556 241 pack 0 0 0;
+#X obj 343 387 triangle;
+#X text 356 341 click here to change the size of the triangle;
+#X msg 570 213 bang;
+#X obj 343 82 pix_image ../data/fractal.JPG;
+#X obj 364 134 vsl 15 128 0 1 0 0 empty empty empty 20 8 0 8 -262144
+-1 -1 0 1;
+#X text 382 141 overall factor;
+#X text 632 121 color-wise factor;
+#X text 103 453 using [pix_gain] is probably very expensive (since
+it does operations on your CPU). Try using [color] if your card has
+openGL-hw-accleration...;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 1 0;
+#X connect 1 0 10 2;
+#X connect 1 0 13 0;
+#X connect 2 0 3 0;
+#X connect 3 0 10 1;
+#X connect 3 0 13 0;
+#X connect 4 0 14 0;
+#X connect 5 0 11 0;
+#X connect 6 0 11 1;
+#X connect 7 0 8 0;
+#X connect 8 0 10 0;
+#X connect 9 0 5 0;
+#X connect 10 0 9 2;
+#X connect 13 0 10 0;
+#X connect 14 0 9 0;
+#X connect 15 0 9 1;
+#X connect 20 0 21 0;
+#X connect 21 0 20 0;
diff --git a/Gem/examples/04.pix/18.Curves.pd b/Gem/examples/04.pix/18.Curves.pd
new file mode 100644
index 0000000..ca02c91
--- /dev/null
+++ b/Gem/examples/04.pix/18.Curves.pd
@@ -0,0 +1,180 @@
+#N canvas 119 33 764 634 10;
+#N canvas 285 0 681 629 tables 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array red 256 float 0;
+#X coords 0 255 255 0 256 140 1;
+#X restore 95 30 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array green 256 float 0;
+#X coords 0 255 255 0 256 140 1;
+#X restore 399 29 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array blue 256 float 0;
+#X coords 0 255 255 0 256 140 1;
+#X restore 98 214 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array alpha 64 float 0;
+#X coords 0 255 63 0 256 140 1;
+#X restore 396 212 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array edge 8 float 0;
+#X coords 0 255 7 0 256 140 1;
+#X restore 49 440 graph;
+#X text 319 459 set all black and white pixels to black.;
+#X text 318 477 set all "grey" pixels (the transients) to white.;
+#X restore 219 225 pd tables;
+#X obj 30 272 gemhead;
+#X obj 30 468 pix_texture;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array rgba 67 float 0;
+#X coords 0 256 66 0 256 140 1;
+#X restore 217 70 graph;
+#X text 78 8 pix_curve: adjust the colour of an image;
+#X text 291 227 separate tables for r \, g \, b and a;
+#X obj 466 274 pix_curve rgba;
+#X obj 469 324 pix_curve red green blue;
+#X obj 470 373 pix_curve red green blue alpha;
+#X text 504 291 one curve for all channels;
+#X text 505 391 curves for r \, g \, b \, a;
+#X text 500 341 curves for r \, g \, b \; leave a unchanged;
+#X msg 507 127 \; rgba cosinesum 64 128 128;
+#X obj 30 393 pix_curve rgba;
+#N canvas 328 58 600 502 init 0;
+#X obj 93 39 loadbang;
+#X msg 115 87 \; rgba resize 256 \; red resize 256 green resize 256
+\; blue resize 256 \; alpha resize 64 \; alpha const 128;
+#X obj 93 197 t b b;
+#X msg 93 219 256;
+#X msg 125 218 0;
+#X obj 93 241 until;
+#X obj 93 262 i;
+#X obj 123 261 + 1;
+#X msg 93 177 bang;
+#X obj 93 283 t f f f;
+#X obj 93 370 tabwrite rgba;
+#X msg 93 348 \$1 \$1;
+#X obj 210 304 / 255;
+#X obj 210 326 sqrt;
+#X obj 210 347 * 255;
+#X obj 210 395 tabwrite red;
+#X obj 210 373 pack 0 0;
+#X obj 319 456 tabwrite green;
+#X obj 104 395 tabwrite blue;
+#X obj 93 63 t b b b;
+#X msg 364 83 \; edge resize 8 \; edge const 255 \; edge 0 0 \; edge
+7 0;
+#X obj 319 393 unpack;
+#X obj 319 413 - 255;
+#X obj 319 432 * -1;
+#X obj 362 413 - 255;
+#X obj 362 432 * -1;
+#X connect 0 0 19 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 1;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 6 0 9 0;
+#X connect 7 0 6 1;
+#X connect 8 0 2 0;
+#X connect 9 0 11 0;
+#X connect 9 1 12 0;
+#X connect 9 2 16 1;
+#X connect 11 0 10 0;
+#X connect 11 0 18 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 16 0;
+#X connect 16 0 15 0;
+#X connect 16 0 21 0;
+#X connect 19 0 8 0;
+#X connect 19 1 1 0;
+#X connect 19 2 20 0;
+#X connect 21 0 22 0;
+#X connect 21 1 24 0;
+#X connect 22 0 23 0;
+#X connect 23 0 17 0;
+#X connect 24 0 25 0;
+#X connect 25 0 17 1;
+#X restore 604 470 pd init;
+#X msg 284 275 set rgba;
+#X msg 282 325 set red green blue;
+#X msg 278 375 set red green blue alpha;
+#X text 505 110 an alternative colour-curve;
+#X text 228 56 paint your own curve;
+#X obj 30 509 square 2;
+#X obj 30 488 translateXYZ -2 0 0;
+#X obj 244 486 gemhead;
+#X obj 244 548 pix_texture;
+#X obj 244 569 translateXYZ 2 0 0;
+#X obj 244 527 pix_curve edge;
+#N canvas 80 38 600 318 pix_update 0;
+#X obj 59 115 inlet;
+#X obj 59 227 outlet;
+#X text 61 19 this is quite a dummy-routine:;
+#X text 78 47 just multiply the pix-buffer with 1 (do nothing !) \,
+and make it thereby dirty \, so that the pix_curve routines are going
+to be called....;
+#X text 56 272 maybe this could be done more easily..?;
+#X obj 59 202 pix_buf;
+#X obj 59 156 t a b;
+#X connect 0 0 6 0;
+#X connect 5 0 1 0;
+#X connect 6 0 5 0;
+#X connect 6 1 5 0;
+#X restore 30 331 pd pix_update;
+#X obj 244 592 square 2;
+#X obj 30 435 alpha;
+#X obj 30 303 pix_image ../data/fractal.JPG;
+#X obj 244 506 pix_image ../data/dancer.JPG;
+#X obj 11 151 cnv 15 200 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X obj 132 193 gemwin;
+#X obj 132 135 t a;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 0 5 0;
+#X connect 2 1 4 0;
+#X connect 2 1 6 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 9 0;
+#X connect 6 0 9 0;
+#X connect 7 0 9 0;
+#X connect 9 0 8 0;
+#X restore 16 195 pd gemwin;
+#X msg 16 171 create;
+#X text 12 151 Create window and render;
+#X connect 1 0 29 0;
+#X connect 2 0 21 0;
+#X connect 13 0 28 0;
+#X connect 15 0 13 0;
+#X connect 16 0 13 0;
+#X connect 17 0 13 0;
+#X connect 21 0 20 0;
+#X connect 22 0 30 0;
+#X connect 23 0 24 0;
+#X connect 24 0 27 0;
+#X connect 25 0 23 0;
+#X connect 26 0 13 0;
+#X connect 28 0 2 0;
+#X connect 29 0 26 0;
+#X connect 30 0 25 0;
+#X connect 32 0 33 0;
+#X connect 33 0 32 0;
diff --git a/Gem/examples/04.pix/19.colorMatrix.pd b/Gem/examples/04.pix/19.colorMatrix.pd
new file mode 100644
index 0000000..c53ab1a
--- /dev/null
+++ b/Gem/examples/04.pix/19.colorMatrix.pd
@@ -0,0 +1,60 @@
+#N canvas 10 20 769 486 10;
+#X obj 252 258 gemhead;
+#X obj 252 313 pix_image ../data/fractal.JPG;
+#X obj 252 343 pix_colormatrix;
+#X msg 351 223 0 1 0 0 0 1 1 0 0;
+#X msg 321 157 0 0 1 1 0 0 0 1 0;
+#X msg 284 61 1 0 0 0 0 1 0 1 0;
+#X obj 252 371 pix_texture;
+#X obj 252 411 square;
+#X msg 312 110 1 0 0 0 1 0 0 0 1;
+#X text 460 156 shift colors: red->[0 \, 0 \, 1]=blue \; green->[1
+\, 0 \, 0]=red \; blue->[0 \, 1 \, 0]=green;
+#X text 469 97 unity matrix: [1 \, 0 \, 0 \; 0 \, 1 \, 0 \; 0 \, 0
+\, 1];
+#X text 446 47 swap green and blue: [1 \, 0 \, 0 \; 0 \, 0 \, 1 \;
+0 \, 1 \, 0];
+#X text 480 210 shift colors: red->[0 \, 1 \, 0]=green \; green->[0
+\, 0 \, 1]=blue \; blue->[1 \, 0 \, 0]=red;
+#X text 26 23 matrix-multiply the RGB-vector;
+#X obj 41 142 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 46 186 pd gemwin;
+#X msg 46 162 create;
+#X text 42 142 Create window and render;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 3 0 2 1;
+#X connect 4 0 2 1;
+#X connect 5 0 2 1;
+#X connect 6 0 7 0;
+#X connect 8 0 2 1;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
diff --git a/Gem/examples/04.pix/20.convolve.pd b/Gem/examples/04.pix/20.convolve.pd
new file mode 100644
index 0000000..bf3999f
--- /dev/null
+++ b/Gem/examples/04.pix/20.convolve.pd
@@ -0,0 +1,106 @@
+#N canvas 150 20 846 728 12;
+#X obj 575 515 s matrix;
+#X obj 502 516 s scale;
+#X msg 502 483 1;
+#X obj 575 404 s matrix;
+#X obj 502 405 s scale;
+#X msg 502 372 1;
+#X obj 572 311 s matrix;
+#X obj 499 312 s scale;
+#X msg 499 279 1;
+#X obj 572 206 s matrix;
+#X obj 499 207 s scale;
+#X msg 499 174 1;
+#X obj 576 106 s matrix;
+#X obj 503 107 s scale;
+#X msg 503 74 1;
+#X obj 320 153 s matrix;
+#X obj 247 154 s scale;
+#X msg 247 121 1;
+#X msg 576 47 -1 -1 -1 -1 8 -1 -1 -1 -1;
+#X msg 572 146 -1 -4 -1 -4 20 -4 -1 -4 -1;
+#X msg 314 517 1 2 1 2 4 2 1 2 1;
+#X text 506 10 edge detection matrices;
+#X text 506 26 scale = 1;
+#X text 234 497 scale = 16;
+#X text 234 482 smoothing matrix;
+#X obj 14 330 gemhead;
+#X obj 14 522 pix_texture;
+#X obj 14 356 pix_image ../data/fractal.JPG;
+#X obj 14 455 pix_convolve 3 3;
+#X msg 320 92 0 0 0 0 1 0 0 0 0;
+#X msg 572 248 0 -1 0 0 2 0 0 -1 0;
+#X msg 575 450 -1 0 -1 0 4 0 -1 0 -1;
+#X msg 575 343 0 0 0 -1 2 -1 0 0 0;
+#X obj 314 596 s matrix;
+#X obj 153 423 r matrix;
+#X obj 241 596 s scale;
+#X obj 83 422 r scale;
+#X text 241 72 scale = 1;
+#X text 241 55 identity matrix;
+#X obj 14 547 square 4;
+#X obj 20 219 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 263 pd gemwin;
+#X msg 25 239 create;
+#X text 21 219 Create window and render;
+#X msg 241 545 1 16;
+#X obj 241 571 /;
+#X text 43 650 a good start for the scale is the sum of all the elements
+;
+#X connect 2 0 1 0;
+#X connect 5 0 4 0;
+#X connect 8 0 7 0;
+#X connect 11 0 10 0;
+#X connect 14 0 13 0;
+#X connect 17 0 16 0;
+#X connect 18 0 14 0;
+#X connect 18 0 12 0;
+#X connect 19 0 11 0;
+#X connect 19 0 9 0;
+#X connect 20 0 44 0;
+#X connect 20 0 33 0;
+#X connect 25 0 27 0;
+#X connect 26 0 39 0;
+#X connect 27 0 28 0;
+#X connect 28 0 26 0;
+#X connect 29 0 17 0;
+#X connect 29 0 15 0;
+#X connect 30 0 8 0;
+#X connect 30 0 6 0;
+#X connect 31 0 2 0;
+#X connect 31 0 0 0;
+#X connect 32 0 5 0;
+#X connect 32 0 3 0;
+#X connect 34 0 28 2;
+#X connect 36 0 28 1;
+#X connect 41 0 42 0;
+#X connect 42 0 41 0;
+#X connect 44 0 45 0;
+#X connect 45 0 35 0;
diff --git a/Gem/examples/04.pix/22.biquad.pd b/Gem/examples/04.pix/22.biquad.pd
new file mode 100644
index 0000000..6e9934e
--- /dev/null
+++ b/Gem/examples/04.pix/22.biquad.pd
@@ -0,0 +1,108 @@
+#N canvas 269 10 753 499 10;
+#X msg 360 312 set;
+#X floatatom 401 209 4 0 0 0 - - -;
+#X floatatom 442 209 4 0 0 0 - - -;
+#X obj 441 229 t b f;
+#X floatatom 491 209 4 0 0 0 - - -;
+#X obj 490 229 t b f;
+#X floatatom 532 208 4 0 0 0 - - -;
+#X obj 531 228 t b f;
+#X floatatom 576 210 4 0 0 0 - - -;
+#X obj 575 230 t b f;
+#X text 257 23 calculates the following difference equation:;
+#X text 261 38 y(n) = ff1 * w(n) + ff2 * w(n-1) + ff3 * w(n-2);
+#X floatatom 621 210 4 0 0 0 - - -;
+#X obj 620 230 t b f;
+#X obj 407 260 pack 0 0 0 0 0 0;
+#X text 265 55 w(n) = fb0 * x(n) + fb1 * w(n-1) + fb2 * w(n-2);
+#X msg 403 98 1 0 0 1 0 0;
+#X msg 403 121 1 0 0 0.2 0.2 0.6;
+#X obj 35 224 gemhead;
+#X obj 35 300 pix_texture;
+#X obj 35 324 square 3;
+#X text 403 190 fb0;
+#X text 443 190 fb1;
+#X text 494 189 fb2;
+#X text 533 186 ff1;
+#X text 582 187 ff2;
+#X text 623 186 ff3;
+#X obj 355 257 t l;
+#X msg 175 218 0;
+#X msg 202 218 1;
+#X msg 231 218 2;
+#X text 551 94 route through;
+#X text 553 120 a low-pass;
+#X text 34 391 pix_biquad: fb0 fb1 fb2 ff1 ff2 ff3;
+#X text 338 377 very(*) similar to the pd-object;
+#X obj 572 375 biquad~;
+#X text 336 406 *: but not exactly the same;
+#X text 390 312 set w(n-1) and w(n-2) to the next(!) x(n);
+#X obj 35 274 pix_biquad;
+#X msg 404 150 0.05 0.8 0.15 0.2 0.2 0.6;
+#X text 587 148 a LOW-pass;
+#X text 397 331 (important for hard feedback-loops);
+#X text 98 455 no sanity check is done for the coefficients !;
+#X text 151 200 click these OFTEN !;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X obj 35 247 pix_multiimage ../data/temp*.JPG 2;
+#X connect 0 0 38 0;
+#X connect 1 0 14 0;
+#X connect 2 0 3 0;
+#X connect 3 0 14 0;
+#X connect 3 1 14 1;
+#X connect 4 0 5 0;
+#X connect 5 0 14 0;
+#X connect 5 1 14 2;
+#X connect 6 0 7 0;
+#X connect 7 0 14 0;
+#X connect 7 1 14 3;
+#X connect 8 0 9 0;
+#X connect 9 0 14 0;
+#X connect 9 1 14 4;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 13 1 14 5;
+#X connect 14 0 27 0;
+#X connect 16 0 27 0;
+#X connect 17 0 27 0;
+#X connect 18 0 48 0;
+#X connect 19 0 20 0;
+#X connect 27 0 38 0;
+#X connect 28 0 48 1;
+#X connect 29 0 48 1;
+#X connect 30 0 48 1;
+#X connect 38 0 19 0;
+#X connect 39 0 27 0;
+#X connect 45 0 46 0;
+#X connect 46 0 45 0;
+#X connect 48 0 38 0;
diff --git a/Gem/examples/04.pix/23.gravity.pd b/Gem/examples/04.pix/23.gravity.pd
new file mode 100644
index 0000000..9821f94
--- /dev/null
+++ b/Gem/examples/04.pix/23.gravity.pd
@@ -0,0 +1,108 @@
+#N canvas 0 0 626 514 10;
+#X floatatom 107 437 5 0 0 0 - - -;
+#X floatatom 160 436 5 0 0 0 - - -;
+#X floatatom 219 435 5 0 0 0 - - -;
+#X obj 54 338 pix_blob 1;
+#X msg 86 227 0;
+#X msg 94 250 1;
+#X msg 101 271 2;
+#X msg 107 292 3;
+#X msg 110 313 4;
+#X text 119 456 X;
+#X text 173 456 Y;
+#X text 230 455 size;
+#X text 135 228 grey (default);
+#X text 136 250 red;
+#X text 136 269 green;
+#X text 137 291 blue;
+#X text 137 313 alpha;
+#X text 327 20 pix_blob;
+#X text 324 32 =========;
+#X text 276 48 get the center of gravity in a picture;
+#X msg 288 298 1 0.5 0.5 1;
+#X msg 284 274 0.33;
+#X msg 276 252 1 1 2;
+#X text 328 252 ==;
+#X msg 355 251 1 1 2 0;
+#X msg 356 274 0.33 0.33 0.33 0;
+#X text 326 275 ==;
+#X msg 363 112 bang;
+#X obj 363 134 t b b;
+#X msg 428 114 bang;
+#X obj 428 136 t b b;
+#X text 341 454 size = 0..1;
+#X text 341 425 x/y-coordinates from lower-left \; 0..1;
+#X text 329 96 upper-left;
+#X text 428 93 lower-right;
+#X obj 54 176 pix_multiimage ../data/blob*.tif 2;
+#X obj 54 148 gemhead;
+#X msg 154 116 0;
+#X msg 154 136 1;
+#X msg 154 154 2;
+#X obj 54 469 pix_texture;
+#X obj 54 492 square 4;
+#X msg 139 496 quality 0;
+#X obj 139 475 loadbang;
+#X text 307 233 rgb(a)-color;
+#X obj 276 320 t b l;
+#X obj 20 19 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 63 pd gemwin;
+#X msg 25 39 create;
+#X text 21 19 Create window and render;
+#X connect 3 0 40 0;
+#X connect 3 1 0 0;
+#X connect 3 2 1 0;
+#X connect 3 3 2 0;
+#X connect 4 0 3 1;
+#X connect 5 0 3 1;
+#X connect 6 0 3 1;
+#X connect 7 0 3 1;
+#X connect 8 0 3 1;
+#X connect 20 0 45 0;
+#X connect 21 0 45 0;
+#X connect 22 0 45 0;
+#X connect 27 0 28 0;
+#X connect 28 0 39 0;
+#X connect 28 1 5 0;
+#X connect 29 0 30 0;
+#X connect 30 0 39 0;
+#X connect 30 1 7 0;
+#X connect 35 0 3 0;
+#X connect 36 0 35 0;
+#X connect 37 0 35 1;
+#X connect 38 0 35 1;
+#X connect 39 0 35 1;
+#X connect 40 0 41 0;
+#X connect 42 0 40 0;
+#X connect 43 0 42 0;
+#X connect 45 0 39 0;
+#X connect 45 1 3 2;
+#X connect 47 0 48 0;
+#X connect 48 0 47 0;
diff --git a/Gem/examples/04.pix/24.time-filtering.pd b/Gem/examples/04.pix/24.time-filtering.pd
new file mode 100644
index 0000000..c1ca697
--- /dev/null
+++ b/Gem/examples/04.pix/24.time-filtering.pd
@@ -0,0 +1,102 @@
+#N canvas 228 84 794 352 10;
+#X floatatom 279 191 5 0 0 0 - - -;
+#X obj 266 241 pix_tIIR 2 2;
+#X obj 279 211 * 0.01;
+#X obj 279 146 unpack 30 60 10 50 50 -20;
+#X floatatom 328 191 5 0 0 0 - - -;
+#X obj 328 211 * 0.01;
+#X floatatom 375 191 5 0 0 0 - - -;
+#X obj 375 211 * 0.01;
+#X floatatom 424 191 5 0 0 0 - - -;
+#X obj 424 211 * 0.01;
+#X floatatom 471 191 5 0 0 0 - - -;
+#X obj 471 211 * 0.01;
+#X floatatom 520 191 5 0 0 0 - - -;
+#X obj 520 211 * 0.01;
+#X msg 279 100 bang;
+#X obj 266 38 gemhead;
+#X msg 601 44 auto \$1;
+#X obj 601 25 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 279 122 pack 30 60 10 50 50 -20;
+#X floatatom 461 64 5 0 0 0 - - -;
+#X floatatom 351 86 5 0 0 0 - - -;
+#X obj 266 262 pix_texture;
+#X msg 421 27 open ../data/alea.mpg;
+#X msg 421 7 open \$1;
+#X obj 483 7 openpanel;
+#X obj 573 5 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 446 63 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 266 61 pix_film ../data/alea.mpg;
+#X obj 266 309 square 3;
+#X obj 266 286 rotateXYZ 0 -30 0;
+#X obj 20 69 cnv 15 220 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X connect 0 0 2 0;
+#X connect 1 0 21 0;
+#X connect 2 0 1 1;
+#X connect 3 0 0 0;
+#X connect 3 1 4 0;
+#X connect 3 2 6 0;
+#X connect 3 3 8 0;
+#X connect 3 4 10 0;
+#X connect 3 5 12 0;
+#X connect 4 0 5 0;
+#X connect 5 0 1 2;
+#X connect 6 0 7 0;
+#X connect 7 0 1 3;
+#X connect 8 0 9 0;
+#X connect 9 0 1 4;
+#X connect 10 0 11 0;
+#X connect 11 0 1 5;
+#X connect 12 0 13 0;
+#X connect 13 0 1 6;
+#X connect 14 0 18 0;
+#X connect 15 0 27 0;
+#X connect 16 0 27 0;
+#X connect 17 0 16 0;
+#X connect 18 0 3 0;
+#X connect 19 0 27 1;
+#X connect 21 0 29 0;
+#X connect 22 0 27 0;
+#X connect 23 0 27 0;
+#X connect 24 0 23 0;
+#X connect 25 0 24 0;
+#X connect 26 0 19 0;
+#X connect 27 0 1 0;
+#X connect 27 1 20 0;
+#X connect 27 2 26 0;
+#X connect 29 0 28 0;
+#X connect 31 0 32 0;
+#X connect 32 0 31 0;
diff --git a/Gem/examples/04.pix/25.buffer.pd b/Gem/examples/04.pix/25.buffer.pd
new file mode 100644
index 0000000..857cdaf
--- /dev/null
+++ b/Gem/examples/04.pix/25.buffer.pd
@@ -0,0 +1,137 @@
+#N canvas 0 0 832 589 10;
+#X obj 62 327 gemhead;
+#X obj 62 369 pix_texture;
+#X obj 62 392 square 4;
+#X obj 316 316 gemhead;
+#X obj 316 342 pix_film;
+#X obj 316 387 t a b;
+#X obj 361 430 i;
+#X obj 388 430 + 1;
+#X obj 361 408 spigot;
+#X obj 398 364 t b b;
+#X msg 398 387 1;
+#X msg 455 388 0;
+#X obj 398 339 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 419 339 start recording into the buffer;
+#X msg 398 296 open \$1;
+#X obj 398 275 openpanel;
+#X obj 398 257 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 477 240 ../data/anim-1.mov;
+#X msg 477 260 ../data/alea.mpg;
+#X msg 478 216 ../data/homer.avi;
+#X obj 477 282 symbol;
+#X floatatom 155 321 5 0 0 0 - - -;
+#X text 195 320 index;
+#X msg 408 408 0;
+#X obj 571 401 gemhead;
+#X obj 571 427 pix_image ../data/fractal.JPG;
+#X floatatom 423 497 5 0 0 0 - - -;
+#X msg 405 318 auto 1;
+#X msg 457 319 0;
+#X obj 361 456 moses 10;
+#X floatatom 663 406 5 0 0 0 - - -;
+#X msg 663 386 5;
+#X text 467 493 put the next image into "myImages" @ index;
+#X msg 140 390 set yourImages;
+#X msg 212 490 set yourImages;
+#X text 213 473 set the storage-name;
+#X obj 62 349 pix_buffer_read myImages;
+#X obj 316 515 pix_buffer_write myImages;
+#X obj 571 453 pix_buffer_write myImages;
+#X text 291 539 write an image into a certain storage-buffer;
+#X text 15 422 read an image from a certain storage-buffer;
+#X text 17 302 get an image from the pix_buffer;
+#X obj 33 227 pix_buffer yourImages 10;
+#X obj 20 69 cnv 15 200 70 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 289 80 pd Gem.init;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X restore 25 113 pd gemwin;
+#X msg 25 89 create;
+#X text 21 69 Create window and render;
+#X text 284 32 ============;
+#X text 236 48 store/get images into/from a buffer;
+#X msg 226 77 bang;
+#X floatatom 226 174 5 0 0 0 - - -;
+#X text 265 77 get the size of the depot;
+#X msg 237 116 allocate 128 64 4;
+#X text 371 104 pre-allocate each image-buffer to hold at east 128*64*4
+pixels;
+#X text 388 155 a storage-place for "10" pix-images called "myImages"
+;
+#X obj 226 153 pix_buffer myImages 10;
+#X text 287 20 [pix_buffer];
+#X msg 353 181 open ../data/fractal.JPG 5;
+#X text 524 182 load an image into a certain storage-buffer;
+#X connect 0 0 36 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 37 0;
+#X connect 5 1 8 0;
+#X connect 6 0 7 0;
+#X connect 6 0 29 0;
+#X connect 7 0 6 1;
+#X connect 8 0 6 0;
+#X connect 9 0 10 0;
+#X connect 9 1 23 0;
+#X connect 10 0 8 1;
+#X connect 11 0 8 1;
+#X connect 11 0 31 0;
+#X connect 12 0 9 0;
+#X connect 14 0 4 0;
+#X connect 14 0 12 0;
+#X connect 14 0 27 0;
+#X connect 14 0 28 0;
+#X connect 15 0 14 0;
+#X connect 16 0 15 0;
+#X connect 17 0 20 0;
+#X connect 18 0 20 0;
+#X connect 19 0 20 0;
+#X connect 20 0 14 0;
+#X connect 21 0 36 1;
+#X connect 23 0 6 1;
+#X connect 24 0 25 0;
+#X connect 25 0 38 0;
+#X connect 26 0 37 1;
+#X connect 27 0 4 0;
+#X connect 28 0 4 1;
+#X connect 29 0 26 0;
+#X connect 29 1 11 0;
+#X connect 30 0 38 1;
+#X connect 31 0 30 0;
+#X connect 33 0 36 0;
+#X connect 34 0 37 0;
+#X connect 36 0 1 0;
+#X connect 44 0 45 0;
+#X connect 45 0 44 0;
+#X connect 49 0 55 0;
+#X connect 52 0 55 0;
+#X connect 55 0 50 0;
+#X connect 57 0 55 0;
diff --git a/Gem/examples/04.pix/26.framebuffer_readback.pd b/Gem/examples/04.pix/26.framebuffer_readback.pd
new file mode 100644
index 0000000..3f49f1e
--- /dev/null
+++ b/Gem/examples/04.pix/26.framebuffer_readback.pd
@@ -0,0 +1,88 @@
+#N canvas 0 0 826 651 10;
+#X msg 112 86 create \, 1;
+#X obj 112 131 gemwin;
+#X obj 311 112 pix_buffer \$0-framebuffer 2;
+#X obj 620 108 gemhead 5;
+#X obj 620 129 world_light;
+#X msg 129 108 lighting 1;
+#X text 44 5 you can render a scene into a framebuffer \, then take
+a snapshot of the framebuffer with [pix_snap] and use this as an ordinary
+pix (where you can apply effects and all kind of weird things);
+#X obj 75 439 cnv 15 250 130 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 161 269 cnv 15 150 150 empty empty scene 20 12 0 14 -233017
+-66577 0;
+#X obj 82 196 gemhead 20;
+#X obj 82 220 gemframebuffer;
+#X msg 163 195 dimen 256 256;
+#X obj 167 331 rotateXYZ;
+#X obj 167 376 teapot;
+#X obj 82 266 t a a b;
+#X obj 187 293 i;
+#X obj 220 292 + 1;
+#X obj 250 291 % 360;
+#X obj 82 453 t a b;
+#X msg 114 474 snap;
+#X obj 82 522 t a b;
+#X msg 296 527 1;
+#X obj 82 547 pix_buffer_write \$0-framebuffer;
+#X obj 410 262 gemhead 30;
+#X obj 410 306 t a b;
+#X msg 465 307 1;
+#X obj 410 331 pix_buffer_read \$0-framebuffer;
+#X obj 410 411 pix_texture;
+#X obj 410 476 square 3;
+#X obj 82 243 translateXYZ 0 0 -4;
+#X obj 82 498 pix_snap 0 0 256 256;
+#X obj 167 353 color 1 0 1;
+#X floatatom 226 313 5 0 0 0 - - -;
+#X obj 410 453 rotateXYZ;
+#X floatatom 445 433 5 0 0 0 - - -;
+#X text 318 130 temporary storage;
+#X obj 163 175 loadbang;
+#X text 130 451 later usage;
+#X text 129 436 snapshot and store image for;
+#X text 562 308 fetch framebuffer-pix;
+#X text 535 379 apply some nifty FX;
+#X text 73 597 note \, that there are more efficient ways to apply
+FX to framebuffers (noteably openGL-shaders: see examples/10.glsl/
+for more information);
+#X obj 425 358 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 410 380 pix_kaleidoscope;
+#X connect 0 0 1 0;
+#X connect 3 0 4 0;
+#X connect 5 0 1 0;
+#X connect 9 0 10 0;
+#X connect 10 0 29 0;
+#X connect 11 0 10 0;
+#X connect 12 0 31 0;
+#X connect 14 0 18 0;
+#X connect 14 1 12 0;
+#X connect 14 2 15 0;
+#X connect 15 0 16 0;
+#X connect 15 0 12 1;
+#X connect 15 0 12 2;
+#X connect 16 0 17 0;
+#X connect 17 0 15 1;
+#X connect 18 0 30 0;
+#X connect 18 1 19 0;
+#X connect 19 0 30 0;
+#X connect 20 0 22 0;
+#X connect 20 1 21 0;
+#X connect 21 0 22 1;
+#X connect 23 0 24 0;
+#X connect 24 0 26 0;
+#X connect 24 1 25 0;
+#X connect 25 0 26 1;
+#X connect 26 0 43 0;
+#X connect 27 0 33 0;
+#X connect 29 0 14 0;
+#X connect 30 0 20 0;
+#X connect 31 0 13 0;
+#X connect 32 0 12 3;
+#X connect 33 0 28 0;
+#X connect 34 0 33 2;
+#X connect 36 0 11 0;
+#X connect 42 0 43 0;
+#X connect 43 0 27 0;
diff --git a/Gem/examples/04.pix/27.bitmap_font.pd b/Gem/examples/04.pix/27.bitmap_font.pd
new file mode 100644
index 0000000..c6b182d
--- /dev/null
+++ b/Gem/examples/04.pix/27.bitmap_font.pd
@@ -0,0 +1,152 @@
+#N canvas 656 222 901 508 10;
+#X obj 191 413 pix_texture;
+#X obj 463 158 gemwin;
+#X msg 506 135 0 \, destroy;
+#X msg 125 362 quality 0;
+#X obj 31 200 pix_crop 0 0 6 8;
+#X obj 125 342 loadbang;
+#X obj 31 10 gemhead 10;
+#N canvas 472 238 750 406 grab-ascii 0;
+#X obj 76 144 moses 65;
+#X obj 121 164 moses 91;
+#X obj 166 194 moses 97;
+#X obj 211 214 moses 123;
+#X obj 153 308 outlet;
+#X obj 211 234 - 97;
+#X text 174 164 from A to Z (65 to 90);
+#X text 276 212 from a to z (97 to 122);
+#X text 137 331 remap from 0 to 25;
+#X obj 121 185 - 65;
+#X obj 334 342 outlet;
+#X text 326 359 bang on <ENTER>;
+#X obj 455 342 outlet;
+#X obj 334 289 sel 10 32 8;
+#X obj 565 342 outlet;
+#X text 556 359 bang on <DEL>;
+#X text 446 359 bang on <SPACE>;
+#X obj 303 319 loadbang;
+#X obj 76 114 key;
+#X connect 0 0 13 0;
+#X connect 0 1 1 0;
+#X connect 1 0 9 0;
+#X connect 1 1 2 0;
+#X connect 2 1 3 0;
+#X connect 3 0 5 0;
+#X connect 5 0 4 0;
+#X connect 9 0 4 0;
+#X connect 13 0 10 0;
+#X connect 13 1 12 0;
+#X connect 13 2 14 0;
+#X connect 17 0 10 0;
+#X connect 18 0 0 0;
+#X restore 73 51 pd grab-ascii;
+#X obj 100 132 f;
+#X obj 413 248 loadbang;
+#X obj 260 189 * 6;
+#X obj 73 158 * 6;
+#X msg 135 92 0;
+#X obj 191 263 gemhead 9;
+#X obj 135 71 t b b;
+#X obj 75 178 t b b f;
+#X obj 31 29 pix_image ../data/bitmap_font_6x8.bmp;
+#X obj 463 64 bng 15 250 50 0 empty empty empty 17 7 0 10 -4034 -1
+-1;
+#X text 310 22 <- this is the bitmap font;
+#X obj 31 138 pix_grey;
+#X obj 73 92 t f b;
+#X obj 127 132 + 1;
+#X text 485 231 - key in range A-Z and a-z;
+#X text 510 212 features :;
+#X text 485 241 - space bar add a space...;
+#X text 485 251 - enter reset all;
+#X text 520 283 purpose :;
+#X text 495 299 - orginally design to drive a LED matrix;
+#X msg 260 298 roi \$1 \$2 \$3 \$4;
+#X obj 260 211 t f f;
+#X obj 260 253 pack 0 0 0 8;
+#X obj 314 232 + 6;
+#N canvas 12 50 450 300 normalize 0;
+#X obj 84 70 inlet x1 y1 x2 y2;
+#X obj 84 92 unpack 0 0 0 0;
+#X obj 84 184 pack 0 0 0 0;
+#X obj 84 206 outlet X1 Y1 X2 Y2;
+#X obj 84 144 / 120;
+#X obj 134 144 / 8;
+#X obj 184 144 / 120;
+#X obj 234 144 / 8;
+#X text 288 112 adding 0.5 to make;
+#X text 288 125 rounding easier...;
+#X connect 0 0 1 0;
+#X connect 1 0 4 0;
+#X connect 1 1 5 0;
+#X connect 1 2 6 0;
+#X connect 1 3 7 0;
+#X connect 2 0 3 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 1;
+#X connect 6 0 2 2;
+#X connect 7 0 2 3;
+#X restore 260 277 pd normalize;
+#X msg 413 268 grey \, fill 1 \, bang;
+#X obj 31 250 pix_dump;
+#X text 481 65 <- 1 click here to start rendering;
+#X obj 191 334 pix_roi 0 0 0 0;
+#X text 306 336 initialize to non-existent ROI;
+#X obj 191 362 pix_set 120 8;
+#X obj 191 165 t b f;
+#X obj 225 124 t b b b;
+#X msg 264 144 roi 0 0 1 1;
+#X obj 225 105 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 463 117 dimen 1024 128 \, color 1 1 1 1 \, create \, 1;
+#X obj 191 433 translateXYZ 0 0 0;
+#X obj 191 483 rectangle 32 -2;
+#X text 501 84 2 click on this patch (to focuses it) and type something
+with your keyboard;
+#X connect 0 0 44 0;
+#X connect 2 0 1 0;
+#X connect 3 0 0 0;
+#X connect 4 0 34 0;
+#X connect 5 0 3 0;
+#X connect 6 0 16 0;
+#X connect 7 0 20 0;
+#X connect 7 1 14 0;
+#X connect 7 2 8 0;
+#X connect 8 0 21 0;
+#X connect 8 0 39 0;
+#X connect 9 0 33 0;
+#X connect 10 0 29 0;
+#X connect 11 0 15 0;
+#X connect 12 0 8 0;
+#X connect 13 0 36 0;
+#X connect 14 0 12 0;
+#X connect 14 0 13 0;
+#X connect 14 1 42 0;
+#X connect 15 0 34 0;
+#X connect 15 1 6 0;
+#X connect 15 2 4 3;
+#X connect 16 0 19 0;
+#X connect 17 0 43 0;
+#X connect 19 0 4 0;
+#X connect 20 0 11 0;
+#X connect 20 1 8 0;
+#X connect 21 0 8 1;
+#X connect 28 0 36 0;
+#X connect 29 0 30 0;
+#X connect 29 1 31 0;
+#X connect 30 0 32 0;
+#X connect 31 0 30 2;
+#X connect 32 0 28 0;
+#X connect 33 0 38 0;
+#X connect 34 1 38 1;
+#X connect 36 0 38 0;
+#X connect 38 0 0 0;
+#X connect 39 0 13 0;
+#X connect 39 1 10 0;
+#X connect 40 0 33 0;
+#X connect 40 1 13 0;
+#X connect 40 2 41 0;
+#X connect 41 0 36 0;
+#X connect 42 0 40 0;
+#X connect 43 0 1 0;
+#X connect 44 0 45 0;
diff --git a/Gem/examples/04.video/00.SimpleVideo.pd b/Gem/examples/04.video/00.SimpleVideo.pd
new file mode 100644
index 0000000..7b59713
--- /dev/null
+++ b/Gem/examples/04.video/00.SimpleVideo.pd
@@ -0,0 +1,87 @@
+#N canvas 147 59 659 387 12;
+#X obj 134 180 cnv 15 500 40 empty empty empty 20 12 0 14 -245500 -66577
+0;
+#X obj 55 78 gemhead;
+#X obj 55 299 rectangle 4 3;
+#X obj 55 265 pix_texture;
+#X obj 55 229 pix_video;
+#X msg 142 190 dialog;
+#X text 49 16 Click on the [create( message to see live video in Gem.
+(You must have a camera attached before loading this patch).;
+#X text 199 188 pop-up dialog to configure the camera (Windows and
+Mac OS X);
+#X msg 98 139 device 0;
+#N canvas 162 133 570 420 serin 0;
+#X obj 205 60 cnv 20 20 20 empty \$0-open-canvas 0 4 10 0 16 -233017
+-1 0;
+#X obj 60 61 hradio 18 1 1 8 empty empty empty 0 -6 0 8 -225271 -1
+-1 0;
+#X obj 60 13 inlet;
+#X msg 200 202 label \$1;
+#X obj 200 180 makefilename %d;
+#X obj 59 108 int;
+#X obj 59 337 outlet;
+#X msg 201 306 set \$1 \$2;
+#X obj 59 266 trigger bang anything;
+#X obj 201 286 list;
+#X obj 200 225 send \$0-open-canvas;
+#X msg 60 210 device \$1;
+#X connect 1 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 10 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 5 0 11 0;
+#X connect 7 0 6 0;
+#X connect 8 0 6 0;
+#X connect 8 1 9 0;
+#X connect 9 0 7 0;
+#X connect 11 0 8 0;
+#X coords 0 -1 1 1 165 20 1 60 60;
+#X restore 98 115 pd serin;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 502 304 pd gemwin;
+#X connect 1 0 4 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 8 0 4 0;
+#X connect 9 0 8 0;
diff --git a/Gem/examples/04.video/01.VideoPaint.pd b/Gem/examples/04.video/01.VideoPaint.pd
new file mode 100644
index 0000000..9c38a80
--- /dev/null
+++ b/Gem/examples/04.video/01.VideoPaint.pd
@@ -0,0 +1,123 @@
+#N canvas 38 374 800 574 10;
+#X obj 50 130 gemhead;
+#X obj 50 493 square;
+#X obj 50 371 alpha;
+#X obj 50 174 pix_video;
+#X obj 50 267 pix_texture;
+#X msg 136 456 4;
+#X msg 167 456 2;
+#X obj 50 392 depth;
+#X obj 50 243 pix_threshold;
+#X text 375 217 click on bang to;
+#X text 187 90 click on these for fun;
+#X text 388 69 turn on rendering before turning on the metro.;
+#X text 437 86 If you don't \, it may crash/not work;
+#X text 375 229 clear the screen;
+#X obj 50 447 rotate;
+#X obj 50 89 t b b;
+#X floatatom 192 179 5 0 100 2 threshold - -;
+#X obj 50 9 tgl 15 0 empty empty run 0 -6 0 10 -4034 -1 -1 0 1;
+#X obj 195 144 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 10 -228856
+-1 -1 0 1;
+#X obj 176 230 hsl 128 15 0 1 0 1 empty empty R 12 8 1 12 -261689 -1
+-1 12700 1;
+#X obj 176 250 hsl 128 15 0 1 0 1 empty empty G 12 8 1 12 -225271 -1
+-1 12700 1;
+#X obj 176 270 hsl 128 15 0 1 0 1 empty empty B 12 8 1 12 -228992 -1
+-1 12700 1;
+#X obj 218 458 hsl 128 15 0.5 5 0 0 empty empty empty -2 -6 0 10 -232576
+-1 -1 0 1;
+#X floatatom 219 481 5 0 0 0 - - -;
+#X obj 83 40 hsl 128 15 10 127 0 1 empty empty empty -2 -6 0 10 -204786
+-1 -1 9900 1;
+#X floatatom 93 63 5 0 0 0 - - -;
+#X obj 50 62 metro;
+#X obj 207 354 + 1;
+#X obj 482 243 bng 15 250 50 0 empty empty empty 0 -6 0 10 -128992
+-1 -1;
+#X msg 80 18 100;
+#X obj 176 290 hsl 128 15 0 1 0 1 empty empty A 12 8 1 12 -195568 -1
+-1 12700 1;
+#X obj 50 319 colorRGB 1 1 1 0.15;
+#X obj 233 354 % 360;
+#X obj 180 354 i;
+#X floatatom 180 375 5 0 0 0 - - -;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, buffer 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 533 345 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 503 362 pd gemwin;
+#X connect 0 0 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 8 0;
+#X connect 4 0 31 0;
+#X connect 5 0 1 1;
+#X connect 6 0 1 1;
+#X connect 7 0 14 0;
+#X connect 8 0 4 0;
+#X connect 14 0 1 0;
+#X connect 15 0 0 0;
+#X connect 15 1 33 0;
+#X connect 16 0 8 1;
+#X connect 17 0 26 0;
+#X connect 18 0 16 0;
+#X connect 19 0 31 1;
+#X connect 20 0 31 2;
+#X connect 21 0 31 3;
+#X connect 22 0 1 1;
+#X connect 22 0 23 0;
+#X connect 24 0 25 0;
+#X connect 24 0 26 1;
+#X connect 26 0 15 0;
+#X connect 27 0 32 0;
+#X connect 28 0 36 0;
+#X connect 29 0 24 0;
+#X connect 30 0 31 4;
+#X connect 31 0 2 0;
+#X connect 32 0 33 1;
+#X connect 33 0 27 0;
+#X connect 33 0 34 0;
+#X connect 34 0 14 1;
+#X connect 35 0 36 0;
diff --git a/Gem/examples/04.video/02.VideoSphere.pd b/Gem/examples/04.video/02.VideoSphere.pd
new file mode 100644
index 0000000..165b5c5
--- /dev/null
+++ b/Gem/examples/04.video/02.VideoSphere.pd
@@ -0,0 +1,99 @@
+#N canvas 84 483 743 466 10;
+#X obj 57 215 pix_texture;
+#X text 187 75 click on any of these;
+#X text 40 25 texture live video onto a sphere;
+#X obj 183 196 hsl 128 15 0 360 0 0 empty empty X 12 8 1 12 -233017
+-1 -1 0 1;
+#X obj 183 216 hsl 128 15 0 360 0 0 empty empty Y 12 8 1 12 -233017
+-1 -1 0 1;
+#X obj 183 236 hsl 128 15 0 360 0 0 empty empty Z 12 8 1 12 -233017
+-1 -1 0 1;
+#X obj 57 255 rotateXYZ 0 0 0;
+#X obj 183 266 hsl 128 15 0 1 0 1 empty empty R 12 8 1 12 -261689 -1
+-1 12700 1;
+#X obj 183 286 hsl 128 15 0 1 0 1 empty empty G 12 8 1 12 -225271 -1
+-1 12700 1;
+#X obj 183 306 hsl 128 15 0 1 0 1 empty empty B 12 8 1 12 -228992 -1
+-1 12700 1;
+#X obj 57 325 colorRGB 1 1 1;
+#X obj 57 70 gemhead;
+#X obj 57 114 pix_video;
+#X obj 57 163 pix_threshold;
+#X floatatom 185 122 5 0 100 1 threshold - -;
+#X obj 184 103 hsl 128 15 0 1 0 0 empty empty empty -2 -6 0 10 -228856
+-1 -1 0 1;
+#X obj 183 348 hsl 128 15 0.5 5 0 1 empty empty empty -2 -6 0 10 -232576
+-1 -1 4233 1;
+#X floatatom 185 367 5 0 0 1 size - -;
+#X obj 183 388 hsl 128 15 5 50 0 1 empty empty empty -2 -6 0 10 -204800
+-1 -1 12700 1;
+#X floatatom 185 407 5 0 0 1 segments - -;
+#X obj 57 410 sphere;
+#X msg 182 143 0.1 0.1 0.1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 488 249 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 458 266 pd gemwin;
+#X connect 0 0 6 0;
+#X connect 3 0 6 1;
+#X connect 4 0 6 2;
+#X connect 5 0 6 3;
+#X connect 6 0 10 0;
+#X connect 7 0 10 1;
+#X connect 8 0 10 2;
+#X connect 9 0 10 3;
+#X connect 10 0 20 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 0 0;
+#X connect 15 0 14 0;
+#X connect 15 0 13 1;
+#X connect 16 0 17 0;
+#X connect 16 0 20 1;
+#X connect 18 0 19 0;
+#X connect 18 0 20 2;
+#X connect 21 0 13 2;
+#X connect 22 0 23 0;
diff --git a/Gem/examples/04.video/03.movement_detection.pd b/Gem/examples/04.video/03.movement_detection.pd
new file mode 100644
index 0000000..34efdef
--- /dev/null
+++ b/Gem/examples/04.video/03.movement_detection.pd
@@ -0,0 +1,87 @@
+#N canvas 378 405 793 522 10;
+#X floatatom 227 258 6 0 0 0 - - -;
+#X floatatom 280 258 6 0 0 0 - - -;
+#X floatatom 339 258 6 0 0 0 - - -;
+#X obj 44 222 pix_blob 4;
+#X obj 44 91 gemhead;
+#X obj 44 150 pix_movement;
+#X obj 44 364 pix_texture;
+#X obj 44 401 square 4;
+#X obj 201 383 gemhead;
+#X obj 201 407 translateXYZ;
+#X obj 201 434 cube 0.5;
+#X obj 227 304 * 8;
+#X obj 227 326 - 4;
+#X obj 280 304 * 8;
+#X obj 280 326 - 4;
+#X obj 339 325 * 2;
+#X obj 44 117 pix_video;
+#X text 57 40 a very simple movement detector;
+#X text 388 255 <<- calculate world-coordinates from normalized pix-coordinates
+;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 511 359 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 481 376 pd gemwin;
+#X connect 0 0 11 0;
+#X connect 1 0 13 0;
+#X connect 2 0 15 0;
+#X connect 3 0 6 0;
+#X connect 3 1 0 0;
+#X connect 3 2 1 0;
+#X connect 3 3 2 0;
+#X connect 4 0 16 0;
+#X connect 5 0 3 0;
+#X connect 6 0 7 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 11 0 12 0;
+#X connect 12 0 9 1;
+#X connect 13 0 14 0;
+#X connect 14 0 9 2;
+#X connect 15 0 9 3;
+#X connect 16 0 5 0;
+#X connect 19 0 20 0;
diff --git a/Gem/examples/04.video/04.videoRTX.pd b/Gem/examples/04.video/04.videoRTX.pd
new file mode 100644
index 0000000..6d71805
--- /dev/null
+++ b/Gem/examples/04.video/04.videoRTX.pd
@@ -0,0 +1,101 @@
+#N canvas 67 70 636 509 10;
+#X obj 43 89 gemhead;
+#X obj 190 380 pix_texture;
+#X obj 43 380 pix_texture;
+#X obj 190 298 pix_rtx;
+#X msg 328 180 clear;
+#X msg 327 270 mode 1;
+#X msg 327 247 mode 0;
+#X text 380 179 clear the buffer;
+#X text 47 14 pix_rtx;
+#X text 188 14 transform the x-axis into the t-axis and vice-versa
+on the fly;
+#X text 42 447 upper-picture;
+#X text 198 448 lower-picture;
+#X text 38 465 NO transformation;
+#X text 198 467 RTX-tranformed;
+#X text 46 24 =======;
+#X text 380 248 lock time on x-axis;
+#X text 376 272 lock x on x-axis;
+#X text 495 272 (default);
+#X msg 329 211 set;
+#X text 363 213 fill the buffer with current frame;
+#X obj 43 113 pix_video;
+#X obj 190 401 translateXYZ 0 -2 0;
+#X obj 43 184 separator;
+#X obj 190 185 separator;
+#X obj 43 401 translateXYZ 0 2 0;
+#X obj 190 208 pix_separator;
+#X obj 190 422 rectangle 3 1.5;
+#X obj 43 422 rectangle 3 1.5;
+#X msg 177 96 dimen 256 128;
+#X msg 177 117 dimen 64 64;
+#X text 281 101 pix-streams to be rtx-transformed must have the same
+properties (width \, height \, colorspace) \;;
+#X obj 43 149 trigger anything anything;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 454 405 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 424 422 pd gemwin;
+#X connect 0 0 20 0;
+#X connect 1 0 21 0;
+#X connect 2 0 24 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 18 0 3 0;
+#X connect 20 0 31 0;
+#X connect 21 0 26 0;
+#X connect 22 0 2 0;
+#X connect 23 0 25 0;
+#X connect 24 0 27 0;
+#X connect 25 0 3 0;
+#X connect 28 0 20 0;
+#X connect 29 0 20 0;
+#X connect 31 0 22 0;
+#X connect 31 1 23 0;
+#X connect 32 0 33 0;
diff --git a/Gem/examples/04.video/05.buffer_rtx.pd b/Gem/examples/04.video/05.buffer_rtx.pd
new file mode 100644
index 0000000..4a29ad6
--- /dev/null
+++ b/Gem/examples/04.video/05.buffer_rtx.pd
@@ -0,0 +1,109 @@
+#N canvas 109 48 758 483 10;
+#X obj 29 30 gemhead;
+#X obj 29 163 pix_video;
+#X obj 29 100 gemframebuffer;
+#X obj 29 122 translateXYZ 0 0 -4;
+#X obj 559 342 pix_texture;
+#X obj 559 410 rectangle 4 3;
+#X obj 559 315 pix_rtx;
+#X obj 29 185 pix_texture;
+#X obj 29 245 square 4;
+#X obj 159 365 pix_snap;
+#X obj 204 322 loadbang;
+#X msg 69 325 snap;
+#X obj 159 434 pix_buffer_write \$0-depot;
+#X obj 43 56 loadbang;
+#X obj 559 262 pix_buffer_read \$0-depot;
+#X obj 559 172 gemhead 51;
+#X floatatom 116 193 5 0 0 0 - - -;
+#X obj 29 215 rotateXYZ 0 0 0;
+#X msg 306 413 0;
+#X obj 362 420 pix_buffer \$0-depot 1;
+#X msg 700 241 0;
+#X text 43 11 render rotated video into buffer;
+#X text 528 148 feed the buffer into pix_rtx;
+#X obj 119 171 hsl 128 15 0 360 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X obj 159 387 trigger anything bang;
+#X text 117 155 rotate the video image;
+#X text 111 280 this is how you write to a framebuffer (pix_buffer)
+;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 547 62 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 546 79 pd gemwin;
+#X msg 204 344 256 256;
+#X msg 43 76 dimen 256 256;
+#X obj 69 305 t b a;
+#X obj 559 212 t a b;
+#X connect 0 0 2 0;
+#X connect 1 0 7 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 5 0;
+#X connect 6 0 4 0;
+#X connect 7 0 17 0;
+#X connect 8 0 31 0;
+#X connect 9 0 24 0;
+#X connect 10 0 29 0;
+#X connect 11 0 9 0;
+#X connect 13 0 30 0;
+#X connect 14 0 6 0;
+#X connect 15 0 32 0;
+#X connect 16 0 17 3;
+#X connect 17 0 8 0;
+#X connect 18 0 12 1;
+#X connect 20 0 14 1;
+#X connect 23 0 16 0;
+#X connect 24 0 12 0;
+#X connect 24 1 18 0;
+#X connect 27 0 28 0;
+#X connect 29 0 9 2;
+#X connect 30 0 2 0;
+#X connect 31 0 11 0;
+#X connect 31 1 9 0;
+#X connect 32 0 14 0;
+#X connect 32 1 20 0;
diff --git a/Gem/examples/04.video/06.frame_diff_tracking.pd b/Gem/examples/04.video/06.frame_diff_tracking.pd
new file mode 100644
index 0000000..3ade8da
--- /dev/null
+++ b/Gem/examples/04.video/06.frame_diff_tracking.pd
@@ -0,0 +1,184 @@
+#N canvas 42 41 639 499 10;
+#X obj 140 80 gemhead;
+#X obj 140 271 pix_diff;
+#X obj 23 397 pix_texture;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 534 15 pd gemwin;
+#X obj 23 442 rectangle 4 3;
+#X obj 140 198 pix_separator;
+#X obj 229 198 pix_separator;
+#X obj 140 134 pix_grey;
+#X obj 140 109 pix_video;
+#X obj 140 346 pix_blob;
+#N canvas 10 40 620 460 cursor 0;
+#X obj 17 14 inlet;
+#X obj 89 18 inlet;
+#X obj 101 346 translateXYZ;
+#X text 63 148 0.64;
+#X text 37 151 1;
+#X obj 23 63 t f f;
+#X obj 37 176 -;
+#X text 62 177 X-Range;
+#X text 196 176 Y-Range;
+#X obj 63 240 expr (8/$f1);
+#X obj 33 241 -;
+#X obj 51 267 *;
+#X obj 29 95 max 0;
+#X obj 71 95 min 10;
+#X obj 59 132 f;
+#X obj 33 131 f;
+#X obj 52 293 - 4;
+#X text 193 146 0.64;
+#X text 167 149 1;
+#X obj 153 61 t f f;
+#X obj 167 174 -;
+#X obj 193 238 expr (8/$f1);
+#X obj 163 239 -;
+#X obj 181 265 *;
+#X obj 159 93 max 0;
+#X obj 201 93 min 10;
+#X obj 189 130 f;
+#X obj 163 129 f;
+#X text 188 171 comment;
+#X obj 154 298 expr (-1*$f1)+4;
+#X obj 293 27 inlet;
+#X obj 94 320 gemhead 15;
+#X obj 157 509 circle 0.1;
+#X obj 17 423 separator;
+#X obj 87 423 separator;
+#X obj 17 484 rectangle 0.2 0.01;
+#X obj 157 423 separator;
+#X msg 185 478 draw line;
+#X obj 185 457 loadbang;
+#X obj 77 386 colorRGB 1 0 0 1;
+#X obj 17 462 rectangle 0.01 0.2;
+#X msg 256 478 width \$1;
+#X obj 296 342 int;
+#X obj 275 413 + 1;
+#X obj 283 63 * 100;
+#X connect 0 0 5 0;
+#X connect 1 0 19 0;
+#X connect 2 0 39 0;
+#X connect 5 0 10 0;
+#X connect 5 0 12 0;
+#X connect 5 1 13 0;
+#X connect 6 0 9 0;
+#X connect 9 0 11 1;
+#X connect 10 0 11 0;
+#X connect 11 0 16 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 6 1;
+#X connect 14 0 10 1;
+#X connect 14 0 13 1;
+#X connect 15 0 6 0;
+#X connect 15 0 12 1;
+#X connect 16 0 2 1;
+#X connect 19 0 22 0;
+#X connect 19 0 24 0;
+#X connect 19 1 25 0;
+#X connect 20 0 21 0;
+#X connect 21 0 23 1;
+#X connect 22 0 23 0;
+#X connect 23 0 29 0;
+#X connect 24 0 27 0;
+#X connect 25 0 26 0;
+#X connect 26 0 20 1;
+#X connect 26 0 22 1;
+#X connect 26 0 25 1;
+#X connect 27 0 20 0;
+#X connect 27 0 24 1;
+#X connect 29 0 2 2;
+#X connect 30 0 44 0;
+#X connect 31 0 2 0;
+#X connect 33 0 40 0;
+#X connect 34 0 35 0;
+#X connect 36 0 32 0;
+#X connect 37 0 32 0;
+#X connect 38 0 37 0;
+#X connect 39 0 33 0;
+#X connect 39 0 34 0;
+#X connect 39 0 36 0;
+#X connect 41 0 32 0;
+#X connect 42 0 43 0;
+#X connect 43 0 41 0;
+#X connect 44 0 32 1;
+#X connect 44 0 42 0;
+#X restore 154 388 pd cursor;
+#X obj 23 420 translateXYZ 0 0 -0.1;
+#X obj 140 316 pix_threshold;
+#X obj 180 294 hsl 128 15 0 1 0 1 empty empty threshold 8 8 0 10 -262130
+-1 -1 900 0;
+#X obj 229 230 pix_delay 1;
+#X text 28 12 This is an example of simple video tracking using the
+difference between the current frame and the previous frame \, then
+using blob detection.;
+#X text 356 108 <-- get the video camera;
+#X text 356 133 <-- convert to grey for easier tracking;
+#X text 356 196 <-- make two copies of the frame;
+#X obj 140 165 trigger anything anything;
+#X text 356 229 <-- delay one copy by one frame;
+#X text 356 305 <-- set the threshold to filter out;
+#X text 381 281 difference between the two frames;
+#X text 356 270 <-- find the absolute value of the;
+#X text 381 316 small changes;
+#X text 356 344 <-- track the (x \, y) coordinates and size;
+#X text 380 357 of the "blob" of the difference;
+#X text 356 384 <-- render a cursor using the (x \, y) and size;
+#X text 6 460 render the video of the;
+#X text 6 472 frame difference;
+#X connect 0 0 8 0;
+#X connect 1 0 12 0;
+#X connect 2 0 11 0;
+#X connect 5 0 1 0;
+#X connect 6 0 14 0;
+#X connect 7 0 19 0;
+#X connect 8 0 7 0;
+#X connect 9 1 10 0;
+#X connect 9 2 10 1;
+#X connect 9 3 10 2;
+#X connect 11 0 4 0;
+#X connect 12 0 9 0;
+#X connect 12 0 2 0;
+#X connect 13 0 12 1;
+#X connect 14 0 1 1;
+#X connect 19 0 6 0;
+#X connect 19 1 5 0;
diff --git a/Gem/examples/04.video/07.bg_subtract_tracking.pd b/Gem/examples/04.video/07.bg_subtract_tracking.pd
new file mode 100644
index 0000000..7527569
--- /dev/null
+++ b/Gem/examples/04.video/07.bg_subtract_tracking.pd
@@ -0,0 +1,184 @@
+#N canvas 22 22 620 460 10;
+#X obj 8 10 cnv 15 400 40 empty empty tracking_using_background_subtraction
+20 12 0 16 -228992 -66577 0;
+#X obj 179 223 pix_grey;
+#X msg 204 251 reset;
+#X obj 179 280 pix_background;
+#X msg 272 259 \$1 \$1 \$1;
+#X obj 123 316 pix_blob;
+#N canvas 10 40 620 460 cursor 0;
+#X obj 17 14 inlet;
+#X obj 89 18 inlet;
+#X obj 101 346 translateXYZ;
+#X text 63 148 0.64;
+#X text 37 151 1;
+#X obj 23 63 t f f;
+#X obj 37 176 -;
+#X text 62 177 X-Range;
+#X text 196 176 Y-Range;
+#X obj 63 240 expr (8/$f1);
+#X obj 33 241 -;
+#X obj 51 267 *;
+#X obj 29 95 max 0;
+#X obj 71 95 min 10;
+#X obj 59 132 f;
+#X obj 33 131 f;
+#X obj 52 293 - 4;
+#X text 193 146 0.64;
+#X text 167 149 1;
+#X obj 153 61 t f f;
+#X obj 167 174 -;
+#X obj 193 238 expr (8/$f1);
+#X obj 163 239 -;
+#X obj 181 265 *;
+#X obj 159 93 max 0;
+#X obj 201 93 min 10;
+#X obj 189 130 f;
+#X obj 163 129 f;
+#X text 188 171 comment;
+#X obj 154 298 expr (-1*$f1)+4;
+#X obj 293 27 inlet;
+#X obj 283 63 * 10;
+#X obj 94 320 gemhead 15;
+#X obj 157 509 circle 0.1;
+#X obj 17 423 separator;
+#X obj 87 423 separator;
+#X obj 17 484 rectangle 0.2 0.01;
+#X obj 157 423 separator;
+#X msg 185 478 draw line;
+#X obj 185 457 loadbang;
+#X obj 77 386 colorRGB 1 0 0 1;
+#X obj 17 462 rectangle 0.01 0.2;
+#X msg 256 478 width \$1;
+#X obj 296 342 int;
+#X obj 275 413 + 1;
+#X connect 0 0 5 0;
+#X connect 1 0 19 0;
+#X connect 2 0 40 0;
+#X connect 5 0 10 0;
+#X connect 5 0 12 0;
+#X connect 5 1 13 0;
+#X connect 6 0 9 0;
+#X connect 9 0 11 1;
+#X connect 10 0 11 0;
+#X connect 11 0 16 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 6 1;
+#X connect 14 0 10 1;
+#X connect 14 0 13 1;
+#X connect 15 0 6 0;
+#X connect 15 0 12 1;
+#X connect 16 0 2 1;
+#X connect 19 0 22 0;
+#X connect 19 0 24 0;
+#X connect 19 1 25 0;
+#X connect 20 0 21 0;
+#X connect 21 0 23 1;
+#X connect 22 0 23 0;
+#X connect 23 0 29 0;
+#X connect 24 0 27 0;
+#X connect 25 0 26 0;
+#X connect 26 0 20 1;
+#X connect 26 0 22 1;
+#X connect 26 0 25 1;
+#X connect 27 0 20 0;
+#X connect 27 0 24 1;
+#X connect 29 0 2 2;
+#X connect 30 0 31 0;
+#X connect 31 0 33 1;
+#X connect 31 0 43 0;
+#X connect 32 0 2 0;
+#X connect 34 0 41 0;
+#X connect 35 0 36 0;
+#X connect 37 0 33 0;
+#X connect 38 0 33 0;
+#X connect 39 0 38 0;
+#X connect 40 0 34 0;
+#X connect 40 0 35 0;
+#X connect 40 0 37 0;
+#X connect 42 0 33 0;
+#X connect 43 0 44 0;
+#X connect 44 0 42 0;
+#X restore 137 348 pd cursor;
+#X obj 392 163 separator;
+#X obj 392 184 pix_texture;
+#X obj 392 205 square 4;
+#X obj 378 368 pix_texture;
+#X obj 179 200 separator;
+#X obj 378 348 alpha;
+#X obj 378 328 colourRGB 1 1 1 0.65;
+#X obj 378 388 translateXYZ -2.4 -2.4 0;
+#X obj 378 408 square 1.5;
+#X obj 337 98 gemhead 10;
+#X obj 337 119 pix_video;
+#X text 376 309 Show pix_background output;
+#X text 136 369 Show centroid/size;
+#X text 368 257 Set noise threshold;
+#X text 391 145 Render source video;
+#X obj 275 237 hsl 128 15 0 1 0 1 empty empty empty -2 -8 0 10 -262130
+-1 -1 1200 1;
+#X floatatom 331 259 5 0 0 0 - - -;
+#X text 21 64 1) make sure no one is in the camera picture;
+#X text 21 84 2) click the [reset( message;
+#X text 21 104 3) set the noise threshold for best results;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 483 25 pd gemwin;
+#X connect 1 0 3 0;
+#X connect 2 0 3 0;
+#X connect 3 0 5 0;
+#X connect 3 0 13 0;
+#X connect 4 0 3 1;
+#X connect 5 1 6 0;
+#X connect 5 2 6 1;
+#X connect 5 3 6 2;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 10 0 14 0;
+#X connect 11 0 1 0;
+#X connect 12 0 10 0;
+#X connect 13 0 12 0;
+#X connect 14 0 15 0;
+#X connect 16 0 17 0;
+#X connect 17 0 7 0;
+#X connect 17 0 11 0;
+#X connect 22 0 23 0;
+#X connect 22 0 4 0;
diff --git a/Gem/examples/04.video/08.color_classification.pd b/Gem/examples/04.video/08.color_classification.pd
new file mode 100644
index 0000000..dd933b2
--- /dev/null
+++ b/Gem/examples/04.video/08.color_classification.pd
@@ -0,0 +1,109 @@
+#N canvas 55 233 930 428 10;
+#X obj 297 283 separator;
+#X obj 297 304 pix_texture;
+#X obj 96 130 gemhead 10;
+#X obj 96 190 pix_video;
+#X text 298 264 Render source video;
+#X obj 297 344 square 4;
+#X msg 166 153 device 2;
+#N canvas 162 133 570 420 serin 0;
+#X obj 205 60 cnv 20 20 20 empty \$0-open-canvas 2 4 10 0 16 -233017
+-1 0;
+#X obj 60 61 hradio 18 1 1 8 empty empty empty 0 -6 0 8 -225271 -1
+-1 2;
+#X obj 60 13 inlet;
+#X msg 200 202 label \$1;
+#X obj 200 180 makefilename %d;
+#X obj 59 108 int;
+#X obj 59 337 outlet;
+#X msg 201 306 set \$1 \$2;
+#X obj 59 266 trigger bang anything;
+#X obj 201 286 list;
+#X obj 200 225 send \$0-open-canvas;
+#X msg 60 210 device \$1;
+#X connect 1 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 10 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 5 0 11 0;
+#X connect 7 0 6 0;
+#X connect 8 0 6 0;
+#X connect 8 1 9 0;
+#X connect 9 0 7 0;
+#X connect 11 0 8 0;
+#X coords 0 -1 1 1 165 20 1 60 60;
+#X restore 166 129 pd serin;
+#X msg 321 153 colorspace RGBA;
+#X msg 430 152 dialog;
+#X obj 297 324 rotateXYZ 0 180 0;
+#X obj 65 285 pix_texture;
+#X obj 65 347 square 1.5;
+#X obj 65 326 rotateXYZ 0 180 0;
+#X obj 65 305 translateXYZ -2.4 -2.4 0.1;
+#X text 72 264 Show color detection output;
+#N canvas 249 346 1447 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 388 14 pd gemwin;
+#X text 6 21 Reliable colors are detected in an incoming video \, each
+pixel being classified into 6 classes: Red \, Green \, Blue \, Yellow
+\, Black \, and White. A light brown color is used to visualize the
+pixels whose color could not be reliably classified. The detector is
+high precision with moderate recall \, meaning it avoids false positives
+at the expense of a smaller number of classified pixels.;
+#X msg 228 153 dimen 320 240;
+#X obj 65 240 pix_colorclassify;
+#X text 7 385 Author: Ricardo Fabbri labmacambira.sf.net rfabbri at
+gmail;
+#X connect 0 0 1 0;
+#X connect 1 0 10 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X connect 3 0 19 0;
+#X connect 6 0 3 0;
+#X connect 7 0 6 0;
+#X connect 8 0 3 0;
+#X connect 9 0 3 0;
+#X connect 10 0 5 0;
+#X connect 11 0 14 0;
+#X connect 13 0 12 0;
+#X connect 14 0 13 0;
+#X connect 18 0 3 0;
+#X connect 19 0 11 0;
diff --git a/Gem/examples/05.text/01.Text.pd b/Gem/examples/05.text/01.Text.pd
new file mode 100644
index 0000000..3cde23a
--- /dev/null
+++ b/Gem/examples/05.text/01.Text.pd
@@ -0,0 +1,120 @@
+#N canvas 262 20 734 641 10;
+#X floatatom 623 223 0 0 0 0 - - -;
+#X floatatom 322 240 0 0 0 0 - - -;
+#X msg 490 144 1;
+#X msg 494 168 0;
+#X floatatom 694 403 0 0 0 0 - - -;
+#X floatatom 529 284 3 0 0 0 - - -;
+#X floatatom 578 222 0 0 0 0 - - -;
+#X obj 479 194 gemhead;
+#X floatatom 533 223 0 0 0 0 - - -;
+#X msg 213 155 1;
+#X msg 217 179 0;
+#X floatatom 395 478 0 0 0 0 - - -;
+#X floatatom 226 305 4 0 0 0 - - -;
+#X floatatom 279 240 0 0 0 0 - - -;
+#X obj 209 207 gemhead;
+#X floatatom 235 240 0 0 0 0 - - -;
+#X obj 208 496 text3d hello world;
+#X obj 209 386 rotate;
+#X obj 479 421 textoutline hello world;
+#X msg 279 320 0 1 0;
+#X msg 283 344 1 0 0;
+#X msg 5 449 justify right top;
+#X obj 209 281 translateXYZ;
+#X msg 532 334 justify left bottom;
+#X msg 4 422 justify center center;
+#X text 205 111 3-D polygonal text;
+#X text 480 99 3-D outline text;
+#X obj 479 308 rotateXYZ;
+#X text 401 496 size;
+#X obj 479 257 translateXYZ 0 2 0;
+#X msg 218 433 font ../data/vera.ttf;
+#X msg 515 364 font ../data/vera.ttf;
+#X msg 225 463 font \$1;
+#X msg 511 390 font \$1;
+#X obj 297 462 openpanel;
+#X msg 377 461 bang;
+#X obj 577 390 openpanel;
+#X msg 657 389 bang;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 29 3;
+#X connect 1 0 22 3;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 4 0 18 1;
+#X connect 5 0 27 2;
+#X connect 6 0 29 2;
+#X connect 7 0 29 0;
+#X connect 8 0 29 1;
+#X connect 9 0 14 0;
+#X connect 10 0 14 0;
+#X connect 11 0 16 1;
+#X connect 12 0 17 1;
+#X connect 13 0 22 2;
+#X connect 14 0 22 0;
+#X connect 15 0 22 1;
+#X connect 17 0 16 0;
+#X connect 19 0 17 2;
+#X connect 20 0 17 2;
+#X connect 21 0 16 0;
+#X connect 22 0 17 0;
+#X connect 23 0 18 0;
+#X connect 24 0 16 0;
+#X connect 27 0 18 0;
+#X connect 29 0 27 0;
+#X connect 30 0 16 0;
+#X connect 31 0 18 0;
+#X connect 32 0 16 0;
+#X connect 33 0 18 0;
+#X connect 34 0 32 0;
+#X connect 35 0 34 0;
+#X connect 36 0 33 0;
+#X connect 37 0 36 0;
+#X connect 38 0 39 0;
diff --git a/Gem/examples/05.text/01.TextNoLoadBang.pd b/Gem/examples/05.text/01.TextNoLoadBang.pd
new file mode 100644
index 0000000..43bb335
--- /dev/null
+++ b/Gem/examples/05.text/01.TextNoLoadBang.pd
@@ -0,0 +1,112 @@
+#N canvas 262 20 734 641 10;
+#X floatatom 623 223 0 0 0 0 - - -;
+#X floatatom 322 240 0 0 0 0 - - -;
+#X msg 490 144 1;
+#X msg 494 168 0;
+#X floatatom 694 403 0 0 0 0 - - -;
+#X floatatom 529 284 3 0 0 0 - - -;
+#X floatatom 578 222 0 0 0 0 - - -;
+#X obj 479 194 gemhead;
+#X floatatom 533 223 0 0 0 0 - - -;
+#X msg 213 155 1;
+#X msg 217 179 0;
+#X floatatom 395 478 0 0 0 0 - - -;
+#X floatatom 226 305 4 0 0 0 - - -;
+#X floatatom 279 240 0 0 0 0 - - -;
+#X obj 209 207 gemhead;
+#X floatatom 235 240 0 0 0 0 - - -;
+#X obj 208 496 text3d hello world;
+#X obj 209 386 rotate;
+#X obj 479 421 textoutline hello world;
+#X msg 279 320 0 1 0;
+#X msg 283 344 1 0 0;
+#X msg 5 449 justify right top;
+#X obj 209 281 translateXYZ;
+#X msg 532 334 justify left bottom;
+#X msg 4 422 justify center center;
+#X text 205 111 3-D polygonal text;
+#X text 480 99 3-D outline text;
+#X obj 479 308 rotateXYZ;
+#X text 401 496 size;
+#X obj 479 257 translateXYZ 0 2 0;
+#X msg 218 433 font ../data/vera.ttf;
+#X msg 515 364 font ../data/vera.ttf;
+#X msg 225 463 font \$1;
+#X msg 511 390 font \$1;
+#X obj 297 462 openpanel;
+#X msg 377 461 bang;
+#X obj 577 390 openpanel;
+#X msg 657 389 bang;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 29 3;
+#X connect 1 0 22 3;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 4 0 18 1;
+#X connect 5 0 27 2;
+#X connect 6 0 29 2;
+#X connect 7 0 29 0;
+#X connect 8 0 29 1;
+#X connect 9 0 14 0;
+#X connect 10 0 14 0;
+#X connect 11 0 16 1;
+#X connect 12 0 17 1;
+#X connect 13 0 22 2;
+#X connect 14 0 22 0;
+#X connect 15 0 22 1;
+#X connect 17 0 16 0;
+#X connect 19 0 17 2;
+#X connect 20 0 17 2;
+#X connect 21 0 16 0;
+#X connect 22 0 17 0;
+#X connect 23 0 18 0;
+#X connect 24 0 16 0;
+#X connect 27 0 18 0;
+#X connect 29 0 27 0;
+#X connect 30 0 16 0;
+#X connect 31 0 18 0;
+#X connect 32 0 16 0;
+#X connect 33 0 18 0;
+#X connect 34 0 32 0;
+#X connect 35 0 34 0;
+#X connect 36 0 33 0;
+#X connect 37 0 36 0;
diff --git a/Gem/examples/05.text/03.ChangeText.pd b/Gem/examples/05.text/03.ChangeText.pd
new file mode 100644
index 0000000..e93314e
--- /dev/null
+++ b/Gem/examples/05.text/03.ChangeText.pd
@@ -0,0 +1,102 @@
+#N canvas 262 100 734 532 10;
+#X floatatom 495 359 0 0 0 0 - - -;
+#X obj 451 243 gemhead;
+#X obj 451 484 text3d hello world;
+#X text 354 25 3-D polygonal text;
+#X msg 240 303 text something really cool;
+#X msg 222 275 text bar;
+#X msg 188 248 text foo;
+#X msg 141 225 text and now with 1 4.5;
+#X obj 201 180 sel 0 1 2 3 4;
+#X msg 216 50 1;
+#X msg 250 50 0;
+#X obj 216 111 metro 250;
+#X obj 216 142 random 7;
+#X msg 262 342 text good bye again;
+#X msg 324 267 text rand \$1;
+#X obj 451 270 translateXYZ 0 0 -3.5;
+#X obj 495 298 metro 20;
+#X obj 451 397 rotateXYZ;
+#X obj 497 439 loadbang;
+#X obj 495 321 i;
+#X obj 527 321 + 1;
+#X obj 557 321 % 360;
+#X obj 216 79 t f;
+#X msg 497 461 font ../data/vera.ttf;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 345 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 362 pd gemwin;
+#X connect 0 0 17 2;
+#X connect 1 0 15 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X connect 6 0 2 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 8 1 6 0;
+#X connect 8 2 5 0;
+#X connect 8 3 4 0;
+#X connect 8 4 13 0;
+#X connect 8 5 14 0;
+#X connect 9 0 22 0;
+#X connect 10 0 22 0;
+#X connect 11 0 12 0;
+#X connect 12 0 8 0;
+#X connect 13 0 2 0;
+#X connect 14 0 2 0;
+#X connect 15 0 17 0;
+#X connect 16 0 19 0;
+#X connect 17 0 2 0;
+#X connect 18 0 23 0;
+#X connect 19 0 20 0;
+#X connect 19 0 0 0;
+#X connect 20 0 21 0;
+#X connect 21 0 19 1;
+#X connect 22 0 11 0;
+#X connect 22 0 16 0;
+#X connect 23 0 2 0;
+#X connect 24 0 25 0;
diff --git a/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd b/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd
new file mode 100644
index 0000000..bb01724
--- /dev/null
+++ b/Gem/examples/05.text/03.ChangeTextNoLoadBang.pd
@@ -0,0 +1,92 @@
+#N canvas 262 100 734 532 10;
+#X floatatom 495 359 0 0 0 0 - - -;
+#X obj 451 243 gemhead;
+#X obj 451 484 text3d hello world;
+#X text 354 25 3-D polygonal text;
+#X msg 240 303 text something really cool;
+#X msg 222 275 text bar;
+#X msg 188 248 text foo;
+#X msg 141 225 text and now with 1 4.5;
+#X obj 201 180 sel 0 1 2 3 4;
+#X msg 179 44 1;
+#X msg 216 43 0;
+#X obj 216 107 metro 250;
+#X obj 216 142 random 7;
+#X msg 262 342 text good bye again;
+#X msg 324 267 text rand \$1;
+#X obj 451 270 translateXYZ 0 0 -3.5;
+#X obj 495 298 metro 20;
+#X obj 451 397 rotateXYZ;
+#X msg 497 461 font ../data/vera.ttf;
+#X obj 216 85 t f;
+#X obj 495 327 i;
+#X obj 526 327 + 1;
+#X obj 556 327 % 360;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 17 2;
+#X connect 1 0 15 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X connect 6 0 2 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 8 1 6 0;
+#X connect 8 2 5 0;
+#X connect 8 3 4 0;
+#X connect 8 4 13 0;
+#X connect 8 5 14 0;
+#X connect 9 0 19 0;
+#X connect 10 0 19 0;
+#X connect 11 0 12 0;
+#X connect 12 0 8 0;
+#X connect 13 0 2 0;
+#X connect 14 0 2 0;
+#X connect 15 0 17 0;
+#X connect 16 0 20 0;
+#X connect 17 0 2 0;
+#X connect 18 0 2 0;
+#X connect 19 0 11 0;
+#X connect 19 0 16 0;
+#X connect 20 0 21 0;
+#X connect 20 0 0 0;
+#X connect 21 0 22 0;
+#X connect 22 0 20 1;
diff --git a/Gem/examples/05.text/vera.ttf b/Gem/examples/05.text/vera.ttf
new file mode 100644
index 0000000..58cd6b5
--- /dev/null
+++ b/Gem/examples/05.text/vera.ttf
Binary files differ
diff --git a/Gem/examples/06.particle/01.simple.pd b/Gem/examples/06.particle/01.simple.pd
new file mode 100644
index 0000000..a618273
--- /dev/null
+++ b/Gem/examples/06.particle/01.simple.pd
@@ -0,0 +1,69 @@
+#N canvas 509 196 487 398 10;
+#X obj 167 160 gemhead;
+#X obj 167 192 part_head;
+#X obj 167 328 part_draw;
+#X text 277 258 set the number per frame;
+#X text 291 290 set the age to kill at;
+#X text 296 110 the velocity domain;
+#X text 295 125 a sphere at 0 \, 0.2 \, 0;
+#X text 296 144 radius = 0.3;
+#X msg 271 170 0 0.2 0 0.3;
+#X msg 358 169 0.2 0 0 0.3;
+#X obj 167 228 part_velocity sphere 0 0.2 0 0.3;
+#X obj 167 261 part_source 20;
+#X obj 167 292 part_killold 50;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 67 48 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 37 65 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 10 0;
+#X connect 8 0 10 2;
+#X connect 9 0 10 2;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 2 0;
+#X connect 13 0 14 0;
diff --git a/Gem/examples/06.particle/02.fountain.pd b/Gem/examples/06.particle/02.fountain.pd
new file mode 100644
index 0000000..a12a37d
--- /dev/null
+++ b/Gem/examples/06.particle/02.fountain.pd
@@ -0,0 +1,86 @@
+#N canvas 396 160 600 500 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 136 part_color;
+#X obj 198 447 part_draw;
+#X msg 335 69 0 1 0;
+#X text 329 37 set the color range;
+#X obj 198 174 part_size 1;
+#X text 299 126 set the size;
+#X obj 198 331 part_gravity 0 -0.01 0;
+#X obj 198 206 part_velocity sphere 0 0.2 0 0.2;
+#X text 310 269 set the number per frame;
+#X text 310 378 set the age to kill at;
+#X text 366 327 gravity to affect the particles;
+#X text 428 174 the velocity domain;
+#X text 426 191 a sphere at 0 \, 0.2 \, 0;
+#X msg 219 413 draw line;
+#X msg 298 413 draw point;
+#X msg 309 151 2;
+#X msg 393 69 1 0 0;
+#X obj 198 270 part_source 25;
+#X obj 198 381 part_killold 45;
+#X text 426 208 radius = 0.2;
+#X msg 126 51 speed 0.1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 159 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 176 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 4 0 2 1;
+#X connect 6 0 9 0;
+#X connect 8 0 20 0;
+#X connect 9 0 19 0;
+#X connect 15 0 3 0;
+#X connect 16 0 3 0;
+#X connect 17 0 6 1;
+#X connect 18 0 2 2;
+#X connect 19 0 8 0;
+#X connect 20 0 3 0;
+#X connect 22 0 1 0;
+#X connect 23 0 24 0;
diff --git a/Gem/examples/06.particle/03.orbit.pd b/Gem/examples/06.particle/03.orbit.pd
new file mode 100644
index 0000000..2791db1
--- /dev/null
+++ b/Gem/examples/06.particle/03.orbit.pd
@@ -0,0 +1,88 @@
+#N canvas 396 160 600 500 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 136 part_color;
+#X obj 198 447 part_draw;
+#X text 329 37 set the color range;
+#X text 299 174 set the size;
+#X text 310 269 set the number per frame;
+#X text 310 378 set the age to kill at;
+#X text 414 196 the velocity domain;
+#X msg 219 413 draw line;
+#X msg 298 413 draw point;
+#X obj 198 270 part_source 25;
+#X obj 198 381 part_killold 45;
+#X text 412 230 radius = 0.2;
+#X msg 336 97 1 0 1;
+#X msg 396 98 0 1 0;
+#X obj 198 220 part_velocity sphere 0 0 0 0.2;
+#X floatatom 375 301 0 0 0 0 - - -;
+#X obj 198 334 part_orbitpoint 0 1 0 0.08;
+#X text 390 333 orbit point and gravity;
+#X obj 198 174 part_size 0.4;
+#X obj 360 61 loadbang;
+#X text 411 213 a sphere at 0 0 0;
+#X text 415 299 keep the gravity low;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 20 0;
+#X connect 9 0 3 0;
+#X connect 10 0 3 0;
+#X connect 11 0 18 0;
+#X connect 12 0 3 0;
+#X connect 14 0 2 1;
+#X connect 15 0 2 2;
+#X connect 16 0 11 0;
+#X connect 17 0 18 2;
+#X connect 18 0 12 0;
+#X connect 20 0 16 0;
+#X connect 21 0 15 0;
+#X connect 21 0 14 0;
+#X connect 24 0 25 0;
diff --git a/Gem/examples/06.particle/04.combo.pd b/Gem/examples/06.particle/04.combo.pd
new file mode 100644
index 0000000..37d9afd
--- /dev/null
+++ b/Gem/examples/06.particle/04.combo.pd
@@ -0,0 +1,104 @@
+#N canvas 125 39 600 634 10;
+#X obj 41 197 gemwin;
+#X msg 41 39 create;
+#X msg 58 68 destroy;
+#X obj 198 39 gemhead;
+#X obj 198 136 part_color;
+#X obj 198 615 part_draw;
+#X text 391 35 set the color range;
+#X text 309 174 set the size;
+#X text 330 269 set the number per frame;
+#X text 330 458 set the age to kill at;
+#X text 464 196 the velocity domain;
+#X text 462 230 radius = 0.2;
+#X floatatom 382 383 0 0 0 0 - - -;
+#X text 420 413 orbit point and gravity;
+#X obj 422 59 loadbang;
+#X text 426 384 keep the gravity low;
+#X obj 198 461 part_killold 35;
+#X msg 398 95 0 0 1;
+#X obj 198 174 part_size 0.8;
+#X text 461 214 a sphere at -1 0 0;
+#X text 373 300 apply a gravity to the right;
+#X msg 85 357 0 1 0;
+#X msg 143 357 0 -1 0;
+#X obj 198 305 part_gravity 0.07 0 0;
+#X obj 198 579 translateXYZ -1 0.5 0;
+#X obj 198 544 rotateXYZ 0 1 0;
+#X floatatom 20 442 0 0 0 0 - - -;
+#X obj 198 414 part_orbitpoint 0 -1 0 0.88;
+#X obj 198 497 part_gravity 0 0 -0.05;
+#X obj 198 220 part_velocity sphere -1 0 0 0.05;
+#X msg 458 96 1 0 0;
+#X text 390 498 apply a gravity in Z;
+#X obj 85 290 metro 2000;
+#X obj 20 290 metro 50;
+#X obj 198 82 part_head 2000;
+#X text 204 60 maximum of 2000 particles;
+#X obj 198 276 part_source 10;
+#N canvas 91 174 290 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 90 175 pd Gem.init;
+#X obj 79 104 tgl 40 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 55 249 t f f;
+#X obj 20 403 i;
+#X obj 51 403 + 1;
+#X obj 81 403 % 360;
+#X obj 79 149 t f f;
+#N canvas 0 0 450 300 alternate 0;
+#X obj 82 126 inlet;
+#X obj 82 239 outlet;
+#X obj 82 192 select 0 1;
+#X obj 145 239 outlet;
+#X obj 82 147 i;
+#X obj 117 146 == 0;
+#X obj 82 167 t f f;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 4 0 6 0;
+#X connect 5 0 4 1;
+#X connect 6 0 2 0;
+#X connect 6 1 5 0;
+#X restore 85 327 pd alternate;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 34 0;
+#X connect 4 0 18 0;
+#X connect 12 0 27 2;
+#X connect 14 0 30 0;
+#X connect 14 0 17 0;
+#X connect 16 0 28 0;
+#X connect 17 0 4 1;
+#X connect 18 0 29 0;
+#X connect 21 0 27 1;
+#X connect 22 0 27 1;
+#X connect 23 0 27 0;
+#X connect 24 0 5 0;
+#X connect 25 0 24 0;
+#X connect 26 0 25 2;
+#X connect 27 0 16 0;
+#X connect 28 0 25 0;
+#X connect 29 0 36 0;
+#X connect 30 0 4 2;
+#X connect 32 0 44 0;
+#X connect 33 0 40 0;
+#X connect 34 0 4 0;
+#X connect 36 0 23 0;
+#X connect 37 0 0 0;
+#X connect 38 0 43 0;
+#X connect 39 0 33 0;
+#X connect 39 1 32 0;
+#X connect 40 0 41 0;
+#X connect 40 0 26 0;
+#X connect 41 0 42 0;
+#X connect 42 0 40 1;
+#X connect 43 0 0 0;
+#X connect 43 1 39 0;
+#X connect 44 0 21 0;
+#X connect 44 1 22 0;
diff --git a/Gem/examples/06.particle/05.twoSrc.pd b/Gem/examples/06.particle/05.twoSrc.pd
new file mode 100644
index 0000000..5884f75
--- /dev/null
+++ b/Gem/examples/06.particle/05.twoSrc.pd
@@ -0,0 +1,173 @@
+#N canvas 336 24 600 774 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 136 part_color;
+#X obj 198 620 part_draw;
+#X text 329 37 set the color range;
+#X text 299 174 set the size;
+#X text 310 269 set the number per frame;
+#X text 321 588 set the age to kill at;
+#X text 444 196 the velocity domain;
+#X text 442 230 radius = 0.2;
+#X obj 360 61 loadbang;
+#X obj 198 586 part_killold 35;
+#X obj 198 174 part_size 0.8;
+#X text 441 214 a sphere at -1 0 0;
+#X text 361 318 apply a gravity to the right;
+#X obj 198 317 part_gravity 0.07 0 0;
+#X obj 198 461 part_color;
+#X obj 251 383 loadbang;
+#X msg 275 421 0.4 0.4 0.4;
+#X msg 227 420 1 0 0;
+#X obj 198 277 part_source 5;
+#X obj 198 497 part_source 5;
+#X obj 198 537 part_gravity -0.01 -0.02 0;
+#X obj 198 352 part_velocity sphere 0 0.2 0 0.05;
+#X msg 324 96 0.4 0.4 0.4;
+#X msg 423 96 0 1 0;
+#X obj 198 220 part_velocity sphere -0.2 0 0 0.1;
+#X obj 375 419 metro 1000;
+#N canvas 0 22 450 300 tripleRand 0;
+#X obj 94 71 inlet;
+#X obj 94 252 outlet;
+#X obj 94 221 pack 0 0 0;
+#X obj 94 104 t b b b;
+#X obj 94 134 random 1000;
+#X obj 94 154 / 1000;
+#X obj 94 175 * 0.1;
+#X obj 194 134 random 1000;
+#X obj 194 154 / 1000;
+#X obj 294 134 random 1000;
+#X obj 294 154 / 1000;
+#X obj 194 175 * 0.2;
+#X obj 294 175 * 0;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 4 0;
+#X connect 3 1 7 0;
+#X connect 3 2 9 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 6 0 2 0;
+#X connect 7 0 8 0;
+#X connect 8 0 11 0;
+#X connect 9 0 10 0;
+#X connect 10 0 12 0;
+#X connect 11 0 2 1;
+#X connect 12 0 2 2;
+#X restore 375 453 pd tripleRand (0.1 0.2 0);
+#N canvas 0 22 450 300 v* 0;
+#X obj 90 62 unpack 0 0 0;
+#X obj 90 42 inlet;
+#X obj 90 137 pack 0 0 0;
+#X obj 90 156 outlet;
+#X obj 90 90 * -1;
+#X obj 127 110 * -1;
+#X obj 165 90 * -1;
+#X connect 0 0 4 0;
+#X connect 0 1 5 0;
+#X connect 0 2 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 3 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 1;
+#X connect 6 0 2 2;
+#X restore 375 483 pd v* (-1);
+#N canvas 0 22 450 300 tripleLine 0;
+#X obj 94 71 inlet;
+#X obj 94 252 outlet;
+#X obj 94 104 unpack 0 0 0;
+#X obj 94 221 pack 0 0 0;
+#X obj 94 176 line;
+#X msg 94 153 \$1 1000;
+#X obj 164 176 line;
+#X msg 164 153 \$1 1000;
+#X obj 234 176 line;
+#X msg 234 153 \$1 1000;
+#X connect 0 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 1 7 0;
+#X connect 2 2 9 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 3 1;
+#X connect 7 0 6 0;
+#X connect 8 0 3 2;
+#X connect 9 0 8 0;
+#X restore 375 505 pd tripleLine (1000);
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X obj 375 392 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 12 0;
+#X connect 10 0 25 0;
+#X connect 10 0 24 0;
+#X connect 11 0 3 0;
+#X connect 12 0 26 0;
+#X connect 15 0 23 0;
+#X connect 16 0 21 0;
+#X connect 17 0 18 0;
+#X connect 17 0 19 0;
+#X connect 18 0 16 2;
+#X connect 19 0 16 1;
+#X connect 20 0 15 0;
+#X connect 21 0 22 0;
+#X connect 22 0 11 0;
+#X connect 23 0 16 0;
+#X connect 24 0 2 1;
+#X connect 25 0 2 2;
+#X connect 26 0 20 0;
+#X connect 27 0 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 22 1;
+#X connect 31 0 32 0;
+#X connect 33 0 27 0;
diff --git a/Gem/examples/06.particle/06.target.pd b/Gem/examples/06.particle/06.target.pd
new file mode 100644
index 0000000..35237ad
--- /dev/null
+++ b/Gem/examples/06.particle/06.target.pd
@@ -0,0 +1,74 @@
+#N canvas 396 160 600 500 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 447 part_draw;
+#X obj 198 331 part_gravity 0 -0.01 0;
+#X obj 198 160 part_velocity sphere 0 0.2 0 0.2;
+#X text 310 269 set the number per frame;
+#X text 310 378 set the age to kill at;
+#X text 366 327 gravity to affect the particles;
+#X text 331 94 the velocity domain;
+#X text 329 111 a sphere at 0 \, 0.2 \, 0;
+#X obj 198 270 part_source 25;
+#X obj 198 381 part_killold 45;
+#X text 329 128 radius = 0.2;
+#X obj 198 116 part_size 0.1;
+#X obj 198 236 part_targetcolor 0 0 1;
+#X obj 198 201 part_targetsize 3;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 13 0;
+#X connect 3 0 11 0;
+#X connect 4 0 15 0;
+#X connect 10 0 3 0;
+#X connect 11 0 2 0;
+#X connect 13 0 4 0;
+#X connect 14 0 10 0;
+#X connect 15 0 14 0;
+#X connect 16 0 17 0;
diff --git a/Gem/examples/06.particle/07.render.pd b/Gem/examples/06.particle/07.render.pd
new file mode 100644
index 0000000..8fd3c0c
--- /dev/null
+++ b/Gem/examples/06.particle/07.render.pd
@@ -0,0 +1,86 @@
+#N canvas 136 52 487 571 10;
+#X obj 167 53 gemhead;
+#X obj 167 81 part_head;
+#X text 293 262 set the number per frame;
+#X text 291 290 set the age to kill at;
+#X text 296 110 the velocity domain;
+#X text 295 125 a sphere at 0 \, 0.2 \, 0;
+#X text 296 144 radius = 0.3;
+#X msg 271 170 0 0.2 0 0.3;
+#X msg 358 169 0.2 0 0 0.3;
+#X obj 167 231 part_velocity sphere 0 0.2 0 0.3;
+#X obj 167 330 part_render;
+#X obj 167 393 sphere 0.2;
+#X obj 47 308 gemhead;
+#X obj 47 331 world_light;
+#X obj 167 128 part_size 1;
+#X msg 257 105 2;
+#X obj 167 204 part_color;
+#X msg 190 150 1 0 0;
+#X obj 167 261 part_source 5;
+#X obj 167 292 part_killold 10;
+#X msg 202 178 0 1 0;
+#X msg 227 104 1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, lighting 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 66 131 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 36 148 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 14 0;
+#X connect 7 0 9 2;
+#X connect 8 0 9 2;
+#X connect 9 0 18 0;
+#X connect 10 0 11 0;
+#X connect 12 0 13 0;
+#X connect 14 0 16 0;
+#X connect 15 0 14 1;
+#X connect 16 0 9 0;
+#X connect 17 0 16 1;
+#X connect 18 0 19 0;
+#X connect 19 0 10 0;
+#X connect 20 0 16 2;
+#X connect 21 0 14 1;
+#X connect 22 0 23 0;
diff --git a/Gem/examples/06.particle/08.info.pd b/Gem/examples/06.particle/08.info.pd
new file mode 100644
index 0000000..5b00adb
--- /dev/null
+++ b/Gem/examples/06.particle/08.info.pd
@@ -0,0 +1,117 @@
+#N canvas 22 71 611 571 10;
+#X obj 169 18 gemhead;
+#X obj 168 85 part_head;
+#X text 278 259 set the number per frame;
+#X text 292 291 set the age to kill at;
+#X msg 290 201 0 0.2 0 0.3;
+#X msg 377 200 0.2 0 0 0.3;
+#X obj 168 229 part_velocity sphere 0 0.2 0 0.3;
+#X obj 168 132 part_size 1;
+#X obj 168 254 part_source 5;
+#X obj 168 279 part_killold 10;
+#X obj 169 300 part_info;
+#X obj 169 382 separator;
+#X obj 169 408 translate 1 0 0 0;
+#X obj 169 431 color;
+#X obj 169 471 scale;
+#X msg 278 518 draw line;
+#X msg 257 105 2;
+#X obj 170 502 rotateXYZ;
+#X obj 320 435 unpack 0 0 0;
+#X text 375 400 this is rather velocity;
+#X text 379 416 than rotation;
+#X obj 279 498 loadbang;
+#X obj 170 537 square 0.2;
+#X msg 300 378 \$1 \$2 0;
+#X obj 169 56 rotateXYZ;
+#X floatatom 272 20 5 0 0 0 - - -;
+#X obj 168 205 part_color;
+#X msg 200 180 1 0 0;
+#X msg 252 180 0 0 1;
+#X text 254 362 we don't allow particles spread along the z-axis;
+#X msg 257 76 1;
+#X obj 255 463 * 360;
+#X obj 315 461 * 360;
+#X obj 382 460 * 360;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 24 0;
+#X connect 1 0 7 0;
+#X connect 4 0 6 2;
+#X connect 5 0 6 2;
+#X connect 6 0 8 0;
+#X connect 7 0 26 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 10 2 23 0;
+#X connect 10 3 13 1;
+#X connect 10 4 18 0;
+#X connect 10 5 14 1;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 17 0;
+#X connect 15 0 22 0;
+#X connect 16 0 7 1;
+#X connect 17 0 22 0;
+#X connect 18 0 31 0;
+#X connect 18 1 32 0;
+#X connect 18 2 33 0;
+#X connect 21 0 15 0;
+#X connect 23 0 12 2;
+#X connect 24 0 1 0;
+#X connect 25 0 24 2;
+#X connect 26 0 6 0;
+#X connect 27 0 26 1;
+#X connect 28 0 26 2;
+#X connect 30 0 7 1;
+#X connect 31 0 17 1;
+#X connect 32 0 17 2;
+#X connect 33 0 17 3;
+#X connect 34 0 35 0;
diff --git a/Gem/examples/06.particle/09.sink.pd b/Gem/examples/06.particle/09.sink.pd
new file mode 100644
index 0000000..d22b5ac
--- /dev/null
+++ b/Gem/examples/06.particle/09.sink.pd
@@ -0,0 +1,100 @@
+#N canvas 424 93 600 500 10;
+#X obj 198 50 gemhead;
+#X obj 198 82 part_head;
+#X obj 198 136 part_color;
+#X obj 199 447 part_draw;
+#X msg 335 69 0 1 0;
+#X text 329 37 set the color range;
+#X obj 198 174 part_size 1;
+#X text 299 126 set the size;
+#X obj 198 206 part_velocity sphere 0 0.2 0 0.2;
+#X text 310 239 set the number per frame;
+#X text 311 378 set the age to kill at;
+#X text 309 255 gravity to affect the particles;
+#X text 428 174 the velocity domain;
+#X text 426 191 a sphere at 0 \, 0.2 \, 0;
+#X msg 220 413 draw line;
+#X msg 299 413 draw point;
+#X msg 309 151 2;
+#X msg 393 69 1 0 0;
+#X obj 198 240 part_source 25;
+#X obj 199 381 part_killold 45;
+#X text 426 208 radius = 0.2;
+#X msg 126 51 speed 0.1;
+#X obj 245 303 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 389 314 5 0 0 0 - - -;
+#X msg 389 331 0 \$1 0 0 1 0;
+#X obj 198 271 part_gravity 0 -0.1 0;
+#X obj 198 355 part_sink plane 0 -1 0 0 1 0;
+#X msg 245 322 kill \$1;
+#X obj 392 293 hsl 128 15 -4 0.1 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 0 1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 4 0 2 1;
+#X connect 6 0 8 0;
+#X connect 8 0 18 0;
+#X connect 14 0 3 0;
+#X connect 15 0 3 0;
+#X connect 16 0 6 1;
+#X connect 17 0 2 2;
+#X connect 18 0 25 0;
+#X connect 19 0 3 0;
+#X connect 21 0 1 0;
+#X connect 22 0 27 0;
+#X connect 23 0 24 0;
+#X connect 24 0 26 2;
+#X connect 25 0 26 0;
+#X connect 26 0 19 0;
+#X connect 27 0 26 0;
+#X connect 28 0 23 0;
+#X connect 29 0 30 0;
diff --git a/Gem/examples/07.texture/01.texture.pd b/Gem/examples/07.texture/01.texture.pd
new file mode 100644
index 0000000..da6dedc
--- /dev/null
+++ b/Gem/examples/07.texture/01.texture.pd
@@ -0,0 +1,60 @@
+#N canvas 180 41 560 399 10;
+#X floatatom 369 147 0 0 0 0 - - -;
+#X obj 325 202 pix_image ../data/fractal.JPG;
+#X obj 325 245 pix_texture;
+#X obj 325 171 rotate 0 1 1;
+#X obj 325 277 cube;
+#X obj 325 124 gemhead;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 90 153 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 60 170 pd gemwin;
+#X connect 0 0 3 1;
+#X connect 1 0 2 0;
+#X connect 2 0 4 0;
+#X connect 3 0 1 0;
+#X connect 5 0 3 0;
+#X connect 6 0 7 0;
diff --git a/Gem/examples/07.texture/02.TexCoord.pd b/Gem/examples/07.texture/02.TexCoord.pd
new file mode 100644
index 0000000..951c700
--- /dev/null
+++ b/Gem/examples/07.texture/02.TexCoord.pd
@@ -0,0 +1,70 @@
+#N canvas 127 46 642 483 10;
+#X obj 251 46 gemhead;
+#X obj 251 424 square;
+#X obj 251 369 pix_coordinate;
+#X obj 251 118 pix_texture;
+#X obj 251 87 pix_image ../data/fractal.JPG;
+#X msg 363 227 0 0 1 0 1 1 0 1;
+#X msg 349 203 0 0 2 0 2 2 0 2;
+#X msg 369 253 0 0 0.5 0 0.5 0.5 0 0.5;
+#X floatatom 400 285 5 0 0 0 - - -;
+#X text 258 170 set the texture coordinates [x1 y1 x2 y2 x3 y3 x4 y4]
+;
+#X msg 400 308 0 0 \$1 0 \$1 \$1 0 \$1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, dimen 300 300;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 5 0 2 1;
+#X connect 6 0 2 1;
+#X connect 7 0 2 1;
+#X connect 8 0 10 0;
+#X connect 10 0 2 1;
+#X connect 11 0 12 0;
diff --git a/Gem/examples/07.texture/04.moveImages.pd b/Gem/examples/07.texture/04.moveImages.pd
new file mode 100644
index 0000000..8107c0c
--- /dev/null
+++ b/Gem/examples/07.texture/04.moveImages.pd
@@ -0,0 +1,153 @@
+#N canvas 180 41 816 619 10;
+#X text 730 64 on;
+#X text 767 62 off;
+#X text 513 71 on;
+#X text 578 69 off;
+#X obj 633 450 pix_texture;
+#X obj 670 477 r initstuff;
+#X msg 724 86 1;
+#X msg 761 85 0;
+#X text 216 393 on;
+#X text 255 391 off;
+#X msg 29 417 1;
+#X msg 65 419 0;
+#X msg 210 419 1;
+#X msg 248 419 0;
+#X obj 286 437 gemhead 1;
+#X obj 454 166 int 0;
+#X obj 506 167 + 2;
+#X floatatom 672 197 0 0 0 0 - - -;
+#X obj 633 537 sphere;
+#X floatatom 454 199 0 0 0 0 - - -;
+#X obj 107 479 world_light;
+#X obj 107 424 gemhead 1;
+#X obj 415 445 sphere;
+#X obj 672 170 int 0;
+#X obj 286 493 light;
+#X msg 670 507 20;
+#X text 108 370 global light;
+#X text 283 370 local light;
+#X text 35 395 on;
+#X text 65 396 off;
+#X obj 454 132 metro 50;
+#X msg 506 97 1;
+#X msg 543 99 0;
+#X obj 672 136 metro 100;
+#X obj 734 168 + 1;
+#X obj 66 580 send initstuff;
+#X obj 452 383 r initstuff;
+#X obj 415 311 pix_image ../data/fractal.JPG;
+#X obj 415 354 pix_texture;
+#X obj 633 314 pix_image ../data/dancer.JPG;
+#X obj 633 377 alpha;
+#X obj 633 414 pix_alpha;
+#X obj 633 53 gemhead 60;
+#X obj 415 228 rotate 0 1 1;
+#X obj 633 227 rotate 1 0 1;
+#X text 426 35 Blue Sphere;
+#X text 641 18 Red Sphere;
+#X obj 633 86 color 1 0 0;
+#X obj 415 272 translateXYZ 2 0 0;
+#X obj 633 274 translateXYZ 1 1 0;
+#X msg 452 417 30;
+#X obj 66 545 loadbang;
+#X obj 415 68 gemhead 60;
+#X obj 415 98 color 0 0 1;
+#X msg 690 338 test 1;
+#X msg 745 339 test 0;
+#X msg 179 113 lighting \$1;
+#X obj 179 93 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, lighting 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X connect 4 0 18 0;
+#X connect 5 0 25 0;
+#X connect 6 0 33 0;
+#X connect 7 0 33 0;
+#X connect 7 0 34 0;
+#X connect 10 0 20 0;
+#X connect 11 0 20 0;
+#X connect 12 0 24 0;
+#X connect 13 0 24 0;
+#X connect 14 0 24 0;
+#X connect 15 0 16 0;
+#X connect 15 0 19 0;
+#X connect 16 0 15 1;
+#X connect 17 0 44 1;
+#X connect 19 0 43 1;
+#X connect 21 0 20 0;
+#X connect 23 0 17 0;
+#X connect 23 0 34 0;
+#X connect 25 0 18 2;
+#X connect 30 0 15 0;
+#X connect 31 0 30 0;
+#X connect 32 0 30 0;
+#X connect 32 0 16 0;
+#X connect 33 0 23 0;
+#X connect 34 0 23 1;
+#X connect 36 0 50 0;
+#X connect 37 0 38 0;
+#X connect 38 0 22 0;
+#X connect 39 0 40 0;
+#X connect 40 0 41 0;
+#X connect 41 0 4 0;
+#X connect 42 0 47 0;
+#X connect 43 0 48 0;
+#X connect 44 0 49 0;
+#X connect 47 0 44 0;
+#X connect 48 0 37 0;
+#X connect 49 0 39 0;
+#X connect 50 0 22 2;
+#X connect 51 0 35 0;
+#X connect 52 0 53 0;
+#X connect 53 0 43 0;
+#X connect 54 0 40 0;
+#X connect 55 0 40 0;
+#X connect 56 0 59 0;
+#X connect 57 0 56 0;
+#X connect 58 0 59 0;
diff --git a/Gem/examples/07.texture/05.newWave.pd b/Gem/examples/07.texture/05.newWave.pd
new file mode 100644
index 0000000..52c631b
--- /dev/null
+++ b/Gem/examples/07.texture/05.newWave.pd
@@ -0,0 +1,201 @@
+#N canvas 110 90 876 486 10;
+#X text 653 313 Inlet 1: gemlist;
+#X obj 209 277 gemhead;
+#X floatatom 622 130 5 0 0 2 size - -;
+#X floatatom 539 84 5 0 0 2 height - -;
+#X floatatom 241 339 5 0 0 0 - - -;
+#X msg 322 5 draw line;
+#X msg 322 25 draw fill;
+#X msg 322 45 draw point;
+#X text 653 188 00..retrigger current action;
+#X text 653 200 01..flat;
+#X text 653 211 02..spike;
+#X text 653 221 03..diagonal wall;
+#X text 652 234 04..sidewall;
+#X text 652 245 05..hole;
+#X text 652 256 06..middleblock;
+#X text 652 267 07..diagonalblock;
+#X text 652 278 08..cornerblock;
+#X text 652 288 09..hill;
+#X obj 718 28 vradio 11 1 0 11 empty empty action -10 -6 0 8 -262144
+-1 -1 0;
+#X text 651 299 10..hill4 (default);
+#X floatatom 274 339 5 0 0 0 - - -;
+#X floatatom 308 339 5 0 0 0 - - -;
+#X floatatom 13 -15 5 0 0 0 - - -;
+#X msg 415 228 force 25 25 30;
+#X msg 539 45 0.06;
+#X obj 539 17 loadbang;
+#X obj 13 3 / 100;
+#X floatatom 173 -15 5 0 0 0 - - -;
+#X obj 173 4 / 100;
+#X obj 401 39 random 50;
+#X obj 444 59 random 50;
+#X obj 401 81 pack 0 0;
+#X obj 401 15 metro 300;
+#X msg 415 273 position 10 10 100;
+#X msg 718 155 mode \$1;
+#X msg 415 250 force 4 2 50;
+#X msg 538 101 height \$1;
+#X floatatom 65 -16 5 0 0 0 - - -;
+#X obj 65 2 / 100;
+#X floatatom 216 -16 5 0 0 0 - - -;
+#X obj 216 3 / 100;
+#X floatatom 114 -17 5 0 0 0 - - -;
+#X obj 114 1 / 100;
+#X floatatom 258 -17 5 0 0 0 - - -;
+#X obj 258 2 / 100;
+#X obj 623 74 loadbang;
+#X msg 23 48 K1 0.05;
+#X msg 13 24 K1 \$1;
+#X msg 179 46 D1 0.1;
+#X msg 173 25 D1 \$1;
+#X msg 65 23 K2 \$1;
+#X msg 114 22 K3 \$1;
+#X msg 75 47 K2 0.05;
+#X msg 124 46 K3 0.05;
+#X msg 216 24 D2 \$1;
+#X msg 222 45 D2 0.1;
+#X msg 258 23 D3 \$1;
+#X obj 13 235 newWave 50;
+#X msg 264 44 D3 0.01;
+#X msg 329 67 width 1;
+#X msg 330 87 width 10;
+#X obj 402 -3 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X msg 87 411 \; pd quit \;;
+#N canvas 0 22 247 188 cpu 0;
+#X obj 30 45 metro 1000;
+#X obj 32 22 loadbang;
+#X obj 33 96 cputime;
+#X obj 30 69 t b b;
+#X obj 34 125 / 10;
+#X obj 33 150 outlet;
+#X connect 0 0 3 0;
+#X connect 1 0 0 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 3 1 2 1;
+#X connect 4 0 5 0;
+#X restore 20 396 pd cpu;
+#X floatatom 20 426 5 0 0 0 - - -;
+#X obj 87 348 gemhead;
+#X obj 87 374 world_light;
+#X obj 209 382 render_trigger;
+#X obj 209 360 rotateXYZ 300 0 0;
+#X obj 311 -18 loadbang;
+#X msg 415 207 force 20 20 30;
+#X msg 623 97 2;
+#X obj 209 317 pix_texture;
+#X obj 209 298 pix_image ../data/fractal.JPG;
+#X msg 400 101 force \$1 \$2 -0.1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 532 385 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 502 402 pd gemwin;
+#X connect 1 0 73 0;
+#X connect 2 0 57 1;
+#X connect 3 0 36 0;
+#X connect 4 0 68 1;
+#X connect 5 0 57 0;
+#X connect 6 0 57 0;
+#X connect 7 0 57 0;
+#X connect 18 0 34 0;
+#X connect 20 0 68 2;
+#X connect 21 0 68 3;
+#X connect 22 0 26 0;
+#X connect 23 0 57 0;
+#X connect 24 0 3 0;
+#X connect 25 0 24 0;
+#X connect 26 0 47 0;
+#X connect 27 0 28 0;
+#X connect 28 0 49 0;
+#X connect 29 0 31 0;
+#X connect 30 0 31 1;
+#X connect 31 0 74 0;
+#X connect 32 0 29 0;
+#X connect 32 0 30 0;
+#X connect 33 0 57 0;
+#X connect 34 0 57 0;
+#X connect 35 0 57 0;
+#X connect 36 0 57 0;
+#X connect 37 0 38 0;
+#X connect 38 0 50 0;
+#X connect 39 0 40 0;
+#X connect 40 0 54 0;
+#X connect 41 0 42 0;
+#X connect 42 0 51 0;
+#X connect 43 0 44 0;
+#X connect 44 0 56 0;
+#X connect 45 0 71 0;
+#X connect 46 0 57 0;
+#X connect 47 0 57 0;
+#X connect 48 0 57 0;
+#X connect 49 0 57 0;
+#X connect 50 0 57 0;
+#X connect 51 0 57 0;
+#X connect 52 0 57 0;
+#X connect 53 0 57 0;
+#X connect 54 0 57 0;
+#X connect 55 0 57 0;
+#X connect 56 0 57 0;
+#X connect 58 0 57 0;
+#X connect 59 0 57 0;
+#X connect 60 0 57 0;
+#X connect 61 0 32 0;
+#X connect 63 0 64 0;
+#X connect 65 0 66 0;
+#X connect 67 0 57 0;
+#X connect 67 2 57 0;
+#X connect 68 0 67 0;
+#X connect 69 0 48 0;
+#X connect 69 0 46 0;
+#X connect 70 0 57 0;
+#X connect 71 0 2 0;
+#X connect 72 0 68 0;
+#X connect 73 0 72 0;
+#X connect 74 0 57 0;
+#X connect 75 0 76 0;
diff --git a/Gem/examples/07.texture/06.ripple.pd b/Gem/examples/07.texture/06.ripple.pd
new file mode 100644
index 0000000..a329550
--- /dev/null
+++ b/Gem/examples/07.texture/06.ripple.pd
@@ -0,0 +1,114 @@
+#N canvas 153 39 582 638 10;
+#X obj 299 39 openpanel;
+#X msg 34 50 dimen 640 480;
+#X obj 174 115 gemhead;
+#X msg 381 41 auto \$1;
+#X obj 384 13 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X floatatom 185 429 5 0 0 0 - - -;
+#X obj 299 11 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 72 92 profile 1;
+#X msg 81 130 profile 0;
+#X msg 384 84 open ../data/anim-1.mov;
+#X msg 299 66 open \$1;
+#X obj 113 429 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 198 445 5 0 0 0 - - -;
+#X floatatom 227 460 5 0 0 0 - - -;
+#X floatatom 214 261 5 0 0 0 - - -;
+#X floatatom 254 261 5 0 0 0 - - -;
+#X floatatom 295 261 5 0 0 0 - - -;
+#X floatatom 242 487 5 0 0 0 - - -;
+#X floatatom 196 306 5 0 0 0 - - -;
+#X floatatom 207 349 4 0 0 0 - - -;
+#X floatatom 240 349 4 0 0 0 - - -;
+#X floatatom 274 349 4 0 0 0 - - -;
+#X obj 174 171 pix_film;
+#X obj 174 324 scale 6;
+#X obj 174 278 translateXYZ 0 0 0;
+#X obj 174 212 pix_texture;
+#X obj 241 172 t f;
+#X msg 384 124 open ../data/alea.mpg;
+#X obj 174 366 rotateXYZ 0 0 0;
+#X obj 174 517 ripple;
+#X msg 384 104 open ../data/homer.avi;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 168 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 185 pd gemwin;
+#X connect 0 0 10 0;
+#X connect 1 0 32 0;
+#X connect 2 0 22 0;
+#X connect 3 0 22 0;
+#X connect 4 0 3 0;
+#X connect 5 0 29 1;
+#X connect 6 0 0 0;
+#X connect 7 0 32 0;
+#X connect 8 0 32 0;
+#X connect 9 0 22 0;
+#X connect 10 0 22 0;
+#X connect 11 0 29 0;
+#X connect 12 0 29 2;
+#X connect 13 0 29 3;
+#X connect 14 0 24 1;
+#X connect 15 0 24 2;
+#X connect 16 0 24 3;
+#X connect 17 0 29 4;
+#X connect 18 0 23 1;
+#X connect 19 0 28 1;
+#X connect 20 0 28 2;
+#X connect 21 0 28 3;
+#X connect 22 0 25 0;
+#X connect 22 2 26 0;
+#X connect 23 0 28 0;
+#X connect 24 0 23 0;
+#X connect 25 0 24 0;
+#X connect 26 0 22 1;
+#X connect 27 0 22 0;
+#X connect 28 0 29 0;
+#X connect 30 0 22 0;
+#X connect 31 0 32 0;
diff --git a/Gem/examples/07.texture/07.feedback.pd b/Gem/examples/07.texture/07.feedback.pd
new file mode 100644
index 0000000..a402cfe
--- /dev/null
+++ b/Gem/examples/07.texture/07.feedback.pd
@@ -0,0 +1,92 @@
+#N canvas 4 50 630 424 10;
+#X msg 320 121 snap;
+#X obj 320 68 gemhead 15;
+#X obj 39 64 gemhead 10;
+#X obj 39 126 scaleXYZ 6 0.1 6;
+#X obj 55 95 hsl 128 15 0.02 1.53 0 0 empty empty empty -2 -6 0 8 -262139
+-1 -1 0 1;
+#X obj 39 259 cube 0.34;
+#X obj 320 260 rotateXYZ;
+#X obj 357 237 hsl 128 15 -34 34 0 0 empty empty empty -2 -6 0 8 -261879
+-1 -1 6350 1;
+#X obj 40 364 light;
+#X obj 40 341 translateXYZ 0 0 4;
+#X obj 320 154 pix_snap2tex 0 0 512 512;
+#X obj 320 300 sphere 3.64 50;
+#X obj 40 318 gemhead 1;
+#X msg 354 216 0;
+#X obj 354 195 loadbang;
+#X obj 125 158 hsl 128 15 0 1 0 1 empty empty R 12 8 1 12 -261689 -1
+-1 12700 1;
+#X obj 125 178 hsl 128 15 0 1 0 1 empty empty G 12 8 1 12 -225271 -1
+-1 12700 1;
+#X obj 125 198 hsl 128 15 0 1 0 1 empty empty B 12 8 1 12 -228992 -1
+-1 12700 1;
+#X obj 39 227 colorRGB 1 1 1;
+#X obj 320 92 trigger bang anything;
+#N canvas 89 204 317 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, dimen 512 512 \, lighting 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 485 338 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 455 355 pd gemwin;
+#X connect 0 0 10 0;
+#X connect 1 0 19 0;
+#X connect 2 0 3 0;
+#X connect 3 0 18 0;
+#X connect 4 0 3 2;
+#X connect 6 0 11 0;
+#X connect 7 0 6 2;
+#X connect 9 0 8 0;
+#X connect 10 0 6 0;
+#X connect 12 0 9 0;
+#X connect 13 0 7 0;
+#X connect 14 0 13 0;
+#X connect 15 0 18 1;
+#X connect 16 0 18 2;
+#X connect 17 0 18 3;
+#X connect 18 0 5 0;
+#X connect 19 0 0 0;
+#X connect 19 1 10 0;
+#X connect 20 0 21 0;
diff --git a/Gem/examples/07.texture/08.MotionBlur.pd b/Gem/examples/07.texture/08.MotionBlur.pd
new file mode 100644
index 0000000..ca5e121
--- /dev/null
+++ b/Gem/examples/07.texture/08.MotionBlur.pd
@@ -0,0 +1,130 @@
+#N canvas 13 0 1023 406 10;
+#X obj 33 260 world_light;
+#X msg 282 164 bang;
+#X obj 282 144 metro 500;
+#X obj 282 126 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 593 113 gemhead -1;
+#X obj 593 234 pix_snap2tex;
+#X msg 638 210 0 0;
+#X msg 684 209 500 500;
+#X obj 638 187 t b b;
+#X obj 593 194 t b a;
+#X obj 593 272 alpha;
+#X floatatom 766 262 5 0 0 0 - - -;
+#X obj 593 340 square 4;
+#X obj 771 114 vsl 15 128 0 1 0 0 empty empty empty 0 -8 0 8 -262144
+-1 -1 0 1;
+#X msg 47 118 frame \$1;
+#X floatatom 47 100 5 0 0 0 - - -;
+#X obj 593 296 colorRGB 1 1 1 0.888;
+#X obj 33 236 gemhead;
+#X obj 638 168 loadbang;
+#N canvas 0 0 749 590 moving 0;
+#X obj 193 81 gemhead;
+#X obj 193 384 translateXYZ;
+#X obj 276 67 t b b;
+#X obj 276 104 random 100;
+#X obj 193 357 colorRGB 1 1 1;
+#X obj 276 39 inlet;
+#X obj 193 411 teapot;
+#X obj 276 135 pack 0 1000;
+#X obj 276 181 / 100;
+#X obj 276 201 * 8;
+#X obj 276 221 - 4;
+#X obj 375 104 random 100;
+#X obj 375 135 pack 0 1000;
+#X obj 375 181 / 100;
+#X obj 375 201 * 8;
+#X obj 375 221 - 4;
+#X obj 276 159 line 50 10;
+#X obj 375 159 line 50 10;
+#X connect 0 0 4 0;
+#X connect 1 0 6 0;
+#X connect 2 0 3 0;
+#X connect 2 1 11 0;
+#X connect 3 0 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 2 0;
+#X connect 7 0 16 0;
+#X connect 8 0 9 0;
+#X connect 8 0 4 1;
+#X connect 9 0 10 0;
+#X connect 10 0 1 1;
+#X connect 11 0 12 0;
+#X connect 12 0 17 0;
+#X connect 13 0 14 0;
+#X connect 13 0 4 2;
+#X connect 14 0 15 0;
+#X connect 15 0 1 2;
+#X connect 16 0 8 0;
+#X connect 17 0 13 0;
+#X restore 282 186 pd moving object;
+#X text 267 31 FullScreen Motion Blur:;
+#N canvas 87 154 414 208 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, frame 100 \, lighting 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 77 143 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 47 160 pd gemwin;
+#X connect 1 0 19 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 5 1;
+#X connect 7 0 5 2;
+#X connect 8 0 6 0;
+#X connect 8 1 7 0;
+#X connect 9 0 5 0;
+#X connect 9 1 5 0;
+#X connect 10 0 16 0;
+#X connect 11 0 16 4;
+#X connect 13 0 11 0;
+#X connect 14 0 22 0;
+#X connect 15 0 14 0;
+#X connect 16 0 12 0;
+#X connect 17 0 0 0;
+#X connect 18 0 8 0;
+#X connect 21 0 22 0;
diff --git a/Gem/examples/07.texture/09.sharedTextures.pd b/Gem/examples/07.texture/09.sharedTextures.pd
new file mode 100644
index 0000000..bd8cb84
--- /dev/null
+++ b/Gem/examples/07.texture/09.sharedTextures.pd
@@ -0,0 +1,79 @@
+#N canvas 180 41 1035 404 10;
+#X floatatom 370 259 0 0 0 0 - - -;
+#X obj 325 122 pix_image ../data/fractal.JPG;
+#X obj 325 155 pix_texture;
+#X obj 325 279 rotate 0 1 1;
+#X obj 325 307 cube;
+#X obj 704 209 pix_texture;
+#X obj 325 237 translateXYZ -2 1 0;
+#X obj 704 283 circle;
+#X obj 704 253 translateXYZ 2 1 0;
+#X obj 325 84 gemhead 10;
+#X obj 704 154 gemhead 30;
+#X obj 570 272 gemhead 20;
+#X obj 570 299 pix_texture;
+#X obj 570 328 pix_coordinate;
+#X obj 570 351 translateXYZ 0 -1 0;
+#X obj 570 381 triangle;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 121 174 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 91 191 pd gemwin;
+#X connect 0 0 3 1;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 2 1 5 1;
+#X connect 3 0 4 0;
+#X connect 5 0 8 0;
+#X connect 6 0 3 0;
+#X connect 8 0 7 0;
+#X connect 9 0 1 0;
+#X connect 10 0 5 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 16 0 17 0;
diff --git a/Gem/examples/07.texture/10.framebuffer.pd b/Gem/examples/07.texture/10.framebuffer.pd
new file mode 100644
index 0000000..7717e47
--- /dev/null
+++ b/Gem/examples/07.texture/10.framebuffer.pd
@@ -0,0 +1,195 @@
+#N canvas 446 42 834 667 10;
+#X obj 202 83 gemhead 20;
+#X obj 491 166 gemhead;
+#X floatatom 532 391 5 0 0 0 - - -;
+#X floatatom 481 392 5 0 0 0 - - -;
+#X obj 581 389 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -6 0 10
+-262144 -1 -1 0 256;
+#X msg 286 97 dim 320 240;
+#X msg 286 117 dim 256 256;
+#X obj 278 634 rotateXYZ;
+#X floatatom 334 617 5 0 0 0 - - -;
+#X floatatom 346 636 5 0 0 0 - - -;
+#X floatatom 295 617 5 0 0 0 - - -;
+#X floatatom 299 443 5 0 0 0 - - -;
+#X floatatom 348 443 5 0 0 0 - - -;
+#X floatatom 250 443 5 0 0 0 - - -;
+#X obj 278 333 separator;
+#X obj -56 319 gemhead 1;
+#X obj -56 339 world_light;
+#X msg 286 137 dim 512 512;
+#X floatatom 507 322 5 0 0 0 - - -;
+#X floatatom 582 333 5 0 0 0 - - -;
+#X msg 289 45 color 0 0 1 0;
+#X msg 286 157 dim 1024 1024;
+#X msg 289 69 color 0 0 0 0;
+#X obj 203 507 rotateXYZ;
+#X floatatom 226 490 5 0 0 0 - - -;
+#X floatatom 269 490 5 0 0 0 - - -;
+#X floatatom 318 496 5 0 0 0 - - -;
+#X msg -21 72 color 0 0 0 0;
+#X obj 278 554 t a b;
+#X msg -33 51 color 0 1 1 0;
+#X msg -12 121 lighting \$1;
+#X obj -12 100 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 554 433 5 0 0 0 - - -;
+#X obj 202 302 t a a;
+#X obj 202 355 color 1 1 1;
+#X obj 203 413 pix_texture;
+#X msg 406 94 mode \$1;
+#X obj 406 67 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 203 467 translateXYZ -0.5 -0.8 -1;
+#X msg 229 374 open data/fractal.JPG;
+#X floatatom 376 507 5 0 0 0 - - -;
+#X msg 289 10 type FLOAT;
+#X obj 460 131 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X floatatom 342 281 5 0 0 0 - - -;
+#X obj 203 527 sphere 0.4;
+#X obj 491 357 rotateXYZ 28 0 200;
+#X obj 491 431 square 2;
+#X obj 491 410 translateXYZ 0 0 1.53;
+#X obj 202 281 translateXYZ 0 0 -4;
+#X obj 278 681 cube 0.57;
+#X obj 278 527 translateXYZ 2 0 -1;
+#X obj 202 135 color 0 1 0;
+#X obj 179 195 cnv 15 400 60 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 202 200 gemframebuffer;
+#X obj 491 233 pix_texture;
+#X obj -56 410 gemhead;
+#X obj -56 459 teapot 0.3;
+#X obj -56 435 translateXYZ -3 3 0;
+#X text -52 726 this example renders a scene (cube and sphere) into
+a framebuffer \, which is then used as a texture onto a square. teapot
+and square live in a "meta"-world in relation to cube and sphere.;
+#X obj 362 575 % 360;
+#X obj 308 575 i;
+#X obj 491 265 t a b;
+#X obj 567 286 + 1;
+#X obj 334 575 + 5;
+#X obj 521 286 i 200;
+#X obj 595 286 % 3600;
+#X obj 582 313 / 10;
+#X text 435 65 <-- click me to change between normalized(0) and rectangle(1)
+textures.;
+#X text 399 717 you need framebuffer support on your gfx-card;
+#X text 395 738 (and its driver!);
+#X obj 202 394 pix_image ../data/fractal.JPG;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore -3 160 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore -33 177 pd gemwin;
+#X connect 0 0 51 0;
+#X connect 1 0 54 0;
+#X connect 2 0 47 2;
+#X connect 3 0 47 1;
+#X connect 4 0 47 3;
+#X connect 5 0 53 0;
+#X connect 6 0 53 0;
+#X connect 7 0 49 0;
+#X connect 8 0 7 2;
+#X connect 9 0 7 3;
+#X connect 10 0 7 1;
+#X connect 11 0 38 2;
+#X connect 12 0 38 3;
+#X connect 13 0 38 1;
+#X connect 14 0 50 0;
+#X connect 15 0 16 0;
+#X connect 17 0 53 0;
+#X connect 18 0 45 1;
+#X connect 19 0 45 3;
+#X connect 20 0 53 0;
+#X connect 21 0 53 0;
+#X connect 22 0 53 0;
+#X connect 23 0 44 0;
+#X connect 24 0 23 1;
+#X connect 25 0 23 2;
+#X connect 26 0 23 3;
+#X connect 27 0 72 0;
+#X connect 28 0 7 0;
+#X connect 28 1 60 0;
+#X connect 29 0 72 0;
+#X connect 30 0 72 0;
+#X connect 31 0 30 0;
+#X connect 32 0 46 1;
+#X connect 33 0 34 0;
+#X connect 33 1 14 0;
+#X connect 34 0 70 0;
+#X connect 35 0 38 0;
+#X connect 36 0 53 0;
+#X connect 37 0 36 0;
+#X connect 38 0 23 0;
+#X connect 39 0 70 0;
+#X connect 40 0 50 3;
+#X connect 41 0 53 0;
+#X connect 42 0 1 0;
+#X connect 43 0 48 3;
+#X connect 45 0 47 0;
+#X connect 47 0 46 0;
+#X connect 48 0 33 0;
+#X connect 50 0 28 0;
+#X connect 51 0 53 0;
+#X connect 53 0 48 0;
+#X connect 53 1 54 1;
+#X connect 54 0 61 0;
+#X connect 55 0 57 0;
+#X connect 57 0 56 0;
+#X connect 59 0 60 1;
+#X connect 60 0 8 0;
+#X connect 60 0 63 0;
+#X connect 61 0 45 0;
+#X connect 61 1 64 0;
+#X connect 62 0 65 0;
+#X connect 63 0 59 0;
+#X connect 64 0 62 0;
+#X connect 64 0 66 0;
+#X connect 65 0 64 1;
+#X connect 66 0 19 0;
+#X connect 70 0 35 0;
+#X connect 71 0 72 0;
diff --git a/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd b/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd
new file mode 100644
index 0000000..69ef470
--- /dev/null
+++ b/Gem/examples/07.texture/11.multiples_gemhead_in_a_framebuffer.pd
@@ -0,0 +1,116 @@
+#N canvas 39 70 764 536 10;
+#X obj 108 279 cnv 15 300 80 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 112 112 cnv 15 300 60 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 116 50 gemhead;
+#X obj 112 440 translateXYZ 1 0 0;
+#X obj 260 443 translateXYZ -1 0 0;
+#X obj 260 483 circle;
+#X obj 116 239 rotateXYZ;
+#X floatatom 156 222 5 0 0 0 - - -;
+#X floatatom 194 423 5 0 0 0 - - -;
+#X floatatom 346 426 5 0 0 0 - - -;
+#X obj 322 50 gemhead;
+#X floatatom 342 71 5 0 0 0 - - -;
+#X obj 116 114 gemframebuffer;
+#X obj 112 483 triangle;
+#X obj 322 147 pix_texture;
+#X obj 116 197 translateXYZ 0 0 -4;
+#X obj 260 463 color 1 0 0;
+#X obj 322 89 rotateXYZ;
+#X obj 322 195 square 3;
+#X obj 148 282 s gemfbhead_trigger1;
+#X obj 116 259 t b b;
+#X obj 112 336 r gemfbhead_trigger1;
+#X obj 112 420 gemhead;
+#X msg 44 389 0;
+#X obj 44 366 loadbang;
+#X obj 260 423 gemhead;
+#X obj 260 336 r gemfbhead_trigger2;
+#X obj 116 306 s gemfbhead_trigger2;
+#X text 203 221 <- rotate all the render chain;
+#X text 201 238 (it change even after a new gemhead \, this is not
+very intuitive);
+#X text 323 283 <- continue the render chain. The gemhead did not start
+a new gemchain \, because it is banged during a frambuffer rendering
+;
+#X text 113 10 This example show how to draw multiples gemhead in a
+single framebuffer;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 625 90 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 595 107 pd gemwin;
+#X msg 595 63 color \$1 \$1 \$1;
+#X obj 595 44 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+0.5;
+#X connect 2 0 12 0;
+#X connect 3 0 13 0;
+#X connect 4 0 16 0;
+#X connect 6 0 20 0;
+#X connect 7 0 6 2;
+#X connect 8 0 3 2;
+#X connect 9 0 4 2;
+#X connect 10 0 17 0;
+#X connect 11 0 17 1;
+#X connect 12 0 15 0;
+#X connect 12 1 14 1;
+#X connect 14 0 18 0;
+#X connect 15 0 6 0;
+#X connect 16 0 5 0;
+#X connect 17 0 14 0;
+#X connect 20 0 27 0;
+#X connect 20 1 19 0;
+#X connect 21 0 22 0;
+#X connect 22 0 3 0;
+#X connect 23 0 22 0;
+#X connect 23 0 25 0;
+#X connect 24 0 23 0;
+#X connect 25 0 4 0;
+#X connect 26 0 25 0;
+#X connect 32 0 33 0;
+#X connect 34 0 33 0;
+#X connect 35 0 34 0;
diff --git a/Gem/examples/08.io/01.Mouse.pd b/Gem/examples/08.io/01.Mouse.pd
new file mode 100644
index 0000000..fcf7d93
--- /dev/null
+++ b/Gem/examples/08.io/01.Mouse.pd
@@ -0,0 +1,84 @@
+#N canvas 396 160 600 500 10;
+#X text 303 95 left button;
+#X obj 302 193 spigot;
+#X floatatom 391 324 0 0 0 0 - - -;
+#X obj 193 275 gemhead;
+#X floatatom 302 322 0 0 0 0 - - -;
+#X obj 193 401 square;
+#X text 109 29 this demonstrates how to use gemmouse;
+#X obj 193 304 color 1 0 0;
+#X obj 193 358 translateXYZ;
+#X obj 302 262 - 1;
+#X obj 302 294 * 4;
+#X obj 391 189 spigot;
+#X text 272 66 the outputs of gemmouse are:;
+#X text 191 94 x pos;
+#X text 247 94 y pos;
+#X text 396 95 middle button;
+#X text 499 96 right button;
+#X obj 391 267 - 1;
+#X obj 391 296 * -4;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 64 238 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 34 255 pd gemwin;
+#X obj 338 143 gemmouse 2 2;
+#X connect 1 0 9 0;
+#X connect 2 0 8 2;
+#X connect 3 0 7 0;
+#X connect 4 0 8 1;
+#X connect 7 0 8 0;
+#X connect 8 0 5 0;
+#X connect 9 0 10 0;
+#X connect 10 0 4 0;
+#X connect 11 0 17 0;
+#X connect 17 0 18 0;
+#X connect 18 0 2 0;
+#X connect 19 0 20 0;
+#X connect 21 0 1 0;
+#X connect 21 1 11 0;
+#X connect 21 2 11 1;
+#X connect 21 2 1 1;
diff --git a/Gem/examples/08.io/02.Tablet.pd b/Gem/examples/08.io/02.Tablet.pd
new file mode 100644
index 0000000..c633ee7
--- /dev/null
+++ b/Gem/examples/08.io/02.Tablet.pd
@@ -0,0 +1,124 @@
+#N canvas 308 107 688 553 10;
+#X msg 197 266 bang;
+#X obj 375 326 spigot;
+#X floatatom 448 437 0 0 0;
+#X obj 12 444 gemwin;
+#X msg 26 150 create;
+#X obj 197 299 gemhead;
+#X msg 38 179 destroy;
+#X msg 63 227 1;
+#X msg 70 251 0;
+#X floatatom 375 438 0 0 0;
+#X obj 197 358 translateXYZ;
+#X obj 375 382 - 1;
+#X obj 375 410 * 4;
+#X obj 448 321 spigot;
+#X text 120 71 x pos;
+#X text 171 73 y pos;
+#X obj 400 103 gemtablet;
+#X msg 61 321 bang;
+#X obj 197 439 alpha;
+#X text 114 55 the outputs of gemtablet are:;
+#X text 229 75 pressure;
+#X text 298 76 azimuth;
+#X text 364 75 altitude;
+#X text 439 75 twist;
+#X text 114 26 Be aware that your tablet might not have all of the
+rotation variables.;
+#X obj 266 160 / 90;
+#X obj 197 329 colorRGB 1 0 0;
+#X obj 375 354 / 200;
+#X obj 448 352 / 200;
+#X obj 448 381 - 1;
+#X obj 448 409 * -4;
+#X text 117 7 this demonstrates how to use gemtablet;
+#X obj 400 265 s xPos;
+#X obj 409 238 s yPos;
+#X obj 375 295 r xPos;
+#X obj 447 294 r yPos;
+#X obj 458 139 s lBut;
+#X obj 501 290 r lBut;
+#X obj 419 213 s press;
+#X obj 234 492 r press;
+#X obj 290 280 r press;
+#X obj 429 187 s azimuth;
+#X obj 438 162 s altitude;
+#X obj 236 385 r azimuth;
+#X obj 266 132 r altitude;
+#X text 45 298 clear screen;
+#X obj 197 408 rotate 0 0 1;
+#X obj 197 518 square;
+#X obj 197 471 scaleXYZ 1 0.05 1;
+#X obj 219 190 t b f;
+#X obj 220 241 - 1;
+#X msg 219 215 1;
+#X obj 290 303 / 6;
+#X text 527 74 middle;
+#X text 488 75 left;
+#X text 581 74 right;
+#X obj 514 140 s mBut;
+#X obj 570 139 s rBut;
+#X obj 553 289 r mBut;
+#X obj 605 289 r rBut;
+#N canvas 421 80 290 179 Gem.init 0;
+#X obj 83 30 loadbang;
+#X msg 161 76 reset;
+#X obj 45 146 outlet;
+#X obj 88 51 t b b;
+#X msg 45 75 dimen 400 400;
+#X msg 90 114 buffer 1;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 3 0 5 0;
+#X connect 3 1 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X restore 61 417 pd Gem.init;
+#X connect 0 0 5 0;
+#X connect 1 0 0 0;
+#X connect 1 0 27 0;
+#X connect 2 0 10 2;
+#X connect 4 0 3 0;
+#X connect 5 0 26 0;
+#X connect 6 0 3 0;
+#X connect 7 0 3 0;
+#X connect 8 0 3 0;
+#X connect 9 0 10 1;
+#X connect 10 0 46 0;
+#X connect 11 0 12 0;
+#X connect 12 0 9 0;
+#X connect 13 0 28 0;
+#X connect 16 0 32 0;
+#X connect 16 1 33 0;
+#X connect 16 2 38 0;
+#X connect 16 3 41 0;
+#X connect 16 4 42 0;
+#X connect 16 6 36 0;
+#X connect 16 7 56 0;
+#X connect 16 8 57 0;
+#X connect 17 0 3 0;
+#X connect 18 0 48 0;
+#X connect 25 0 49 0;
+#X connect 25 0 26 3;
+#X connect 26 0 10 0;
+#X connect 27 0 11 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 2 0;
+#X connect 34 0 1 0;
+#X connect 35 0 13 0;
+#X connect 37 0 13 1;
+#X connect 37 0 1 1;
+#X connect 39 0 47 1;
+#X connect 40 0 52 0;
+#X connect 43 0 46 1;
+#X connect 44 0 25 0;
+#X connect 46 0 18 0;
+#X connect 48 0 47 0;
+#X connect 49 0 51 0;
+#X connect 49 1 50 1;
+#X connect 50 0 26 1;
+#X connect 51 0 50 0;
+#X connect 52 0 26 4;
+#X connect 60 0 3 0;
diff --git a/Gem/examples/08.io/03.Orb.pd b/Gem/examples/08.io/03.Orb.pd
new file mode 100644
index 0000000..6e50d58
--- /dev/null
+++ b/Gem/examples/08.io/03.Orb.pd
@@ -0,0 +1,51 @@
+#N canvas 396 160 600 500 10;
+#X text 52 292 x pos;
+#X text 94 292 y pos;
+#X obj 234 146 gemorb 2;
+#X floatatom 82 267 0 0 0;
+#X floatatom 117 267 0 0 0;
+#X floatatom 152 267 0 0 0;
+#X floatatom 202 271 0 0 0;
+#X floatatom 237 271 0 0 0;
+#X floatatom 272 271 0 0 0;
+#X text 133 90 the outputs of gemorb are:;
+#X text 134 292 z pos;
+#X text 197 293 x rot;
+#X text 239 293 y rot;
+#X text 279 293 z rot;
+#X obj 91 230 unpack 0 0 0;
+#X obj 204 230 unpack 0 0 0;
+#X floatatom 333 270 0 0 0;
+#X floatatom 368 270 0 0 0;
+#X floatatom 403 270 0 0 0;
+#X obj 385 231 unpack 0 0 0 0 0 0;
+#X floatatom 448 271 0 0 0;
+#X floatatom 483 271 0 0 0;
+#X floatatom 518 271 0 0 0;
+#X text 133 111 position;
+#X text 224 110 rotation;
+#X text 317 109 button status;
+#X text 340 290 a;
+#X text 377 293 b;
+#X text 411 290 c;
+#X text 457 293 d;
+#X text 491 291 e;
+#X text 529 295 f;
+#X text 94 56 The argument should be the serial port number of the
+orb;
+#X text 255 17 gemorb;
+#X connect 2 0 14 0;
+#X connect 2 1 15 0;
+#X connect 2 2 19 0;
+#X connect 14 0 3 0;
+#X connect 14 1 4 0;
+#X connect 14 2 5 0;
+#X connect 15 0 6 0;
+#X connect 15 1 7 0;
+#X connect 15 2 8 0;
+#X connect 19 0 16 0;
+#X connect 19 1 17 0;
+#X connect 19 2 18 0;
+#X connect 19 3 20 0;
+#X connect 19 4 21 0;
+#X connect 19 5 22 0;
diff --git a/Gem/examples/08.io/04.UseOrb.pd b/Gem/examples/08.io/04.UseOrb.pd
new file mode 100644
index 0000000..cecdfa4
--- /dev/null
+++ b/Gem/examples/08.io/04.UseOrb.pd
@@ -0,0 +1,86 @@
+#N canvas 396 160 600 366 10;
+#X obj 41 324 gemwin;
+#X msg 70 111 create;
+#X obj 223 109 gemhead;
+#X msg 76 138 destroy;
+#X msg 96 184 1;
+#X msg 96 208 0;
+#X obj 223 260 square;
+#X text 109 29 this demonstrates how to create a red square;
+#X msg 467 228 draw line;
+#X obj 338 68 gemorb 2;
+#X obj 223 227 rotateXYZ;
+#X obj 367 109 unpack 0 0 0;
+#X obj 223 195 color;
+#X obj 467 158 unpack 0 0 0;
+#X msg 506 208 draw fill;
+#X obj 467 184 sel 1;
+#X obj 506 184 sel 1;
+#N canvas 91 174 290 179 Gem.init 0;
+#X obj 83 30 loadbang;
+#X msg 161 76 reset;
+#X obj 45 107 outlet;
+#X msg 45 75 dimen 300 300;
+#X obj 88 51 t b b;
+#X connect 0 0 4 0;
+#X connect 1 0 2 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 4 1 1 0;
+#X restore 78 297 pd Gem.init;
+#X obj 367 136 * 0.25;
+#X obj 393 156 * 0.25;
+#X obj 411 179 * 0.25;
+#N canvas 0 0 450 300 process 0;
+#X obj 185 63 unpack 0 0 0;
+#X obj 185 199 pack 0 0 0;
+#X obj 185 107 / 500;
+#X obj 185 127 abs;
+#X obj 185 147 + 0.1;
+#X obj 235 107 / 500;
+#X obj 235 127 abs;
+#X obj 235 147 + 0.1;
+#X obj 285 107 / 500;
+#X obj 285 127 abs;
+#X obj 285 147 + 0.1;
+#X obj 185 226 outlet;
+#X obj 185 36 inlet;
+#X connect 0 0 2 0;
+#X connect 0 1 5 0;
+#X connect 0 2 8 0;
+#X connect 1 0 11 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 1 1;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 10 0 1 2;
+#X connect 12 0 0 0;
+#X restore 338 89 pd process;
+#X connect 1 0 0 0;
+#X connect 2 0 12 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 5 0 0 0;
+#X connect 8 0 6 0;
+#X connect 9 0 21 0;
+#X connect 9 1 11 0;
+#X connect 9 2 13 0;
+#X connect 10 0 6 0;
+#X connect 11 0 18 0;
+#X connect 11 1 19 0;
+#X connect 11 2 20 0;
+#X connect 12 0 10 0;
+#X connect 13 0 15 0;
+#X connect 13 1 16 0;
+#X connect 14 0 6 0;
+#X connect 15 0 8 0;
+#X connect 16 0 14 0;
+#X connect 17 0 0 0;
+#X connect 18 0 10 1;
+#X connect 19 0 10 2;
+#X connect 20 0 10 3;
+#X connect 21 0 12 1;
diff --git a/Gem/examples/09.openGL/01.primQuad.pd b/Gem/examples/09.openGL/01.primQuad.pd
new file mode 100644
index 0000000..da187b2
--- /dev/null
+++ b/Gem/examples/09.openGL/01.primQuad.pd
@@ -0,0 +1,107 @@
+#N canvas 50 20 769 629 10;
+#X obj 469 17 gemhead;
+#X obj 468 504 GEMglEnd;
+#X obj 469 233 GEMglColor4f 1 0 0 0;
+#X obj 469 254 GEMglVertex3f -1 0 0;
+#X obj 469 366 GEMglColor3f 0 1 0;
+#X obj 468 387 GEMglVertex3f 1 0 0;
+#X obj 469 307 GEMglColor3f 0 0 1;
+#X obj 469 330 GEMglVertex3f 0 -1 0;
+#X floatatom 502 45 5 0 0 0 - - -;
+#X obj 469 77 GEMglRotatef 0 1 1 1;
+#X obj 605 127 GLdefine GL_SMOOTH;
+#X obj 605 105 loadbang;
+#X obj 605 147 loadbang;
+#X obj 605 169 GLdefine GL_POLYGON;
+#X obj 469 187 GEMglBegin;
+#X obj 469 145 GEMglShadeModel;
+#X obj 621 487 loadbang;
+#X obj 468 527 GEMglShadeModel;
+#X obj 621 509 GLdefine GL_FLAT;
+#X text 52 17 this is an example how to use Gem as an openGL-wrapper:
+;
+#X text 47 79 you can use "any" openGL-command (like "glBegin") as
+a Gem-object with a prepended "GEM" (like [GEMglBegin]);
+#X text 32 378 to make use of GL-constants (like "GL_TRIANGLE") \,
+use the object [GLdefine] \, that maps symbols to their corresponding
+values.;
+#X obj 468 436 GEMglColor3fv 1 1 0;
+#X obj 468 459 GEMglVertex3fv 0 1 0;
+#X msg 613 413 1 0 1;
+#X msg 655 413 1 1 0;
+#X floatatom 650 260 3 0 100 0 - - -;
+#X obj 650 281 * 0.01;
+#X msg 672 103 bang;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 104 170 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 74 187 pd gemwin;
+#X connect 0 0 9 0;
+#X connect 1 0 17 0;
+#X connect 2 0 3 0;
+#X connect 3 0 6 0;
+#X connect 4 0 5 0;
+#X connect 5 0 22 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 8 0 9 1;
+#X connect 9 0 15 0;
+#X connect 10 0 15 1;
+#X connect 11 0 10 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 1;
+#X connect 14 0 2 0;
+#X connect 15 0 14 0;
+#X connect 16 0 18 0;
+#X connect 18 0 17 1;
+#X connect 22 0 23 0;
+#X connect 23 0 1 0;
+#X connect 24 0 22 1;
+#X connect 25 0 22 1;
+#X connect 26 0 27 0;
+#X connect 27 0 6 2;
+#X connect 28 0 10 0;
+#X connect 29 0 30 0;
diff --git a/Gem/examples/09.openGL/02.displayList.pd b/Gem/examples/09.openGL/02.displayList.pd
new file mode 100644
index 0000000..d6ec2e6
--- /dev/null
+++ b/Gem/examples/09.openGL/02.displayList.pd
@@ -0,0 +1,185 @@
+#N canvas 76 58 1137 553 10;
+#X obj 366 251 GEMglGenLists 1;
+#X obj 336 418 GEMglNewList;
+#X obj 147 432 GEMglCallList;
+#N canvas 0 0 450 300 once 0;
+#X obj 91 62 inlet;
+#X obj 91 266 outlet;
+#X obj 91 150 spigot 1;
+#X obj 91 175 t a b;
+#X msg 121 197 0;
+#X obj 298 57 inlet open;
+#X obj 298 92 t b;
+#X msg 142 128 1;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 3 1 4 0;
+#X connect 4 0 2 1;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 2 1;
+#X restore 366 229 pd once;
+#N canvas 0 0 450 300 once 0;
+#X obj 91 62 inlet;
+#X obj 91 266 outlet;
+#X obj 91 150 spigot 1;
+#X obj 91 175 t a b;
+#X msg 121 197 0;
+#X obj 298 57 inlet open;
+#X obj 298 92 t b;
+#X msg 142 128 1;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 3 1 4 0;
+#X connect 4 0 2 1;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 2 1;
+#X restore 336 392 pd once;
+#X obj 549 281 t b f;
+#X obj 415 374 loadbang;
+#X obj 415 393 GLdefine GL_COMPILE;
+#X msg 417 199 bang;
+#X obj 336 508 GEMglEndList;
+#X obj 336 445 t a a;
+#X obj 366 466 separator;
+#X obj 336 173 gemhead 1;
+#X obj 336 198 t a a;
+#X obj 466 271 t f b;
+#X obj 345 298 t f f;
+#X text 26 21 this is an example of how to use Gem's openGL-wrapper-objects
+to speed up things;
+#X obj 147 248 gemhead;
+#X obj 147 311 translateXYZ;
+#X obj 147 364 rotateXYZ;
+#X floatatom 549 236 5 -2 2 2 pos - -;
+#X floatatom 199 282 5 -4 4 0 - - -;
+#X floatatom 185 339 5 0 0 0 - - -;
+#X text 346 25 1 generate a displaylist with [GEMglGenLists];
+#X text 376 38 you should do this only once;
+#X text 346 65 2 compile what is between [GEMglNewList] and [GEMglEndList]
+;
+#X text 377 82 you should do this \, whenever a parameter of the display-list
+has changed;
+#X text 346 125 3 call the displaylist with [GEMglCallList];
+#N canvas 0 0 450 300 weird 0;
+#X obj 37 9 inlet gemlist;
+#X obj 37 125 cylinder;
+#X obj 190 30 inlet dist;
+#X obj 360 30 inlet tearot;
+#X obj 67 204 rotate 0 0 1 0;
+#X obj 67 231 teapot 0.2;
+#X obj 67 173 translate 1 0 0 2;
+#X obj 67 144 color 1 0 0;
+#X obj 37 103 color 1 1 1 0.5;
+#X obj 37 81 alpha;
+#X obj 37 34 t a a;
+#X obj 67 56 separator;
+#X connect 0 0 10 0;
+#X connect 2 0 6 1;
+#X connect 3 0 4 1;
+#X connect 4 0 5 0;
+#X connect 6 0 4 0;
+#X connect 7 0 6 0;
+#X connect 8 0 1 0;
+#X connect 9 0 8 0;
+#X connect 10 0 9 0;
+#X connect 10 1 11 0;
+#X connect 11 0 7 0;
+#X restore 366 487 pd weird thing;
+#X msg 496 318 bang;
+#X floatatom 660 269 5 0 0 2 rot - -;
+#X text 535 320 recompile the display-list;
+#X obj 147 400 spigot;
+#X obj 249 365 t b f;
+#X msg 202 400 1;
+#X text 461 190 CLICK ME to generate the display-list \, once the rendering
+is turned on;
+#X text 598 231 when you change this \, the display-list will be recompiled
+;
+#X text 706 258 when you change this \, the display-list will NOT be
+recompiled. You have to do that by hand!;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 119 99 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 89 116 pd gemwin;
+#X connect 0 1 14 0;
+#X connect 1 0 10 0;
+#X connect 3 0 0 0;
+#X connect 4 0 1 0;
+#X connect 5 0 29 0;
+#X connect 5 1 28 1;
+#X connect 6 0 7 0;
+#X connect 7 0 1 2;
+#X connect 8 0 3 1;
+#X connect 10 0 9 0;
+#X connect 10 1 11 0;
+#X connect 11 0 28 0;
+#X connect 12 0 13 0;
+#X connect 13 0 4 0;
+#X connect 13 1 3 0;
+#X connect 14 0 15 0;
+#X connect 14 1 29 0;
+#X connect 15 0 33 0;
+#X connect 15 1 1 1;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 32 0;
+#X connect 20 0 5 0;
+#X connect 21 0 18 1;
+#X connect 21 0 18 2;
+#X connect 22 0 19 1;
+#X connect 22 0 19 2;
+#X connect 22 0 19 3;
+#X connect 29 0 4 1;
+#X connect 30 0 28 2;
+#X connect 32 0 2 0;
+#X connect 33 0 34 0;
+#X connect 33 1 2 1;
+#X connect 34 0 32 1;
+#X connect 38 0 39 0;
diff --git a/Gem/examples/09.openGL/03.stencilBuffer.pd b/Gem/examples/09.openGL/03.stencilBuffer.pd
new file mode 100644
index 0000000..44f1e61
--- /dev/null
+++ b/Gem/examples/09.openGL/03.stencilBuffer.pd
@@ -0,0 +1,251 @@
+#N canvas 431 30 849 872 10;
+#X obj 39 330 GEMglEnable;
+#X floatatom 125 332 5 0 0 0 - - -;
+#X obj 111 282 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 111 305 GLdefine GL_STENCIL_TEST;
+#X obj 129 280 loadbang;
+#X obj 104 382 GLdefine GL_STENCIL_BUFFER_BIT;
+#X obj 166 361 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X floatatom 119 407 5 0 0 0 - - -;
+#X obj 104 359 loadbang;
+#X obj 39 249 GEMglClearStencil 0;
+#X obj 39 407 GEMglClear;
+#X obj 39 33 gemhead 45;
+#X obj 39 506 GEMglStencilFunc;
+#X msg 146 480 1;
+#X obj 75 436 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 74 459 GLdefine GL_ALWAYS;
+#X obj 96 436 loadbang;
+#X floatatom 100 480 5 0 0 0 - - -;
+#X obj 39 586 GEMglStencilOp;
+#X floatatom 156 581 5 0 0 0 - - -;
+#X obj 70 486 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 70 552 GLdefine GL_REPLACE;
+#X obj 95 530 loadbang;
+#X obj 239 743 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 170 742 loadbang;
+#X obj 39 810 GEMglClear;
+#X floatatom 156 812 5 0 0 0 - - -;
+#X obj 145 788 GLdefine GL_DEPTH_BUFFER_BIT;
+#X obj 126 743 t b b;
+#X obj 490 287 GEMglStencilFunc;
+#X msg 597 263 1;
+#X obj 525 220 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 546 218 loadbang;
+#X floatatom 535 264 5 0 0 0 - - -;
+#X obj 525 241 GLdefine GL_NOTEQUAL;
+#X obj 490 396 color 1 0 0;
+#X obj 490 659 GEMglStencilFunc;
+#X msg 597 634 1;
+#X obj 525 594 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 547 592 loadbang;
+#X floatatom 536 638 5 0 0 0 - - -;
+#X obj 490 709 rotateXYZ 0 0 45;
+#X obj 525 615 GLdefine GL_EQUAL;
+#X obj 490 685 color 1 1 0;
+#X obj 126 766 GLdefine GL_COLOR_BUFFER_BIT;
+#X obj 490 365 GEMglStencilOp;
+#X floatatom 601 364 5 0 0 0 - - -;
+#X obj 521 310 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 544 307 loadbang;
+#X obj 521 331 GLdefine GL_KEEP;
+#X floatatom 58 144 5 0 0 0 - - -;
+#X floatatom 97 144 5 0 0 0 - - -;
+#X obj 39 187 colorRGB 0 0 1;
+#X obj 126 810 |;
+#X floatatom 587 830 5 0 0 0 - - -;
+#X obj 569 782 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 569 805 GLdefine GL_STENCIL_TEST;
+#X obj 587 780 loadbang;
+#X obj 490 830 GEMglDisable;
+#X text 67 212 allow \, clear and configure stencil buffer;
+#X obj 39 695 circle 1.5;
+#X text 131 685 draw in all buffer;
+#X text 104 840 clear color and depth buffer;
+#X text 488 189 draw where the stencil buffer is not 1;
+#X obj 490 423 square 3;
+#X text 522 565 draw where the stencil buffer is 1;
+#X obj 529 21 gemhead 10;
+#X floatatom 562 41 5 0 0 0 - - -;
+#X floatatom 602 41 5 0 0 0 - - -;
+#X floatatom 642 41 5 0 0 0 - - -;
+#X obj 529 87 world_light;
+#X obj 529 62 rotateXYZ 0 0 0;
+#X obj 39 167 rotateXYZ;
+#X text 151 144 <- play with this.;
+#X text 238 858 (c) Cyrille Henry 2006;
+#X obj 39 56 t a b;
+#X obj 74 78 i;
+#X obj 122 56 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X obj 103 78 + 0;
+#X obj 74 123 t f f;
+#X obj 74 100 spigot;
+#X obj 104 673 teapot 1.5;
+#X obj 39 657 spigot;
+#X obj 104 654 spigot;
+#X obj 79 610 loadbang;
+#X obj 147 632 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 82 634 == 0;
+#X msg 147 611 0;
+#X obj 131 77 % 360;
+#X obj 490 754 sphere 1.2 25;
+#X obj 36 6 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, lighting 1;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 372 38 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 342 55 pd gemwin;
+#X connect 0 0 10 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 3 0 0 1;
+#X connect 4 0 3 0;
+#X connect 5 0 7 0;
+#X connect 5 0 10 1;
+#X connect 6 0 5 0;
+#X connect 8 0 5 0;
+#X connect 9 0 0 0;
+#X connect 10 0 12 0;
+#X connect 11 0 75 0;
+#X connect 12 0 18 0;
+#X connect 13 0 12 3;
+#X connect 13 0 12 2;
+#X connect 14 0 15 0;
+#X connect 14 0 13 0;
+#X connect 15 0 12 1;
+#X connect 15 0 17 0;
+#X connect 16 0 13 0;
+#X connect 16 0 15 0;
+#X connect 18 0 82 0;
+#X connect 18 0 83 0;
+#X connect 20 0 21 0;
+#X connect 21 0 19 0;
+#X connect 21 0 18 1;
+#X connect 21 0 18 2;
+#X connect 21 0 18 3;
+#X connect 22 0 20 0;
+#X connect 23 0 28 0;
+#X connect 24 0 28 0;
+#X connect 25 0 29 0;
+#X connect 27 0 53 1;
+#X connect 28 0 44 0;
+#X connect 28 1 27 0;
+#X connect 29 0 45 0;
+#X connect 30 0 29 3;
+#X connect 30 0 29 2;
+#X connect 31 0 34 0;
+#X connect 32 0 30 0;
+#X connect 32 0 34 0;
+#X connect 34 0 29 1;
+#X connect 34 0 33 0;
+#X connect 35 0 64 0;
+#X connect 36 0 43 0;
+#X connect 37 0 36 3;
+#X connect 37 0 36 2;
+#X connect 38 0 42 0;
+#X connect 39 0 37 0;
+#X connect 39 0 42 0;
+#X connect 41 0 89 0;
+#X connect 42 0 36 1;
+#X connect 42 0 40 0;
+#X connect 43 0 41 0;
+#X connect 44 0 53 0;
+#X connect 45 0 35 0;
+#X connect 47 0 49 0;
+#X connect 48 0 47 0;
+#X connect 49 0 46 0;
+#X connect 49 0 45 1;
+#X connect 49 0 45 2;
+#X connect 49 0 45 3;
+#X connect 50 0 72 1;
+#X connect 51 0 72 2;
+#X connect 52 0 9 0;
+#X connect 53 0 26 0;
+#X connect 53 0 25 1;
+#X connect 55 0 56 0;
+#X connect 56 0 54 0;
+#X connect 56 0 58 1;
+#X connect 57 0 56 0;
+#X connect 60 0 25 0;
+#X connect 64 0 36 0;
+#X connect 66 0 71 0;
+#X connect 67 0 71 1;
+#X connect 68 0 71 2;
+#X connect 69 0 71 3;
+#X connect 71 0 70 0;
+#X connect 72 0 52 0;
+#X connect 75 0 72 0;
+#X connect 75 1 76 0;
+#X connect 76 0 78 0;
+#X connect 76 0 80 0;
+#X connect 77 0 78 1;
+#X connect 77 0 80 1;
+#X connect 78 0 88 0;
+#X connect 79 0 50 0;
+#X connect 79 1 51 0;
+#X connect 80 0 79 0;
+#X connect 81 0 25 0;
+#X connect 82 0 60 0;
+#X connect 83 0 81 0;
+#X connect 84 0 87 0;
+#X connect 85 0 83 1;
+#X connect 85 0 86 0;
+#X connect 86 0 82 1;
+#X connect 87 0 85 0;
+#X connect 88 0 76 1;
+#X connect 89 0 58 0;
+#X connect 90 0 11 0;
+#X connect 91 0 92 0;
diff --git a/Gem/examples/09.openGL/04.clearZ.pd b/Gem/examples/09.openGL/04.clearZ.pd
new file mode 100644
index 0000000..e4947ff
--- /dev/null
+++ b/Gem/examples/09.openGL/04.clearZ.pd
@@ -0,0 +1,27 @@
+#N canvas 0 0 710 401 10;
+#X obj 111 162 loadbang;
+#X obj 44 209 GEMglClear;
+#X obj 111 186 GLdefine GL_DEPTH_BUFFER_BIT;
+#X obj 173 164 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 44 75 gemhead;
+#X obj 44 255 translateXYZ 0 0 -2;
+#X obj 339 129 gemwin;
+#X msg 352 101 create \, 1;
+#X obj 44 281 color 1 0 0;
+#X obj 44 126 circle 1;
+#X obj 44 310 circle 1;
+#X text 206 11 Clear Depth Buffer;
+#X text 205 352 this is related to the depth object that turn off depth
+buffer test \, but not quite the same...;
+#X text 176 213 <- clear Depth buffer \, so that you can draw anything
+even if it is behind something else;
+#X connect 0 0 2 0;
+#X connect 1 0 5 0;
+#X connect 2 0 1 1;
+#X connect 3 0 2 0;
+#X connect 4 0 9 0;
+#X connect 5 0 8 0;
+#X connect 7 0 6 0;
+#X connect 8 0 10 0;
+#X connect 9 0 1 0;
diff --git a/Gem/examples/09.openGL/05.load_identity_matrix.pd b/Gem/examples/09.openGL/05.load_identity_matrix.pd
new file mode 100644
index 0000000..2db138a
--- /dev/null
+++ b/Gem/examples/09.openGL/05.load_identity_matrix.pd
@@ -0,0 +1,74 @@
+#N canvas 0 0 784 537 10;
+#X obj 64 47 gemhead;
+#X obj 96 94 gemlist_info;
+#X floatatom 177 138 5 0 0 0 - - -;
+#X floatatom 217 138 5 0 0 0 - - -;
+#X floatatom 258 138 5 0 0 0 - - -;
+#X obj 177 115 unpack f f f;
+#X text 185 97 position;
+#X obj 64 71 t a a;
+#X obj 64 328 GEMglLoadIdentity;
+#X obj 64 204 translateXYZ 2 1 3;
+#X obj 96 254 gemlist_info;
+#X floatatom 177 298 5 0 0 0 - - -;
+#X floatatom 217 298 5 0 0 0 - - -;
+#X floatatom 258 298 5 0 0 0 - - -;
+#X obj 177 275 unpack f f f;
+#X text 185 257 position;
+#X obj 64 231 t a a;
+#X obj 96 384 gemlist_info;
+#X floatatom 177 428 5 0 0 0 - - -;
+#X floatatom 217 428 5 0 0 0 - - -;
+#X floatatom 258 428 5 0 0 0 - - -;
+#X obj 177 405 unpack f f f;
+#X text 185 387 position;
+#X obj 64 361 t a a;
+#X obj 64 532 circle;
+#X floatatom 105 179 5 0 0 0 - - -;
+#X obj 391 101 gemwin;
+#X msg 400 78 create \, 1;
+#X obj 64 457 translateXYZ 0 0 -4;
+#X obj 96 504 gemlist_info;
+#X floatatom 177 548 5 0 0 0 - - -;
+#X floatatom 217 548 5 0 0 0 - - -;
+#X floatatom 258 548 5 0 0 0 - - -;
+#X obj 177 525 unpack f f f;
+#X text 185 507 position;
+#X obj 64 481 t a a;
+#X text 272 197 <- this translation does not affect the circle \, because
+of the "load identity" object that resets the transformation;
+#X text 209 333 <- this object reset the gemlist sent by the gemhead.
+;
+#X text 211 457 <- move the object regarding the camera position (this
+is normally done automatically by the gemwin \, but since we have reset
+the transformation matrix we have to do it ourselves...);
+#X connect 0 0 7 0;
+#X connect 1 4 5 0;
+#X connect 5 0 2 0;
+#X connect 5 1 3 0;
+#X connect 5 2 4 0;
+#X connect 7 0 9 0;
+#X connect 7 1 1 0;
+#X connect 8 0 23 0;
+#X connect 9 0 16 0;
+#X connect 10 4 14 0;
+#X connect 14 0 11 0;
+#X connect 14 1 12 0;
+#X connect 14 2 13 0;
+#X connect 16 0 8 0;
+#X connect 16 1 10 0;
+#X connect 17 4 21 0;
+#X connect 21 0 18 0;
+#X connect 21 1 19 0;
+#X connect 21 2 20 0;
+#X connect 23 0 28 0;
+#X connect 23 1 17 0;
+#X connect 25 0 9 1;
+#X connect 27 0 26 0;
+#X connect 28 0 35 0;
+#X connect 29 4 33 0;
+#X connect 33 0 30 0;
+#X connect 33 1 31 0;
+#X connect 33 2 32 0;
+#X connect 35 0 24 0;
+#X connect 35 1 29 0;
diff --git a/Gem/examples/10.glsl/01.simple_texture.pd b/Gem/examples/10.glsl/01.simple_texture.pd
new file mode 100644
index 0000000..2d1c6ba
--- /dev/null
+++ b/Gem/examples/10.glsl/01.simple_texture.pd
@@ -0,0 +1,124 @@
+#N canvas 486 82 722 633 10;
+#X obj 76 22 gemhead;
+#X obj 76 367 glsl_program;
+#X obj 169 329 print linking;
+#X obj 76 411 rotateXYZ;
+#X floatatom 96 389 5 0 0 0 - - -;
+#X floatatom 140 389 5 0 0 0 - - -;
+#X floatatom 182 389 5 0 0 0 - - -;
+#X obj 76 580 pix_texture;
+#X msg 548 116 color 1 0 0;
+#X obj 106 69 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X msg 106 154 open texture.frag;
+#X obj 76 197 glsl_fragment;
+#X text 215 459 <- load texture;
+#X obj 106 535 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 76 489 pix_image img1.jpg;
+#X msg 103 460 open img2.jpg;
+#X msg 243 154 open texture_rect.frag;
+#X msg 114 114 0;
+#X obj 243 72 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X text 275 70 <-load an other shader;
+#X text 279 84 (using rectangular texturing);
+#X msg 254 113 1;
+#X msg 351 258 B \$1;
+#X msg 364 297 C \$1;
+#X floatatom 351 241 5 0 0 0 - - -;
+#X floatatom 364 280 5 0 0 0 - - -;
+#X text 408 280 <- adjust Contrast;
+#X text 400 240 <- adjust Brightness;
+#X text 138 67 <- load shader;
+#X obj 76 604 square 3;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 566 142 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 548 163 pd gemwin;
+#X msg 106 555 rectangle \$1;
+#X obj 254 134 s rectangle;
+#X obj 114 135 s rectangle;
+#X obj 106 512 r rectangle;
+#X msg 32 167 print;
+#X msg 39 340 print;
+#X floatatom 192 372 0 0 0 0 - - -;
+#X msg 151 308 link \$1;
+#X obj 151 259 change;
+#X connect 0 0 11 0;
+#X connect 1 0 3 0;
+#X connect 1 1 38 0;
+#X connect 3 0 14 0;
+#X connect 4 0 3 1;
+#X connect 5 0 3 2;
+#X connect 6 0 3 3;
+#X connect 7 0 29 0;
+#X connect 8 0 31 0;
+#X connect 9 0 10 0;
+#X connect 9 0 17 0;
+#X connect 10 0 11 0;
+#X connect 11 0 1 0;
+#X connect 11 1 40 0;
+#X connect 13 0 32 0;
+#X connect 14 0 7 0;
+#X connect 15 0 14 0;
+#X connect 16 0 11 0;
+#X connect 17 0 34 0;
+#X connect 18 0 16 0;
+#X connect 18 0 21 0;
+#X connect 21 0 33 0;
+#X connect 22 0 1 0;
+#X connect 23 0 1 0;
+#X connect 24 0 22 0;
+#X connect 25 0 23 0;
+#X connect 30 0 31 0;
+#X connect 32 0 7 0;
+#X connect 35 0 13 0;
+#X connect 36 0 11 0;
+#X connect 37 0 1 0;
+#X connect 39 0 1 0;
+#X connect 39 0 2 0;
+#X connect 40 0 39 0;
diff --git a/Gem/examples/10.glsl/02.primitive_distortion.pd b/Gem/examples/10.glsl/02.primitive_distortion.pd
new file mode 100644
index 0000000..9a5280a
--- /dev/null
+++ b/Gem/examples/10.glsl/02.primitive_distortion.pd
@@ -0,0 +1,125 @@
+#N canvas 462 82 520 667 10;
+#X obj 74 -1 gemhead;
+#X msg 29 80 print;
+#X obj 74 262 glsl_program;
+#X obj 146 121 change;
+#X msg 98 233 print;
+#X floatatom 146 144 2 0 0 0 ID - -;
+#X obj 164 212 print linking;
+#X obj 74 102 glsl_vertex;
+#X obj 74 451 pix_texture;
+#X obj 124 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 74 24 alpha;
+#X obj 101 397 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X floatatom 292 202 5 0 0 0 - - -;
+#X msg 101 375 0;
+#X msg 292 223 K \$1;
+#X obj 74 494 sphere 2 30;
+#N canvas 0 50 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 124 38 pd load_shader;
+#N canvas 50 82 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 153 286 pd init_shader;
+#X obj 101 354 loadbang;
+#X text 347 201 <- 2;
+#X text 395 670 ch 20007;
+#X msg 103 305 open texture.jpg;
+#X obj 74 471 rotateXYZ -90 0 0;
+#X msg 292 177 0.1;
+#X obj 74 328 pix_image img3.jpg;
+#X msg 88 80 open P_distord.vert;
+#X text 69 527 this shader create a dirty pseudo random value \, and
+move all vertices separatly;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 389 41 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 359 58 pd gemwin;
+#X msg 101 417 rectangle \$1;
+#X msg 146 191 link \$1;
+#X connect 0 0 10 0;
+#X connect 1 0 7 0;
+#X connect 2 0 24 0;
+#X connect 2 1 17 0;
+#X connect 3 0 5 0;
+#X connect 4 0 2 0;
+#X connect 5 0 30 0;
+#X connect 7 0 2 0;
+#X connect 7 1 3 0;
+#X connect 8 0 22 0;
+#X connect 9 0 25 0;
+#X connect 10 0 7 0;
+#X connect 11 0 29 0;
+#X connect 12 0 14 0;
+#X connect 13 0 11 0;
+#X connect 14 0 2 0;
+#X connect 16 0 9 0;
+#X connect 17 0 23 0;
+#X connect 18 0 13 0;
+#X connect 21 0 24 0;
+#X connect 22 0 15 0;
+#X connect 23 0 12 0;
+#X connect 24 0 8 0;
+#X connect 25 0 7 0;
+#X connect 27 0 28 0;
+#X connect 29 0 8 0;
+#X connect 30 0 2 0;
+#X connect 30 0 6 0;
diff --git a/Gem/examples/10.glsl/03.texture_distortion.pd b/Gem/examples/10.glsl/03.texture_distortion.pd
new file mode 100644
index 0000000..be30c96
--- /dev/null
+++ b/Gem/examples/10.glsl/03.texture_distortion.pd
@@ -0,0 +1,144 @@
+#N canvas 10 10 552 667 10;
+#X text 381 660 ch 20007;
+#X obj 74 -1 gemhead;
+#X msg 29 80 print;
+#X obj 74 382 glsl_program;
+#X obj 147 281 pack 0 0;
+#X msg 31 162 print;
+#X obj 168 261 t b f;
+#X obj 168 216 change;
+#X obj 146 121 change;
+#X msg 147 304 link \$1 \$2;
+#X msg 98 353 print;
+#X floatatom 168 242 2 0 0 0 ID - -;
+#X floatatom 146 144 2 0 0 0 ID - -;
+#X obj 165 325 print linking;
+#X obj 74 196 glsl_fragment;
+#X obj 74 102 glsl_vertex;
+#X obj 74 571 pix_texture;
+#X obj 124 59 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 74 24 alpha;
+#X obj 124 522 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X floatatom 361 352 5 0 0 0 - - -;
+#X floatatom 476 353 5 0 0 0 - - -;
+#X msg 124 500 0;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 124 38 pd load_shader;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 155 405 pd init_shader;
+#X obj 124 479 loadbang;
+#X text 416 351 <- 2;
+#X msg 92 431 open texture.jpg;
+#X msg 361 373 K1 \$1;
+#X msg 361 327 1;
+#X msg 476 375 seed \$1;
+#X msg 88 80 open T_distord.vert;
+#X msg 85 166 open T_distord.frag;
+#X obj 74 458 pix_image img3.jpg;
+#X obj 74 596 rectangle 4 4;
+#X text 73 627 This shader compute a dirty pseudo random number \,
+and distort the texture this with value;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 384 41 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 354 58 pd gemwin;
+#X msg 124 542 rectangle \$1;
+#X connect 1 0 18 0;
+#X connect 2 0 15 0;
+#X connect 3 0 33 0;
+#X connect 3 1 24 0;
+#X connect 4 0 9 0;
+#X connect 5 0 14 0;
+#X connect 6 0 4 0;
+#X connect 6 1 4 1;
+#X connect 7 0 11 0;
+#X connect 8 0 12 0;
+#X connect 9 0 3 0;
+#X connect 9 0 13 0;
+#X connect 10 0 3 0;
+#X connect 11 0 6 0;
+#X connect 12 0 4 0;
+#X connect 14 0 3 0;
+#X connect 14 1 7 0;
+#X connect 15 0 14 0;
+#X connect 15 1 8 0;
+#X connect 16 0 34 0;
+#X connect 17 0 31 0;
+#X connect 17 0 32 0;
+#X connect 18 0 15 0;
+#X connect 19 0 38 0;
+#X connect 20 0 28 0;
+#X connect 21 0 30 0;
+#X connect 22 0 19 0;
+#X connect 23 0 17 0;
+#X connect 24 0 29 0;
+#X connect 25 0 22 0;
+#X connect 27 0 33 0;
+#X connect 28 0 3 0;
+#X connect 29 0 20 0;
+#X connect 30 0 3 0;
+#X connect 31 0 15 0;
+#X connect 32 0 14 0;
+#X connect 33 0 16 0;
+#X connect 36 0 37 0;
+#X connect 38 0 16 0;
diff --git a/Gem/examples/10.glsl/04.game_of_life.pd b/Gem/examples/10.glsl/04.game_of_life.pd
new file mode 100644
index 0000000..16ccb57
--- /dev/null
+++ b/Gem/examples/10.glsl/04.game_of_life.pd
@@ -0,0 +1,138 @@
+#N canvas 10 10 599 681 10;
+#X obj 316 488 pix_snap2tex;
+#X msg 356 461 0 0;
+#X msg 402 460 500 500;
+#X obj 356 438 t b b;
+#X obj 316 513 alpha;
+#X obj 316 563 square 4;
+#X msg 52 75 frame \$1;
+#X floatatom 52 57 5 0 0 0 - - -;
+#X obj 356 419 loadbang;
+#X msg 271 95 print;
+#X obj 316 370 glsl_program;
+#X obj 389 296 pack 0 0;
+#X msg 273 177 print;
+#X obj 410 276 t b f;
+#X obj 410 231 change;
+#X obj 388 136 change;
+#X msg 389 321 link \$1 \$2;
+#X msg 272 333 print;
+#X floatatom 410 257 2 0 0 0 ID - -;
+#X floatatom 388 159 2 0 0 0 ID - -;
+#X obj 407 342 print linking;
+#X obj 316 211 glsl_fragment;
+#X obj 316 117 glsl_vertex;
+#X obj 338 68 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 316 37 gemhead -1;
+#X obj 316 537 colorRGB 1 1 1 1;
+#X msg 330 95 open game.vert;
+#X msg 327 181 open game.frag;
+#X obj 39 259 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 39 281 gemhead 50;
+#X obj 39 311 translateXYZ 0 0 1;
+#X obj 39 409 rectangle;
+#X obj 39 216 loadbang;
+#X msg 39 237 0;
+#X text 157 261 <- 3;
+#X text 375 69 <- 2 : load shader;
+#X obj 316 392 t b a;
+#X floatatom 69 362 5 0 0 0 - - -;
+#X floatatom 124 363 5 0 0 0 - - -;
+#X obj 69 381 / 100;
+#X obj 124 384 / 100;
+#X text 13 634 This is an example of iterative process : the output
+of the shader is used for next frame input;
+#X text 145 140 <----- 1;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 82 100 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 52 117 pd gemwin;
+#X connect 0 0 4 0;
+#X connect 1 0 0 1;
+#X connect 2 0 0 2;
+#X connect 3 0 1 0;
+#X connect 3 1 2 0;
+#X connect 4 0 25 0;
+#X connect 6 0 44 0;
+#X connect 7 0 6 0;
+#X connect 8 0 3 0;
+#X connect 9 0 22 0;
+#X connect 10 0 36 0;
+#X connect 11 0 16 0;
+#X connect 12 0 21 0;
+#X connect 13 0 11 0;
+#X connect 13 1 11 1;
+#X connect 14 0 18 0;
+#X connect 15 0 19 0;
+#X connect 16 0 10 0;
+#X connect 16 0 20 0;
+#X connect 17 0 10 0;
+#X connect 18 0 13 0;
+#X connect 19 0 11 0;
+#X connect 21 0 10 0;
+#X connect 21 1 14 0;
+#X connect 22 0 21 0;
+#X connect 22 1 15 0;
+#X connect 23 0 26 0;
+#X connect 23 0 27 0;
+#X connect 24 0 22 0;
+#X connect 25 0 5 0;
+#X connect 26 0 22 0;
+#X connect 27 0 21 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 32 0 33 0;
+#X connect 33 0 28 0;
+#X connect 36 0 0 0;
+#X connect 36 1 0 0;
+#X connect 37 0 39 0;
+#X connect 38 0 40 0;
+#X connect 39 0 31 1;
+#X connect 40 0 31 2;
+#X connect 43 0 44 0;
diff --git a/Gem/examples/10.glsl/05.multitexture.pd b/Gem/examples/10.glsl/05.multitexture.pd
new file mode 100644
index 0000000..d80c9a4
--- /dev/null
+++ b/Gem/examples/10.glsl/05.multitexture.pd
@@ -0,0 +1,201 @@
+#N canvas 10 10 930 667 10;
+#X obj 76 5 gemhead;
+#X obj 75 429 glsl_program;
+#X obj 149 268 pack 0 0;
+#X obj 170 248 t b f;
+#X obj 164 203 change;
+#X msg 149 294 link \$1 \$2;
+#X floatatom 170 229 2 0 0 0 ID - -;
+#X floatatom 148 121 2 0 0 0 ID - -;
+#X obj 167 315 print linking;
+#X msg 365 23 color 1 0 0;
+#X obj 142 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 76 79 glsl_vertex;
+#X obj 76 183 glsl_fragment;
+#X obj 463 464 pix_texture;
+#X obj 546 271 openpanel;
+#X obj 546 248 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 90 57 open multitexture.vert;
+#X msg 86 153 open multitexture.frag;
+#X obj 463 230 gemhead 11;
+#X obj 463 204 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 463 90 1) turn on rendering;
+#X msg 503 432 texunit 1;
+#X obj 687 467 pix_texture;
+#X obj 768 271 openpanel;
+#X obj 768 250 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 687 204 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X msg 725 430 texunit 0;
+#X obj 462 488 translateXYZ -2 0 0;
+#X obj 685 490 translateXYZ 2 0 0;
+#X msg 187 406 MyTex 0;
+#X obj 75 644 pix_texture;
+#X obj 218 498 openpanel;
+#X obj 218 477 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 254 381 MyTex1 1;
+#X msg 255 406 MyTex 1;
+#X msg 186 381 MyTex1 0;
+#X msg 321 382 MyTex1 2;
+#X msg 326 407 MyTex 2;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 142 5 pd load_shader;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 156 450 pd init_shader;
+#X msg 546 296 set open \$1 \, bang;
+#X obj 491 387 loadbang;
+#X msg 218 519 set open \$1 \, bang;
+#X msg 768 294 set open \$1 \, bang;
+#X obj 482 295 loadbang;
+#X obj 153 519 loadbang;
+#X obj 704 294 loadbang;
+#X obj 220 569 loadbang;
+#X obj 716 388 loadbang;
+#X obj 687 229 gemhead 22;
+#X text 187 360 2) change shader texuinit;
+#X msg 482 320 open img2.jpg;
+#X obj 463 349 pix_image img2.jpg;
+#X obj 687 346 pix_image img3.jpg;
+#X msg 704 318 open img3.jpg;
+#X msg 153 544 open img1.jpg;
+#X obj 75 613 pix_image img1.jpg;
+#X obj 148 98 change;
+#X text 343 147 This is an example of multitexturing \, this shader
+mixes 2 textures;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 395 47 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 365 64 pd gemwin;
+#X obj 75 670 rectangle 3 3;
+#X obj 462 514 square 2;
+#X obj 685 516 square 2;
+#X msg 220 591 texunit 2 \, rectangle 0;
+#X msg 491 409 texunit 0 \, rectangle 0;
+#X msg 716 409 texunit 1 \, rectangle 0;
+#X connect 0 0 11 0;
+#X connect 1 0 56 0;
+#X connect 1 1 39 0;
+#X connect 2 0 5 0;
+#X connect 3 0 2 0;
+#X connect 3 1 2 1;
+#X connect 4 0 6 0;
+#X connect 5 0 1 0;
+#X connect 5 0 8 0;
+#X connect 6 0 3 0;
+#X connect 7 0 2 0;
+#X connect 9 0 60 0;
+#X connect 10 0 16 0;
+#X connect 10 0 17 0;
+#X connect 11 0 12 0;
+#X connect 11 1 57 0;
+#X connect 12 0 1 0;
+#X connect 12 1 4 0;
+#X connect 13 0 27 0;
+#X connect 14 0 40 0;
+#X connect 15 0 14 0;
+#X connect 16 0 11 0;
+#X connect 17 0 12 0;
+#X connect 18 0 52 0;
+#X connect 19 0 18 0;
+#X connect 21 0 13 0;
+#X connect 22 0 28 0;
+#X connect 23 0 43 0;
+#X connect 24 0 23 0;
+#X connect 25 0 49 0;
+#X connect 26 0 22 0;
+#X connect 29 0 1 0;
+#X connect 30 0 61 0;
+#X connect 31 0 42 0;
+#X connect 32 0 31 0;
+#X connect 33 0 1 0;
+#X connect 34 0 1 0;
+#X connect 35 0 1 0;
+#X connect 36 0 1 0;
+#X connect 37 0 1 0;
+#X connect 38 0 10 0;
+#X connect 39 0 33 0;
+#X connect 39 0 29 0;
+#X connect 40 0 51 0;
+#X connect 41 0 65 0;
+#X connect 42 0 55 0;
+#X connect 43 0 54 0;
+#X connect 44 0 51 0;
+#X connect 45 0 55 0;
+#X connect 46 0 54 0;
+#X connect 47 0 64 0;
+#X connect 48 0 66 0;
+#X connect 49 0 53 0;
+#X connect 51 0 52 0;
+#X connect 52 0 13 0;
+#X connect 53 0 22 0;
+#X connect 54 0 53 0;
+#X connect 55 0 56 0;
+#X connect 56 0 30 0;
+#X connect 57 0 7 0;
+#X connect 59 0 60 0;
+#X connect 64 0 30 0;
+#X connect 65 0 13 0;
+#X connect 66 0 22 0;
diff --git a/Gem/examples/10.glsl/05.multitexture_bis.pd b/Gem/examples/10.glsl/05.multitexture_bis.pd
new file mode 100644
index 0000000..63652ff
--- /dev/null
+++ b/Gem/examples/10.glsl/05.multitexture_bis.pd
@@ -0,0 +1,200 @@
+#N canvas 207 200 1100 637 10;
+#X obj 76 5 gemhead;
+#X obj 75 429 glsl_program;
+#X obj 149 268 pack 0 0;
+#X obj 170 248 t b f;
+#X obj 164 203 change;
+#X msg 149 294 link \$1 \$2;
+#X floatatom 170 229 2 0 0 0 ID - -;
+#X floatatom 148 121 2 0 0 0 ID - -;
+#X obj 167 315 print linking;
+#X msg 365 23 color 1 0 0;
+#X obj 142 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 76 79 glsl_vertex;
+#X obj 76 183 glsl_fragment;
+#X obj 749 262 openpanel;
+#X obj 749 239 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 90 57 open multitexture.vert;
+#X msg 86 153 open multitexture.frag;
+#X obj 666 221 gemhead 11;
+#X obj 666 195 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 463 90 1) turn on rendering;
+#X obj 971 262 openpanel;
+#X obj 971 241 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 890 195 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X msg 187 406 MyTex 0;
+#X msg 254 381 MyTex1 1;
+#X msg 255 406 MyTex 1;
+#X msg 186 381 MyTex1 0;
+#X msg 321 382 MyTex1 2;
+#X msg 326 407 MyTex 2;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 142 5 pd load_shader;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 156 450 pd init_shader;
+#X msg 749 287 set open \$1 \, bang;
+#X obj 694 378 loadbang;
+#X msg 971 285 set open \$1 \, bang;
+#X obj 685 286 loadbang;
+#X obj 907 285 loadbang;
+#X obj 919 379 loadbang;
+#X obj 890 220 gemhead 22;
+#X text 187 360 2) change shader texuinit;
+#X msg 685 311 open img2.jpg;
+#X obj 666 340 pix_image img2.jpg;
+#X obj 890 337 pix_image img3.jpg;
+#X msg 907 309 open img3.jpg;
+#X obj 148 98 change;
+#X text 343 147 This is an example of multitexturing \, this shader
+mixes 2 textures;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 395 47 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 365 64 pd gemwin;
+#X obj 75 550 rectangle 3 3;
+#X obj 75 520 pix_multitexture 3;
+#X obj 666 425 pix_texture;
+#X obj 890 428 pix_texture;
+#X msg 694 400 rectangle 0;
+#X msg 919 400 rectangle 0;
+#X obj 526 264 openpanel;
+#X obj 526 241 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 443 223 gemhead 11;
+#X obj 443 197 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X msg 526 289 set open \$1 \, bang;
+#X obj 471 380 loadbang;
+#X obj 462 288 loadbang;
+#X obj 443 427 pix_texture;
+#X msg 471 402 rectangle 0;
+#X msg 462 313 open img1.jpg;
+#X obj 443 342 pix_image img1.jpg;
+#X connect 0 0 11 0;
+#X connect 1 0 48 0;
+#X connect 1 1 30 0;
+#X connect 2 0 5 0;
+#X connect 3 0 2 0;
+#X connect 3 1 2 1;
+#X connect 4 0 6 0;
+#X connect 5 0 1 0;
+#X connect 5 0 8 0;
+#X connect 6 0 3 0;
+#X connect 7 0 2 0;
+#X connect 9 0 46 0;
+#X connect 10 0 15 0;
+#X connect 10 0 16 0;
+#X connect 11 0 12 0;
+#X connect 11 1 43 0;
+#X connect 12 0 1 0;
+#X connect 12 1 4 0;
+#X connect 13 0 31 0;
+#X connect 14 0 13 0;
+#X connect 15 0 11 0;
+#X connect 16 0 12 0;
+#X connect 17 0 40 0;
+#X connect 18 0 17 0;
+#X connect 20 0 33 0;
+#X connect 21 0 20 0;
+#X connect 22 0 37 0;
+#X connect 23 0 1 0;
+#X connect 24 0 1 0;
+#X connect 25 0 1 0;
+#X connect 26 0 1 0;
+#X connect 27 0 1 0;
+#X connect 28 0 1 0;
+#X connect 29 0 10 0;
+#X connect 30 0 24 0;
+#X connect 30 0 23 0;
+#X connect 31 0 39 0;
+#X connect 32 0 51 0;
+#X connect 33 0 42 0;
+#X connect 34 0 39 0;
+#X connect 35 0 42 0;
+#X connect 36 0 52 0;
+#X connect 37 0 41 0;
+#X connect 39 0 40 0;
+#X connect 40 0 49 0;
+#X connect 41 0 50 0;
+#X connect 42 0 41 0;
+#X connect 43 0 7 0;
+#X connect 45 0 46 0;
+#X connect 48 0 47 0;
+#X connect 49 1 48 2;
+#X connect 50 1 48 3;
+#X connect 51 0 49 0;
+#X connect 52 0 50 0;
+#X connect 53 0 57 0;
+#X connect 54 0 53 0;
+#X connect 55 0 63 0;
+#X connect 56 0 55 0;
+#X connect 57 0 62 0;
+#X connect 58 0 61 0;
+#X connect 59 0 62 0;
+#X connect 60 1 48 1;
+#X connect 61 0 60 0;
+#X connect 62 0 63 0;
+#X connect 63 0 60 0;
diff --git a/Gem/examples/10.glsl/06.rectangle_multitexture.pd b/Gem/examples/10.glsl/06.rectangle_multitexture.pd
new file mode 100644
index 0000000..48e6600
--- /dev/null
+++ b/Gem/examples/10.glsl/06.rectangle_multitexture.pd
@@ -0,0 +1,199 @@
+#N canvas 511 97 648 675 10;
+#X obj 279 76 gemhead;
+#X obj 295 208 loadbang;
+#X obj 279 251 pix_texture;
+#X msg 295 231 rectangle 1 \, texunit 1;
+#X obj 334 97 openpanel;
+#X msg 334 118 open \$1;
+#X obj 334 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1
+-1;
+#X obj 459 76 gemhead;
+#X obj 475 208 loadbang;
+#X obj 459 251 pix_texture;
+#X obj 514 97 openpanel;
+#X msg 514 118 open \$1;
+#X obj 514 76 bng 15 250 50 0 empty empty empty 17 7 0 10 -257985 -1
+-1;
+#X msg 475 231 rectangle 1 \, texunit 2;
+#X obj 279 275 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577
+0;
+#N canvas 0 0 450 300 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 142 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 198 112 destroy;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X restore 284 314 pd gemwin;
+#X msg 284 295 create;
+#X text 280 274 Create window:;
+#X obj 101 358 cnv 15 100 120 empty empty empty 20 12 0 14 -4034 -66577
+0;
+#X obj 37 538 glsl_program;
+#X obj 100 259 pack 0 0;
+#X obj 118 236 t b f;
+#X obj 118 194 change;
+#X msg 100 285 link \$1 \$2;
+#X floatatom 118 217 2 0 0 0 ID - -;
+#X floatatom 100 133 2 0 0 0 ID - -;
+#X obj 105 309 print linking;
+#X obj 124 43 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#X obj 37 88 glsl_vertex;
+#X obj 37 174 glsl_fragment;
+#N canvas 0 0 450 300 load_shader 0;
+#X msg 116 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X obj 89 100 t b b;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X connect 3 1 0 0;
+#X restore 124 21 pd load_shader;
+#X obj 100 110 change;
+#X obj 106 581 loadbang;
+#X obj 37 21 gemhead 51;
+#X msg 109 371 add;
+#X msg 109 431 multiply;
+#X msg 109 451 mix;
+#N canvas 0 0 450 300 route 0;
+#X obj 113 53 inlet;
+#X msg 113 95 0;
+#X msg 155 95 1;
+#X msg 198 95 2;
+#X msg 240 95 3;
+#X obj 113 126 outlet;
+#X msg 283 95 4;
+#X obj 113 74 route add subtract diff multiply mix;
+#X connect 0 0 7 0;
+#X connect 1 0 5 0;
+#X connect 2 0 5 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 6 0 5 0;
+#X connect 7 0 1 0;
+#X connect 7 1 2 0;
+#X connect 7 2 3 0;
+#X connect 7 3 4 0;
+#X connect 7 4 6 0;
+#X restore 72 486 pd route;
+#X msg 184 540 Ttex1 1;
+#X msg 240 540 Ttex2 2;
+#X msg 72 507 style \$1;
+#X obj 109 337 loadbang;
+#X obj 37 625 pix_texture;
+#X msg 106 603 rectangle 1 \, texunit 0;
+#X obj 37 598 pix_set;
+#X obj 142 457 hsl 50 10 0 1 0 0 empty empty MIX_FACTOR -2 -4 0 7 -262144
+-1 -1 0 1;
+#X msg 51 66 open GLSL_mix.vert;
+#X msg 51 151 open GLSL_mix.frag;
+#X msg 109 411 diff;
+#X text 383 295 <- 1 : create GEM window;
+#X text 248 375 add : add two texture together (it is easy to get a
+white out);
+#X msg 109 391 subtract;
+#X text 277 16 This shader program give you the possibility to mix
+two sources of different size. You can add \, subtract \, diff \, multiply
+and mix the two sources.;
+#X text 248 401 subtract : subtract two texture together (it is easy
+to get a black out);
+#X text 248 427 diff : subtract two texture together (get absolute
+value);
+#X text 248 441 multiply : multiply two texture together;
+#X text 248 455 mix : mix two texture together (use the mix factor
+for crossfading);
+#N canvas 242 260 450 300 onebang 0;
+#X obj 120 71 inlet;
+#X obj 120 151 outlet;
+#X obj 120 120 t b;
+#X obj 120 100 change;
+#X msg 161 71 set -1;
+#X obj 161 11 gemhead;
+#X obj 161 51 route 0;
+#X obj 161 31 route gem_state;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 3 0;
+#X connect 5 0 7 0;
+#X connect 6 0 4 0;
+#X connect 7 0 6 0;
+#X restore 106 559 pd onebang;
+#X text 206 357 <- 2 : test differents mix;
+#X obj 459 167 pix_resize 512 512;
+#X obj 279 167 pix_resize 234 543;
+#X obj 279 147 pix_image img3.jpg;
+#X obj 459 147 pix_image img2.jpg;
+#X text 292 186 images have diferents sizes;
+#X msg 139 507 mix_factor \$1;
+#X obj 37 646 square 4;
+#X connect 0 0 61 0;
+#X connect 1 0 3 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 5 0 61 0;
+#X connect 6 0 4 0;
+#X connect 7 0 62 0;
+#X connect 8 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 62 0;
+#X connect 12 0 10 0;
+#X connect 13 0 9 0;
+#X connect 15 0 16 0;
+#X connect 16 0 15 0;
+#X connect 19 0 44 0;
+#X connect 19 1 57 0;
+#X connect 20 0 23 0;
+#X connect 21 0 20 0;
+#X connect 21 1 20 1;
+#X connect 22 0 24 0;
+#X connect 23 0 19 0;
+#X connect 23 0 26 0;
+#X connect 24 0 21 0;
+#X connect 25 0 20 0;
+#X connect 27 0 46 0;
+#X connect 27 0 47 0;
+#X connect 28 0 29 0;
+#X connect 28 1 31 0;
+#X connect 29 0 19 0;
+#X connect 29 1 22 0;
+#X connect 30 0 27 0;
+#X connect 31 0 25 0;
+#X connect 32 0 43 0;
+#X connect 33 0 28 0;
+#X connect 34 0 37 0;
+#X connect 35 0 37 0;
+#X connect 36 0 37 0;
+#X connect 37 0 40 0;
+#X connect 38 0 19 0;
+#X connect 39 0 19 0;
+#X connect 40 0 19 0;
+#X connect 41 0 34 0;
+#X connect 42 0 65 0;
+#X connect 43 0 42 0;
+#X connect 44 0 42 0;
+#X connect 45 0 64 0;
+#X connect 46 0 28 0;
+#X connect 47 0 29 0;
+#X connect 48 0 37 0;
+#X connect 51 0 37 0;
+#X connect 57 0 38 0;
+#X connect 57 0 39 0;
+#X connect 59 0 9 0;
+#X connect 60 0 2 0;
+#X connect 61 0 60 0;
+#X connect 62 0 59 0;
+#X connect 64 0 19 0;
diff --git a/Gem/examples/10.glsl/07.framebuffer_and_shader.pd b/Gem/examples/10.glsl/07.framebuffer_and_shader.pd
new file mode 100644
index 0000000..c829e8f
--- /dev/null
+++ b/Gem/examples/10.glsl/07.framebuffer_and_shader.pd
@@ -0,0 +1,418 @@
+#N canvas 1 25 1126 659 10;
+#X obj 9 470 translateXYZ 0 0 -4;
+#X obj 9 234 ortho;
+#X floatatom 83 538 5 0 0 0 - - -;
+#X msg 83 515 \$1;
+#X obj 9 365 gemframebuffer;
+#X obj 9 494 pix_texture;
+#X obj 218 474 translateXYZ 0 0 -4;
+#X obj 218 501 pix_texture;
+#X floatatom 484 153 5 0 0 0 - - -;
+#X msg 484 131 \$1;
+#X floatatom 325 550 5 0 0 0 - - -;
+#X msg 325 528 \$1;
+#X floatatom 104 412 5 0 0 0 - - -;
+#X msg 104 389 \$1;
+#X floatatom 294 411 5 0 0 0 - - -;
+#X msg 294 388 \$1;
+#X obj 435 58 loadbang;
+#X obj 199 364 gemframebuffer;
+#N canvas 573 206 496 427 shader 0;
+#X obj 32 294 glsl_program;
+#X obj 126 137 change;
+#X obj 126 183 print linking;
+#X obj 32 117 glsl_fragment;
+#X floatatom 130 239 5 0 0 0 - - -;
+#X floatatom 232 239 5 0 0 0 - - -;
+#X floatatom 181 239 5 0 0 0 - - -;
+#X msg 130 260 K1 \$1;
+#X msg 181 260 K3 \$1;
+#X msg 232 260 D1 \$1;
+#X msg 130 214 0.25;
+#X msg 126 158 link \$1;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 42 70 pd load_shader;
+#X obj 32 36 inlet;
+#X obj 32 363 outlet;
+#X obj 304 38 inlet;
+#X obj 139 343 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 113 318 pd init_shader;
+#X obj 112 341 t b;
+#X obj 395 43 inlet;
+#X msg 181 213 0;
+#X msg 232 215 0;
+#X msg 193 151 text 0;
+#X msg 42 93 open wave.frag;
+#X connect 0 0 14 0;
+#X connect 0 1 17 0;
+#X connect 1 0 11 0;
+#X connect 3 0 0 0;
+#X connect 3 1 1 0;
+#X connect 4 0 7 0;
+#X connect 5 0 9 0;
+#X connect 6 0 8 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 0 0;
+#X connect 10 0 4 0;
+#X connect 11 0 0 0;
+#X connect 11 0 2 0;
+#X connect 12 0 23 0;
+#X connect 13 0 3 0;
+#X connect 15 0 23 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 0;
+#X connect 18 0 10 0;
+#X connect 18 0 20 0;
+#X connect 18 0 21 0;
+#X connect 18 0 22 0;
+#X connect 19 0 16 0;
+#X connect 20 0 6 0;
+#X connect 21 0 5 0;
+#X connect 22 0 0 0;
+#X connect 23 0 3 0;
+#X restore 9 274 pd shader;
+#X obj 137 289 t a;
+#X obj 137 197 t b;
+#X obj 147 177 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 137 156 loadbang;
+#X obj 218 421 t a a;
+#X obj 402 518 separator;
+#X obj 218 447 separator;
+#X obj 218 537 color 1 1 1;
+#X obj 218 563 rectangle 4 4;
+#X obj 9 563 rectangle 4 4;
+#X obj 66 250 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 93 251 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 390 472 t a;
+#N canvas 0 0 857 562 border 0;
+#X obj 14 10 inlet;
+#X obj 13 46 separator;
+#X obj 13 68 translateXYZ 0 4 -3.9;
+#X obj 13 115 rectangle 5 0.12;
+#X obj 182 46 separator;
+#X obj 182 115 rectangle 5 0.12;
+#X obj 351 45 separator;
+#X obj 182 68 translateXYZ 0 -4 -3.9;
+#X obj 351 67 translateXYZ 4 0 -3.9;
+#X obj 351 114 rectangle 0.12 5;
+#X obj 528 39 separator;
+#X obj 528 108 rectangle 0.12 5;
+#X obj 528 61 translateXYZ -4 0 -3.9;
+#X obj 528 85 color 0.5 0.5 0.5;
+#X obj 351 91 color 0.5 0.5 0.5;
+#X obj 181 93 color 0.5 0.5 0.5;
+#X obj 13 92 color 0.5 0.5 0.5;
+#X connect 0 0 1 0;
+#X connect 0 0 4 0;
+#X connect 0 0 6 0;
+#X connect 0 0 10 0;
+#X connect 1 0 2 0;
+#X connect 2 0 16 0;
+#X connect 4 0 7 0;
+#X connect 6 0 8 0;
+#X connect 7 0 15 0;
+#X connect 8 0 14 0;
+#X connect 10 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 11 0;
+#X connect 14 0 9 0;
+#X connect 15 0 5 0;
+#X connect 16 0 3 0;
+#X restore 390 569 pd border;
+#X obj 774 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 774 172 gemhead 40;
+#X floatatom 825 519 5 0 0 0 - - -;
+#X obj 774 484 pix_texture;
+#X floatatom 876 520 5 0 0 0 - - -;
+#X obj 442 357 pix_texture;
+#X floatatom 867 236 5 0 0 0 - - -;
+#X obj 653 216 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 454 308 loadbang;
+#X obj 786 442 loadbang;
+#N canvas 693 153 804 667 _glsl 0;
+#X obj 80 426 glsl_program;
+#X obj 261 238 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+-1;
+#N canvas 0 22 450 300 open 0;
+#X obj 75 103 openpanel;
+#X obj 75 173 outlet;
+#X obj 75 127 t b s;
+#X msg 105 152 set open \$1;
+#X obj 75 80 inlet;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X connect 2 1 3 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 204 237 pd open;
+#X msg 33 296 print;
+#X obj 166 331 change;
+#X msg 34 420 print;
+#X obj 80 310 glsl_fragment;
+#X floatatom 166 355 2 0 0 0 ID - -;
+#X obj 184 400 print linking;
+#X obj 13 52 inlet;
+#X obj 80 462 outlet;
+#X msg 93 273 open \$1.frag;
+#X msg 204 261 open \$1;
+#X obj 422 77 inlet;
+#X obj 13 75 route bang;
+#X obj 140 83 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 140 109 t b b;
+#X msg 140 202 symbol \$1/\$2;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 159 447 change;
+#X obj 159 468 t b;
+#X obj 159 491 outlet;
+#X msg 166 379 link \$1;
+#X obj 140 133 symbol vague;
+#X connect 0 0 10 0;
+#X connect 0 1 22 0;
+#X connect 1 0 2 0;
+#X connect 2 0 12 0;
+#X connect 3 0 6 0;
+#X connect 4 0 7 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 6 1 4 0;
+#X connect 7 0 25 0;
+#X connect 9 0 14 0;
+#X connect 11 0 6 0;
+#X connect 12 0 6 0;
+#X connect 13 0 0 0;
+#X connect 14 0 16 0;
+#X connect 14 1 6 0;
+#X connect 15 0 16 0;
+#X connect 16 0 26 0;
+#X connect 17 0 11 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 21 0;
+#X connect 21 0 16 0;
+#X connect 22 0 23 0;
+#X connect 23 0 24 0;
+#X connect 25 0 0 0;
+#X connect 25 0 8 0;
+#X connect 26 0 11 0;
+#X restore 774 326 pd _glsl;
+#X obj 743 302 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 435 82 texunit 3;
+#X obj 410 108 pix_texture;
+#X obj 181 299 t a;
+#N canvas 0 0 450 300 gouttes 0;
+#X obj 27 79 translateXYZ 0 0 -4;
+#X obj 27 101 t a b b;
+#X obj 27 195 translateXYZ 0 0 0.1;
+#X obj 50 123 random 1000;
+#X obj 50 147 - 500;
+#X obj 136 123 random 1000;
+#X obj 136 147 - 500;
+#X obj 50 171 / 130;
+#X obj 136 171 / 130;
+#X obj 27 242 circle 0.02;
+#X obj 27 218 color 0.3 0.3 0.3;
+#X obj 28 51 inlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 1 1 3 0;
+#X connect 1 2 5 0;
+#X connect 2 0 10 0;
+#X connect 3 0 4 0;
+#X connect 4 0 7 0;
+#X connect 5 0 6 0;
+#X connect 6 0 8 0;
+#X connect 7 0 2 1;
+#X connect 8 0 2 2;
+#X connect 10 0 9 0;
+#X connect 11 0 0 0;
+#X restore 402 542 pd gouttes;
+#X msg 244 284 quality 0;
+#X obj 774 541 rectangle -4 -4;
+#X obj 9 155 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X obj 220 180 delay 1000;
+#N canvas 0 0 450 300 init 0;
+#X obj 89 154 outlet;
+#X obj 89 100 change;
+#X obj 89 127 t b;
+#X obj 91 52 gemhead;
+#X msg 91 73 1;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X connect 3 0 4 0;
+#X connect 4 0 1 0;
+#X restore 220 157 pd init;
+#X obj 410 34 gemhead 16;
+#X obj 199 342 gemhead 12;
+#X obj 442 214 gemhead 17;
+#X obj 9 177 gemhead 10;
+#X obj 442 240 pix_image img2.jpg;
+#X msg 867 215 111;
+#X text 33 612 This shader is rendered into a framebuffer \, in order
+to use it in the next frame for a simple physical modeling simulation
+;
+#X text 345 168 This creates a texture (texunit 3) from the shaders'
+output;
+#X text 437 386 this loads a texture (texunit 2);
+#X text 691 411 not used \, just to set texture coordinate;
+#X text 633 594 This uses the two textures (texunit 2 and 3) in order
+to render the final images;
+#X text 201 9 This is an example of rendering to texture (using framebuffer)
+and multitextures;
+#X obj 402 497 t a a a a a;
+#X obj 774 393 pix_set 512 512;
+#N canvas 87 154 452 208 Gem.init 0;
+#X obj 118 46 loadbang;
+#X obj 118 113 outlet;
+#X msg 118 81 reset \, dimen 800 600;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 760 47 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 730 64 pd gemwin;
+#X msg 786 463 rectangle 1;
+#X msg 454 331 texunit 2 \, quality 1 \, rectangle 1;
+#X msg 137 222 type FLOAT \, dimen 512 512 \, rectangle 1;
+#X msg 220 202 quality 1 \, rectangle 1;
+#X msg 867 255 K \$1 \, texture1 2 \, texture2 3;
+#X text 880 276 texture1==base;
+#X text 882 294 texture2==deformation;
+#X connect 0 0 5 0;
+#X connect 1 0 18 0;
+#X connect 3 0 2 0;
+#X connect 4 0 0 0;
+#X connect 4 1 7 1;
+#X connect 4 1 13 0;
+#X connect 5 0 28 0;
+#X connect 5 1 3 0;
+#X connect 6 0 7 0;
+#X connect 7 0 26 0;
+#X connect 7 1 11 0;
+#X connect 7 1 46 1;
+#X connect 9 0 8 0;
+#X connect 11 0 10 0;
+#X connect 13 0 12 0;
+#X connect 15 0 14 0;
+#X connect 16 0 45 0;
+#X connect 17 0 23 0;
+#X connect 17 1 5 1;
+#X connect 17 1 15 0;
+#X connect 18 0 4 0;
+#X connect 19 0 4 0;
+#X connect 19 0 17 0;
+#X connect 20 0 72 0;
+#X connect 21 0 20 0;
+#X connect 22 0 20 0;
+#X connect 23 0 25 0;
+#X connect 23 1 31 0;
+#X connect 24 0 48 0;
+#X connect 25 0 6 0;
+#X connect 26 0 27 0;
+#X connect 29 0 18 1;
+#X connect 30 0 18 2;
+#X connect 31 0 66 0;
+#X connect 33 0 34 0;
+#X connect 34 0 43 0;
+#X connect 35 0 50 1;
+#X connect 36 0 50 0;
+#X connect 37 0 50 2;
+#X connect 39 0 74 0;
+#X connect 40 0 59 0;
+#X connect 41 0 71 0;
+#X connect 42 0 70 0;
+#X connect 43 0 67 0;
+#X connect 43 1 40 0;
+#X connect 44 0 43 0;
+#X connect 45 0 46 0;
+#X connect 46 1 9 0;
+#X connect 47 0 5 0;
+#X connect 47 0 46 0;
+#X connect 47 0 7 0;
+#X connect 49 0 47 0;
+#X connect 51 0 57 0;
+#X connect 52 0 73 0;
+#X connect 53 0 52 0;
+#X connect 54 0 46 0;
+#X connect 55 0 17 0;
+#X connect 56 0 58 0;
+#X connect 57 0 1 0;
+#X connect 58 0 38 0;
+#X connect 59 0 39 0;
+#X connect 66 0 24 0;
+#X connect 66 1 24 0;
+#X connect 66 2 24 0;
+#X connect 66 3 24 0;
+#X connect 66 4 24 0;
+#X connect 67 0 36 0;
+#X connect 68 0 69 0;
+#X connect 70 0 36 0;
+#X connect 71 0 38 0;
+#X connect 72 0 19 0;
+#X connect 73 0 47 0;
+#X connect 74 0 43 1;
diff --git a/Gem/examples/10.glsl/08.multi_pass_rendering.pd b/Gem/examples/10.glsl/08.multi_pass_rendering.pd
new file mode 100644
index 0000000..5ada6be
--- /dev/null
+++ b/Gem/examples/10.glsl/08.multi_pass_rendering.pd
@@ -0,0 +1,341 @@
+#N canvas 208 184 980 477 10;
+#X obj 42 315 square 4;
+#X obj 42 199 translateXYZ 0 0 -4;
+#X obj 671 399 pix_texture;
+#X obj 671 419 square 4;
+#N canvas 370 126 407 295 init 0;
+#X obj 106 175 outlet;
+#X msg 125 89 type FLOAT;
+#X obj 124 68 loadbang;
+#X msg 146 109 dimen 1024 1024;
+#X msg 211 147 rectangle 0;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 2 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X restore 56 157 pd init;
+#X obj 650 230 pix_texture;
+#X obj 650 252 square 4;
+#X floatatom 724 255 5 0 0 0 - - -;
+#N canvas 157 111 392 206 init 0;
+#X obj 93 68 t b;
+#X obj 93 47 loadbang;
+#X obj 93 159 outlet;
+#X msg 93 118 type FLOAT \, dimen 1024 1024 \, rectangle 0;
+#X connect 0 0 3 0;
+#X connect 1 0 0 0;
+#X connect 3 0 2 0;
+#X restore 669 120 pd init;
+#X obj 353 199 translateXYZ 0 0 -4;
+#N canvas 700 0 407 295 init 0;
+#X obj 106 175 outlet;
+#X obj 106 68 loadbang;
+#X msg 106 118 type FLOAT \, dimen 1024 1024 \, rectangle 0;
+#X connect 1 0 2 0;
+#X connect 2 0 0 0;
+#X restore 373 156 pd init;
+#X text 6 4 first input \, render whatever in a frambuffer;
+#X obj 691 357 loadbang;
+#X obj 42 222 pix_image img1.jpg;
+#X obj 42 54 gemhead 11;
+#X obj 666 187 loadbang;
+#X obj 650 166 translateXYZ 0 0 -4;
+#X obj 650 142 gemframebuffer;
+#X obj 353 177 gemframebuffer;
+#N canvas 330 106 589 635 shader1 0;
+#X obj 94 500 glsl_program;
+#X obj 94 340 glsl_fragment;
+#X obj 94 160 glsl_vertex;
+#X obj 172 400 pack 0 0;
+#X obj 162 200 change;
+#X obj 182 375 change;
+#X msg 172 420 link \$1 \$2;
+#X obj 162 220 t b f;
+#X obj 176 444 print linking;
+#X obj 94 66 inlet;
+#X obj 94 530 outlet;
+#X obj 464 245 inlet;
+#X floatatom 182 179 0 0 0 0 - - -;
+#X floatatom 234 377 0 0 0 0 - - -;
+#X msg 56 472 print;
+#X msg 246 65 1;
+#X obj 246 106 t b;
+#X obj 246 46 gemhead 1;
+#X obj 175 548 t b;
+#X obj 175 571 outlet;
+#X msg 246 135 open T_distord.vert;
+#X msg 289 160 open T_distord.frag;
+#X obj 246 86 change -1;
+#X obj 175 524 change;
+#X connect 0 0 10 0;
+#X connect 0 1 23 0;
+#X connect 1 0 0 0;
+#X connect 1 1 5 0;
+#X connect 1 1 13 0;
+#X connect 2 0 1 0;
+#X connect 2 1 4 0;
+#X connect 2 1 12 0;
+#X connect 3 0 6 0;
+#X connect 4 0 7 0;
+#X connect 5 0 3 0;
+#X connect 6 0 0 0;
+#X connect 6 0 8 0;
+#X connect 7 0 3 0;
+#X connect 7 1 3 1;
+#X connect 9 0 2 0;
+#X connect 11 0 0 0;
+#X connect 14 0 0 0;
+#X connect 15 0 22 0;
+#X connect 16 0 20 0;
+#X connect 16 0 21 0;
+#X connect 17 0 15 0;
+#X connect 18 0 19 0;
+#X connect 20 0 2 0;
+#X connect 21 0 1 0;
+#X connect 22 0 16 0;
+#X connect 23 0 18 0;
+#X restore 42 81 pd shader1;
+#N canvas 476 68 589 635 shader2 0;
+#X obj 94 500 glsl_program;
+#X obj 94 340 glsl_fragment;
+#X obj 94 160 glsl_vertex;
+#X obj 172 400 pack 0 0;
+#X obj 162 200 change;
+#X obj 182 375 change;
+#X msg 172 420 link \$1 \$2;
+#X obj 162 220 t b f;
+#X obj 176 444 print linking;
+#X obj 94 66 inlet;
+#X obj 94 530 outlet;
+#X obj 464 245 inlet;
+#X floatatom 182 179 0 0 0 0 - - -;
+#X floatatom 234 377 0 0 0 0 - - -;
+#X msg 56 472 print;
+#X msg 246 65 1;
+#X obj 246 106 t b;
+#X obj 246 46 gemhead 1;
+#X obj 175 548 t b;
+#X obj 175 571 outlet;
+#X msg 246 135 open P_distord.vert;
+#X msg 289 160 open P_distord.frag;
+#X obj 246 86 change -1;
+#X obj 175 524 change;
+#X connect 0 0 10 0;
+#X connect 0 1 23 0;
+#X connect 1 0 0 0;
+#X connect 1 1 5 0;
+#X connect 1 1 13 0;
+#X connect 2 0 1 0;
+#X connect 2 1 4 0;
+#X connect 2 1 12 0;
+#X connect 3 0 6 0;
+#X connect 4 0 7 0;
+#X connect 5 0 3 0;
+#X connect 6 0 0 0;
+#X connect 6 0 8 0;
+#X connect 7 0 3 0;
+#X connect 7 1 3 1;
+#X connect 9 0 2 0;
+#X connect 11 0 0 0;
+#X connect 14 0 0 0;
+#X connect 15 0 22 0;
+#X connect 16 0 20 0;
+#X connect 16 0 21 0;
+#X connect 17 0 15 0;
+#X connect 18 0 19 0;
+#X connect 20 0 2 0;
+#X connect 21 0 1 0;
+#X connect 22 0 16 0;
+#X connect 23 0 18 0;
+#X restore 353 78 pd shader2;
+#N canvas 660 91 589 635 shader3 0;
+#X obj 94 500 glsl_program;
+#X obj 94 340 glsl_fragment;
+#X obj 94 160 glsl_vertex;
+#X obj 172 400 pack 0 0;
+#X obj 162 200 change;
+#X obj 182 375 change;
+#X msg 172 420 link \$1 \$2;
+#X obj 162 220 t b f;
+#X obj 176 444 print linking;
+#X obj 94 66 inlet;
+#X obj 94 530 outlet;
+#X obj 464 245 inlet;
+#X floatatom 182 179 0 0 0 0 - - -;
+#X floatatom 234 377 0 0 0 0 - - -;
+#X msg 56 472 print;
+#X msg 246 65 1;
+#X obj 246 106 t b;
+#X obj 246 46 gemhead 1;
+#X obj 175 548 t b;
+#X obj 175 571 outlet;
+#X msg 326 429 MyTex 1;
+#X msg 336 451 MyTex1 2;
+#X msg 247 135 open multitexture.vert;
+#X msg 291 160 open multitexture.frag;
+#X obj 246 86 change -1;
+#X obj 175 524 change;
+#X connect 0 0 10 0;
+#X connect 0 1 25 0;
+#X connect 1 0 0 0;
+#X connect 1 1 5 0;
+#X connect 1 1 13 0;
+#X connect 2 0 1 0;
+#X connect 2 1 4 0;
+#X connect 2 1 12 0;
+#X connect 3 0 6 0;
+#X connect 4 0 7 0;
+#X connect 5 0 3 0;
+#X connect 6 0 0 0;
+#X connect 6 0 8 0;
+#X connect 7 0 3 0;
+#X connect 7 1 3 1;
+#X connect 9 0 2 0;
+#X connect 11 0 0 0;
+#X connect 14 0 0 0;
+#X connect 15 0 24 0;
+#X connect 16 0 22 0;
+#X connect 16 0 23 0;
+#X connect 17 0 15 0;
+#X connect 18 0 19 0;
+#X connect 18 0 20 0;
+#X connect 18 0 21 0;
+#X connect 20 0 0 0;
+#X connect 21 0 0 0;
+#X connect 22 0 2 0;
+#X connect 23 0 1 0;
+#X connect 24 0 16 0;
+#X connect 25 0 18 0;
+#X restore 650 79 pd shader3;
+#X obj 650 54 gemhead 31;
+#X obj 671 314 gemhead 32;
+#X obj 56 248 loadbang;
+#X obj 367 245 loadbang;
+#X msg 56 270 rectangle 0;
+#X msg 367 267 rectangle 0;
+#X obj 42 295 pix_texture;
+#X msg 55 135 texunit 1;
+#X obj 55 113 loadbang;
+#X obj 366 115 loadbang;
+#X msg 366 136 texunit 2;
+#X msg 141 48 1;
+#X floatatom 141 69 5 0 0 0 - - -;
+#X msg 141 88 K1 \$1;
+#X text 183 69 change effect;
+#X text 347 1 second input : same as 1st.;
+#X text 7 22 put framebuffer as texunit 1 \, for futur use;
+#X text 348 17 render an image in framebuffer.;
+#X text 350 31 put framebuffer in texunit 2;
+#X text 632 8 finally :;
+#X text 631 23 shader mixing 2 textures in a framebuffer;
+#X floatatom 449 79 5 0 0 0 - - -;
+#X text 491 79 change effect;
+#X msg 449 98 K \$1;
+#X msg 449 58 0.1;
+#X text 161 433 <-------------------;
+#X text 569 442 draw the final frambuffer (without shader);
+#X obj 671 335 rotateXYZ -20 0 0;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 58 46 loadbang;
+#X obj 58 113 outlet;
+#X msg 58 80 reset \, dimen 320 240;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 99 394 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 69 411 pd gemwin;
+#X obj 42 177 gemframebuffer;
+#X obj 353 332 mesh_square 10 10;
+#X obj 353 311 scaleXYZ 4 4 1;
+#X obj 353 57 gemhead 21;
+#X obj 353 222 pix_image img2.jpg;
+#X obj 353 291 pix_texture;
+#X msg 666 209 rectangle 0;
+#X msg 691 378 rectangle 0;
+#X connect 1 0 13 0;
+#X connect 2 0 3 0;
+#X connect 4 0 52 0;
+#X connect 5 0 6 0;
+#X connect 5 1 7 0;
+#X connect 8 0 17 0;
+#X connect 9 0 56 0;
+#X connect 10 0 18 0;
+#X connect 12 0 59 0;
+#X connect 13 0 28 0;
+#X connect 14 0 19 0;
+#X connect 15 0 58 0;
+#X connect 16 0 5 0;
+#X connect 17 0 16 0;
+#X connect 17 1 2 1;
+#X connect 18 0 9 0;
+#X connect 19 0 52 0;
+#X connect 19 1 33 0;
+#X connect 20 0 18 0;
+#X connect 20 1 46 0;
+#X connect 21 0 17 0;
+#X connect 22 0 21 0;
+#X connect 23 0 49 0;
+#X connect 24 0 26 0;
+#X connect 25 0 27 0;
+#X connect 26 0 28 0;
+#X connect 27 0 57 0;
+#X connect 28 0 0 0;
+#X connect 29 0 52 0;
+#X connect 30 0 29 0;
+#X connect 31 0 32 0;
+#X connect 32 0 18 0;
+#X connect 33 0 34 0;
+#X connect 34 0 35 0;
+#X connect 35 0 19 1;
+#X connect 43 0 45 0;
+#X connect 45 0 20 1;
+#X connect 46 0 43 0;
+#X connect 49 0 2 0;
+#X connect 50 0 51 0;
+#X connect 52 0 1 0;
+#X connect 54 0 53 0;
+#X connect 55 0 20 0;
+#X connect 56 0 57 0;
+#X connect 57 0 54 0;
+#X connect 58 0 5 0;
+#X connect 59 0 2 0;
diff --git a/Gem/examples/10.glsl/09.vertex_texture_fetching.pd b/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
new file mode 100644
index 0000000..e1439c4
--- /dev/null
+++ b/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
@@ -0,0 +1,142 @@
+#N canvas 239 0 785 526 10;
+#X obj 504 69 gemhead;
+#X obj 576 346 pack 0 0;
+#X obj 597 326 t b f;
+#X msg 576 369 link \$1 \$2;
+#X floatatom 597 307 2 0 0 0 ID - -;
+#X floatatom 576 206 2 0 0 0 ID - -;
+#X obj 594 390 print linking;
+#X obj 504 480 pix_texture;
+#X obj 540 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 28 199 gemhead 1;
+#X obj 28 311 gemframebuffer;
+#X obj 28 485 pix_texture;
+#X obj 28 336 translateXYZ 0 0 -4;
+#X obj 28 510 square 4;
+#X obj 504 261 glsl_fragment;
+#X obj 504 164 glsl_vertex;
+#X obj 576 183 change;
+#X obj 597 281 change;
+#X obj 504 409 glsl_program;
+#X floatatom 542 505 5 0 0 0 - - -;
+#X obj 49 231 loadbang;
+#X obj 44 419 loadbang;
+#X msg 520 456 quality 0;
+#N canvas 703 231 450 300 load_glsl 0;
+#X obj 51 22 gemhead;
+#X obj 51 98 outlet;
+#X obj 51 50 route gem_state;
+#X obj 51 74 route 1;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X restore 540 93 pd load_glsl;
+#X msg 514 231 open fetching.frag;
+#X msg 518 142 open fetching.vert;
+#X obj 504 525 rotateXYZ -30 0 0;
+#X obj 504 551 scaleXYZ 3 3 1;
+#X obj 28 388 pix_image img1.jpg;
+#X msg 46 363 open img2.jpg;
+#X text 137 11 This patch need a glsl 3 compliant hardware;
+#X text 26 535 draw an image in a frambuffer;
+#X text 49 274 this configuration is very important to have full hardware
+support for vertex texture fetching;
+#X text 306 603 this example uses the framebuffer image in the vertex
+shader in the same way you can do in the pixel shader. This is only
+possible in this specific configuration (it's a hardware limitation)
+;
+#X text 137 56 (nvidia 7000 and 8000 serie should work \, ati X1000
+serie does not \, but later should);
+#X obj 504 579 mesh_square 200;
+#X text 138 28 As in 2007 \, only good (and new) graphic cards are
+able to run this patch.;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 56 77 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 26 94 pd gemwin;
+#X msg 49 255 rectangle 0 \, type BYTE \, format RGB32 \, dimen 1024
+1024;
+#X msg 44 439 rectangle 0 \, quality 0;
+#X obj 520 437 loadbang;
+#X connect 0 0 15 0;
+#X connect 1 0 3 0;
+#X connect 2 0 1 0;
+#X connect 2 1 1 1;
+#X connect 3 0 6 0;
+#X connect 3 0 18 0;
+#X connect 4 0 2 0;
+#X connect 5 0 1 0;
+#X connect 7 0 26 0;
+#X connect 8 0 25 0;
+#X connect 8 0 24 0;
+#X connect 9 0 10 0;
+#X connect 10 0 12 0;
+#X connect 10 1 7 1;
+#X connect 11 0 13 0;
+#X connect 12 0 28 0;
+#X connect 14 0 18 0;
+#X connect 14 1 17 0;
+#X connect 15 0 14 0;
+#X connect 15 1 16 0;
+#X connect 16 0 5 0;
+#X connect 17 0 4 0;
+#X connect 18 0 7 0;
+#X connect 19 0 26 1;
+#X connect 20 0 39 0;
+#X connect 21 0 40 0;
+#X connect 22 0 7 0;
+#X connect 23 0 8 0;
+#X connect 24 0 14 0;
+#X connect 25 0 15 0;
+#X connect 26 0 27 0;
+#X connect 27 0 35 0;
+#X connect 28 0 11 0;
+#X connect 29 0 28 0;
+#X connect 37 0 38 0;
+#X connect 39 0 10 0;
+#X connect 40 0 11 0;
+#X connect 41 0 22 0;
diff --git a/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd b/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd
new file mode 100644
index 0000000..6d44970
--- /dev/null
+++ b/Gem/examples/10.glsl/10.GPGPU_Physical_model.pd
@@ -0,0 +1,1246 @@
+#N struct 1002-xy-pad-knob-1 float x0 float y0 float id;
+#N canvas 875 218 764 482 10;
+#X obj 27 380 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
+-1 0;
+#X floatatom 185 212 5 0 0 0 - - -;
+#N canvas 4 106 187 219 fps 0;
+#X obj 22 62 realtime;
+#X obj 22 41 t b b;
+#X obj 22 19 gemhead;
+#X obj 22 170 outlet;
+#X msg 22 84 1000 \$1;
+#X obj 22 105 /;
+#X obj 22 126 + 0.5;
+#X obj 22 147 i;
+#X connect 0 0 4 0;
+#X connect 1 0 0 0;
+#X connect 1 1 0 1;
+#X connect 2 0 1 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 3 0;
+#X restore 185 192 pd fps;
+#N canvas 93 66 1183 666 shaders_PM 0;
+#X obj 718 34 gemhead;
+#X obj 718 57 route gem_state;
+#X obj 718 79 route 1 0;
+#X obj 24 477 translateXYZ 0 0 -4;
+#X obj 24 609 square 4;
+#X msg 50 399 texunit 1;
+#X obj 50 378 loadbang;
+#N canvas 573 206 607 627 shader 0;
+#X obj 126 247 change;
+#X obj 126 323 print linking;
+#X obj 32 227 glsl_fragment;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 148 49 pd load_shader;
+#X obj 32 36 inlet;
+#X obj 32 423 outlet;
+#X obj 155 18 inlet;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 113 378 pd init_shader;
+#X obj 278 25 inlet;
+#X obj 113 408 outlet;
+#X msg 42 203 open mass.frag;
+#X obj 32 354 glsl_program;
+#X obj 32 137 glsl_vertex;
+#X msg 42 113 open mass.vert;
+#X obj 94 74 t b b;
+#X obj 126 272 pack f f;
+#X msg 126 296 link \$1 \$2;
+#X connect 0 0 15 0;
+#X connect 2 0 11 0;
+#X connect 2 1 0 0;
+#X connect 3 0 14 0;
+#X connect 4 0 12 0;
+#X connect 6 0 14 0;
+#X connect 7 0 9 0;
+#X connect 8 0 11 0;
+#X connect 10 0 2 0;
+#X connect 11 0 5 0;
+#X connect 11 1 7 0;
+#X connect 12 0 2 0;
+#X connect 12 1 15 1;
+#X connect 13 0 12 0;
+#X connect 14 0 10 0;
+#X connect 14 1 13 0;
+#X connect 15 0 16 0;
+#X connect 16 0 1 0;
+#X connect 16 0 11 0;
+#X restore 24 257 pd shader;
+#X obj 53 234 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 506 468 translateXYZ 0 0 -4;
+#X obj 506 610 square 4;
+#X obj 261 477 translateXYZ 0 0 -4;
+#X obj 290 368 loadbang;
+#N canvas 1062 27 528 709 shader 0;
+#X obj 32 384 glsl_program;
+#X obj 32 36 inlet;
+#X obj 32 453 outlet;
+#X obj 155 18 inlet;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 113 408 pd init_shader;
+#X obj 278 25 inlet;
+#X obj 113 438 outlet;
+#X obj 126 247 change;
+#X obj 126 323 print linking;
+#X obj 32 227 glsl_fragment;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 1;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 148 49 pd load_shader;
+#X obj 32 137 glsl_vertex;
+#X obj 94 74 t b b;
+#X obj 126 272 pack f f;
+#X msg 126 296 link \$1 \$2;
+#X msg 42 113 open link.vert;
+#X msg 42 203 open link.frag;
+#X connect 0 0 2 0;
+#X connect 0 1 4 0;
+#X connect 1 0 11 0;
+#X connect 3 0 12 0;
+#X connect 4 0 6 0;
+#X connect 5 0 0 0;
+#X connect 7 0 13 0;
+#X connect 9 0 0 0;
+#X connect 9 1 7 0;
+#X connect 10 0 12 0;
+#X connect 11 0 9 0;
+#X connect 11 1 13 1;
+#X connect 12 0 16 0;
+#X connect 12 1 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 8 0;
+#X connect 14 0 0 0;
+#X connect 15 0 11 0;
+#X connect 16 0 9 0;
+#X restore 261 256 pd shader;
+#X obj 292 231 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 280 539 loadbang;
+#X obj 119 448 s texture_mass;
+#X obj 359 444 s texture_link;
+#X obj 530 373 loadbang;
+#X msg 530 394 texunit 2;
+#X msg 286 390 texunit 3;
+#X obj 601 440 s texture_mass2;
+#X obj 321 229 r shader_link;
+#X obj 321 277 s init_shader_link;
+#X obj 261 612 square 4;
+#X obj 613 34 inlet;
+#X obj 24 201 gemhead 2;
+#X obj 261 185 gemhead 11;
+#X obj 506 236 gemhead 21;
+#X msg 41 561 rectangle 1 \, quality 0;
+#X msg 280 560 rectangle 1 \, quality 0;
+#X obj 615 58 t b b;
+#X obj 658 36 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 621 113 s init_shader_link;
+#X obj 84 233 r shader_mass;
+#X obj 84 281 s init_shader_mass;
+#X obj 601 140 s init_shader_mass;
+#X obj 261 589 pix_texture;
+#X obj 261 418 gemframebuffer;
+#X obj 24 588 pix_texture;
+#X obj 24 425 gemframebuffer;
+#X obj 65 310 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 506 418 gemframebuffer;
+#X obj 524 513 loadbang;
+#X msg 524 532 rectangle 1 \, quality 0;
+#X obj 506 588 pix_texture;
+#X obj 580 565 r texture_mass;
+#X obj 103 260 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 341 251 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 616 79 delay 500;
+#N canvas 0 0 446 324 init_fb 0;
+#X msg 100 173 type BYTE;
+#X msg 78 151 format RGB32;
+#X obj 46 121 t b b;
+#X obj 78 261 t a;
+#X obj 78 285 outlet;
+#X msg 137 215 rectangle 1;
+#X msg 46 196 dimen 128 128;
+#X obj 46 11 inlet;
+#X msg 137 42 0;
+#X obj 46 49 spigot 1;
+#X obj 46 72 t a b;
+#X connect 0 0 3 0;
+#X connect 1 0 3 0;
+#X connect 2 0 6 0;
+#X connect 2 1 1 0;
+#X connect 2 1 0 0;
+#X connect 2 1 5 0;
+#X connect 3 0 4 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 7 0 9 0;
+#X connect 8 0 9 1;
+#X connect 9 0 10 0;
+#X connect 10 0 2 0;
+#X connect 10 1 8 0;
+#X restore 56 337 pd init_fb;
+#X obj 24 306 t a b;
+#X obj 302 300 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 0 0 450 300 init_fb 0;
+#X msg 100 153 type BYTE;
+#X msg 78 131 format RGB32;
+#X obj 46 101 t b b;
+#X obj 78 241 t a;
+#X obj 78 265 outlet;
+#X msg 137 195 rectangle 1;
+#X msg 46 176 dimen 128 128;
+#X obj 46 11 inlet;
+#X msg 137 42 0;
+#X obj 46 49 spigot 1;
+#X obj 46 72 t a b;
+#X connect 0 0 3 0;
+#X connect 1 0 3 0;
+#X connect 2 0 6 0;
+#X connect 2 1 1 0;
+#X connect 2 1 0 0;
+#X connect 2 1 5 0;
+#X connect 3 0 4 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 7 0 9 0;
+#X connect 8 0 9 1;
+#X connect 9 0 10 0;
+#X connect 10 0 2 0;
+#X connect 10 1 8 0;
+#X restore 293 327 pd init_fb;
+#X obj 261 296 t a b;
+#X obj 547 298 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 0 0 450 300 init_fb 0;
+#X msg 100 153 type BYTE;
+#X msg 78 131 format RGB32;
+#X obj 46 101 t b b;
+#X obj 78 241 t a;
+#X obj 78 265 outlet;
+#X msg 137 195 rectangle 1;
+#X msg 46 176 dimen 128 128;
+#X obj 46 11 inlet;
+#X msg 137 42 0;
+#X obj 46 49 spigot 1;
+#X obj 46 72 t a b;
+#X connect 0 0 3 0;
+#X connect 1 0 3 0;
+#X connect 2 0 6 0;
+#X connect 2 1 1 0;
+#X connect 2 1 0 0;
+#X connect 2 1 5 0;
+#X connect 3 0 4 0;
+#X connect 5 0 3 0;
+#X connect 6 0 3 0;
+#X connect 7 0 9 0;
+#X connect 8 0 9 1;
+#X connect 9 0 10 0;
+#X connect 10 0 2 0;
+#X connect 10 1 8 0;
+#X restore 538 325 pd init_fb;
+#X obj 506 294 t a b;
+#X obj 32 29 gemhead 2;
+#X msg 271 106 0;
+#X obj 271 82 loadbang;
+#X msg 33 59 20;
+#X obj 32 90 until;
+#X obj 44 540 loadbang;
+#X msg 804 378 init \$1;
+#X floatatom 804 360 5 0 1 0 - - -;
+#X obj 762 371 t b;
+#X obj 762 254 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 762 407 texture_link 3;
+#X msg 804 338 1;
+#X msg 950 229 gravite \$1;
+#X floatatom 948 189 5 0 0 0 - - -;
+#X floatatom 1012 190 5 0 0 0 - - -;
+#X msg 1012 206 D \$1;
+#X msg 1063 208 K1 \$1;
+#X floatatom 1062 189 5 0 0 0 - - -;
+#X obj 948 207 / 100;
+#X obj 950 251 t a;
+#X obj 950 526 s shader_link;
+#X obj 952 90 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 952 70 r init_shader_link;
+#X obj 950 146 t b;
+#X obj 952 127 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X msg 1059 168 0.05;
+#X msg 950 169 -0.0025;
+#X msg 1009 170 0.004;
+#X obj 842 314 delay 1000;
+#X msg 842 337 0;
+#X obj 762 454 s shader_mass;
+#X obj 762 225 r init_shader_mass;
+#X obj 804 286 t b;
+#X msg 992 362 init \$1;
+#X floatatom 992 344 5 0 1 0 - - -;
+#X msg 992 322 1;
+#X obj 1030 298 delay 1000;
+#X msg 1030 321 0;
+#X obj 991 270 t b;
+#X msg 1049 470 texture_mass 1;
+#X msg 1040 496 texture_mass_old 2;
+#X obj 1040 419 t b;
+#X msg 771 426 texture_mass_old 2;
+#X msg 1071 391 N \$1;
+#X msg 1071 367 0.01;
+#X msg 1121 368 0;
+#X obj 1078 340 delay 100;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 31 0;
+#X connect 3 0 39 0;
+#X connect 5 0 40 0;
+#X connect 6 0 5 0;
+#X connect 7 0 51 0;
+#X connect 7 1 35 0;
+#X connect 8 0 7 1;
+#X connect 9 0 45 0;
+#X connect 11 0 37 0;
+#X connect 12 0 20 0;
+#X connect 13 0 54 0;
+#X connect 13 1 23 0;
+#X connect 14 0 13 1;
+#X connect 15 0 30 0;
+#X connect 18 0 19 0;
+#X connect 19 0 42 0;
+#X connect 20 0 38 0;
+#X connect 22 0 13 2;
+#X connect 25 0 31 0;
+#X connect 26 0 7 0;
+#X connect 27 0 13 0;
+#X connect 28 0 57 0;
+#X connect 29 0 39 0;
+#X connect 30 0 37 0;
+#X connect 31 0 49 0;
+#X connect 31 1 8 0;
+#X connect 31 1 14 0;
+#X connect 32 0 31 0;
+#X connect 34 0 7 2;
+#X connect 37 0 24 0;
+#X connect 38 0 11 0;
+#X connect 38 1 17 0;
+#X connect 38 1 37 1;
+#X connect 39 0 4 0;
+#X connect 40 0 3 0;
+#X connect 40 1 16 0;
+#X connect 40 1 39 1;
+#X connect 41 0 50 0;
+#X connect 42 0 9 0;
+#X connect 42 1 21 0;
+#X connect 43 0 44 0;
+#X connect 44 0 45 0;
+#X connect 45 0 10 0;
+#X connect 46 0 45 1;
+#X connect 47 0 35 0;
+#X connect 48 0 23 0;
+#X connect 49 0 33 0;
+#X connect 49 0 36 0;
+#X connect 50 0 40 0;
+#X connect 51 0 40 0;
+#X connect 51 1 50 0;
+#X connect 52 0 53 0;
+#X connect 53 0 38 0;
+#X connect 54 0 38 0;
+#X connect 54 1 53 0;
+#X connect 55 0 56 0;
+#X connect 56 0 42 0;
+#X connect 57 0 42 0;
+#X connect 57 1 56 0;
+#X connect 58 0 61 0;
+#X connect 59 0 26 0;
+#X connect 59 0 27 0;
+#X connect 59 0 28 0;
+#X connect 60 0 59 0;
+#X connect 61 0 62 0;
+#X connect 62 0 26 0;
+#X connect 62 0 27 0;
+#X connect 62 0 28 0;
+#X connect 63 0 29 0;
+#X connect 64 0 88 0;
+#X connect 65 0 64 0;
+#X connect 66 0 68 0;
+#X connect 66 0 100 0;
+#X connect 67 0 66 0;
+#X connect 67 0 90 0;
+#X connect 68 0 88 0;
+#X connect 69 0 65 0;
+#X connect 70 0 77 0;
+#X connect 71 0 76 0;
+#X connect 72 0 73 0;
+#X connect 73 0 77 0;
+#X connect 74 0 77 0;
+#X connect 75 0 74 0;
+#X connect 76 0 70 0;
+#X connect 77 0 78 0;
+#X connect 79 0 82 0;
+#X connect 79 0 96 0;
+#X connect 80 0 79 0;
+#X connect 81 0 84 0;
+#X connect 81 0 85 0;
+#X connect 81 0 83 0;
+#X connect 82 0 81 0;
+#X connect 83 0 75 0;
+#X connect 84 0 71 0;
+#X connect 85 0 72 0;
+#X connect 86 0 87 0;
+#X connect 87 0 65 0;
+#X connect 89 0 67 0;
+#X connect 90 0 69 0;
+#X connect 90 0 86 0;
+#X connect 91 0 78 0;
+#X connect 92 0 91 0;
+#X connect 93 0 92 0;
+#X connect 94 0 95 0;
+#X connect 94 0 102 0;
+#X connect 94 0 104 0;
+#X connect 95 0 92 0;
+#X connect 96 0 93 0;
+#X connect 96 0 94 0;
+#X connect 96 0 99 0;
+#X connect 97 0 78 0;
+#X connect 98 0 78 0;
+#X connect 99 0 97 0;
+#X connect 99 0 98 0;
+#X connect 100 0 88 0;
+#X connect 101 0 78 0;
+#X connect 102 0 101 0;
+#X connect 103 0 101 0;
+#X connect 104 0 103 0;
+#X restore 27 323 pd shaders_PM _________________;
+#N canvas 267 495 450 300 config 0;
+#X msg 16 75 W \$1;
+#X floatatom 225 101 5 0 0 0 - - -;
+#X msg 225 120 f \$1;
+#X obj 133 155 t a;
+#X msg 133 83 N \$1;
+#X text 141 101 bruit;
+#X obj 16 53 / 11000;
+#X obj 225 78 + 5;
+#X obj 225 55 * 5;
+#X obj 133 61 / 5000;
+#X msg 338 120 t \$1;
+#X obj 338 31 gemhead 77;
+#X obj 338 56 t b;
+#X obj 338 79 f;
+#X obj 338 99 + 0.3;
+#X obj 338 141 s shader_link;
+#X obj 133 181 s shader_link;
+#X obj 16 29 r oscillation1;
+#X obj 133 31 r qqt_noise;
+#X obj 225 31 r force_wind;
+#X connect 0 0 3 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 16 0;
+#X connect 4 0 3 0;
+#X connect 6 0 0 0;
+#X connect 7 0 1 0;
+#X connect 8 0 7 0;
+#X connect 9 0 4 0;
+#X connect 10 0 15 0;
+#X connect 11 0 12 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 13 1;
+#X connect 14 0 10 0;
+#X connect 17 0 6 0;
+#X connect 18 0 9 0;
+#X connect 19 0 8 0;
+#X restore 27 361 pd config _____________________;
+#N canvas 0 0 450 300 render 0;
+#X obj 43 137 pix_texture;
+#X obj 43 181 square 4;
+#X obj 43 115 gemhead 66;
+#X obj 241 120 != 0;
+#X obj 210 119 == 0;
+#X obj 133 58 r texture_link;
+#X obj 146 77 r texture_interpol;
+#X obj 210 146 s aff_drapeau;
+#X obj 120 39 r texture_mass;
+#X msg 43 94 0;
+#X obj 43 73 loadbang;
+#N canvas 0 0 656 297 spigot4 0;
+#X obj 40 21 inlet;
+#X obj 458 22 inlet;
+#X obj 40 179 outlet;
+#X obj 113 24 inlet;
+#X obj 112 91 spigot 0;
+#X obj 196 24 inlet;
+#X obj 195 91 spigot 0;
+#X obj 86 68 == 1;
+#X obj 159 71 == 2;
+#X obj 240 71 == 3;
+#X obj 40 88 spigot 0;
+#X obj 283 29 inlet;
+#X obj 282 96 spigot 0;
+#X obj 327 76 == 4;
+#X obj 361 32 inlet;
+#X obj 360 99 spigot 0;
+#X obj 405 79 == 5;
+#X connect 0 0 10 0;
+#X connect 1 0 7 0;
+#X connect 1 0 8 0;
+#X connect 1 0 9 0;
+#X connect 1 0 13 0;
+#X connect 1 0 16 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 5 0 6 0;
+#X connect 6 0 2 0;
+#X connect 7 0 10 1;
+#X connect 8 0 4 1;
+#X connect 9 0 6 1;
+#X connect 10 0 2 0;
+#X connect 11 0 12 0;
+#X connect 12 0 2 0;
+#X connect 13 0 12 1;
+#X connect 14 0 15 0;
+#X connect 15 0 2 0;
+#X connect 16 0 15 1;
+#X restore 120 115 pd spigot4;
+#X obj 160 96 r texture_normal;
+#X obj 43 160 translateXYZ 0 0 -40;
+#X obj 240 27 f;
+#X obj 238 5 inlet;
+#X connect 0 0 13 0;
+#X connect 2 0 0 0;
+#X connect 3 0 2 0;
+#X connect 4 0 7 0;
+#X connect 5 0 11 1;
+#X connect 6 0 11 2;
+#X connect 8 0 11 0;
+#X connect 9 0 2 0;
+#X connect 10 0 9 0;
+#X connect 11 0 0 1;
+#X connect 12 0 11 3;
+#X connect 13 0 1 0;
+#X connect 14 0 3 0;
+#X connect 14 0 4 0;
+#X connect 14 0 11 5;
+#X connect 15 0 14 0;
+#X restore 27 398 pd render _____________________;
+#X text 288 6 Made by Cyrille Henry 2008 10 24;
+#N canvas 452 305 812 549 shader_render 0;
+#X obj 315 429 pix_texture;
+#X obj 67 256 gemframebuffer;
+#X obj 67 443 pix_texture;
+#X obj 67 305 translateXYZ 0 0 -4;
+#X obj 67 462 square 4;
+#X obj 85 369 loadbang;
+#N canvas 224 312 1052 398 init 0;
+#X obj 14 130 outlet;
+#X obj 14 30 inlet;
+#X obj 14 53 spigot 1;
+#X obj 31 81 t b;
+#X msg 67 31 0;
+#X msg 14 104 rectangle 1 \, type BYTE \, format RGB32 \, dim 256 256
+;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 1;
+#X connect 5 0 0 0;
+#X restore 99 223 pd init;
+#N canvas 573 206 496 427 shader 0;
+#X obj 32 264 glsl_program;
+#X obj 126 187 change;
+#X obj 126 233 print linking;
+#X obj 32 167 glsl_fragment;
+#X msg 126 208 link \$1;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 30;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 120 89 pd load_shader;
+#X obj 32 36 inlet;
+#X obj 32 333 outlet;
+#X obj 155 18 inlet;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 113 288 pd init_shader;
+#X obj 278 25 inlet;
+#X obj 113 318 outlet;
+#X msg 43 143 open interpol.frag;
+#X msg 135 265 set -1;
+#X connect 0 0 7 0;
+#X connect 0 1 9 0;
+#X connect 1 0 4 0;
+#X connect 3 0 0 0;
+#X connect 3 1 1 0;
+#X connect 4 0 0 0;
+#X connect 4 0 2 0;
+#X connect 5 0 12 0;
+#X connect 6 0 3 0;
+#X connect 8 0 12 0;
+#X connect 8 0 13 0;
+#X connect 9 0 11 0;
+#X connect 10 0 0 0;
+#X connect 12 0 3 0;
+#X connect 13 0 9 0;
+#X restore 67 175 pd shader;
+#X obj 92 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 146 134 t b;
+#X msg 146 155 texture_mass 1;
+#N canvas 668 405 301 465 shader 0;
+#X obj 110 298 pack 0 0;
+#X obj 131 278 t b f;
+#X msg 110 321 link \$1 \$2;
+#X floatatom 131 259 2 0 0 0 ID - -;
+#X floatatom 110 158 2 0 0 0 ID - -;
+#X obj 128 342 print linking;
+#X obj 74 70 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 38 213 glsl_fragment;
+#X obj 38 116 glsl_vertex;
+#X obj 110 135 change;
+#X obj 131 233 change;
+#X obj 38 371 glsl_program;
+#N canvas 703 231 450 300 load_glsl 0;
+#X obj 51 22 gemhead;
+#X obj 51 98 outlet;
+#X obj 51 50 route gem_state;
+#X obj 51 74 route 1;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 1 0;
+#X restore 74 45 pd load_glsl;
+#X obj 41 13 inlet;
+#X obj 37 397 outlet;
+#X obj 150 10 inlet;
+#X obj 265 14 inlet;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 107 399 pd init_shader;
+#X obj 107 429 outlet;
+#X msg 52 94 open fetching2.vert;
+#X msg 48 183 open fetching2.frag;
+#X msg 132 373 set -1;
+#X connect 0 0 2 0;
+#X connect 1 0 0 0;
+#X connect 1 1 0 1;
+#X connect 2 0 5 0;
+#X connect 2 0 11 0;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X connect 6 0 19 0;
+#X connect 6 0 20 0;
+#X connect 7 0 11 0;
+#X connect 7 1 10 0;
+#X connect 8 0 7 0;
+#X connect 8 1 9 0;
+#X connect 9 0 4 0;
+#X connect 10 0 3 0;
+#X connect 11 0 14 0;
+#X connect 11 1 17 0;
+#X connect 12 0 6 0;
+#X connect 13 0 8 0;
+#X connect 15 0 6 0;
+#X connect 15 0 21 0;
+#X connect 16 0 11 0;
+#X connect 17 0 18 0;
+#X connect 19 0 8 0;
+#X connect 20 0 7 0;
+#X connect 21 0 17 0;
+#X restore 315 208 pd shader;
+#X obj 345 185 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 387 229 t b;
+#X obj 315 116 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 147 114 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 163 278 s texture_interpol;
+#X obj 315 96 r aff_drapeau;
+#X obj 67 102 gemhead 31;
+#X obj 315 135 gemhead 51;
+#X obj 410 25 inlet;
+#X obj 410 156 delay 1000;
+#X obj 315 461 mesh_square 92 64;
+#X obj 315 156 alpha;
+#X obj 315 316 scaleXYZ 15 15 15;
+#X obj 315 286 translateXYZ 0 0.55 -8;
+#X msg 327 399 quality 0;
+#X msg 521 258 draw line;
+#X msg 521 238 draw default;
+#X msg 522 279 draw point;
+#X floatatom 485 203 5 0 0 0 - - -;
+#X obj 485 28 inlet;
+#X obj 327 365 loadbang;
+#X obj 67 198 t a b;
+#X msg 410 185 texture 4;
+#X msg 85 396 rectangle 1 \, quality 0;
+#X obj 637 140 loadbang;
+#X msg 637 162 15;
+#X obj 637 184 s \$0-scale;
+#X connect 0 0 22 0;
+#X connect 1 0 3 0;
+#X connect 1 1 0 1;
+#X connect 1 1 2 1;
+#X connect 1 1 16 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 0;
+#X connect 5 0 35 0;
+#X connect 6 0 1 0;
+#X connect 7 0 33 0;
+#X connect 7 1 15 0;
+#X connect 8 0 7 1;
+#X connect 9 0 10 0;
+#X connect 10 0 7 2;
+#X connect 11 0 25 0;
+#X connect 11 1 13 0;
+#X connect 12 0 11 1;
+#X connect 13 0 34 0;
+#X connect 14 0 19 0;
+#X connect 15 0 9 0;
+#X connect 17 0 14 0;
+#X connect 18 0 7 0;
+#X connect 19 0 23 0;
+#X connect 20 0 21 0;
+#X connect 20 0 12 0;
+#X connect 20 0 8 0;
+#X connect 21 0 34 0;
+#X connect 23 0 11 0;
+#X connect 24 0 0 0;
+#X connect 25 0 24 0;
+#X connect 26 0 0 0;
+#X connect 27 0 22 0;
+#X connect 28 0 22 0;
+#X connect 29 0 22 0;
+#X connect 30 0 24 1;
+#X connect 30 0 24 2;
+#X connect 30 0 24 3;
+#X connect 31 0 30 0;
+#X connect 32 0 26 0;
+#X connect 33 0 1 0;
+#X connect 33 1 6 0;
+#X connect 34 0 11 2;
+#X connect 35 0 2 0;
+#X connect 36 0 37 0;
+#X connect 37 0 38 0;
+#X restore 27 304 pd shader_render ______________;
+#X text 12 6 "Potential Flag" \, by Samuel Bianchini;
+#X floatatom 606 304 5 0 0 0 - - -;
+#X obj 606 324 * 10;
+#N canvas 830 53 450 300 Gem.init 0;
+#X obj 26 3 loadbang;
+#X msg 26 26 perspec -1 1 -1 1 10 100;
+#X obj 26 124 t a;
+#X obj 25 153 outlet;
+#X msg 55 77 dimen 800 600;
+#X msg 37 51 FSAA 5;
+#X connect 0 0 1 0;
+#X connect 0 0 5 0;
+#X connect 0 0 4 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 4 0 2 0;
+#X connect 5 0 2 0;
+#X restore 66 188 pd Gem.init;
+#N canvas 341 104 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 1 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X obj 318 255 gemwin 30;
+#X msg 441 219 color 0.2 0.3 0.5;
+#X msg 443 257 dimen 1024 768;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 7 0 17 0;
+#X connect 7 1 9 0;
+#X connect 9 0 10 0;
+#X connect 9 1 12 0;
+#X connect 10 0 11 0;
+#X connect 11 0 14 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 0 0;
+#X connect 17 0 8 0;
+#X connect 18 0 17 0;
+#X connect 19 0 17 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 47 209 pd gemwin 30;
+#X floatatom 210 282 5 0 0 0 scale-> #0-scale -;
+#X obj 6 325 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#N canvas 290 239 395 502 shader_normal 0;
+#X obj 51 233 gemframebuffer;
+#X obj 51 347 pix_texture;
+#X obj 51 276 translateXYZ 0 0 -4;
+#X obj 51 366 square 4;
+#X obj 67 304 loadbang;
+#N canvas 0 0 1052 398 init 0;
+#X obj 14 140 outlet;
+#X obj 14 30 inlet;
+#X obj 14 55 spigot 1;
+#X obj 24 76 b;
+#X msg 67 31 0;
+#X msg 14 114 rectangle 1 \, type BYTE \, format RGB32 \, dim 128 128
+;
+#X connect 1 0 2 0;
+#X connect 2 0 5 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 1;
+#X connect 5 0 0 0;
+#X restore 83 160 pd init;
+#N canvas 555 24 496 709 shader 0;
+#X obj 32 474 glsl_program;
+#X obj 126 357 change;
+#X obj 126 443 print linking;
+#X obj 32 337 glsl_fragment;
+#N canvas 0 0 450 300 load_shader 0;
+#X obj 89 99 t b b;
+#X msg 119 126 0;
+#X obj 89 154 outlet;
+#X obj 89 71 gemhead 30;
+#X connect 0 0 2 0;
+#X connect 0 1 1 0;
+#X connect 1 0 3 0;
+#X connect 3 0 0 0;
+#X restore 134 96 pd load_shader;
+#X obj 32 36 inlet;
+#X obj 32 543 outlet;
+#X obj 175 28 inlet;
+#N canvas 0 0 450 300 init_shader 0;
+#X obj 89 154 outlet;
+#X obj 89 45 inlet;
+#X obj 89 73 change;
+#X obj 89 100 t b;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X restore 113 498 pd init_shader;
+#X obj 278 25 inlet;
+#X obj 113 528 outlet;
+#X msg 43 313 open normal.frag;
+#X obj 32 185 glsl_vertex;
+#X obj 96 122 t b b;
+#X obj 126 393 pack f f;
+#X msg 126 418 link \$1 \$2;
+#X msg 42 161 open normal.vert;
+#X connect 0 0 6 0;
+#X connect 0 1 8 0;
+#X connect 1 0 14 0;
+#X connect 3 0 0 0;
+#X connect 3 1 1 0;
+#X connect 4 0 13 0;
+#X connect 5 0 12 0;
+#X connect 7 0 13 0;
+#X connect 8 0 10 0;
+#X connect 9 0 0 0;
+#X connect 11 0 3 0;
+#X connect 12 0 3 0;
+#X connect 12 1 14 1;
+#X connect 13 0 11 0;
+#X connect 13 1 16 0;
+#X connect 14 0 15 0;
+#X connect 15 0 0 0;
+#X connect 15 0 2 0;
+#X connect 16 0 12 0;
+#X restore 51 112 pd shader;
+#X obj 76 93 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 143 65 t b;
+#X obj 146 45 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 157 252 s texture_normal;
+#X obj 51 39 gemhead 32;
+#X obj 78 189 loadbang;
+#X msg 78 208 texunit 4;
+#X msg 141 88 texture_mass 1;
+#X obj 51 136 t a b;
+#X msg 67 323 rectangle 1 \, quality 1;
+#X connect 0 0 2 0;
+#X connect 0 1 10 0;
+#X connect 0 1 1 1;
+#X connect 1 0 3 0;
+#X connect 2 0 1 0;
+#X connect 4 0 16 0;
+#X connect 5 0 0 0;
+#X connect 6 0 15 0;
+#X connect 6 1 9 0;
+#X connect 7 0 6 1;
+#X connect 8 0 14 0;
+#X connect 9 0 8 0;
+#X connect 11 0 6 0;
+#X connect 12 0 13 0;
+#X connect 13 0 0 0;
+#X connect 14 0 6 2;
+#X connect 15 0 0 0;
+#X connect 15 1 5 0;
+#X connect 16 0 1 0;
+#X restore 27 342 pd shader_normal ______________;
+#X obj 6 304 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#N canvas 1468 153 767 700 \$0-pad 0;
+#X msg 158 309 clear;
+#N canvas 6 50 590 367 clear-all 0;
+#X obj 89 46 inlet;
+#X obj 89 122 s pd-\$0-work;
+#X msg 89 99 clear;
+#X obj 89 72 t b;
+#X connect 0 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X restore 158 331 pd clear-all;
+#X obj 92 646 outlet;
+#X obj 72 171 loadbang;
+#X obj 191 411 metro 50;
+#N canvas 581 163 695 660 pointer-parser 0;
+#X obj 129 165 pointer;
+#X text 276 46 from metro;
+#X obj 282 346 t b f;
+#X obj 117 49 inlet;
+#X obj 237 48 inlet;
+#X obj 129 541 outlet;
+#X obj 129 398 pack 0 0;
+#X obj 129 193 get \$0-xy-pad-knob-1 x0 y0;
+#X obj 129 320 change -1;
+#X obj 282 325 change -1;
+#X obj 129 238 / 90;
+#X obj 282 236 / 90;
+#X obj 129 420 unpack 0 0;
+#X obj 129 442 * 2;
+#X obj 129 464 - 1;
+#X obj 129 516 pack;
+#X obj 169 442 * 2;
+#X obj 169 464 - 1;
+#X obj 384 202 set \$0-xy-pad-knob-1 x0 y0;
+#X obj 384 43 inlet set;
+#X obj 384 65 unpack;
+#X text 432 67 -1..+1;
+#X obj 384 112 + 1;
+#X obj 384 134 / 2;
+#X obj 384 156 * 90;
+#X obj 424 112 + 1;
+#X obj 424 134 / 2;
+#X floatatom 173 241 5 0 0 0 - - -;
+#X obj 424 156 * 90;
+#X connect 0 0 18 2;
+#X connect 0 0 7 0;
+#X connect 2 0 6 0;
+#X connect 2 1 6 1;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 6 0 12 0;
+#X connect 7 0 10 0;
+#X connect 7 0 27 0;
+#X connect 7 1 11 0;
+#X connect 8 0 6 0;
+#X connect 9 0 2 0;
+#X connect 10 0 8 0;
+#X connect 11 0 9 0;
+#X connect 12 0 13 0;
+#X connect 12 1 16 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 5 0;
+#X connect 16 0 17 0;
+#X connect 17 0 15 1;
+#X connect 19 0 20 0;
+#X connect 20 0 22 0;
+#X connect 20 1 25 0;
+#X connect 22 0 23 0;
+#X connect 23 0 24 0;
+#X connect 24 0 18 0;
+#X connect 25 0 26 0;
+#X connect 26 0 28 0;
+#X connect 28 0 18 1;
+#X restore 72 448 pd pointer-parser;
+#N canvas 419 563 751 371 add-controller 0;
+#X msg 520 189 traverse \$1 \, bang;
+#X obj 520 216 pointer;
+#X obj 405 322 outlet;
+#X obj 405 21 inlet;
+#X obj 405 50 t f b;
+#X obj 520 132 symbol pd-\$0-work;
+#X obj 405 285 append \$0-xy-pad-knob-1 x0 y0 id;
+#X obj 23 35 struct \$0-xy-pad-knob-1 float x0 float y0 float id;
+#X obj 22 81 filledpolygon id 999 1 x0(0:90)(0:90) y0(0:90)(0:90) x0(0:90)(10:100)
+y0(0:90)(0:90) x0(0:90)(10:100) y0(0:90)(10:100) x0(0:90)(0:90) y0(0:90)(10:100)
+;
+#X msg 405 261 45 45 \$1;
+#X connect 0 0 1 0;
+#X connect 1 0 6 3;
+#X connect 3 0 4 0;
+#X connect 4 0 9 0;
+#X connect 4 1 5 0;
+#X connect 5 0 0 0;
+#X connect 6 0 2 0;
+#X connect 9 0 6 0;
+#X restore 72 379 pd add-controller;
+#X obj 192 391 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X msg 193 370 1;
+#X obj 72 303 t f b b;
+#X text 111 233 5/10 red;
+#X text 111 248 3/10 green;
+#X text 111 263 2/10 blue;
+#X text 522 76 (c) 2010 Thomas Musil;
+#X text 521 58 (c) -2010 Frank Barknecht;
+#X msg 72 233 900;
+#X obj 162 646 outlet;
+#X text 486 42 based on: xy-pad;
+#N canvas 1444 366 450 300 xy2rphi 0;
+#X obj 46 35 inlet x y;
+#X obj 46 272 outlet r;
+#X obj 136 266 outlet phi;
+#X text 244 77 r=sqrt(x^2+y^2);
+#X text 246 97 phi=atan2(y \, x);
+#X obj 102 106 t f f f;
+#X obj 102 129 *;
+#X obj 46 169 +;
+#X obj 46 106 t f f f;
+#X obj 46 129 *;
+#X obj 46 201 sqrt;
+#X obj 136 157 pack;
+#X obj 136 196 atan2;
+#X msg 136 177 \$2 \$1;
+#X obj 46 61 unpack 0 0;
+#X text 147 282 in rad;
+#X connect 0 0 14 0;
+#X connect 5 0 6 0;
+#X connect 5 1 6 1;
+#X connect 5 2 11 1;
+#X connect 6 0 7 1;
+#X connect 7 0 10 0;
+#X connect 8 0 9 0;
+#X connect 8 1 9 1;
+#X connect 8 2 11 0;
+#X connect 9 0 7 0;
+#X connect 10 0 1 0;
+#X connect 11 0 13 0;
+#X connect 12 0 2 0;
+#X connect 13 0 12 0;
+#X connect 14 0 8 0;
+#X connect 14 1 5 0;
+#X restore 394 485 pd xy2rphi;
+#X obj 92 530 t l l;
+#X obj 92 552 unpack 0 0;
+#X obj 387 102 inlet r;
+#X obj 456 103 inlet phi;
+#X obj 444 333 t f f;
+#X obj 444 357 cos;
+#X obj 387 354 t f f;
+#X obj 387 390 * 1;
+#X obj 417 389 * 0;
+#X obj 387 277 unpack 0 0;
+#X obj 387 254 pack;
+#X obj 456 225 t b f;
+#X obj 471 356 sin;
+#X obj 387 412 pack;
+#X obj 387 204 t f;
+#X obj 387 226 clip 0 1;
+#X obj 304 74 cnv 10 12 12 empty empty empty 20 12 0 14 -99865 -66577
+0;
+#N canvas 493 264 450 300 \$0-work 0;
+#X scalar 1002-xy-pad-knob-1 71.2205 45 900 \;;
+#X coords 0 100 100 0 100 100 1;
+#X restore 260 30 pd \$0-work;
+#X obj 451 532 wrap;
+#X obj 72 193 t b b;
+#X obj 608 163 atan2;
+#X msg 608 138 1 0;
+#X obj 608 185 * 4;
+#X obj 608 207 t f f;
+#X obj 378 612 s \$0-force;
+#X obj 451 632 s \$0-direction;
+#X msg 451 554 set \$1;
+#X msg 378 564 set \$1;
+#X obj 451 507 / 6.28;
+#X obj 444 309 * -6.28;
+#X obj 394 507 t f f;
+#X obj 337 537 s force_wind;
+#X obj 160 611 * -1;
+#X connect 0 0 1 0;
+#X connect 3 0 38 0;
+#X connect 4 0 5 1;
+#X connect 5 0 19 0;
+#X connect 6 0 5 0;
+#X connect 7 0 4 0;
+#X connect 8 0 7 0;
+#X connect 9 0 6 0;
+#X connect 9 1 8 0;
+#X connect 9 2 0 0;
+#X connect 15 0 9 0;
+#X connect 18 0 49 0;
+#X connect 18 1 47 0;
+#X connect 19 0 20 0;
+#X connect 19 1 18 0;
+#X connect 20 0 2 0;
+#X connect 20 1 51 0;
+#X connect 21 0 33 0;
+#X connect 22 0 30 0;
+#X connect 23 0 24 0;
+#X connect 23 1 31 0;
+#X connect 24 0 26 1;
+#X connect 25 0 26 0;
+#X connect 25 1 27 0;
+#X connect 26 0 32 0;
+#X connect 27 0 32 1;
+#X connect 28 0 25 0;
+#X connect 28 1 48 0;
+#X connect 29 0 28 0;
+#X connect 30 0 29 0;
+#X connect 30 1 29 1;
+#X connect 31 0 27 1;
+#X connect 32 0 5 2;
+#X connect 33 0 34 0;
+#X connect 34 0 29 0;
+#X connect 37 0 45 0;
+#X connect 38 0 15 0;
+#X connect 38 1 40 0;
+#X connect 39 0 41 0;
+#X connect 40 0 39 0;
+#X connect 41 0 42 0;
+#X connect 42 0 48 1;
+#X connect 42 1 47 1;
+#X connect 45 0 44 0;
+#X connect 46 0 43 0;
+#X connect 47 0 37 0;
+#X connect 48 0 23 0;
+#X connect 49 0 50 0;
+#X connect 49 1 46 0;
+#X connect 51 0 16 0;
+#X coords 0 -1 1 1 100 100 2 260 30;
+#X restore 445 290 pd \$0-pad;
+#X obj 445 151 vsl 15 128 0 1 0 0 empty \$0-force force 0 -9 0 10 -262144
+-1 -1 7400 1;
+#X obj 538 152 vsl 15 128 0 1 0 0 empty \$0-direction direction 0 -9
+0 10 -262144 -1 -1 0 1;
+#N canvas 424 571 337 368 wind-control. 0;
+#X obj 41 82 pack f f;
+#X msg 41 104 wind \$1 \$2;
+#X obj 41 126 s shader_link;
+#X obj 41 30 inlet;
+#X obj 105 32 inlet;
+#X obj 181 304 s oscillation1;
+#X obj 41 58 / 11000;
+#X obj 105 58 / 11000;
+#X obj 181 187 *;
+#X obj 181 164 t f f;
+#X obj 181 212 +;
+#X obj 181 236 sqrt;
+#X obj 231 187 *;
+#X obj 231 164 t f f;
+#X obj 181 259 * 600;
+#X obj 181 281 min 300;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 3 0 6 0;
+#X connect 3 0 9 0;
+#X connect 4 0 7 0;
+#X connect 4 0 13 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 1;
+#X connect 8 0 10 0;
+#X connect 9 0 8 0;
+#X connect 9 1 8 1;
+#X connect 10 0 11 0;
+#X connect 11 0 14 0;
+#X connect 12 0 10 1;
+#X connect 13 0 12 0;
+#X connect 13 1 12 1;
+#X connect 14 0 15 0;
+#X connect 15 0 5 0;
+#X restore 445 397 pd wind-control.;
+#X text 28 20 Simple version for Gem examples;
+#X text 29 34 Did work under Linux \, with Nvidia driver. I don't know
+on other OS/hardware.;
+#X text 29 72 This patch is quite huge. the GPU compute the position
+of 64x92 masses \, and 64x92x12 links at 50x20 Hz. (about 7e+07 links/sec
+\, so about 100 time faster than what is curently possible with MSD
+on a CPU) (My GPU is old \, this patch performs 10 to 50 times faster
+on a good GPU);
+#X obj 606 346 s qqt_noise;
+#X connect 0 0 5 0;
+#X connect 2 0 1 0;
+#X connect 9 0 10 0;
+#X connect 10 0 24 0;
+#X connect 11 0 12 0;
+#X connect 13 0 7 1;
+#X connect 14 0 3 0;
+#X connect 16 0 7 0;
+#X connect 17 0 20 0;
+#X connect 17 1 20 1;
+#X connect 18 0 17 0;
+#X connect 19 0 17 1;
diff --git a/Gem/examples/10.glsl/11.geometry.pd b/Gem/examples/10.glsl/11.geometry.pd
new file mode 100644
index 0000000..1851c8a
--- /dev/null
+++ b/Gem/examples/10.glsl/11.geometry.pd
@@ -0,0 +1,123 @@
+#N canvas 197 25 552 632 10;
+#X floatatom 132 447 9 0 0 0 ID - -;
+#X floatatom 132 279 9 0 0 0 ID - -;
+#X obj 150 506 print linking;
+#X obj 132 465 pack 0 0 0;
+#X floatatom 126 364 9 0 0 0 ID - -;
+#X obj 44 139 gemhead;
+#X msg 132 485 link \$1 \$2 \$3;
+#X obj 44 319 glsl_vertex;
+#X obj 44 403 glsl_fragment;
+#X obj 44 237 glsl_geometry;
+#X obj 44 158 alpha;
+#X floatatom 122 531 5 0 0 0 - - -;
+#X floatatom 164 531 5 0 0 0 - - -;
+#X floatatom 209 532 5 0 0 0 - - -;
+#X obj 44 512 glsl_program;
+#X msg 182 200 -1;
+#X obj 182 156 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 132 258 change;
+#X obj 126 341 change;
+#X obj 132 426 change;
+#X obj 44 552 translateXYZ 0 0 0;
+#X obj 44 197 colorRGB 1 1 1;
+#X floatatom 128 174 5 0 0 0 - - -;
+#X obj 44 177 depth 1;
+#X obj 44 576 circle;
+#X obj 182 176 t b b;
+#X text 184 7 geometry shader;
+#X text 48 28 The geometry shader is usefull to create new geometry
+;
+#X text 51 47 Here is an example where 40 circles are draw with 1 single
+primitive.;
+#X text 49 87 Be aware that the geometry shader is computed after the
+vertex shader. coordinate are in 2d.;
+#X msg 58 217 open geo.geom;
+#X msg 56 299 open geo.vert;
+#X msg 57 384 open geo.frag;
+#X obj 182 136 loadbang;
+#X text 205 155 load shaders;
+#N canvas 87 154 247 179 Gem.init 0;
+#X obj 118 46 loadbang;
+#X msg 118 81 reset;
+#X obj 118 113 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X restore 366 247 pd Gem.init;
+#N canvas 340 107 682 322 gemwin 0;
+#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
+-1 -1 0 1;
+#X obj 102 161 r \$0-gemstart;
+#X obj 102 182 select 1 0;
+#X msg 102 214 create \, 1;
+#X msg 177 215 destroy;
+#X obj 102 239 t a;
+#X obj 318 54 inlet;
+#X obj 318 255 gemwin;
+#X obj 318 100 t a a;
+#X obj 318 287 outlet;
+#X obj 350 128 route create destroy;
+#X obj 350 150 t b;
+#X msg 350 172 1;
+#X obj 390 150 t b;
+#X msg 390 172 0;
+#X obj 350 195 t f;
+#X msg 350 219 set \$1;
+#X text 118 122 rendering;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 2 1 4 0;
+#X connect 3 0 5 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 10 0;
+#X connect 10 0 11 0;
+#X connect 10 1 13 0;
+#X connect 11 0 12 0;
+#X connect 12 0 15 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 0 0;
+#X coords 0 -1 1 1 85 40 1 100 100;
+#X restore 336 264 pd gemwin;
+#X connect 0 0 3 0;
+#X connect 1 0 3 2;
+#X connect 3 0 6 0;
+#X connect 4 0 3 1;
+#X connect 5 0 10 0;
+#X connect 6 0 2 0;
+#X connect 6 0 14 0;
+#X connect 7 0 8 0;
+#X connect 7 1 18 0;
+#X connect 8 0 14 0;
+#X connect 8 1 19 0;
+#X connect 9 0 7 0;
+#X connect 9 1 17 0;
+#X connect 10 0 23 0;
+#X connect 11 0 20 1;
+#X connect 12 0 20 2;
+#X connect 13 0 20 3;
+#X connect 14 0 20 0;
+#X connect 15 0 19 0;
+#X connect 16 0 25 0;
+#X connect 17 0 1 0;
+#X connect 18 0 4 0;
+#X connect 19 0 0 0;
+#X connect 20 0 24 0;
+#X connect 21 0 9 0;
+#X connect 22 0 21 2;
+#X connect 23 0 21 0;
+#X connect 25 0 15 0;
+#X connect 25 1 32 0;
+#X connect 25 1 30 0;
+#X connect 25 1 31 0;
+#X connect 30 0 9 0;
+#X connect 31 0 7 0;
+#X connect 32 0 8 0;
+#X connect 33 0 16 0;
+#X connect 35 0 36 0;
diff --git a/Gem/examples/10.glsl/12.tri2fan.pd b/Gem/examples/10.glsl/12.tri2fan.pd
new file mode 100644
index 0000000..5437d4b
--- /dev/null
+++ b/Gem/examples/10.glsl/12.tri2fan.pd
@@ -0,0 +1,157 @@
+#N canvas 1775 56 785 745 10;
+#X floatatom 286 440 9 0 0 0 ID - -;
+#X floatatom 249 264 9 0 0 0 ID - -;
+#X obj 296 500 print linking;
+#X obj 286 458 pack 0 0 0;
+#X floatatom 244 350 9 0 0 0 ID - -;
+#X obj 161 78 gemhead;
+#X msg 286 479 link \$1 \$2 \$3;
+#X obj 161 151 alpha;
+#X floatatom 202 578 5 0 0 0 - - -;
+#X floatatom 244 578 5 0 0 0 - - -;
+#X floatatom 289 579 5 0 0 0 - - -;
+#X obj 161 526 glsl_program;
+#X obj 42 117 t b b b b;
+#X msg 42 147 -1;
+#X obj 42 98 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 249 242 change;
+#X obj 244 329 change;
+#X obj 286 419 change;
+#X obj 161 650 t a b;
+#X obj 209 650 loadbang;
+#X msg 340 672 2;
+#X obj 161 217 glsl_geometry;
+#X obj 161 307 glsl_vertex;
+#X obj 161 394 glsl_fragment;
+#X obj 42 76 loadbang;
+#X text 65 97 reload;
+#X msg 422 113 create \, 1;
+#X msg 431 135 destroy;
+#X obj 402 654 triangle;
+#X msg 473 202 lighting 1;
+#X obj 161 627 spigot 1;
+#X obj 230 628 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 470 633 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X obj 402 631 spigot 0;
+#X msg 460 180 perspec -0.1 0.1 -0.1 0.1 1 110;
+#X obj 422 229 gemwin;
+#X obj 460 159 loadbang;
+#N canvas 0 0 877 520 light 0;
+#X obj 225 45 gemhead 10;
+#X floatatom 258 78 5 0 0 0 - - -;
+#X floatatom 299 77 5 0 0 0 - - -;
+#X floatatom 341 78 5 0 0 0 - - -;
+#X obj 225 227 world_light;
+#X obj 250 151 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X msg 250 172 debug \$1;
+#X obj 225 103 rotateXYZ 0 30 0;
+#X obj 27 51 gemhead 10;
+#X floatatom 60 84 5 0 0 0 - - -;
+#X floatatom 101 83 5 0 0 0 - - -;
+#X floatatom 143 84 5 0 0 0 - - -;
+#X obj 27 233 world_light;
+#X obj 48 158 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
+;
+#X msg 48 179 debug \$1;
+#X obj 27 109 rotateXYZ 0 -90 0;
+#X msg 297 207 0.8 0.8 0.8;
+#X msg 100 210 0.7 0.7 0.7;
+#X obj 408 73 loadbang;
+#X connect 0 0 7 0;
+#X connect 1 0 7 1;
+#X connect 2 0 7 2;
+#X connect 3 0 7 3;
+#X connect 5 0 6 0;
+#X connect 6 0 4 0;
+#X connect 7 0 4 0;
+#X connect 8 0 15 0;
+#X connect 9 0 15 1;
+#X connect 10 0 15 2;
+#X connect 11 0 15 3;
+#X connect 13 0 14 0;
+#X connect 14 0 12 0;
+#X connect 15 0 12 0;
+#X connect 16 0 4 1;
+#X connect 17 0 12 1;
+#X connect 18 0 17 0;
+#X connect 18 0 16 0;
+#X restore 421 253 pd light;
+#X obj 161 595 rotateXYZ -55 20 0;
+#X floatatom 298 537 5 0 0 0 - - -;
+#X text 235 13 replace triangle with 3 triangles thoses orientation
+depend on the normal of the original primitive;
+#X obj 161 554 scaleXYZ 0.2 0.2 0.2;
+#X msg 172 129 auto 1;
+#X obj 172 108 loadbang;
+#X msg 176 195 open tri2fan.geom;
+#X msg 177 286 open tri2fan.vert;
+#X msg 178 370 open tri2fan.frag;
+#X obj 161 724 newWave 25 25;
+#X msg 209 671 D1 0.01 \, D2 0.1;
+#X floatatom 520 593 5 0 25 0 - - -;
+#X obj 552 635 pack f f;
+#X obj 520 611 t f f;
+#X msg 552 655 force \$1 \$2 0.3;
+#X connect 0 0 3 0;
+#X connect 1 0 3 2;
+#X connect 3 0 6 0;
+#X connect 4 0 3 1;
+#X connect 5 0 7 0;
+#X connect 6 0 2 0;
+#X connect 6 0 11 0;
+#X connect 7 0 21 0;
+#X connect 8 0 38 1;
+#X connect 9 0 38 2;
+#X connect 10 0 38 3;
+#X connect 11 0 41 0;
+#X connect 12 0 13 0;
+#X connect 12 1 46 0;
+#X connect 12 2 45 0;
+#X connect 12 3 44 0;
+#X connect 13 0 17 0;
+#X connect 14 0 12 0;
+#X connect 15 0 1 0;
+#X connect 16 0 4 0;
+#X connect 17 0 0 0;
+#X connect 18 0 47 0;
+#X connect 18 1 47 0;
+#X connect 19 0 48 0;
+#X connect 20 0 47 3;
+#X connect 21 0 22 0;
+#X connect 21 1 15 0;
+#X connect 22 0 23 0;
+#X connect 22 1 16 0;
+#X connect 23 0 11 0;
+#X connect 23 1 17 0;
+#X connect 24 0 14 0;
+#X connect 26 0 35 0;
+#X connect 27 0 35 0;
+#X connect 29 0 35 0;
+#X connect 30 0 18 0;
+#X connect 31 0 30 1;
+#X connect 32 0 33 1;
+#X connect 33 0 28 0;
+#X connect 34 0 35 0;
+#X connect 36 0 34 0;
+#X connect 36 0 29 0;
+#X connect 38 0 30 0;
+#X connect 38 0 33 0;
+#X connect 39 0 41 2;
+#X connect 39 0 41 3;
+#X connect 39 0 41 1;
+#X connect 41 0 38 0;
+#X connect 42 0 7 0;
+#X connect 43 0 42 0;
+#X connect 44 0 21 0;
+#X connect 45 0 22 0;
+#X connect 46 0 23 0;
+#X connect 48 0 47 0;
+#X connect 49 0 51 0;
+#X connect 50 0 52 0;
+#X connect 51 0 50 1;
+#X connect 51 1 50 0;
+#X connect 52 0 47 0;
diff --git a/Gem/examples/10.glsl/13.panoramique.pd b/Gem/examples/10.glsl/13.panoramique.pd
new file mode 100644
index 0000000..c483a4c
--- /dev/null
+++ b/Gem/examples/10.glsl/13.panoramique.pd
@@ -0,0 +1,525 @@
+#N canvas 189 90 1107 660 10;
+#X msg 17 91 create \, 1;
+#X msg 30 114 0 \, destroy;
+#X obj 160 405 pix_texture;
+#X obj 169 165 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 1338 29 792 790 glsl 0;
+#X obj 78 339 glsl_vertex;
+#X msg 32 338 print;
+#X obj 78 626 glsl_program;
+#X obj 163 555 pack 0 0;
+#X msg 30 476 print;
+#X obj 163 511 change;
+#X obj 150 358 change;
+#X msg 163 579 link \$1 \$2;
+#X msg 32 620 print;
+#X obj 77 490 glsl_fragment;
+#X floatatom 163 535 2 0 0 0 ID - -;
+#X floatatom 150 381 2 0 0 0 ID - -;
+#X obj 181 600 print linking;
+#X obj 15 21 inlet;
+#X obj 78 662 outlet;
+#X obj 577 95 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 647 change;
+#X obj 157 668 t b;
+#X obj 158 690 outlet;
+#X obj 90 426 symbol;
+#X obj 90 401 t b;
+#X msg 287 598 0;
+#X obj 15 65 t b b b;
+#X msg 118 307 open panoramique.vert;
+#X msg 90 453 open panoramique.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 160 182 pd glsl;
+#X obj 175 245 loadbang;
+#X obj 160 288 pix_image;
+#X msg 174 379 rectangle 1;
+#X obj 174 358 loadbang;
+#X obj 160 317 pix_info 0 0 0;
+#X msg 238 148 sizeX \$1;
+#X msg 253 169 sizeY \$1;
+#X obj 353 406 pix_texture;
+#X obj 362 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 1338 29 792 790 glsl 0;
+#X obj 78 339 glsl_vertex;
+#X msg 32 338 print;
+#X obj 78 626 glsl_program;
+#X obj 163 555 pack 0 0;
+#X msg 30 476 print;
+#X obj 163 511 change;
+#X obj 150 358 change;
+#X msg 163 579 link \$1 \$2;
+#X msg 32 620 print;
+#X obj 77 490 glsl_fragment;
+#X floatatom 163 535 2 0 0 0 ID - -;
+#X floatatom 150 381 2 0 0 0 ID - -;
+#X obj 181 600 print linking;
+#X obj 15 21 inlet;
+#X obj 78 662 outlet;
+#X obj 577 95 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 647 change;
+#X obj 157 668 t b;
+#X obj 158 690 outlet;
+#X obj 90 426 symbol;
+#X obj 90 401 t b;
+#X msg 287 598 0;
+#X obj 15 65 t b b b;
+#X msg 118 307 open panoramique.vert;
+#X msg 90 453 open panoramique.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 353 183 pd glsl;
+#X obj 368 246 loadbang;
+#X obj 353 289 pix_image;
+#X msg 367 378 rectangle 1;
+#X obj 367 359 loadbang;
+#X obj 353 318 pix_info 0 0 0;
+#X msg 431 144 sizeX \$1;
+#X msg 446 170 sizeY \$1;
+#X obj 552 407 pix_texture;
+#X obj 561 167 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 1338 29 792 790 glsl 0;
+#X obj 78 339 glsl_vertex;
+#X msg 32 338 print;
+#X obj 78 626 glsl_program;
+#X obj 163 555 pack 0 0;
+#X msg 30 476 print;
+#X obj 163 511 change;
+#X obj 150 358 change;
+#X msg 163 579 link \$1 \$2;
+#X msg 32 620 print;
+#X obj 77 490 glsl_fragment;
+#X floatatom 163 535 2 0 0 0 ID - -;
+#X floatatom 150 381 2 0 0 0 ID - -;
+#X obj 181 600 print linking;
+#X obj 15 21 inlet;
+#X obj 78 662 outlet;
+#X obj 577 95 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 647 change;
+#X obj 157 668 t b;
+#X obj 158 690 outlet;
+#X obj 90 426 symbol;
+#X obj 90 401 t b;
+#X msg 287 598 0;
+#X obj 15 65 t b b b;
+#X msg 118 307 open panoramique.vert;
+#X msg 90 453 open panoramique.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 552 184 pd glsl;
+#X obj 567 247 loadbang;
+#X obj 552 290 pix_image;
+#X msg 566 379 rectangle 1;
+#X obj 566 360 loadbang;
+#X obj 552 319 pix_info 0 0 0;
+#X msg 614 148 sizeX \$1;
+#X msg 633 166 sizeY \$1;
+#X obj 160 427 translateXYZ -3 0 0;
+#X obj 352 426 translateXYZ -1 0 0;
+#X obj 551 427 translateXYZ 1 0 0;
+#X obj 747 408 pix_texture;
+#X obj 756 168 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 1338 29 792 790 glsl 0;
+#X obj 78 339 glsl_vertex;
+#X msg 32 338 print;
+#X obj 78 626 glsl_program;
+#X obj 163 555 pack 0 0;
+#X msg 30 476 print;
+#X obj 163 511 change;
+#X obj 150 358 change;
+#X msg 163 579 link \$1 \$2;
+#X msg 32 620 print;
+#X obj 77 490 glsl_fragment;
+#X floatatom 163 535 2 0 0 0 ID - -;
+#X floatatom 150 381 2 0 0 0 ID - -;
+#X obj 181 600 print linking;
+#X obj 15 21 inlet;
+#X obj 78 662 outlet;
+#X obj 577 95 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 647 change;
+#X obj 157 668 t b;
+#X obj 158 690 outlet;
+#X obj 90 426 symbol;
+#X obj 90 401 t b;
+#X msg 287 598 0;
+#X obj 15 65 t b b b;
+#X msg 118 307 open panoramique.vert;
+#X msg 90 452 open panoramique.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 747 185 pd glsl;
+#X obj 762 248 loadbang;
+#X obj 747 291 pix_image;
+#X msg 761 380 rectangle 1;
+#X obj 761 361 loadbang;
+#X obj 747 320 pix_info 0 0 0;
+#X msg 825 146 sizeX \$1;
+#X msg 840 172 sizeY \$1;
+#X obj 746 428 translateXYZ 3 0 0;
+#X floatatom 199 68 5 0 0 0 - - -;
+#X msg 199 87 dZ \$1;
+#X obj 17 430 s shaders;
+#X obj 206 205 s init_shader;
+#X obj 399 204 s init_shader;
+#X obj 600 204 s init_shader;
+#X obj 794 206 s init_shader;
+#X obj 399 124 r shaders;
+#X obj 598 126 r shaders;
+#X obj 793 127 r shaders;
+#X obj 160 506 rectangle 1 0.75;
+#X obj 352 507 rectangle 1 0.75;
+#X obj 551 508 rectangle 1 0.75;
+#X obj 746 509 rectangle 1 0.75;
+#X obj 160 463 translateXYZ 0 0 0;
+#X obj 201 446 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 0.12 256;
+#X obj 259 446 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 -0.06 256;
+#X obj 352 465 translateXYZ 0 0 0;
+#X obj 393 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 0 256;
+#X obj 451 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 0 256;
+#X obj 551 466 translateXYZ 0 0 0;
+#X obj 592 449 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 -0.11 256;
+#X obj 650 449 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 -0.03 256;
+#X obj 746 465 translateXYZ 0 0 0;
+#X obj 787 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 -0.18 256;
+#X obj 845 448 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 -0.05 256;
+#X obj 160 -30 gemhead 10;
+#X obj 353 -29 gemhead 20;
+#X obj 552 -28 gemhead 30;
+#X obj 747 -27 gemhead 40;
+#X obj 160 104 alpha;
+#X obj 353 103 alpha;
+#X obj 552 99 alpha;
+#X obj 747 102 alpha;
+#X msg 256 113 ShadeL \$1;
+#X obj 199 25 r init_shader;
+#X obj 256 92 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 0 256;
+#X msg 447 93 ShadeL \$1;
+#X obj 447 72 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 39 256;
+#X msg 634 95 ShadeL \$1;
+#X obj 634 74 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 35 256;
+#X msg 831 93 ShadeL \$1;
+#X obj 831 72 nbx 5 14 -1e+37 1e+37 0 1 empty empty empty 0 -8 0 10
+-262144 -1 -1 23 256;
+#X msg 212 486 -1;
+#X msg 269 485 -0.75;
+#X text 163 486 invert;
+#X msg 406 485 -1;
+#X msg 463 484 -0.75;
+#X text 357 485 invert;
+#X msg 605 488 -1;
+#X msg 662 487 -0.75;
+#X text 556 488 invert;
+#X msg 800 489 -1;
+#X msg 857 488 -0.75;
+#X text 751 489 invert;
+#X obj 17 218 gemwin;
+#X obj 37 168 loadbang;
+#X obj 160 -8 scaleXYZ 4 4 1;
+#X obj 353 -8 scaleXYZ 4 4 1;
+#X obj 552 -4 scaleXYZ 4 4 1;
+#X obj 747 -5 scaleXYZ 4 4 1;
+#X text 21 548 This patch allow multiples images to be assembled in
+order to dreate a panoramic image.;
+#X text 20 575 A shader distord the image to correct distance distortion
+\, and allow a fade between 2 images;
+#X text 17 602 "dz" depend on the angles between images.;
+#X text 462 579 copyright cyrille Henry and iem.;
+#X text 463 596 This developement was suported by the COMEDIA project
+;
+#X floatatom 18 354 5 0 0 0 - - -;
+#X msg 18 373 dZ \$1;
+#X obj 18 311 r init_shader;
+#X msg 18 333 1.62;
+#X msg 199 47 1.38;
+#X msg 37 192 dimen 1024 256;
+#X msg 177 264 thread 0 \, open cam1.jpg;
+#X msg 370 265 thread 0 \, open cam2.jpg;
+#X msg 569 266 thread 0 \, open cam3.jpg;
+#X msg 764 267 thread 0 \, open cam4.jpg;
+#X connect 0 0 101 0;
+#X connect 1 0 101 0;
+#X connect 2 0 32 0;
+#X connect 3 0 4 0;
+#X connect 4 0 6 0;
+#X connect 4 1 49 0;
+#X connect 4 1 82 0;
+#X connect 5 0 118 0;
+#X connect 6 0 9 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 9 0 2 0;
+#X connect 9 1 10 0;
+#X connect 9 2 11 0;
+#X connect 10 0 4 1;
+#X connect 11 0 4 1;
+#X connect 12 0 33 0;
+#X connect 13 0 14 0;
+#X connect 14 0 16 0;
+#X connect 14 1 50 0;
+#X connect 14 1 84 0;
+#X connect 15 0 119 0;
+#X connect 16 0 19 0;
+#X connect 17 0 12 0;
+#X connect 18 0 17 0;
+#X connect 19 0 12 0;
+#X connect 19 1 20 0;
+#X connect 19 2 21 0;
+#X connect 20 0 14 1;
+#X connect 21 0 14 1;
+#X connect 22 0 34 0;
+#X connect 23 0 24 0;
+#X connect 24 0 26 0;
+#X connect 24 1 51 0;
+#X connect 24 1 86 0;
+#X connect 25 0 120 0;
+#X connect 26 0 29 0;
+#X connect 27 0 22 0;
+#X connect 28 0 27 0;
+#X connect 29 0 22 0;
+#X connect 29 1 30 0;
+#X connect 29 2 31 0;
+#X connect 30 0 24 1;
+#X connect 31 0 24 1;
+#X connect 32 0 60 0;
+#X connect 33 0 63 0;
+#X connect 34 0 66 0;
+#X connect 35 0 45 0;
+#X connect 36 0 37 0;
+#X connect 37 0 39 0;
+#X connect 37 1 52 0;
+#X connect 37 1 88 0;
+#X connect 38 0 121 0;
+#X connect 39 0 42 0;
+#X connect 40 0 35 0;
+#X connect 41 0 40 0;
+#X connect 42 0 35 0;
+#X connect 42 1 43 0;
+#X connect 42 2 44 0;
+#X connect 43 0 37 1;
+#X connect 44 0 37 1;
+#X connect 45 0 69 0;
+#X connect 46 0 47 0;
+#X connect 47 0 4 1;
+#X connect 53 0 14 1;
+#X connect 54 0 24 1;
+#X connect 55 0 37 1;
+#X connect 60 0 56 0;
+#X connect 61 0 60 1;
+#X connect 62 0 60 2;
+#X connect 63 0 57 0;
+#X connect 64 0 63 1;
+#X connect 65 0 63 2;
+#X connect 66 0 58 0;
+#X connect 67 0 66 1;
+#X connect 68 0 66 2;
+#X connect 69 0 59 0;
+#X connect 70 0 69 1;
+#X connect 71 0 69 2;
+#X connect 72 0 103 0;
+#X connect 73 0 104 0;
+#X connect 74 0 105 0;
+#X connect 75 0 106 0;
+#X connect 76 0 4 0;
+#X connect 77 0 14 0;
+#X connect 78 0 24 0;
+#X connect 79 0 37 0;
+#X connect 80 0 4 1;
+#X connect 81 0 116 0;
+#X connect 82 0 80 0;
+#X connect 83 0 14 1;
+#X connect 84 0 83 0;
+#X connect 85 0 24 1;
+#X connect 86 0 85 0;
+#X connect 87 0 37 1;
+#X connect 88 0 87 0;
+#X connect 89 0 56 1;
+#X connect 90 0 56 2;
+#X connect 92 0 57 1;
+#X connect 93 0 57 2;
+#X connect 95 0 58 1;
+#X connect 96 0 58 2;
+#X connect 98 0 59 1;
+#X connect 99 0 59 2;
+#X connect 102 0 117 0;
+#X connect 103 0 76 0;
+#X connect 104 0 77 0;
+#X connect 105 0 78 0;
+#X connect 106 0 79 0;
+#X connect 112 0 113 0;
+#X connect 113 0 48 0;
+#X connect 114 0 115 0;
+#X connect 115 0 112 0;
+#X connect 116 0 46 0;
+#X connect 117 0 101 0;
+#X connect 118 0 6 0;
+#X connect 119 0 16 0;
+#X connect 120 0 26 0;
+#X connect 121 0 39 0;
diff --git a/Gem/examples/10.glsl/14.blur.pd b/Gem/examples/10.glsl/14.blur.pd
new file mode 100644
index 0000000..ed1c099
--- /dev/null
+++ b/Gem/examples/10.glsl/14.blur.pd
@@ -0,0 +1,177 @@
+#N canvas 481 142 778 497 10;
+#X obj 16 74 gemhead;
+#X obj 16 130 gemframebuffer;
+#X obj 129 13 loadbang;
+#X obj 16 185 translateXYZ 0 0 -4;
+#X obj 14 283 cnv 15 125 200 empty empty empty 20 12 0 14 -228856 -66577
+0;
+#X floatatom 82 334 5 0 0 0 - - -;
+#X obj 16 362 rotateXYZ 30 30 0;
+#X obj 16 385 colorRGB 1 0 1;
+#X obj 16 408 teapot 1.5;
+#N canvas 385 358 230 231 shunt 0;
+#X obj 171 17 inlet;
+#X obj 72 67 * -1;
+#X obj 72 91 + 1;
+#X obj 27 17 inlet;
+#X obj 27 200 outlet;
+#X obj 126 197 outlet;
+#X obj 27 117 spigot 1;
+#X obj 126 115 spigot 0;
+#X connect 0 0 1 0;
+#X connect 0 0 7 1;
+#X connect 1 0 2 0;
+#X connect 2 0 6 1;
+#X connect 3 0 6 0;
+#X connect 3 0 7 0;
+#X connect 6 0 4 0;
+#X connect 7 0 5 0;
+#X restore 16 223 pd shunt;
+#X obj 81 224 tgl 15 0 empty empty empty 17 7 0 10 -257985 -1 -1 0
+1;
+#X obj 162 283 cnv 15 125 200 empty empty empty 20 12 0 14 -228856
+-66577 0;
+#X obj 169 385 colorRGB 1 1 0;
+#X text 76 286 Scene A;
+#X text 223 287 Scene B;
+#X text 105 223 Scene A / Scene B;
+#X obj 169 360 rotateXYZ 0 0 45;
+#X obj 169 463 square 2.8;
+#X floatatom 197 409 5 0 0 0 - - -;
+#X obj 169 429 translateXYZ;
+#X obj 129 54 s to_fb;
+#X obj 30 103 r to_fb;
+#X msg 129 34 dimen 500 500 \, rectangle 0;
+#X obj 327 379 pix_texture;
+#X obj 327 399 square 4;
+#X msg 344 358 quality 1 \, rectangle 0;
+#X obj 344 337 loadbang;
+#X obj 327 309 gemhead 99;
+#N canvas 1070 136 503 739 14_pass_blur 0;
+#X obj 87 102 inlet;
+#X obj 87 527 outlet;
+#X obj 87 173 single_blur 76 0 64;
+#X obj 87 263 single_blur 80 0 16;
+#X obj 87 284 single_blur 81 16 0;
+#X obj 87 305 single_blur 82 0 8;
+#X obj 87 326 single_blur 83 8 0;
+#X obj 87 347 single_blur 84 0 4;
+#X obj 87 368 single_blur 85 4 0;
+#X obj 87 389 single_blur 86 0 2;
+#X obj 87 410 single_blur 87 2 0;
+#X obj 87 430 single_blur 88 0 1;
+#X obj 87 451 single_blur 89 1 0;
+#X obj 87 236 single_blur 79 32 0;
+#X obj 87 215 single_blur 78 0 32;
+#X obj 87 194 single_blur 77 64 0;
+#X connect 0 0 2 0;
+#X connect 2 0 15 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 1 0;
+#X connect 13 0 3 0;
+#X connect 14 0 13 0;
+#X connect 15 0 14 0;
+#X restore 114 149 pd 14_pass_blur;
+#X obj 557 245 pack f f;
+#X obj 557 264 s motion_blur;
+#X obj 575 205 cos;
+#X obj 557 151 / 500;
+#X obj 557 171 t f f;
+#X obj 610 226 *;
+#X obj 628 205 sin;
+#X floatatom 596 129 5 0 6.28 0 - - -;
+#X obj 596 150 t b f;
+#N canvas 0 22 454 304 gemwin 0;
+#X obj 132 136 gemwin;
+#X obj 67 89 outlet;
+#X obj 67 10 inlet;
+#X obj 67 41 route create;
+#X msg 67 70 set destroy;
+#X msg 182 68 set create;
+#X msg 132 112 create \, 1;
+#X msg 238 112 destroy;
+#N canvas 87 154 850 451 Gem.init 0;
+#X obj 59 46 loadbang;
+#X obj 119 130 outlet;
+#X msg 118 81 reset \, dimen 500 500 \, lighting 1 \, title blur \,
+frame 20 \,;
+#X connect 0 0 2 0;
+#X connect 2 0 1 0;
+#X restore 289 80 pd Gem.init;
+#X obj 75 217 world_light;
+#X obj 75 194 gemhead 1;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 5 0;
+#X connect 3 1 7 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 0 0;
+#X connect 7 0 0 0;
+#X connect 8 0 0 0;
+#X connect 10 0 9 0;
+#X restore 17 32 pd gemwin;
+#X msg 17 8 create;
+#X obj 383 89 cnv 15 150 25 empty empty empty 20 12 0 14 -257985 -66577
+0;
+#X obj 392 95 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X obj 389 140 s blur;
+#X obj 389 115 / 500;
+#X text 389 69 blur;
+#X obj 551 91 cnv 15 150 25 empty empty empty 20 12 0 14 -257985 -66577
+0;
+#X obj 560 97 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
+-1 -1 0 1;
+#X text 556 67 motion blur;
+#X obj 557 226 * 1;
+#X text 640 129 angle (radian);
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 1 1 28 0;
+#X connect 2 0 22 0;
+#X connect 3 0 9 0;
+#X connect 5 0 6 2;
+#X connect 5 0 6 1;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 9 0 6 0;
+#X connect 9 1 16 0;
+#X connect 10 0 9 1;
+#X connect 12 0 19 0;
+#X connect 16 0 12 0;
+#X connect 18 0 19 1;
+#X connect 19 0 17 0;
+#X connect 21 0 1 0;
+#X connect 22 0 20 0;
+#X connect 23 0 24 0;
+#X connect 25 0 23 0;
+#X connect 26 0 25 0;
+#X connect 27 0 23 0;
+#X connect 28 0 23 1;
+#X connect 29 0 30 0;
+#X connect 31 0 48 1;
+#X connect 32 0 33 0;
+#X connect 33 0 48 0;
+#X connect 33 1 34 0;
+#X connect 34 0 29 1;
+#X connect 35 0 34 1;
+#X connect 36 0 37 0;
+#X connect 37 0 32 0;
+#X connect 37 1 35 0;
+#X connect 37 1 31 0;
+#X connect 38 0 39 0;
+#X connect 39 0 38 0;
+#X connect 41 0 43 0;
+#X connect 43 0 42 0;
+#X connect 46 0 32 0;
+#X connect 48 0 29 0;
diff --git a/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd b/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd
new file mode 100644
index 0000000..e1ae128
--- /dev/null
+++ b/Gem/examples/10.glsl/15.bicubic_image_interpolation.pd
@@ -0,0 +1,63 @@
+#N canvas 722 145 681 529 10;
+#X obj 232 189 gemhead;
+#X obj 232 356 pix_noise 5 5;
+#X obj 232 446 pix_texture;
+#X obj 232 465 square 4;
+#X msg 240 403 rectangle 1;
+#X obj 240 382 loadbang;
+#X obj 242 222 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X floatatom 250 272 5 0 0 0 - - -;
+#X obj 35 196 gemwin;
+#X msg 250 334 set \$1 \$2;
+#X obj 250 314 pack f f;
+#X obj 303 288 t b f;
+#X floatatom 303 271 5 0 0 0 - - -;
+#X msg 35 151 create \, 1;
+#X msg 42 173 0 \, destroy;
+#X obj 232 243 _glsl bicubic_interpolation;
+#X obj 436 191 gemhead;
+#X msg 358 408 quality \$1;
+#X obj 358 389 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 33 246 vradio 15 1 1 3 empty empty empty 0 -8 0 10 -262144 -1
+-1 0;
+#X text 53 246 bicubic interpolation;
+#X text 53 264 bilinear interpolation;
+#X text 55 276 no interpolation;
+#X obj 33 304 s sel_interpolation;
+#X obj 232 169 == 0;
+#X obj 232 149 r sel_interpolation;
+#X obj 436 152 r sel_interpolation;
+#X obj 436 172 != 0;
+#X obj 358 369 != 2;
+#X obj 358 349 r sel_interpolation;
+#X text 46 16 This example use shader in order to compute a bicubic
+image interpolation. Bicubic interpolation offer a smoother surface
+than obtain with bilinear interpolation. But since it need 16 sample
+to compute the interpolation \, it is quite slow.;
+#X connect 0 0 15 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 4 0 2 0;
+#X connect 5 0 4 0;
+#X connect 6 0 15 0;
+#X connect 7 0 10 0;
+#X connect 9 0 1 0;
+#X connect 10 0 9 0;
+#X connect 11 0 10 0;
+#X connect 11 1 10 1;
+#X connect 12 0 11 0;
+#X connect 13 0 8 0;
+#X connect 14 0 8 0;
+#X connect 15 0 1 0;
+#X connect 16 0 1 0;
+#X connect 17 0 2 0;
+#X connect 18 0 17 0;
+#X connect 19 0 23 0;
+#X connect 24 0 0 0;
+#X connect 25 0 24 0;
+#X connect 26 0 27 0;
+#X connect 27 0 16 0;
+#X connect 28 0 18 0;
+#X connect 29 0 28 0;
diff --git a/Gem/examples/10.glsl/GLSL_mix.frag b/Gem/examples/10.glsl/GLSL_mix.frag
new file mode 100644
index 0000000..ce47bf8
--- /dev/null
+++ b/Gem/examples/10.glsl/GLSL_mix.frag
@@ -0,0 +1,35 @@
+//jack/RYBN 2010
+#extension GL_EXT_gpu_shader4 : enable
+#extension GL_ARB_texture_rectangle : enable
+uniform sampler2DRect Ttex1;
+uniform sampler2DRect Ttex2;
+uniform sampler2DRect tex0;
+uniform float style;
+uniform float mix_factor;
+varying vec2 texcoord0;
+ivec2 size1 = textureSize2DRect(Ttex1, 0);
+ivec2 size2 = textureSize2DRect(Ttex2, 0);
+ivec2 size0 = textureSize2DRect(tex0, 0);
+
+void main (void)
+{
+ float sizeF1X = float(size1.x)/float(size0.x);
+ float sizeF1Y = float(size1.y)/float(size0.y);
+ float sizeF2X = float(size2.x)/float(size0.x);
+ float sizeF2Y = float(size2.y)/float(size0.y);
+ vec4 color1 = texture2DRect(Ttex1, vec2(texcoord0.s*sizeF1X,texcoord0.t*sizeF1Y));
+ vec4 color2 = texture2DRect(Ttex2, vec2(texcoord0.s*sizeF2X,texcoord0.t*sizeF2Y));
+ if (style == 0.) {
+ gl_FragColor = (color1 + color2);
+ } else if (style == 1.) {
+ gl_FragColor = (color1 - color2);
+ } else if (style == 2.) {
+ gl_FragColor = abs(color1 - color2);
+ } else if (style == 3.) {
+ gl_FragColor = (color1 * color2);
+ } else if (style == 4.) {
+ gl_FragColor = mix(color1,color2,mix_factor);
+ }
+
+}
+
diff --git a/Gem/examples/10.glsl/GLSL_mix.vert b/Gem/examples/10.glsl/GLSL_mix.vert
new file mode 100644
index 0000000..a69a61f
--- /dev/null
+++ b/Gem/examples/10.glsl/GLSL_mix.vert
@@ -0,0 +1,9 @@
+//jack/RYBN 2010
+varying vec2 texcoord0;
+
+void main()
+{
+ texcoord0 = (gl_TextureMatrix[0]*gl_MultiTexCoord0).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/P_distord.frag b/Gem/examples/10.glsl/P_distord.frag
new file mode 100644
index 0000000..5460d6c
--- /dev/null
+++ b/Gem/examples/10.glsl/P_distord.frag
@@ -0,0 +1,19 @@
+// Cyrille Henry 2007
+
+uniform sampler2D tex0;
+
+void main()
+{
+ vec2 C = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
+ gl_FragColor = texture2D(tex0, C ) ;
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/Gem/examples/10.glsl/P_distord.vert b/Gem/examples/10.glsl/P_distord.vert
new file mode 100644
index 0000000..f0db5f3
--- /dev/null
+++ b/Gem/examples/10.glsl/P_distord.vert
@@ -0,0 +1,21 @@
+// Cyrille Henry 2007
+
+uniform float K;
+uniform sampler2D tex0;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ float xs1 = sin((1.2 + gl_TexCoord[0].s)*(2.3+gl_TexCoord[0].t));
+ float xs2 = sin(xs1*533.);
+ float xs3 = K * sin(xs2*1013.);
+
+ float ys1 = sin((2.1 + gl_TexCoord[0].s)*(3.2+gl_TexCoord[0].t));
+ float ys2 = sin(ys1*5313.);
+ float ys3 = K * sin(ys2*10113.);
+
+ gl_Position = gl_ModelViewProjectionMatrix * (gl_Vertex + vec4(xs3,ys3,0.,0.));
+
+}
+
diff --git a/Gem/examples/10.glsl/T_distord.frag b/Gem/examples/10.glsl/T_distord.frag
new file mode 100644
index 0000000..385f427
--- /dev/null
+++ b/Gem/examples/10.glsl/T_distord.frag
@@ -0,0 +1,31 @@
+// Cyrille Henry 2007
+
+uniform float K1, seed;
+uniform sampler2D tex0;
+
+void main()
+{
+
+ vec2 C = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
+
+ float xs1 = sin(gl_TexCoord[0].s*gl_TexCoord[0].t/(abs(seed)+1.));
+ float xs2 = sin(xs1*533.);
+ float xs3 = sin(xs2*1013.);
+
+ float ys1 = sin(gl_TexCoord[0].s*gl_TexCoord[0].t/(abs(seed)+1.));
+ float ys2 = sin(ys1*5313.);
+ float ys3 = sin(ys2*10113.);
+
+ gl_FragColor = texture2D(tex0, C + K1 * 0.01 *vec2(xs3,ys3)) ;
+
+}
+
+
+
+
+
+
+
+
+
+
diff --git a/Gem/examples/10.glsl/T_distord.vert b/Gem/examples/10.glsl/T_distord.vert
new file mode 100644
index 0000000..1143615
--- /dev/null
+++ b/Gem/examples/10.glsl/T_distord.vert
@@ -0,0 +1,9 @@
+// Cyrille Henry 2007
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = ftransform();
+
+}
+
diff --git a/Gem/examples/10.glsl/_glsl.pd b/Gem/examples/10.glsl/_glsl.pd
new file mode 100644
index 0000000..de6228c
--- /dev/null
+++ b/Gem/examples/10.glsl/_glsl.pd
@@ -0,0 +1,73 @@
+#N canvas 652 79 668 661 10;
+#X obj 78 339 glsl_vertex;
+#X msg 32 338 print;
+#X obj 78 626 glsl_program;
+#X obj 163 555 pack 0 0;
+#X msg 30 476 print;
+#X obj 163 511 change;
+#X obj 150 358 change;
+#X msg 163 579 link \$1 \$2;
+#X msg 32 620 print;
+#X obj 77 490 glsl_fragment;
+#X floatatom 163 535 2 0 0 0 ID - -;
+#X floatatom 150 381 2 0 0 0 ID - -;
+#X obj 181 600 print linking;
+#X obj 15 21 inlet;
+#X obj 78 662 outlet;
+#X msg 106 309 open \$1.vert;
+#X msg 90 453 open \$1.frag;
+#X obj 577 95 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 647 change;
+#X obj 157 668 t b;
+#X obj 158 690 outlet;
+#X obj 140 224 t a a;
+#X obj 90 426 symbol;
+#X obj 90 401 t b;
+#X msg 287 598 0;
+#X obj 15 65 t b b b;
+#X obj 140 199 symbol \$1;
+#X text 270 193 This abstraction can be usefull to load shader. Shader
+location is relative to this abstraction path.;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 23 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 28 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 18 0;
+#X connect 15 0 0 0;
+#X connect 16 0 9 0;
+#X connect 17 0 2 0;
+#X connect 18 0 30 0;
+#X connect 18 1 0 0;
+#X connect 19 0 20 0;
+#X connect 20 0 21 0;
+#X connect 21 0 22 0;
+#X connect 22 0 31 0;
+#X connect 23 0 24 0;
+#X connect 24 0 25 0;
+#X connect 26 0 15 0;
+#X connect 26 1 27 1;
+#X connect 27 0 16 0;
+#X connect 28 0 27 0;
+#X connect 29 0 23 0;
+#X connect 30 0 29 0;
+#X connect 30 1 10 0;
+#X connect 30 2 31 0;
+#X connect 31 0 26 0;
diff --git a/Gem/examples/10.glsl/bicubic_interpolation.frag b/Gem/examples/10.glsl/bicubic_interpolation.frag
new file mode 100644
index 0000000..9482bc6
--- /dev/null
+++ b/Gem/examples/10.glsl/bicubic_interpolation.frag
@@ -0,0 +1,90 @@
+// Cyrille Henry 2007
+
+#extension GL_ARB_texture_rectangle : enable
+uniform sampler2DRect texture;
+
+void main (void)
+{
+ vec2 coordinate = (gl_TextureMatrix[0] * gl_TexCoord[0]).st-vec2(0.5,0.5);
+
+ vec2 coord = floor(coordinate)+vec2(0.5,0.5);
+ vec2 interpol = fract(coordinate);
+ vec2 interpol2 = interpol * interpol;
+ vec2 interpol3 = interpol2 * interpol;
+
+ vec4 C00 = texture2DRect(texture, coord + vec2(-1,-1) );
+ vec4 C10 = texture2DRect(texture, coord + vec2( 0,-1) );
+ vec4 C20 = texture2DRect(texture, coord + vec2( 1,-1) );
+ vec4 C30 = texture2DRect(texture, coord + vec2( 2,-1) );
+ vec4 C01 = texture2DRect(texture, coord + vec2(-1, 0) );
+ vec4 C11 = texture2DRect(texture, coord );
+ vec4 C21 = texture2DRect(texture, coord + vec2( 1, 0) );
+ vec4 C31 = texture2DRect(texture, coord + vec2( 2, 0) );
+ vec4 C02 = texture2DRect(texture, coord + vec2(-1, 1) );
+ vec4 C12 = texture2DRect(texture, coord + vec2( 0, 1) );
+ vec4 C22 = texture2DRect(texture, coord + vec2( 1, 1) );
+ vec4 C32 = texture2DRect(texture, coord + vec2( 2, 1) );
+ vec4 C03 = texture2DRect(texture, coord + vec2(-1, 2) );
+ vec4 C13 = texture2DRect(texture, coord + vec2( 0, 2) );
+ vec4 C23 = texture2DRect(texture, coord + vec2( 1, 2) );
+ vec4 C33 = texture2DRect(texture, coord + vec2( 2, 2) );
+
+ vec4 w0 = C11;
+ vec4 w1 = C21;
+ vec4 w2 = C12;
+ vec4 w3 = C22;
+ // x derivative
+ vec4 x0 = (C21 - C01) / 2.;
+ vec4 x1 = (C31 - C11) / 2.;
+ vec4 x2 = (C22 - C02) / 2.;
+ vec4 x3 = (C32 - C12) / 2.;
+ // y derivative
+ vec4 y0 = (C12 - C10) / 2.;
+ vec4 y1 = (C22 - C20) / 2.;
+ vec4 y2 = (C13 - C11) / 2.;
+ vec4 y3 = (C23 - C21) / 2.;
+ // xy derivative
+ vec4 z0 = (C22 - C00) / 2.;
+ vec4 z1 = (C32 - C10) / 2.;
+ vec4 z2 = (C23 - C01) / 2.;
+ vec4 z3 = (C33 - C11) / 2.;
+
+
+
+ vec4 a00 = w0;
+ vec4 a01 = y0;
+ vec4 a02 = -3.*w0 + 3.*w2 -2.*y0 - y2;
+ vec4 a03 = 2.*w0 - 2.*w2 + y0 + y2;
+ vec4 a10 = x0;
+ vec4 a11 = z0;
+ vec4 a12 = -3.*x0 + 3.*x2 - 2.*z0 - z2;
+ vec4 a13 = 2.*x0 - 2.*x2 + z0 + z2;
+ vec4 a20 = -3.*w0 + 3.*w1 - 2.*x0 - x1;
+ vec4 a21 = -3.*y0 + 3.*y1 - 2.*z0 - z1;
+ vec4 a22 = 9.*w0 - 9.*w1 - 9.*w2 + 9.*w3 + 6.*x0 + 3.*x1 + -6.*x2 - 3.*x3 + 6.*y0 - 6.*y1 + 3.*y2 - 3.*y3 + 4.*z0 + 2.*z1 + 2.*z2 + z3;
+ vec4 a23 = -6.*w0 + 6.*w1 + 6.*w2 - 6.*w3 -4.*x0 - 2.*x1 + 4.*x2 + 2.*x3 -3.*y0 + 3.*y1 - 3.*y2 + 3.*y3 + -2.*z0 - z1 - 2.*z2 - z3;
+ vec4 a30 = 2.*w0 - 2.*w1 + x0 + x1;
+ vec4 a31 = 2.*y0 - 2.*y1 + z0 + z1;
+ vec4 a32 = -6.*w0 + 6.*w1 + 6.*w2 -6.*w3 -3.*x0 - 3.*x1 + 3.*x2 + 3.*x3 -4.*y0 + 4.*y1 - 2.*y2 + 2.*y3 + -2.*z0 - 2.*z1 - z2 - z3;
+ vec4 a33 = 4.*w0 - 4.*w1 - 4.*w2 + 4.*w3 + 2.*x0 + 2.*x1 + -2.*x2 - 2.*x3 + 2.*y0 - 2.*y1 + 2.*y2 - 2.*y3 + z0 + z1 + z2 + z3;
+
+
+ vec4 color = a00;
+ color += a01 * interpol.y;
+ color += a02 * interpol2.y;
+ color += a03 * interpol3.y;
+ color += a10 * interpol.x;
+ color += a11 * interpol.x * interpol.y;
+ color += a12 * interpol.x * interpol2.y;
+ color += a13 * interpol.x * interpol3.y;
+ color += a20 * interpol2.x;
+ color += a21 * interpol2.x * interpol.y;
+ color += a22 * interpol2.x * interpol2.y;
+ color += a23 * interpol2.x * interpol3.y;
+ color += a30 * interpol3.x;
+ color += a31 * interpol3.x * interpol.y;
+ color += a32 * interpol3.x * interpol2.y;
+ color += a33 * interpol3.x * interpol3.y;
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/10.glsl/bicubic_interpolation.vert b/Gem/examples/10.glsl/bicubic_interpolation.vert
new file mode 100644
index 0000000..c890bd7
--- /dev/null
+++ b/Gem/examples/10.glsl/bicubic_interpolation.vert
@@ -0,0 +1,8 @@
+// Cyrille Henry 2007
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/blur.frag b/Gem/examples/10.glsl/blur.frag
new file mode 100644
index 0000000..f54e03a
--- /dev/null
+++ b/Gem/examples/10.glsl/blur.frag
@@ -0,0 +1,18 @@
+uniform sampler2D tex0;
+uniform vec2 distance;
+uniform vec2 TX;
+
+void main (void)
+{
+
+ vec2 texcoord = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
+ vec4 sample = 0.5 * texture2D(tex0, texcoord - distance);
+ sample += texture2D(tex0, texcoord);
+ sample += 0.5 * texture2D(tex0, texcoord + distance);
+
+ sample /= 2.;
+
+ gl_FragColor = sample;
+}
+
+
diff --git a/Gem/examples/10.glsl/blur.vert b/Gem/examples/10.glsl/blur.vert
new file mode 100644
index 0000000..0254682
--- /dev/null
+++ b/Gem/examples/10.glsl/blur.vert
@@ -0,0 +1,9 @@
+varying vec2 texcoord0;
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ // perform standard transform on vertex
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/cam1.jpg b/Gem/examples/10.glsl/cam1.jpg
new file mode 100644
index 0000000..c5023ba
--- /dev/null
+++ b/Gem/examples/10.glsl/cam1.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/cam2.jpg b/Gem/examples/10.glsl/cam2.jpg
new file mode 100644
index 0000000..dd7ab0b
--- /dev/null
+++ b/Gem/examples/10.glsl/cam2.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/cam3.jpg b/Gem/examples/10.glsl/cam3.jpg
new file mode 100644
index 0000000..76b6898
--- /dev/null
+++ b/Gem/examples/10.glsl/cam3.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/cam4.jpg b/Gem/examples/10.glsl/cam4.jpg
new file mode 100644
index 0000000..8d2c096
--- /dev/null
+++ b/Gem/examples/10.glsl/cam4.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/fetching.frag b/Gem/examples/10.glsl/fetching.frag
new file mode 100644
index 0000000..3d1af1f
--- /dev/null
+++ b/Gem/examples/10.glsl/fetching.frag
@@ -0,0 +1,8 @@
+varying vec4 C;
+
+void main (void)
+{
+ gl_FragColor = C;
+}
+
+
diff --git a/Gem/examples/10.glsl/fetching.vert b/Gem/examples/10.glsl/fetching.vert
new file mode 100644
index 0000000..b41cc16
--- /dev/null
+++ b/Gem/examples/10.glsl/fetching.vert
@@ -0,0 +1,15 @@
+uniform sampler2D MyTex;
+varying vec4 C;
+void main()
+{
+ vec4 v = vec4(gl_Vertex);
+ vec4 color = texture2D(MyTex, (gl_TextureMatrix[0] * gl_MultiTexCoord0).st);
+ v.z = color.r;
+// v.x += (color.b-0.5)/2.;
+// v.y += (color.g-0.5)/2.;
+
+ C=color;
+ gl_Position = gl_ModelViewProjectionMatrix * v;
+
+}
+
diff --git a/Gem/examples/10.glsl/fetching2.frag b/Gem/examples/10.glsl/fetching2.frag
new file mode 100644
index 0000000..1b576a5
--- /dev/null
+++ b/Gem/examples/10.glsl/fetching2.frag
@@ -0,0 +1,56 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect texture;
+uniform float K2, K;
+
+vec2 pos_(vec2 V, float x, float y)
+{
+ V += vec2(x,y);
+ return(max(min(V,vec2(91.,63.)),vec2(0.)));
+}
+
+
+void main (void)
+{
+ vec2 pos = gl_TexCoord[0].st * vec2(90.,62.)/256. ;
+
+ vec4 color1 = texture2DRect(texture,pos_(pos,-1./256.,-1./256.));
+ vec4 color2 = texture2DRect(texture,pos_(pos, 0./256.,-1./256.));
+ vec4 color3 = texture2DRect(texture,pos_(pos, 1./256.,-1./256.));
+ vec4 color4 = texture2DRect(texture,pos_(pos,-1./256., 0./256.));
+ vec4 color5 = texture2DRect(texture,pos_(pos, 0./256., 0./256.));
+ vec4 color6 = texture2DRect(texture,pos_(pos, 1./256., 0./256.));
+ vec4 color7 = texture2DRect(texture,pos_(pos,-1./256., 1./256.));
+ vec4 color8 = texture2DRect(texture,pos_(pos, 0./256., 1./256.));
+ vec4 color9 = texture2DRect(texture,pos_(pos, 1./256., 1./256.));
+
+ vec4 colorBG = color1 + color2 + color4 + color5;
+ vec4 colorBD = color3 + color2 + color6 + color5;
+ vec4 colorHG = color4 + color5 + color7 + color8;
+ vec4 colorHD = color5 + color6 + color8 + color9;
+
+ vec2 fract_pos = (fract(pos));
+
+ vec4 XB = mix(colorBG,colorBD,fract_pos.x);
+ vec4 XH = mix(colorHG,colorHD,fract_pos.x);
+ vec4 X = mix(XB,XH,fract_pos.y) / 4.;
+
+ X -= vec4(0.5);
+ X.xyz = normalize(X.xyz);
+
+ if(gl_FrontFacing)
+ {X *= -1.;}
+
+ float tmp = dot(X.xyz,normalize(vec3(0.,1.,1.)));
+ tmp = -tmp;
+ tmp = max(0.,tmp) + 0.3 * min(0.,tmp);
+
+ tmp = 0.1 + 0.9 * tmp;
+ vec4 color = tmp * vec4(1,0.95,0.9,1);
+ color.a = smoothstep(0.75,1.,pos.x);
+ gl_FragColor = color;
+
+}
+
+
diff --git a/Gem/examples/10.glsl/fetching2.vert b/Gem/examples/10.glsl/fetching2.vert
new file mode 100644
index 0000000..01fbf0a
--- /dev/null
+++ b/Gem/examples/10.glsl/fetching2.vert
@@ -0,0 +1,21 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect MyTex;
+uniform float K;
+
+void main()
+{
+ vec4 v = vec4(gl_Vertex);
+ vec4 color = texture2DRect(MyTex, gl_MultiTexCoord0.st * vec2(91./128.,63./128.));
+
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ v.x = color.r -0.5;
+ v.y = color.g -0.5;
+ v.z = color.b -0.5;
+
+ gl_Position = gl_ModelViewProjectionMatrix * v;
+
+}
+
diff --git a/Gem/examples/10.glsl/game.frag b/Gem/examples/10.glsl/game.frag
new file mode 100644
index 0000000..9b5800d
--- /dev/null
+++ b/Gem/examples/10.glsl/game.frag
@@ -0,0 +1,30 @@
+// Cyrille Henry 2007
+
+uniform sampler2D texture;
+
+const float dx = 1./500.; // change to gemwin dim
+
+void main (void)
+{
+ vec2 tmp = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
+
+ float x = tmp.s;
+ float y = tmp.t;
+
+ vec4 c;
+ c = texture2D(texture, vec2(x-dx, y-dx));
+ c += texture2D(texture, vec2(x, y-dx));
+ c += texture2D(texture, vec2(x+dx, y-dx));
+ c += texture2D(texture, vec2(x-dx, y));
+ c += texture2D(texture, vec2(x+dx, y));
+ c += texture2D(texture, vec2(x-dx, y+dx));
+ c += texture2D(texture, vec2(x, y+dx));
+ c += texture2D(texture, vec2(x+dx, y+dx));
+
+ vec4 c1 = texture2D(texture, vec2(x, y));
+
+ c.rgb = vec3(step(2.5-c1.r,c.r)*step(c.r,3.5));
+ c.a = 1.;
+
+ gl_FragColor = c;
+}
diff --git a/Gem/examples/10.glsl/game.vert b/Gem/examples/10.glsl/game.vert
new file mode 100644
index 0000000..64eb4f4
--- /dev/null
+++ b/Gem/examples/10.glsl/game.vert
@@ -0,0 +1,14 @@
+// Cyrille Henry 2007
+
+uniform float K1;
+uniform float K2;
+uniform float K3;
+
+uniform vec2 offset;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = ftransform();
+}
+
diff --git a/Gem/examples/10.glsl/geo.frag b/Gem/examples/10.glsl/geo.frag
new file mode 100644
index 0000000..7ec0b43
--- /dev/null
+++ b/Gem/examples/10.glsl/geo.frag
@@ -0,0 +1,8 @@
+void main()
+{
+ vec4 tmp = gl_Color;
+ tmp.a /= 10.;
+ gl_FragColor = tmp;
+ // set color but alpha is 20 time less
+}
+
diff --git a/Gem/examples/10.glsl/geo.geom b/Gem/examples/10.glsl/geo.geom
new file mode 100644
index 0000000..3271c6f
--- /dev/null
+++ b/Gem/examples/10.glsl/geo.geom
@@ -0,0 +1,28 @@
+#version 120
+#extension GL_EXT_geometry_shader4: enable
+
+void main(void)
+{
+ //increment variable
+ int i,j;
+ float rnd1,rnd2;
+ rnd1 = 0.0216767863321334264; // seed
+ rnd2 = 0.0475785688678678345;
+ for(j=0; j< 40; j++)
+ {
+ rnd1 = fract(124.321345312123465*rnd1) -0.5; // easy way to generated pseudo random number
+ rnd2 = fract(5234.43532345435245*rnd2) -0.5;
+
+ //draw 40 time the same geometry, but with small shift in it's position
+ for(i=0; i< gl_VerticesIn; i++)
+ {
+ gl_FrontColor = gl_FrontColorIn[i];
+ gl_TexCoord[0] = gl_TexCoordIn[i][0];
+ gl_Position = gl_PositionIn[i]; // get position of the original point
+ gl_Position.xy += vec2(rnd1,rnd2)/3.; // add small random
+ // the geometry as already been transform in 2d, so we jut have to move it in X and Y
+ EmitVertex();
+ }
+ EndPrimitive();
+ }
+}
diff --git a/Gem/examples/10.glsl/geo.vert b/Gem/examples/10.glsl/geo.vert
new file mode 100644
index 0000000..4359aa3
--- /dev/null
+++ b/Gem/examples/10.glsl/geo.vert
@@ -0,0 +1,7 @@
+void main()
+{
+ gl_FrontColor = gl_Color;
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = ftransform();
+ //simple passthrow
+}
diff --git a/Gem/examples/10.glsl/img1.jpg b/Gem/examples/10.glsl/img1.jpg
new file mode 100644
index 0000000..8e17c8b
--- /dev/null
+++ b/Gem/examples/10.glsl/img1.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/img2.jpg b/Gem/examples/10.glsl/img2.jpg
new file mode 100644
index 0000000..5934461
--- /dev/null
+++ b/Gem/examples/10.glsl/img2.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/img3.jpg b/Gem/examples/10.glsl/img3.jpg
new file mode 100644
index 0000000..edfaf1e
--- /dev/null
+++ b/Gem/examples/10.glsl/img3.jpg
Binary files differ
diff --git a/Gem/examples/10.glsl/interpol.frag b/Gem/examples/10.glsl/interpol.frag
new file mode 100644
index 0000000..a3c2c08
--- /dev/null
+++ b/Gem/examples/10.glsl/interpol.frag
@@ -0,0 +1,13 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect texture_mass;
+uniform float init;
+
+void main (void)
+{
+ vec2 coord = gl_TexCoord[0].st/2.;
+ vec4 pos = texture2DRect(texture_mass, coord);
+
+ gl_FragColor = pos;
+}
diff --git a/Gem/examples/10.glsl/link.frag b/Gem/examples/10.glsl/link.frag
new file mode 100644
index 0000000..053cd5e
--- /dev/null
+++ b/Gem/examples/10.glsl/link.frag
@@ -0,0 +1,164 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect texture_mass, texture_mass_old, texture_normal;
+uniform float init, gravite;
+uniform vec2 wind;
+uniform float D;
+uniform float K1; // rigiditée liaison
+uniform float W,f,N; // amplitude du Wind et frequence; Noise
+uniform float t; //temps
+
+varying vec2 coord;
+
+vec2 test1(vec2 V)
+{
+// return(max(min(V,vec2(64.)),vec2(0.)));
+ return(V);
+}
+
+void main (void)
+{
+ vec4 force = vec4(0,1.,0.,1.);
+
+ if ( (coord.x < 92.) && (coord.y < 64.) )
+ {
+ vec3 dist;
+ float taille;
+
+ vec4 pos = texture2DRect(texture_mass, coord );// -vec4(0.5);
+ vec4 pos_old = texture2DRect(texture_mass_old,coord );// -vec4(0.5);
+ vec4 posG = texture2DRect(texture_mass, (coord+vec2(-1., 0.)));// -vec4(0.5);
+ vec4 posD = texture2DRect(texture_mass, (coord+vec2( 1., 0.)));// -vec4(0.5);
+ vec4 posH = texture2DRect(texture_mass, (coord+vec2( 0., 1.)));// -vec4(0.5);
+ vec4 posB = texture2DRect(texture_mass, (coord+vec2( 0.,-1.)));// -vec4(0.5);
+ vec4 posHD = texture2DRect(texture_mass, (coord+vec2( 1.,-1.)));// -vec4(0.5);
+ vec4 posBG = texture2DRect(texture_mass, (coord+vec2(-1., 1.)));// -vec4(0.5);
+ vec4 posHG = texture2DRect(texture_mass, (coord+vec2( 1., 1.)));// -vec4(0.5);
+ vec4 posBD = texture2DRect(texture_mass, (coord+vec2(-1.,-1.)));// -vec4(0.5);
+ vec4 pos2G = texture2DRect(texture_mass, (coord+vec2(-2., 0.)));// -vec4(0.5);
+ vec4 pos2D = texture2DRect(texture_mass, (coord+vec2( 2., 0.)));// -vec4(0.5);
+ vec4 pos2H = texture2DRect(texture_mass, (coord+vec2( 0., 2.)));// -vec4(0.5);
+ vec4 pos2B = texture2DRect(texture_mass, (coord+vec2( 0.,-2.)));// -vec4(0.5);
+ // lecture des position des masses voisinnes
+
+ force = pos-pos_old;
+ // ajout de la force d'inertie (conservation de la vitesse)
+
+ force *= 1.-D;
+ // damping relatif a un point fix
+ // ATTENTION, c'est le seul damping du system!
+
+
+ // 4 liens direct (gauche / droite et haut / bas)
+ // on ajoute une force ssi la taille est > 0
+ // on limite aussi ds l'espace pour ne prendre en compte que le lien valide (effet de bord)
+
+ dist = pos.xyz - posG.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x > 1.) )
+ { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); }
+
+ dist = pos.xyz - posD.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x < 91.) )
+ { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); }
+
+ dist = pos.xyz - posH.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.y < 63.) )
+ { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); }
+
+ dist = pos.xyz - posB.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.y > 1.) )
+ { force.xyz += -K1 * (taille - 1./1000.)* normalize(dist); }
+
+ // 4 liens diagonaux (haut gauche, bas droite, etc)
+ dist = pos.xyz - posHD.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x < 91.) && (coord.y > 1.) )
+ { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); }
+
+ dist = pos.xyz - posBG.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x > 1.) && (coord.y < 63.) )
+ { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); }
+
+ dist = pos.xyz - posHG.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x < 91.) && (coord.y < 63.) )
+ { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); }
+
+ dist = pos.xyz - posBD.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x > 1.) && (coord.y > 1.) )
+ { force.xyz += -K1 * (taille - 1.4142/1000.)* normalize(dist); }
+
+ // 4 liens double longeur (rigidité de flexion)
+ dist = pos.xyz - pos2G.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x > 2.) )
+ { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); }
+
+ dist = pos.xyz - pos2D.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.x < 90.) )
+ { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); }
+
+ dist = pos.xyz - pos2H.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.y < 62.) )
+ { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); }
+
+ dist = pos.xyz - pos2B.xyz ;
+ taille = length(dist) ;
+ if ( (taille > 0.) && (coord.y > 2.) )
+ { force.xyz += -K1 * (taille - 2./1000.)* normalize(dist); }
+
+ // autres forces
+ vec4 normal = texture2DRect(texture_normal, coord*64.) -vec4(0.5);
+ normal = normalize(normal);
+ // float force_wind = abs(dot(normalize(vec3(wind.xy,0.)),normal.xyz));
+
+ force.r += wind.x/100.;
+ force.g += gravite/100.;
+ force.b += wind.y/100.;
+
+ // ajout d'une force sinusoidal perpendiculaire a la direction du vent
+ float W_sin = cos(-t + f*0.01*gl_TexCoord[0].s);
+ W_sin *= 91.- gl_TexCoord[0].s;
+ W_sin /= 91.;
+ W_sin *= 91.- gl_TexCoord[0].s;
+ W_sin /= 91.;
+
+ W_sin *= gl_TexCoord[0].t + 50.;
+ W_sin /= 63.;
+ W_sin *= gl_TexCoord[0].t + 50.;
+ W_sin /= 63.;
+
+ force.x += W*(-wind.y*W_sin);
+ force.z += W*( wind.x*W_sin);
+
+ // ajout d'un pseuo buit
+ float W_noiseX = cos(t + 0.353 * coord.t + 0.0234434* coord.s + 345.2342);
+ W_noiseX = cos(123456.35345 * W_noiseX + 234.23);
+ float W_noiseY = cos(-2.2 * t + 6235.457456 * W_noiseX + 567.456);
+ float W_noiseZ = cos(5.*t + 8976457.457 * W_noiseX + 3464.54);
+ W_noiseX = cos(323344.64345 * W_noiseX + 567.45);
+
+ force.x += 0.00001 * N * W_noiseX;
+ force.y += 0.00001 * N * W_noiseY;
+ force.z += 0.00001 * N * W_noiseZ;
+
+
+ // preparation de la sortie
+ force = min(max(force,vec4(-0.5)),vec4(0.5));
+ // min et max pour virer les +inf
+ force += vec4(0.5,0.5,0.5,1.);
+ // ajout de l'ofset pour etre entre 0 et 1
+ force.a = 1.;
+ // on vire la 4eme composante au cas ou.
+ }
+ gl_FragColor = mix(force,vec4(0.5,0.5,0.5,1.),init);
+}
diff --git a/Gem/examples/10.glsl/link.vert b/Gem/examples/10.glsl/link.vert
new file mode 100644
index 0000000..fefc366
--- /dev/null
+++ b/Gem/examples/10.glsl/link.vert
@@ -0,0 +1,10 @@
+varying vec2 coord;
+
+
+void main()
+{
+
+ coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/mass.frag b/Gem/examples/10.glsl/mass.frag
new file mode 100644
index 0000000..29a2ef2
--- /dev/null
+++ b/Gem/examples/10.glsl/mass.frag
@@ -0,0 +1,34 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect texture_mass_old,texture_link;
+varying vec2 coord;
+uniform float init;
+
+void main (void)
+{
+ vec4 color = vec4(0.,0.,1.,1.);
+ if ( (coord.x < 92.) && (coord.y < 64.) )
+ {
+ vec4 pos = texture2DRect(texture_mass_old, coord)-vec4(0.5);
+ vec4 force = texture2DRect(texture_link, coord)-vec4(0.5);
+
+ force = min(max(force,vec4(-0.5)),vec4(0.5));
+ // on vire les +inf et -inf qui peuvent poser pb en cas d'instabilités
+ pos += force;
+ //increment de la position
+
+ float reset = step(coord.x,1.);
+// reset *= step(mod(coord.y,10.),4.);
+ // les point en x<1 sont tjrs reseté : ils sont dc imobiles
+
+ color = mix(pos,vec4(coord.x/1000.,(coord.y-32.)/1000.,0.,0.),reset+(1.-reset)*init);
+ // couleur de sortie mixé avec couleur d'initialisation
+
+ color += vec4(0.5);
+ color.a = 1.;
+ // preparation de la sortie (ajout de l'offset + virer l'alpha)
+ }
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/10.glsl/mass.vert b/Gem/examples/10.glsl/mass.vert
new file mode 100644
index 0000000..fefc366
--- /dev/null
+++ b/Gem/examples/10.glsl/mass.vert
@@ -0,0 +1,10 @@
+varying vec2 coord;
+
+
+void main()
+{
+
+ coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/multitexture.frag b/Gem/examples/10.glsl/multitexture.frag
new file mode 100644
index 0000000..9e8ed0c
--- /dev/null
+++ b/Gem/examples/10.glsl/multitexture.frag
@@ -0,0 +1,13 @@
+uniform sampler2D MyTex;
+uniform sampler2D MyTex1;
+
+varying vec2 texcoord1;
+varying vec2 texcoord2;
+
+void main (void)
+{
+ vec4 color = texture2D(MyTex, texcoord1);
+ vec4 color2 = texture2D(MyTex1, texcoord2);
+ gl_FragColor = (color + color2) / 2.;
+}
+
diff --git a/Gem/examples/10.glsl/multitexture.vert b/Gem/examples/10.glsl/multitexture.vert
new file mode 100644
index 0000000..2cade19
--- /dev/null
+++ b/Gem/examples/10.glsl/multitexture.vert
@@ -0,0 +1,11 @@
+varying vec2 texcoord1;
+varying vec2 texcoord2;
+
+void main()
+{
+
+ texcoord1 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
+ texcoord2 = (gl_TextureMatrix[1] * gl_MultiTexCoord1).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/multitexture_rect.frag b/Gem/examples/10.glsl/multitexture_rect.frag
new file mode 100644
index 0000000..3eb9b2b
--- /dev/null
+++ b/Gem/examples/10.glsl/multitexture_rect.frag
@@ -0,0 +1,15 @@
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect MyTex;
+uniform sampler2DRect MyTex1;
+
+varying vec2 texcoord1;
+varying vec2 texcoord2;
+
+void main (void)
+{
+ vec4 color = texture2DRect(MyTex, texcoord1);
+ vec4 color2 = texture2DRect(MyTex1, texcoord1); // texcoord2 does not work.
+ gl_FragColor = (color + color2) / 2.;
+}
+
diff --git a/Gem/examples/10.glsl/multitexture_rect.vert b/Gem/examples/10.glsl/multitexture_rect.vert
new file mode 100644
index 0000000..2cade19
--- /dev/null
+++ b/Gem/examples/10.glsl/multitexture_rect.vert
@@ -0,0 +1,11 @@
+varying vec2 texcoord1;
+varying vec2 texcoord2;
+
+void main()
+{
+
+ texcoord1 = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
+ texcoord2 = (gl_TextureMatrix[1] * gl_MultiTexCoord1).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/normal.frag b/Gem/examples/10.glsl/normal.frag
new file mode 100644
index 0000000..eef7f86
--- /dev/null
+++ b/Gem/examples/10.glsl/normal.frag
@@ -0,0 +1,37 @@
+// Cyrille Henry 2008
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect texture_mass;
+varying vec2 coord;
+
+vec2 test1(vec2 V)
+{
+ return(max(min(V,vec2(91.,63.)),vec2(0.)));
+}
+
+void main (void)
+{
+ vec4 color = vec4(1.,0.,0.,1.);
+
+ if ( (coord.x < 91.) && (coord.y < 63.) )
+ {
+ vec4 posG = texture2DRect(texture_mass, test1(coord+vec2(-1., 0.))) ;
+ vec4 posD = texture2DRect(texture_mass, test1(coord+vec2( 1., 0.))) ;
+ vec4 posH = texture2DRect(texture_mass, test1(coord+vec2( 0.,-1.))) ;
+ vec4 posB = texture2DRect(texture_mass, test1(coord+vec2( 0., 1.))) ;
+
+ vec3 normal = cross((posG.xyz-posD.xyz),(posH.xyz-posB.xyz));
+ color.xyz = normalize(normal);
+ color.xyz = normal;
+
+ vec3 DX = posG.xyz-posD.xyz;
+ vec3 DY = posH.xyz-posB.xyz;
+
+ color += vec4(1.);
+ color *= 0.5;
+
+ }
+ color.a = 1.;
+ gl_FragColor = color;
+
+}
diff --git a/Gem/examples/10.glsl/normal.vert b/Gem/examples/10.glsl/normal.vert
new file mode 100644
index 0000000..fefc366
--- /dev/null
+++ b/Gem/examples/10.glsl/normal.vert
@@ -0,0 +1,10 @@
+varying vec2 coord;
+
+
+void main()
+{
+
+ coord = (gl_TextureMatrix[0] * gl_MultiTexCoord0).st;
+ gl_Position = ftransform();
+
+}
diff --git a/Gem/examples/10.glsl/panoramique.frag b/Gem/examples/10.glsl/panoramique.frag
new file mode 100644
index 0000000..d0378b6
--- /dev/null
+++ b/Gem/examples/10.glsl/panoramique.frag
@@ -0,0 +1,28 @@
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect MyTex;
+uniform float dZ, ShadeL, ShadeR, sizeX, sizeY;
+
+void main (void)
+{
+
+ vec2 pos_out;
+ pos_out.x=-1.+(2.*gl_TexCoord[0].s)/sizeX;
+ pos_out.y=-1.+(2.*gl_TexCoord[0].t)/sizeY;
+ pos_out.y *= sqrt(pos_out.x*pos_out.x+dZ*dZ)/dZ;
+
+ pos_out.x = sizeX*(pos_out.x+1.)/2.;
+ pos_out.y = sizeY*(pos_out.y+1.)/2.;
+
+ vec4 color = texture2DRect(MyTex, pos_out);
+
+ color.a = 1.;
+ float tmp = mix(0.,1.,gl_TexCoord[0].s/ShadeL);
+ tmp = min(tmp,1.);
+ color.a *= tmp;
+ tmp = mix(0.,1.,(sizeX-gl_TexCoord[0].s)/ShadeR);
+ tmp = min(tmp,1.);
+ color.a *= tmp;
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/10.glsl/panoramique.vert b/Gem/examples/10.glsl/panoramique.vert
new file mode 100644
index 0000000..5fcb9d8
--- /dev/null
+++ b/Gem/examples/10.glsl/panoramique.vert
@@ -0,0 +1,5 @@
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
diff --git a/Gem/examples/10.glsl/single_blur.pd b/Gem/examples/10.glsl/single_blur.pd
new file mode 100644
index 0000000..76088b7
--- /dev/null
+++ b/Gem/examples/10.glsl/single_blur.pd
@@ -0,0 +1,55 @@
+#N canvas 310 229 681 595 10;
+#X obj 99 59 inlet;
+#X obj 26 145 gemframebuffer;
+#X obj 26 215 translateXYZ 0 0 -4;
+#X obj 26 285 pix_texture;
+#X obj 26 305 square 4;
+#X msg 43 264 quality 1 \, rectangle 0;
+#X obj 43 243 loadbang;
+#X obj 128 431 outlet;
+#X obj 26 195 _glsl blur;
+#X obj 47 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 248 85 t f f;
+#X obj 248 17 r blur;
+#X obj 248 133 pack f f;
+#X obj 26 85 gemhead \$1;
+#X obj 248 112 * \$2;
+#X obj 301 111 * \$3;
+#X msg 248 153 distance \$1 \$2;
+#X obj 42 119 r to_fb;
+#X obj 248 39 route float;
+#X obj 322 61 unpack f f;
+#X obj 441 18 r motion_blur;
+#X obj 441 90 pack f f;
+#X obj 441 65 * \$2;
+#X obj 441 41 unpack f f;
+#X obj 508 65 * \$2;
+#X connect 0 0 3 1;
+#X connect 1 0 8 0;
+#X connect 1 1 7 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 3 0;
+#X connect 6 0 5 0;
+#X connect 8 0 2 0;
+#X connect 9 0 8 0;
+#X connect 10 0 14 0;
+#X connect 10 1 15 0;
+#X connect 11 0 18 0;
+#X connect 12 0 16 0;
+#X connect 13 0 1 0;
+#X connect 14 0 12 0;
+#X connect 15 0 12 1;
+#X connect 16 0 8 1;
+#X connect 17 0 1 0;
+#X connect 18 0 10 0;
+#X connect 18 1 19 0;
+#X connect 19 0 14 0;
+#X connect 19 1 15 0;
+#X connect 20 0 23 0;
+#X connect 21 0 16 0;
+#X connect 22 0 21 0;
+#X connect 23 0 22 0;
+#X connect 23 1 24 0;
+#X connect 24 0 21 1;
diff --git a/Gem/examples/10.glsl/texture.frag b/Gem/examples/10.glsl/texture.frag
new file mode 100644
index 0000000..aaee824
--- /dev/null
+++ b/Gem/examples/10.glsl/texture.frag
@@ -0,0 +1,16 @@
+// Cyrille Henry 2007
+
+//#extension GL_ARB_texture_rectangle : enable
+//uniform sampler2DRect MyTex;
+uniform sampler2D MyTex;
+uniform float B,C;
+
+void main (void)
+{
+ vec4 color = texture2D(MyTex, (gl_TextureMatrix[0] * gl_TexCoord[0]).st);
+
+ color *= B+1.; // brightness
+ vec4 gray = vec4(dot(color.rgb,vec3(0.2125, 0.7154, 0.0721)));
+ color = mix(gray, color, C+1.); // contrast
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/10.glsl/texture.vert b/Gem/examples/10.glsl/texture.vert
new file mode 100644
index 0000000..bda9f47
--- /dev/null
+++ b/Gem/examples/10.glsl/texture.vert
@@ -0,0 +1,8 @@
+// Cyrille Henry 2007
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+
+}
diff --git a/Gem/examples/10.glsl/texture_rect.frag b/Gem/examples/10.glsl/texture_rect.frag
new file mode 100644
index 0000000..98adc1f
--- /dev/null
+++ b/Gem/examples/10.glsl/texture_rect.frag
@@ -0,0 +1,16 @@
+// Cyrille Henry 2007
+
+#extension GL_ARB_texture_rectangle : enable
+uniform sampler2DRect MyTex;
+//uniform sampler2D MyTex;
+uniform float B,C;
+
+void main (void)
+{
+ vec4 color = texture2DRect(MyTex, (gl_TextureMatrix[0] * gl_TexCoord[0]).st);
+
+ color *= B+1.; // brightness
+ vec4 gray = vec4(dot(color.rgb,vec3(0.2125, 0.7154, 0.0721)));
+ color = mix(gray, color, C+1.); // contrast
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/10.glsl/tri2fan.frag b/Gem/examples/10.glsl/tri2fan.frag
new file mode 100644
index 0000000..391dc68
--- /dev/null
+++ b/Gem/examples/10.glsl/tri2fan.frag
@@ -0,0 +1,6 @@
+void main()
+{
+ gl_FragColor = vec4(1.0,1.0,1.0,0.1);
+ // set color
+}
+
diff --git a/Gem/examples/10.glsl/tri2fan.geom b/Gem/examples/10.glsl/tri2fan.geom
new file mode 100644
index 0000000..45961e2
--- /dev/null
+++ b/Gem/examples/10.glsl/tri2fan.geom
@@ -0,0 +1,51 @@
+// Cyrille Henry 2010
+
+#version 120
+#extension GL_EXT_geometry_shader4 : enable
+
+void main(void)
+{
+
+ int i; //increment variable
+ vec4 pos1,pos2, pos3, pos4, pos5; // tmp
+ vec3 high;
+
+ for(i=0; i< gl_VerticesIn; i += 3){ // for all triangles
+ pos1 = gl_PositionIn[i];
+ pos2 = gl_PositionIn[i+1];
+ pos3 = gl_PositionIn[i+2];
+ pos4 = (pos1 + pos2 + pos3) / 3.; // center of the triangle
+
+ high = 10.*cross(pos2.xyz-pos1.xyz,pos3.xyz-pos2.xyz);
+ // hight and orientation of the piramide
+
+ high = normalize(high);
+ high *= length(pos2-pos1);
+ pos5 = pos4 ;
+ pos5.xyz += high;
+
+ gl_Position = gl_ModelViewProjectionMatrix * pos1;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos4;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos5;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos2;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos4;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos5;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos3;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos4;
+ EmitVertex();
+ gl_Position = gl_ModelViewProjectionMatrix * pos5;
+ EmitVertex();
+
+ EndPrimitive();
+ // new primitive
+ }
+
+}
+
diff --git a/Gem/examples/10.glsl/tri2fan.vert b/Gem/examples/10.glsl/tri2fan.vert
new file mode 100644
index 0000000..2d22ff2
--- /dev/null
+++ b/Gem/examples/10.glsl/tri2fan.vert
@@ -0,0 +1,6 @@
+void main()
+{
+ gl_Position = gl_Vertex;
+}
+
+
diff --git a/Gem/examples/10.glsl/vague.frag b/Gem/examples/10.glsl/vague.frag
new file mode 100644
index 0000000..7b6a2f3
--- /dev/null
+++ b/Gem/examples/10.glsl/vague.frag
@@ -0,0 +1,23 @@
+// Cyrille Henry 2007
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform float K;
+uniform sampler2DRect texture, texture1, texture2;
+
+const float dx = 1.;
+const float dy = 1.;
+const float dp = 1.;
+
+void main (void)
+{
+ float light;
+ vec2 position = gl_TexCoord[0].st;
+ vec4 C, C1;
+ C = texture2DRect(texture2, position) ;
+
+ vec4 color2 = texture2DRect(texture1, (position+K*C.rg));
+
+ gl_FragColor = color2;
+
+}
diff --git a/Gem/examples/10.glsl/wave.frag b/Gem/examples/10.glsl/wave.frag
new file mode 100644
index 0000000..d455f88
--- /dev/null
+++ b/Gem/examples/10.glsl/wave.frag
@@ -0,0 +1,40 @@
+// Cyrille Henry 2007
+
+#extension GL_ARB_texture_rectangle : enable
+
+uniform float K1,K3,D1,K;
+uniform sampler2DRect text;
+
+const float dx = 1.;
+const float dy = 1.;
+
+void main (void)
+{
+ float x,y;
+ vec4 C;
+ vec2 texture1 = gl_TexCoord[0].st ;
+
+ x=texture1.x;
+ y=texture1.y;
+
+ C = texture2DRect(text, vec2(x, y));
+
+ vec4 color_cote = texture2DRect(text, vec2(x-dx, y-dy));
+ color_cote += texture2DRect(text, vec2(x+dx, y-dy));
+ color_cote += texture2DRect(text, vec2(x-dx, y+dy));
+ color_cote += texture2DRect(text, vec2(x+dx, y+dy));
+ color_cote += texture2DRect(text, vec2(x, y-dy));
+ color_cote += texture2DRect(text, vec2(x-dx, y));
+ color_cote += texture2DRect(text, vec2(x+dx, y));
+ color_cote += texture2DRect(text, vec2(x, y+dy));
+
+
+ float K = K1 * color_cote.r + K3 * 0.5 - (8. * K1 + K3) * C.r;
+ float D = D1 * (C.r - C.g);
+
+ C.b = C.g;
+ C.g = C.r;
+ C.r = (2.* C.g) - C.b + K - D ;
+
+ gl_FragColor = vec4(C.rgb,1.);
+}
diff --git a/Gem/examples/11.obj-exporter/obj_cube.pd b/Gem/examples/11.obj-exporter/obj_cube.pd
new file mode 100644
index 0000000..d874dc6
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_cube.pd
@@ -0,0 +1,152 @@
+#N canvas 511 83 666 689 12;
+#X obj 18 14 inlet;
+#X obj 18 35 t a a;
+#X obj 50 98 spigot 0;
+#X obj 50 169 GEMglPushMatrix;
+#X obj 50 573 GEMglPopMatrix;
+#X obj 50 211 gemlist_info;
+#X obj 103 77 r global_snap_obj;
+#X obj 560 718 s global_obj_creator;
+#X obj 50 317 gemlist_info;
+#X obj 342 25 loadbang;
+#X obj 342 46 \$1;
+#X obj 342 67 sel 0;
+#X msg 342 88 1;
+#X obj 342 110 f;
+#X text 374 108 or primitive apothema for matju;
+#X text 375 92 primitive size;
+#X obj 342 131 s \$0-size;
+#X obj 422 25 inlet;
+#X obj 18 77 outlet;
+#X obj 166 168 r \$0-size;
+#X obj 50 190 translateXYZ;
+#X obj 104 275 * -2;
+#X obj 50 296 translateXYZ;
+#X obj 104 253 r \$0-size;
+#X obj 50 424 gemlist_info;
+#X obj 77 382 * -2;
+#X obj 50 403 translateXYZ;
+#X obj 77 360 r \$0-size;
+#X obj 50 530 gemlist_info;
+#X obj 50 509 translateXYZ;
+#X obj 104 467 r \$0-size;
+#X obj 50 121 t a b;
+#X text 150 143 create new groupe;
+#X obj 104 488 * 2;
+#X obj 50 594 t b;
+#X msg 131 232 v \$1 \$2 \$3;
+#X msg 131 339 v \$1 \$2 \$3;
+#X msg 131 445 v \$1 \$2 \$3;
+#X msg 131 552 v \$1 \$2 \$3;
+#X obj 59 35 r \$0-size;
+#X obj 50 636 spigot 1;
+#X obj 123 690 spigot 0;
+#X obj 103 594 r global_obj_triangulate;
+#X obj 103 615 == 0;
+#X msg 82 142 g cube;
+#X obj 18 56 cube;
+#X obj 260 217 gemlist_info;
+#X obj 260 323 gemlist_info;
+#X obj 341 154 r \$0-size;
+#X obj 260 196 translateXYZ;
+#X obj 314 281 * -2;
+#X obj 260 302 translateXYZ;
+#X obj 314 259 r \$0-size;
+#X obj 260 430 gemlist_info;
+#X obj 287 388 * -2;
+#X obj 260 409 translateXYZ;
+#X obj 287 366 r \$0-size;
+#X obj 260 536 gemlist_info;
+#X obj 260 515 translateXYZ;
+#X obj 314 473 r \$0-size;
+#X obj 314 494 * 2;
+#X msg 341 238 v \$1 \$2 \$3;
+#X msg 341 345 v \$1 \$2 \$3;
+#X msg 341 451 v \$1 \$2 \$3;
+#X msg 341 558 v \$1 \$2 \$3;
+#X obj 341 175 * -2;
+#X obj 287 175 * 2;
+#X msg 50 657 f -5 -6 -7 -8 \, f -7 -3 -4 -8 \, f -5 -8 -4 -1 \, f
+-2 -3 -7 -6 \, f -1 -2 -6 -5 \, f -3 -2 -1 -4;
+#X msg 123 711 f -6 -7 -8 \, f -8 -5 -6 \, f -3 -4 -8 \, f -8 -7 -3
+\, f -8 -4 -1 \, f -1 -5 -8 \, f -3 -7 -6 \, f -6 -2 -3 \, f -2 -6
+-5 \, f -5 -1 -2 \, f -2 -1 -4 \, f -4 -3 -2;
+#X connect 0 0 1 0;
+#X connect 1 0 45 0;
+#X connect 1 1 2 0;
+#X connect 2 0 31 0;
+#X connect 3 0 20 0;
+#X connect 4 0 34 0;
+#X connect 5 0 22 0;
+#X connect 5 4 35 0;
+#X connect 6 0 2 1;
+#X connect 8 0 26 0;
+#X connect 8 4 36 0;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 11 1 13 0;
+#X connect 12 0 13 0;
+#X connect 13 0 16 0;
+#X connect 17 0 13 0;
+#X connect 19 0 20 1;
+#X connect 19 0 20 2;
+#X connect 19 0 20 3;
+#X connect 20 0 5 0;
+#X connect 21 0 22 2;
+#X connect 22 0 8 0;
+#X connect 23 0 21 0;
+#X connect 24 0 29 0;
+#X connect 24 4 37 0;
+#X connect 25 0 26 1;
+#X connect 26 0 24 0;
+#X connect 27 0 25 0;
+#X connect 28 0 49 0;
+#X connect 28 4 38 0;
+#X connect 29 0 28 0;
+#X connect 30 0 33 0;
+#X connect 31 0 3 0;
+#X connect 31 1 44 0;
+#X connect 33 0 29 2;
+#X connect 34 0 40 0;
+#X connect 34 0 41 0;
+#X connect 35 0 7 0;
+#X connect 36 0 7 0;
+#X connect 37 0 7 0;
+#X connect 38 0 7 0;
+#X connect 39 0 45 1;
+#X connect 40 0 67 0;
+#X connect 41 0 68 0;
+#X connect 42 0 41 1;
+#X connect 42 0 43 0;
+#X connect 43 0 40 1;
+#X connect 44 0 7 0;
+#X connect 45 0 18 0;
+#X connect 46 0 51 0;
+#X connect 46 4 61 0;
+#X connect 47 0 55 0;
+#X connect 47 4 62 0;
+#X connect 48 0 65 0;
+#X connect 48 0 66 0;
+#X connect 49 0 46 0;
+#X connect 50 0 51 2;
+#X connect 51 0 47 0;
+#X connect 52 0 50 0;
+#X connect 53 0 58 0;
+#X connect 53 4 63 0;
+#X connect 54 0 55 1;
+#X connect 55 0 53 0;
+#X connect 56 0 54 0;
+#X connect 57 0 4 0;
+#X connect 57 4 64 0;
+#X connect 58 0 57 0;
+#X connect 59 0 60 0;
+#X connect 60 0 58 2;
+#X connect 61 0 7 0;
+#X connect 62 0 7 0;
+#X connect 63 0 7 0;
+#X connect 64 0 7 0;
+#X connect 65 0 49 3;
+#X connect 66 0 49 1;
+#X connect 67 0 7 0;
+#X connect 68 0 7 0;
diff --git a/Gem/examples/11.obj-exporter/obj_exporter-help.pd b/Gem/examples/11.obj-exporter/obj_exporter-help.pd
new file mode 100644
index 0000000..543a2b2
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_exporter-help.pd
@@ -0,0 +1,87 @@
+#N canvas 58 106 645 381 12;
+#X obj 35 90 gemhead;
+#X obj 35 175 translateXYZ 0 0 0.1;
+#X obj 35 153 rotateXYZ 1 5 9;
+#X obj 35 197 scaleXYZ 1 1.1 1;
+#X obj 35 219 obj_square 0.2;
+#X obj 242 205 obj_exporter;
+#X msg 242 95 save test1.obj;
+#N canvas 428 179 450 300 repeat 0;
+#X obj 36 22 inlet;
+#X obj 36 44 t a a;
+#X obj 111 170 gemlist;
+#X obj 36 227 outlet;
+#X obj 111 149 until;
+#X msg 111 128 30;
+#X obj 36 65 route gem_state;
+#X obj 36 86 route float;
+#X msg 36 107 gem_state \$1;
+#X connect 0 0 1 0;
+#X connect 1 0 6 0;
+#X connect 1 1 2 1;
+#X connect 2 0 3 0;
+#X connect 4 0 2 0;
+#X connect 5 0 4 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 1 5 0;
+#X connect 8 0 3 0;
+#X restore 35 112 pd repeat 30;
+#X msg 35 15 create \, 1;
+#X msg 46 36 destroy;
+#X floatatom 69 133 5 0 0 0 - - -;
+#X floatatom 109 133 5 0 0 0 - - -;
+#X floatatom 149 133 5 0 0 0 - - -;
+#X msg 256 142 goupe \$1;
+#X obj 256 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 276 122 grouping or not the various primitives;
+#X text 325 144 default = 0;
+#X msg 270 181 triangulate \$1;
+#X obj 270 164 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 379 182 triangulate quads (default = 0);
+#X obj 35 324 obj_primTri;
+#X msg 47 261 0.1 0.3 0.5;
+#X msg 59 282 0.2 0.4 0.5;
+#X obj 47 240 loadbang;
+#X obj 241 261 gemhead;
+#X obj 401 261 gemhead;
+#X obj 401 324 obj_rectangle 0.5 1;
+#X obj 401 282 translateXYZ -1 -1 2;
+#X obj 401 303 rotateXYZ 30 -20 10;
+#X msg 72 303 0.2 0.4 0.4;
+#X obj 241 324 obj_cube 0.5;
+#X obj 241 303 rotateXYZ 30 30 30;
+#X obj 241 282 translateXYZ 2 1 2;
+#X obj 35 59 gemwin;
+#X text 236 16 Here is a way to create obj file in Gem.;
+#X obj 307 64 model;
+#X connect 0 0 7 0;
+#X connect 1 0 3 0;
+#X connect 2 0 1 0;
+#X connect 3 0 4 0;
+#X connect 4 0 20 0;
+#X connect 6 0 5 0;
+#X connect 7 0 2 0;
+#X connect 8 0 33 0;
+#X connect 9 0 33 0;
+#X connect 10 0 2 1;
+#X connect 11 0 2 2;
+#X connect 12 0 2 3;
+#X connect 13 0 5 0;
+#X connect 14 0 13 0;
+#X connect 17 0 5 0;
+#X connect 18 0 17 0;
+#X connect 21 0 20 1;
+#X connect 22 0 20 2;
+#X connect 23 0 21 0;
+#X connect 23 0 22 0;
+#X connect 23 0 29 0;
+#X connect 24 0 32 0;
+#X connect 25 0 27 0;
+#X connect 27 0 28 0;
+#X connect 28 0 26 0;
+#X connect 29 0 20 3;
+#X connect 31 0 30 0;
+#X connect 32 0 31 0;
diff --git a/Gem/examples/11.obj-exporter/obj_exporter.pd b/Gem/examples/11.obj-exporter/obj_exporter.pd
new file mode 100644
index 0000000..5a4b08f
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_exporter.pd
@@ -0,0 +1,96 @@
+#N canvas 166 167 375 605 12;
+#X obj 90 9 inlet;
+#X obj 51 108 gemhead;
+#X obj 51 150 delay 0;
+#X obj 83 234 s global_snap_obj;
+#X msg 113 74 1;
+#X obj 51 129 t b;
+#X obj 51 171 spigot 0;
+#X msg 83 213 0;
+#X obj 51 598 textfile;
+#X msg 146 74 rewind \, clear;
+#X msg 51 314 write \$1 cr;
+#X obj 66 338 r global_obj_creator;
+#X obj 66 359 route g v f;
+#X msg 90 401 add v \$1 \$2 \$3;
+#X obj 115 422 list prepend add f;
+#X obj 90 51 t a b b;
+#X obj 51 291 symbol;
+#X obj 115 443 list trim;
+#X obj 51 192 t b b;
+#X obj 90 269 symbol;
+#X obj 98 506 f;
+#X obj 121 529 + 1;
+#X msg 116 485 0;
+#X obj 66 556 pack s f;
+#X msg 66 577 add g \$1_\$2;
+#X obj 66 485 t a b;
+#X obj 148 51 == 0;
+#X obj 66 464 spigot 1;
+#N canvas 1 82 450 300 remove_cam_offset 0;
+#X obj 213 32 gemhead 1;
+#X obj 213 53 gemlist_info;
+#X obj 294 74 unpack f f f;
+#X obj 23 28 inlet;
+#X obj 23 244 outlet;
+#X obj 23 76 unpack f f f;
+#X obj 23 217 pack f f f;
+#X obj 23 167 -;
+#X obj 63 167 -;
+#X obj 104 167 -;
+#X connect 0 0 1 0;
+#X connect 1 4 2 0;
+#X connect 2 0 7 1;
+#X connect 2 1 8 1;
+#X connect 2 2 9 1;
+#X connect 3 0 5 0;
+#X connect 5 0 7 0;
+#X connect 5 1 8 0;
+#X connect 5 2 9 0;
+#X connect 6 0 4 0;
+#X connect 7 0 6 0;
+#X connect 8 0 6 1;
+#X connect 9 0 6 2;
+#X restore 90 380 pd remove_cam_offset;
+#X obj 90 30 route save groupe triangulate;
+#X obj 223 51 s global_obj_triangulate;
+#X connect 0 0 29 0;
+#X connect 1 0 5 0;
+#X connect 2 0 6 0;
+#X connect 4 0 6 1;
+#X connect 4 0 3 0;
+#X connect 5 0 2 0;
+#X connect 6 0 18 0;
+#X connect 7 0 3 0;
+#X connect 7 0 6 1;
+#X connect 9 0 8 0;
+#X connect 10 0 8 0;
+#X connect 11 0 12 0;
+#X connect 12 0 27 0;
+#X connect 12 1 28 0;
+#X connect 12 2 14 0;
+#X connect 13 0 8 0;
+#X connect 14 0 17 0;
+#X connect 15 0 19 0;
+#X connect 15 1 4 0;
+#X connect 15 2 9 0;
+#X connect 15 2 22 0;
+#X connect 16 0 10 0;
+#X connect 17 0 8 0;
+#X connect 18 0 16 0;
+#X connect 18 1 7 0;
+#X connect 19 0 16 1;
+#X connect 20 0 21 0;
+#X connect 20 0 23 1;
+#X connect 21 0 20 1;
+#X connect 22 0 20 1;
+#X connect 23 0 24 0;
+#X connect 24 0 8 0;
+#X connect 25 0 23 0;
+#X connect 25 1 20 0;
+#X connect 26 0 27 1;
+#X connect 27 0 25 0;
+#X connect 28 0 13 0;
+#X connect 29 0 15 0;
+#X connect 29 1 26 0;
+#X connect 29 2 30 0;
diff --git a/Gem/examples/11.obj-exporter/obj_primTri.pd b/Gem/examples/11.obj-exporter/obj_primTri.pd
new file mode 100644
index 0000000..2607197
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_primTri.pd
@@ -0,0 +1,87 @@
+#N canvas 418 99 489 673 12;
+#X obj 23 26 inlet;
+#X obj 137 19 inlet;
+#X obj 183 19 inlet;
+#X obj 233 19 inlet;
+#X obj 304 19 inlet;
+#X obj 350 19 inlet;
+#X obj 400 19 inlet;
+#X obj 23 47 t a a;
+#X obj 23 89 outlet;
+#X obj 23 68 primTri 0 0 0;
+#X obj 55 110 spigot 0;
+#X obj 55 173 GEMglPushMatrix;
+#X obj 55 542 GEMglPopMatrix;
+#X obj 55 236 gemlist_info;
+#X obj 108 89 r global_snap_obj;
+#X obj 178 602 s global_obj_creator;
+#X text 217 241 get it's position;
+#X text 227 260 send it to the global abstraction;
+#X obj 55 362 gemlist_info;
+#X obj 55 215 translateXYZ;
+#X obj 55 341 translateXYZ;
+#X obj 55 488 gemlist_info;
+#X obj 55 467 translateXYZ;
+#X obj 55 131 t a b;
+#X text 171 155 create new groupe;
+#X msg 136 257 v \$1 \$2 \$3;
+#X msg 136 383 v \$1 \$2 \$3;
+#X msg 136 509 v \$1 \$2 \$3;
+#X msg 87 152 g triangle;
+#X obj 55 278 GEMglPopMatrix;
+#X obj 55 299 GEMglPushMatrix;
+#X obj 55 404 GEMglPopMatrix;
+#X obj 55 425 GEMglPushMatrix;
+#X obj 82 194 unpack f f f;
+#X text 217 223 1st vertex of the triangle;
+#X obj 82 320 unpack f f f;
+#X text 220 340 2nd vertex of the triangle;
+#X obj 82 446 unpack f f f;
+#X text 152 465 3rd vertex of the triangle;
+#X msg 55 563 f -3 -2 -1;
+#X connect 0 0 7 0;
+#X connect 1 0 9 1;
+#X connect 1 0 33 0;
+#X connect 2 0 9 2;
+#X connect 2 0 35 0;
+#X connect 3 0 9 3;
+#X connect 3 0 37 0;
+#X connect 4 0 9 4;
+#X connect 5 0 9 5;
+#X connect 6 0 9 6;
+#X connect 7 0 9 0;
+#X connect 7 1 10 0;
+#X connect 9 0 8 0;
+#X connect 10 0 23 0;
+#X connect 11 0 19 0;
+#X connect 12 0 39 0;
+#X connect 13 0 29 0;
+#X connect 13 4 25 0;
+#X connect 14 0 10 1;
+#X connect 18 0 31 0;
+#X connect 18 4 26 0;
+#X connect 19 0 13 0;
+#X connect 20 0 18 0;
+#X connect 21 0 12 0;
+#X connect 21 4 27 0;
+#X connect 22 0 21 0;
+#X connect 23 0 11 0;
+#X connect 23 1 28 0;
+#X connect 25 0 15 0;
+#X connect 26 0 15 0;
+#X connect 27 0 15 0;
+#X connect 28 0 15 0;
+#X connect 29 0 30 0;
+#X connect 30 0 20 0;
+#X connect 31 0 32 0;
+#X connect 32 0 22 0;
+#X connect 33 0 19 1;
+#X connect 33 1 19 2;
+#X connect 33 2 19 3;
+#X connect 35 0 20 1;
+#X connect 35 1 20 2;
+#X connect 35 2 20 3;
+#X connect 37 0 22 1;
+#X connect 37 1 22 2;
+#X connect 37 2 22 3;
+#X connect 39 0 15 0;
diff --git a/Gem/examples/11.obj-exporter/obj_rectangle.pd b/Gem/examples/11.obj-exporter/obj_rectangle.pd
new file mode 100644
index 0000000..648eddf
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_rectangle.pd
@@ -0,0 +1,123 @@
+#N canvas 571 83 666 689 12;
+#X obj 18 24 inlet;
+#X obj 18 45 t a a;
+#X obj 50 108 spigot 0;
+#X obj 50 179 GEMglPushMatrix;
+#X obj 50 583 GEMglPopMatrix;
+#X obj 50 221 gemlist_info;
+#X obj 103 87 r global_snap_obj;
+#X obj 387 591 s global_obj_creator;
+#X text 212 203 1st vertex of the square;
+#X text 212 221 get it's position;
+#X text 252 241 send it to the global abstraction;
+#X obj 50 327 gemlist_info;
+#X text 152 326 get it's position;
+#X text 257 348 send it to the global abstraction;
+#X obj 342 18 loadbang;
+#X obj 342 39 \$1;
+#X obj 342 60 sel 0;
+#X msg 342 82 1;
+#X obj 342 104 f;
+#X obj 422 16 inlet;
+#X obj 18 87 outlet;
+#X obj 50 200 translateXYZ;
+#X obj 104 285 * -2;
+#X obj 50 306 translateXYZ;
+#X text 147 304 2nd vertex of the square;
+#X obj 50 434 gemlist_info;
+#X obj 77 392 * -2;
+#X obj 50 413 translateXYZ;
+#X obj 50 540 gemlist_info;
+#X obj 50 519 translateXYZ;
+#X obj 50 131 t a b;
+#X text 170 153 create new groupe;
+#X text 147 411 3rd vertex of the square;
+#X obj 104 498 * 2;
+#X obj 50 604 t b;
+#X msg 131 242 v \$1 \$2 \$3;
+#X msg 131 349 v \$1 \$2 \$3;
+#X msg 131 455 v \$1 \$2 \$3;
+#X msg 131 562 v \$1 \$2 \$3;
+#X obj 50 646 spigot 1;
+#X obj 160 646 spigot 0;
+#X obj 103 604 r global_obj_triangulate;
+#X obj 103 625 == 0;
+#X obj 342 125 s \$0-sizeX;
+#X obj 472 18 loadbang;
+#X obj 472 60 sel 0;
+#X msg 472 82 1;
+#X obj 472 104 f;
+#X obj 552 16 inlet;
+#X obj 472 39 \$2;
+#X obj 472 125 s \$0-sizeY;
+#X msg 82 152 g rectangle;
+#X obj 164 178 r \$0-sizeX;
+#X obj 240 178 r \$0-sizeY;
+#X obj 104 263 r \$0-sizeY;
+#X obj 77 370 r \$0-sizeX;
+#X obj 104 477 r \$0-sizeY;
+#X obj 18 66 rectangle;
+#X obj 59 45 r \$0-sizeX;
+#X obj 139 45 r \$0-sizeY;
+#X msg 50 667 f -1 -2 -3 -4;
+#X msg 160 667 f -2 -3 -4 \, f -4 -1 -2;
+#X connect 0 0 1 0;
+#X connect 1 0 57 0;
+#X connect 1 1 2 0;
+#X connect 2 0 30 0;
+#X connect 3 0 21 0;
+#X connect 4 0 34 0;
+#X connect 5 0 23 0;
+#X connect 5 4 35 0;
+#X connect 6 0 2 1;
+#X connect 11 0 27 0;
+#X connect 11 4 36 0;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 16 1 18 0;
+#X connect 17 0 18 0;
+#X connect 18 0 43 0;
+#X connect 19 0 18 0;
+#X connect 21 0 5 0;
+#X connect 22 0 23 2;
+#X connect 23 0 11 0;
+#X connect 25 0 29 0;
+#X connect 25 4 37 0;
+#X connect 26 0 27 1;
+#X connect 27 0 25 0;
+#X connect 28 0 4 0;
+#X connect 28 4 38 0;
+#X connect 29 0 28 0;
+#X connect 30 0 3 0;
+#X connect 30 1 51 0;
+#X connect 33 0 29 2;
+#X connect 34 0 39 0;
+#X connect 34 0 40 0;
+#X connect 35 0 7 0;
+#X connect 36 0 7 0;
+#X connect 37 0 7 0;
+#X connect 38 0 7 0;
+#X connect 39 0 60 0;
+#X connect 40 0 61 0;
+#X connect 41 0 40 1;
+#X connect 41 0 42 0;
+#X connect 42 0 39 1;
+#X connect 44 0 49 0;
+#X connect 45 0 46 0;
+#X connect 45 1 47 0;
+#X connect 46 0 47 0;
+#X connect 47 0 50 0;
+#X connect 48 0 47 0;
+#X connect 49 0 45 0;
+#X connect 51 0 7 0;
+#X connect 52 0 21 1;
+#X connect 53 0 21 2;
+#X connect 54 0 22 0;
+#X connect 55 0 26 0;
+#X connect 56 0 33 0;
+#X connect 57 0 20 0;
+#X connect 58 0 57 1;
+#X connect 59 0 57 2;
+#X connect 60 0 7 0;
+#X connect 61 0 7 0;
diff --git a/Gem/examples/11.obj-exporter/obj_square.pd b/Gem/examples/11.obj-exporter/obj_square.pd
new file mode 100644
index 0000000..c9a18f0
--- /dev/null
+++ b/Gem/examples/11.obj-exporter/obj_square.pd
@@ -0,0 +1,108 @@
+#N canvas 573 83 666 689 12;
+#X obj 18 24 inlet;
+#X obj 18 45 t a a;
+#X obj 50 108 spigot 0;
+#X obj 50 179 GEMglPushMatrix;
+#X obj 50 583 GEMglPopMatrix;
+#X obj 50 221 gemlist_info;
+#X obj 103 87 r global_snap_obj;
+#X obj 387 591 s global_obj_creator;
+#X text 212 203 1st vertex of the square;
+#X text 212 221 get it's position;
+#X text 252 241 send it to the global abstraction;
+#X obj 50 327 gemlist_info;
+#X text 152 326 get it's position;
+#X text 257 348 send it to the global abstraction;
+#X obj 18 66 square;
+#X obj 342 18 loadbang;
+#X obj 342 39 \$1;
+#X obj 342 60 sel 0;
+#X msg 342 82 1;
+#X obj 342 104 f;
+#X text 365 123 or primitive apothema for matju;
+#X text 366 107 primitive size;
+#X obj 342 141 s \$0-size;
+#X obj 422 16 inlet;
+#X obj 18 87 outlet;
+#X obj 168 180 r \$0-size;
+#X obj 50 200 translateXYZ;
+#X obj 104 285 * -2;
+#X obj 50 306 translateXYZ;
+#X obj 104 263 r \$0-size;
+#X text 147 304 2nd vertex of the square;
+#X obj 50 434 gemlist_info;
+#X obj 77 392 * -2;
+#X obj 50 413 translateXYZ;
+#X obj 77 370 r \$0-size;
+#X obj 50 540 gemlist_info;
+#X obj 50 519 translateXYZ;
+#X obj 104 477 r \$0-size;
+#X obj 50 131 t a b;
+#X text 150 152 create new groupe;
+#X text 147 411 3rd vertex of the square;
+#X obj 104 498 * 2;
+#X obj 50 604 t b;
+#X msg 131 242 v \$1 \$2 \$3;
+#X msg 131 349 v \$1 \$2 \$3;
+#X msg 131 455 v \$1 \$2 \$3;
+#X msg 131 562 v \$1 \$2 \$3;
+#X obj 59 45 r \$0-size;
+#X msg 82 152 g square;
+#X obj 50 646 spigot 1;
+#X obj 160 646 spigot 0;
+#X obj 103 604 r global_obj_triangulate;
+#X obj 103 625 == 0;
+#X msg 50 667 f -1 -2 -3 -4;
+#X msg 160 667 f -2 -3 -4 \, f -4 -1 -2;
+#X connect 0 0 1 0;
+#X connect 1 0 14 0;
+#X connect 1 1 2 0;
+#X connect 2 0 38 0;
+#X connect 3 0 26 0;
+#X connect 4 0 42 0;
+#X connect 5 0 28 0;
+#X connect 5 4 43 0;
+#X connect 6 0 2 1;
+#X connect 11 0 33 0;
+#X connect 11 4 44 0;
+#X connect 14 0 24 0;
+#X connect 15 0 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 17 1 19 0;
+#X connect 18 0 19 0;
+#X connect 19 0 22 0;
+#X connect 23 0 19 0;
+#X connect 25 0 26 1;
+#X connect 25 0 26 2;
+#X connect 26 0 5 0;
+#X connect 27 0 28 2;
+#X connect 28 0 11 0;
+#X connect 29 0 27 0;
+#X connect 31 0 36 0;
+#X connect 31 4 45 0;
+#X connect 32 0 33 1;
+#X connect 33 0 31 0;
+#X connect 34 0 32 0;
+#X connect 35 0 4 0;
+#X connect 35 4 46 0;
+#X connect 36 0 35 0;
+#X connect 37 0 41 0;
+#X connect 38 0 3 0;
+#X connect 38 1 48 0;
+#X connect 41 0 36 2;
+#X connect 42 0 49 0;
+#X connect 42 0 50 0;
+#X connect 43 0 7 0;
+#X connect 44 0 7 0;
+#X connect 45 0 7 0;
+#X connect 46 0 7 0;
+#X connect 47 0 14 1;
+#X connect 48 0 7 0;
+#X connect 49 0 53 0;
+#X connect 50 0 54 0;
+#X connect 51 0 50 1;
+#X connect 51 0 52 0;
+#X connect 52 0 49 1;
+#X connect 53 0 7 0;
+#X connect 54 0 7 0;
diff --git a/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd b/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd
new file mode 100644
index 0000000..eb5b2fc
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/01.flat_projection-help.pd
@@ -0,0 +1,30 @@
+#N canvas 365 180 996 500 10;
+#X obj 39 307 r render;
+#X obj 39 437 pix_texture;
+#X obj 110 353 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 110 373 openpanel;
+#X msg 110 394 open \$1;
+#X obj 39 458 square 25;
+#X text 99 307 <- this object must be present in your patch to start
+the gemchain like in this example.;
+#X floatatom 109 462 5 0 0 0 - - -;
+#X obj 39 49 flat_projection 20;
+#X text 304 191 <- abstraction [flat_projection];
+#X obj 39 416 pix_image ../data/fractal.JPG;
+#X msg 51 24 offset 1024 0;
+#X text 176 23 other messages to the gemwin;
+#X text 305 133 This define the way screen are physically connected
+to the computer.;
+#X text 306 93 This define the way screen are positioned in space to
+create a single image.;
+#X text 305 159 geometry screen and geometry computer can be diferents
+\, but should define the same number of screen.;
+#X connect 0 0 10 0;
+#X connect 1 0 5 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 10 0;
+#X connect 7 0 5 1;
+#X connect 10 0 1 0;
+#X connect 11 0 8 0;
diff --git a/Gem/examples/12.multi_screen_projection/02.nfp-help.pd b/Gem/examples/12.multi_screen_projection/02.nfp-help.pd
new file mode 100644
index 0000000..6a8404d
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/02.nfp-help.pd
@@ -0,0 +1,46 @@
+#N canvas 321 188 996 584 10;
+#X obj 27 231 gemhead;
+#X obj 27 298 gemframebuffer;
+#X obj 27 348 translateXYZ 0 0 -4;
+#X msg 43 275 dimen 1024 768;
+#X obj 43 255 loadbang;
+#X obj 27 442 pix_texture;
+#X obj 27 464 rectangle 5.333 4;
+#X msg 42 397 thread 0 \, open grid.jpg;
+#X obj 42 377 loadbang;
+#X text 24 211 creation of a big framebuffer;
+#X msg 171 274 rectangle 1;
+#X obj 171 255 loadbang;
+#X obj 27 420 pix_image;
+#X obj 30 177 gemwin;
+#X msg 30 129 create \, 1;
+#X msg 43 149 0 \, destroy;
+#X obj 122 320 s nfp_fb;
+#X obj 35 61 load_save;
+#X obj 86 43 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 35 43 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 280 43 nfp_flat_wall 1;
+#X obj 35 19 loadbang;
+#X obj 490 43 nfp_flat_wall 2;
+#X obj 703 44 nfp_curved_wall 3;
+#X text 52 43 load;
+#X text 104 42 save;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 1 1 16 0;
+#X connect 2 0 12 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 6 0;
+#X connect 7 0 12 0;
+#X connect 8 0 7 0;
+#X connect 10 0 1 0;
+#X connect 11 0 10 0;
+#X connect 12 0 5 0;
+#X connect 14 0 13 0;
+#X connect 15 0 13 0;
+#X connect 18 0 17 1;
+#X connect 19 0 17 0;
+#X connect 21 0 19 0;
diff --git a/Gem/examples/12.multi_screen_projection/config.txt b/Gem/examples/12.multi_screen_projection/config.txt
new file mode 100644
index 0000000..8e10bbb
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/config.txt
@@ -0,0 +1,70 @@
+VP_CR_Y-3 2.34;
+VP_CR_X-3 1.79;
+VP_CC_Y-3 -0.34;
+VP_CC_X-3 0.55;
+VP_CL_Y-3 0.76;
+VP_CL_X-3 -0.730001;
+VP_BC_Y-3 -4.01001;
+VP_BC_X-3 0.2;
+VP_TC_Y-3 3.7;
+VP_TC_X-3 0.00999991;
+Shade_B-3 0;
+Shade_T-3 0;
+Shade_R-3 0.0829032;
+Shade_L-3 0.0693548;
+TP_BR_Y-3 265;
+TP_BR_X-3 416;
+TP_TR_Y-3 0;
+TP_TR_X-3 367;
+TP_BL_Y-3 227;
+TP_BL_X-3 0;
+TP_TL_Y-3 13;
+TP_TL_X-3 105;
+VP_BR_Y-3 -3.37;
+VP_BR_X-3 1.52;
+VP_TR_Y-3 3.95;
+VP_TR_X-3 1.31;
+VP_BL_Y-3 -2.83;
+VP_BL_X-3 -1.21;
+VP_TL_Y-3 3.35;
+VP_TL_X-3 -1.16;
+Shade_B-2 0;
+Shade_T-2 0;
+Shade_R-2 0;
+Shade_L-2 0;
+TP_BR_Y-2 538;
+TP_BR_X-2 975;
+TP_TR_Y-2 0;
+TP_TR_X-2 889;
+TP_BL_Y-2 449;
+TP_BL_X-2 625;
+TP_TL_Y-2 117;
+TP_TL_X-2 605;
+VP_BR_Y-2 -3.53;
+VP_BR_X-2 3.44;
+VP_TR_Y-2 2.64;
+VP_TR_X-2 3;
+VP_BL_Y-2 -2.53;
+VP_BL_X-2 1.33;
+VP_TL_Y-2 1.18;
+VP_TL_X-2 1.17;
+Shade_B-1 0;
+Shade_T-1 0;
+Shade_R-1 0;
+Shade_L-1 0;
+TP_BR_Y-1 448;
+TP_BR_X-1 453;
+TP_TR_Y-1 110;
+TP_TR_X-1 543;
+TP_BL_Y-1 484;
+TP_BL_X-1 95;
+TP_TL_Y-1 0;
+TP_TL_X-1 0;
+VP_BR_Y-1 -3.01999;
+VP_BR_X-1 -0.18;
+VP_TR_Y-1 1.94;
+VP_TR_X-1 0.54;
+VP_BL_Y-1 -3.75;
+VP_BL_X-1 -2.9;
+VP_TL_Y-1 3.84;
+VP_TL_X-1 -3.66001;
diff --git a/Gem/examples/12.multi_screen_projection/flat_projection.pd b/Gem/examples/12.multi_screen_projection/flat_projection.pd
new file mode 100644
index 0000000..9f81653
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/flat_projection.pd
@@ -0,0 +1,454 @@
+#N canvas 75 144 1376 699 10;
+#X obj 263 277 gemhead;
+#X obj 263 351 gemframebuffer;
+#X obj 263 402 s render;
+#X msg 285 326 rectangle 0;
+#X obj 285 307 loadbang;
+#X obj 263 376 translateXYZ 0 0 -4;
+#N canvas 190 83 1090 559 size 0;
+#X obj 29 20 inlet;
+#X obj 29 91 unpack f f;
+#X obj 142 91 unpack f f;
+#X obj 336 91 unpack f f;
+#X obj 142 122 - 1;
+#X obj 199 124 - 1;
+#X obj 142 187 *;
+#X obj 155 163 t b f;
+#X obj 199 187 *;
+#X obj 212 163 t b f;
+#X obj 42 233 t b f;
+#X obj 126 233 t b f;
+#X obj 29 330 pack f f;
+#X obj 441 160 t b b f;
+#X obj 29 494 outlet;
+#X obj 29 147 *;
+#X obj 42 123 t b f;
+#X obj 86 147 *;
+#X obj 99 123 t b f;
+#X obj 257 329 pack f f;
+#X obj 257 407 outlet;
+#X obj 29 257 -;
+#X obj 113 257 -;
+#X obj 113 285 f;
+#X obj 29 285 f;
+#N canvas 260 83 450 300 change2 0;
+#X obj 41 24 inlet;
+#X obj 41 47 unpack f f;
+#X obj 80 176 pack f f;
+#X obj 98 132 t b f;
+#X obj 80 201 outlet;
+#X obj 41 149 moses 2;
+#X obj 41 89 change;
+#X obj 98 89 change;
+#X connect 0 0 1 0;
+#X connect 1 0 6 0;
+#X connect 1 1 7 0;
+#X connect 2 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 2 1;
+#X connect 5 1 2 0;
+#X connect 6 0 5 0;
+#X connect 7 0 3 0;
+#X restore 257 366 pd change2;
+#N canvas 260 83 450 300 change2 0;
+#X obj 41 24 inlet;
+#X obj 41 47 unpack f f;
+#X obj 80 176 pack f f;
+#X obj 98 132 t b f;
+#X obj 80 201 outlet;
+#X obj 41 149 moses 2;
+#X obj 41 89 change;
+#X obj 98 89 change;
+#X connect 0 0 1 0;
+#X connect 1 0 6 0;
+#X connect 1 1 7 0;
+#X connect 2 0 4 0;
+#X connect 3 0 6 0;
+#X connect 3 1 2 1;
+#X connect 5 1 2 0;
+#X connect 6 0 5 0;
+#X connect 7 0 3 0;
+#X restore 29 350 pd change2;
+#X obj 581 311 pack f f;
+#X obj 594 265 t b f;
+#X obj 651 265 t b f;
+#X obj 581 289 /;
+#X obj 638 289 /;
+#X obj 579 171 pack f f;
+#X obj 305 428 /;
+#X obj 305 448 * 4;
+#X msg 305 468 \$1 4;
+#X msg 29 369 dimen \$1 \$2;
+#X obj 57 392 /;
+#X msg 57 472 perspec \$1 \$2 -1 1 1 20;
+#X obj 57 452 pack f f;
+#X obj 57 411 t f f;
+#X obj 57 431 * -1;
+#X obj 441 91 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#X text 467 90 basic FSAA;
+#X obj 29 46 route screen_size geometry_screen geometry_computer overlap
+FSAA;
+#X obj 239 91 unpack f f;
+#X obj 239 137 *;
+#X obj 252 113 t b f;
+#X obj 296 137 *;
+#X obj 309 113 t b f;
+#X obj 579 191 s \$0-glsl_geometry_screen;
+#X obj 578 224 s \$0-glsl_geometry_computer;
+#X obj 581 331 s \$0-glsl_overlap;
+#X obj 305 490 s \$0-size_gemwin;
+#X obj 388 255 r \$0-altern;
+#X obj 407 311 list;
+#X obj 388 276 sel 0 1;
+#X obj 388 341 list;
+#X obj 29 307 + 0;
+#X obj 113 308 + 0;
+#X text 480 108 not full implemented yet!;
+#X connect 0 0 44 0;
+#X connect 1 0 15 0;
+#X connect 1 0 28 0;
+#X connect 1 0 46 0;
+#X connect 1 1 17 0;
+#X connect 1 1 29 0;
+#X connect 1 1 48 0;
+#X connect 2 0 4 0;
+#X connect 2 0 16 0;
+#X connect 2 0 32 0;
+#X connect 2 1 5 0;
+#X connect 2 1 18 0;
+#X connect 2 1 32 1;
+#X connect 3 0 7 0;
+#X connect 3 0 30 0;
+#X connect 3 1 9 0;
+#X connect 3 1 31 0;
+#X connect 4 0 6 0;
+#X connect 5 0 8 0;
+#X connect 6 0 10 0;
+#X connect 7 0 6 0;
+#X connect 7 1 6 1;
+#X connect 8 0 11 0;
+#X connect 9 0 8 0;
+#X connect 9 1 8 1;
+#X connect 10 0 21 0;
+#X connect 10 1 21 1;
+#X connect 11 0 22 0;
+#X connect 11 1 22 1;
+#X connect 12 0 26 0;
+#X connect 12 0 37 0;
+#X connect 13 0 24 0;
+#X connect 13 1 23 0;
+#X connect 13 2 58 1;
+#X connect 13 2 59 1;
+#X connect 15 0 21 0;
+#X connect 16 0 15 0;
+#X connect 16 1 15 1;
+#X connect 17 0 22 0;
+#X connect 18 0 17 0;
+#X connect 18 1 17 1;
+#X connect 19 0 25 0;
+#X connect 21 0 24 0;
+#X connect 22 0 23 0;
+#X connect 23 0 59 0;
+#X connect 24 0 58 0;
+#X connect 25 0 20 0;
+#X connect 25 0 33 0;
+#X connect 26 0 36 0;
+#X connect 27 0 52 0;
+#X connect 28 0 30 0;
+#X connect 28 1 30 1;
+#X connect 29 0 31 0;
+#X connect 29 1 31 1;
+#X connect 30 0 27 0;
+#X connect 31 0 27 1;
+#X connect 32 0 50 0;
+#X connect 33 0 34 0;
+#X connect 34 0 35 0;
+#X connect 35 0 53 0;
+#X connect 36 0 14 0;
+#X connect 37 0 40 0;
+#X connect 38 0 14 0;
+#X connect 39 0 38 0;
+#X connect 40 0 41 0;
+#X connect 40 1 39 1;
+#X connect 41 0 39 0;
+#X connect 42 0 13 0;
+#X connect 44 0 1 0;
+#X connect 44 1 2 0;
+#X connect 44 1 55 1;
+#X connect 44 2 45 0;
+#X connect 44 2 51 0;
+#X connect 44 2 57 1;
+#X connect 44 3 3 0;
+#X connect 44 4 42 0;
+#X connect 45 0 47 0;
+#X connect 45 1 49 0;
+#X connect 46 0 19 0;
+#X connect 47 0 46 0;
+#X connect 47 1 46 1;
+#X connect 48 0 19 1;
+#X connect 49 0 48 0;
+#X connect 49 1 48 1;
+#X connect 54 0 56 0;
+#X connect 55 0 45 0;
+#X connect 55 0 51 0;
+#X connect 56 0 57 0;
+#X connect 56 1 55 0;
+#X connect 57 0 45 0;
+#X connect 57 0 51 0;
+#X connect 58 0 12 0;
+#X connect 59 0 12 1;
+#X restore 528 320 pd size;
+#X msg 605 523 0 \, destroy;
+#X obj 594 551 gemwin;
+#X obj 428 489 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 281 601 rectangle;
+#X obj 306 559 unpack f f;
+#X floatatom 380 580 5 0 0 0 - - -;
+#X floatatom 319 582 5 0 0 0 - - -;
+#N canvas 0 0 743 323 init_glsl 0;
+#X obj 129 184 outlet;
+#X msg 129 120 overlap \$1 \$2;
+#X obj 129 95 pack f f;
+#X obj 249 98 pack f f;
+#X obj 434 99 pack f f;
+#X msg 249 119 geometry_screen \$1 \$2;
+#X msg 434 120 geometry_computer \$1 \$2;
+#X obj 434 76 r \$0-glsl_geometry_computer;
+#X obj 249 75 r \$0-glsl_geometry_screen;
+#X obj 129 72 r \$0-glsl_overlap;
+#X obj 38 27 r \$0-init_glsl;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 5 0 0 0;
+#X connect 6 0 0 0;
+#X connect 7 0 4 0;
+#X connect 8 0 3 0;
+#X connect 9 0 2 0;
+#X connect 10 0 3 0;
+#X connect 10 0 2 0;
+#X connect 10 0 4 0;
+#X restore 418 467 pd init_glsl;
+#X obj 292 470 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 281 509 pix_texture;
+#X obj 281 448 gemhead 60;
+#X obj 528 343 print framebuffer;
+#X obj 604 415 print gem_window;
+#N canvas 0 0 669 667 glsl_frag 0;
+#X obj 78 598 glsl_program;
+#X msg 35 325 print;
+#X obj 172 387 change;
+#X msg 34 545 print;
+#X obj 78 367 glsl_fragment;
+#X floatatom 172 413 2 0 0 0 ID - -;
+#X obj 190 459 print linking;
+#X text 97 546 after linking \, click "print" to get some info about
+the compiled shader program;
+#X obj 13 52 inlet;
+#X obj 78 634 outlet;
+#X obj 577 95 inlet;
+#X obj 13 75 route bang;
+#X obj 141 87 gemhead 1;
+#X msg 141 109 1;
+#X obj 141 133 change;
+#X obj 141 157 t b;
+#X obj 157 619 change;
+#X obj 157 640 t b;
+#X obj 157 661 outlet;
+#X msg 172 438 link \$1;
+#X msg 87 324 open soft_edge.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 16 0;
+#X connect 1 0 4 0;
+#X connect 2 0 5 0;
+#X connect 3 0 0 0;
+#X connect 4 0 0 0;
+#X connect 4 1 2 0;
+#X connect 5 0 19 0;
+#X connect 8 0 11 0;
+#X connect 10 0 0 0;
+#X connect 11 0 20 0;
+#X connect 11 1 4 0;
+#X connect 12 0 13 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 20 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 19 0 0 0;
+#X connect 19 0 6 0;
+#X connect 20 0 4 0;
+#X restore 281 488 pd glsl_frag _______;
+#X obj 605 470 sel 0 1;
+#X msg 624 500 border 0 \, create \, 1;
+#X obj 528 67 pack f f;
+#X obj 638 48 t b f;
+#X obj 831 65 pack f f;
+#X obj 941 46 t b f;
+#X msg 528 97 screen_size \$1 \$2;
+#X msg 831 92 geometry_screen \$1 \$2;
+#X obj 1151 65 pack f f;
+#X obj 1281 46 t b f;
+#X msg 746 93 2 2;
+#X msg 746 67 set \$1 \$2;
+#X obj 683 67 loadbang;
+#X msg 1151 92 geometry_computer \$1 \$2;
+#X msg 1066 67 set \$1 \$2;
+#X obj 1003 67 loadbang;
+#X msg 1066 93 4 1;
+#X msg 446 67 set \$1 \$2;
+#X obj 383 67 loadbang;
+#X msg 446 93 160 120;
+#X obj 446 114 unpack f f;
+#X obj 746 114 unpack f f;
+#X obj 1066 114 unpack f f;
+#X obj 1003 236 loadbang;
+#X msg 1066 262 0 0;
+#X msg 1151 282 overlap \$1 \$1;
+#X msg 567 576 0;
+#X msg 594 392 dimen \$1 \$2;
+#X obj 567 369 t b l;
+#X obj 100 235 cnv 15 250 20 empty empty PUT_AN_OBJECT_[r_render]_IN_YOUR_PATCH
+10 10 0 10 -258113 -66577 0;
+#X obj 100 20 cnv 15 250 215 empty empty empty 20 12 0 14 -260097 -66577
+0;
+#X obj 108 163 nbx 5 14 0 5000 0 0 \$0-overlap \$0-overlap empty 0
+-8 0 10 -99865 -1 -1 0 256;
+#X obj 108 187 tgl 15 0 \$0-createDestroy \$0-createDestroy empty 17
+7 0 10 -1 -262144 -1 0 1;
+#X text 128 187 Create/Destroy Gem window;
+#X obj 108 29 nbx 4 12 -1e+37 1e+37 0 0 \$0-sizeScreenX \$0-sizeScreenX
+empty 0 -8 0 10 -1 -262144 -1 160 256;
+#X text 166 163 Overlap X and Y (pixels);
+#X obj 108 45 nbx 4 12 -1e+37 1e+37 0 0 \$0-sizeScreenY \$0-sizeScreenY
+empty 0 -8 0 10 -1 -262144 -1 120 256;
+#X obj 108 83 nbx 4 12 -1e+37 1e+37 0 0 \$0-Geom-screenY \$0-Geom-screenY
+empty 0 -8 0 10 -257985 -1 -1 2 256;
+#X obj 108 67 nbx 4 12 -1e+37 1e+37 0 0 \$0-Geom-screenX \$0-Geom-screenX
+empty 0 -8 0 10 -257985 -1 -1 2 256;
+#X obj 108 143 tgl 10 0 \$0-altern \$0-altern empty 17 7 0 10 -1 -262144
+-1 0 1;
+#X obj 108 121 nbx 4 12 -1e+37 1e+37 0 0 \$0-Geom-computerY \$0-Geom-computerY
+empty 0 -8 0 10 -257985 -1 -1 1 256;
+#X obj 108 105 nbx 4 12 -1e+37 1e+37 0 0 \$0-Geom-computerX \$0-Geom-computerX
+empty 0 -8 0 10 -257985 -1 -1 4 256;
+#X text 158 65 Geometry screen (X);
+#X text 158 81 Geometry screen (Y);
+#X text 158 103 Geometry computer (X);
+#X text 158 119 Geometry computer (Y);
+#X text 158 28 Screens size (X);
+#X text 158 44 Screens size (Y);
+#X obj 108 212 bng 15 250 50 0 \$0-save \$0-receiveNothing empty 17
+7 0 10 -258113 -1 -1;
+#X text 128 212 Save parameters;
+#X obj 446 156 s \$0-sizeScreenX;
+#X obj 503 136 s \$0-sizeScreenY;
+#X obj 746 155 s \$0-Geom-screenX;
+#X obj 803 135 s \$0-Geom-screenY;
+#X obj 1123 135 s \$0-Geom-computerY;
+#X obj 1066 155 s \$0-Geom-computerX;
+#X obj 1066 304 s \$0-overlap;
+#X obj 605 449 r \$0-createDestroy;
+#X obj 567 596 s \$0-createDestroy;
+#X obj 418 510 s \$0-init_glsl;
+#X obj 306 539 r \$0-size_gemwin;
+#X obj 528 27 r \$0-sizeScreenX;
+#X obj 638 27 r \$0-sizeScreenY;
+#X obj 831 25 r \$0-Geom-screenX;
+#X obj 941 25 r \$0-Geom-screenY;
+#X obj 1281 25 r \$0-Geom-computerY;
+#X obj 1151 25 r \$0-Geom-computerX;
+#X obj 1151 215 r \$0-overlap;
+#X obj 100 271 r \$0-save;
+#X msg 1066 236 set \$1 \$1;
+#X obj 100 317 s pd-soft_edge.pd;
+#X msg 100 292 menusave;
+#X text 856 481 'soft-edge.pd' by Cyrille Henry (GUI by Jack/RYBN)
+;
+#X text 121 140 View computer(0)/screen(1);
+#X obj 388 16 inlet;
+#X connect 0 0 1 0;
+#X connect 1 0 5 0;
+#X connect 1 1 16 1;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 2 0;
+#X connect 6 0 1 0;
+#X connect 6 0 18 0;
+#X connect 6 1 49 0;
+#X connect 7 0 8 0;
+#X connect 9 0 80 0;
+#X connect 11 0 10 1;
+#X connect 11 0 13 0;
+#X connect 11 1 10 2;
+#X connect 11 1 12 0;
+#X connect 14 0 20 1;
+#X connect 15 0 20 0;
+#X connect 16 0 10 0;
+#X connect 17 0 20 0;
+#X connect 20 0 16 0;
+#X connect 20 1 80 0;
+#X connect 21 0 7 0;
+#X connect 21 1 22 0;
+#X connect 22 0 8 0;
+#X connect 23 0 27 0;
+#X connect 23 0 38 0;
+#X connect 24 0 23 0;
+#X connect 24 1 23 1;
+#X connect 25 0 28 0;
+#X connect 25 0 32 0;
+#X connect 26 0 25 0;
+#X connect 26 1 25 1;
+#X connect 27 0 6 0;
+#X connect 28 0 6 0;
+#X connect 29 0 34 0;
+#X connect 29 0 35 0;
+#X connect 30 0 29 0;
+#X connect 30 1 29 1;
+#X connect 31 0 28 0;
+#X connect 31 0 42 0;
+#X connect 32 0 31 0;
+#X connect 33 0 31 0;
+#X connect 34 0 6 0;
+#X connect 35 0 37 0;
+#X connect 36 0 37 0;
+#X connect 37 0 34 0;
+#X connect 37 0 43 0;
+#X connect 38 0 40 0;
+#X connect 39 0 40 0;
+#X connect 40 0 27 0;
+#X connect 40 0 41 0;
+#X connect 41 0 71 0;
+#X connect 41 1 72 0;
+#X connect 42 0 73 0;
+#X connect 42 1 74 0;
+#X connect 43 0 76 0;
+#X connect 43 1 75 0;
+#X connect 44 0 45 0;
+#X connect 45 0 46 0;
+#X connect 45 0 77 0;
+#X connect 46 0 6 0;
+#X connect 47 0 79 0;
+#X connect 48 0 8 0;
+#X connect 48 0 19 0;
+#X connect 49 0 47 0;
+#X connect 49 1 48 0;
+#X connect 78 0 21 0;
+#X connect 81 0 11 0;
+#X connect 82 0 23 0;
+#X connect 83 0 24 0;
+#X connect 84 0 25 0;
+#X connect 85 0 26 0;
+#X connect 86 0 30 0;
+#X connect 87 0 29 0;
+#X connect 88 0 46 0;
+#X connect 88 0 90 0;
+#X connect 89 0 92 0;
+#X connect 90 0 45 0;
+#X connect 92 0 91 0;
+#X connect 95 0 8 0;
+#X coords 0 -1 1 1 250 235 2 100 20;
diff --git a/Gem/examples/12.multi_screen_projection/grid.jpg b/Gem/examples/12.multi_screen_projection/grid.jpg
new file mode 100644
index 0000000..3f84359
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/grid.jpg
Binary files differ
diff --git a/Gem/examples/12.multi_screen_projection/load_save.pd b/Gem/examples/12.multi_screen_projection/load_save.pd
new file mode 100644
index 0000000..8037857
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/load_save.pd
@@ -0,0 +1,40 @@
+#N canvas 140 207 521 345 10;
+#X obj 258 43 bng 15 250 50 0 empty empty empty 17 7 0 10 -258699 -1
+-1;
+#X msg 287 139 clear;
+#X obj 248 227 textfile;
+#X obj 308 185 list prepend add;
+#X obj 308 206 list trim;
+#X obj 54 59 bng 15 250 50 0 empty empty empty 17 7 0 10 -24198 -1
+-1;
+#X obj 38 125 until;
+#X text 75 61 load;
+#X text 279 43 save;
+#X obj 38 80 t b a;
+#X obj 248 24 inlet;
+#X obj 38 29 inlet;
+#X msg 248 116 write config.txt;
+#X msg 65 100 read config.txt \, rewind;
+#X obj 308 164 r save_system_data;
+#X obj 38 173 s save_system_saved;
+#X obj 248 71 t b b b;
+#X obj 267 92 s save_system_save;
+#X obj 38 149 textfile;
+#X connect 0 0 16 0;
+#X connect 1 0 2 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 5 0 9 0;
+#X connect 6 0 18 0;
+#X connect 9 0 6 0;
+#X connect 9 1 13 0;
+#X connect 10 0 16 0;
+#X connect 11 0 9 0;
+#X connect 12 0 2 0;
+#X connect 13 0 18 0;
+#X connect 14 0 3 0;
+#X connect 16 0 12 0;
+#X connect 16 1 17 0;
+#X connect 16 2 1 0;
+#X connect 18 0 15 0;
+#X connect 18 1 6 1;
diff --git a/Gem/examples/12.multi_screen_projection/nfp_22.frag b/Gem/examples/12.multi_screen_projection/nfp_22.frag
new file mode 100644
index 0000000..e3ce36c
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_22.frag
@@ -0,0 +1,18 @@
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect MyTex;
+uniform float Sl,Sr,St,Sb; // shade size
+varying vec2 pos;
+
+
+void main (void)
+{
+ vec4 color = texture2DRect(MyTex, gl_TexCoord[0].st);
+
+ color.a *=min(1.,pos.x/Sl);
+ color.a *=min(1.,(1.-pos.x)/Sr);
+ color.a *=min(1.,pos.y/St);
+ color.a *=min(1.,(1.-pos.y)/Sb);
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/12.multi_screen_projection/nfp_22.vert b/Gem/examples/12.multi_screen_projection/nfp_22.vert
new file mode 100644
index 0000000..ab8f107
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_22.vert
@@ -0,0 +1,26 @@
+uniform vec2 Vtl,Vbl,Vtr,Vbr; // Vertex position
+uniform vec2 Ttl,Tbl,Ttr,Tbr; // texture coordinate
+uniform vec2 center;
+
+varying vec2 pos;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ vec4 position = gl_Vertex;
+ position.xy += 1.;
+ position.xy /= 2.;
+ pos = position.xy;
+ position.xy = pow(position.xy,center);
+
+ vec2 tex_top = mix(Ttl,Ttr,pos.x);
+ vec2 tex_bottom = mix(Tbl,Tbr,pos.x);
+ gl_TexCoord[0].st = mix(tex_top,tex_bottom, pos.y);
+
+ vec2 pos_top = mix(Vtl,Vtr,position.x);
+ vec2 pos_bottom = mix(Vbl,Vbr,position.x);
+ position.xy = mix(pos_top,pos_bottom, position.y);
+
+ gl_Position = gl_ModelViewProjectionMatrix * position;
+}
diff --git a/Gem/examples/12.multi_screen_projection/nfp_33.frag b/Gem/examples/12.multi_screen_projection/nfp_33.frag
new file mode 100644
index 0000000..e3ce36c
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_33.frag
@@ -0,0 +1,18 @@
+#extension GL_ARB_texture_rectangle : enable
+
+uniform sampler2DRect MyTex;
+uniform float Sl,Sr,St,Sb; // shade size
+varying vec2 pos;
+
+
+void main (void)
+{
+ vec4 color = texture2DRect(MyTex, gl_TexCoord[0].st);
+
+ color.a *=min(1.,pos.x/Sl);
+ color.a *=min(1.,(1.-pos.x)/Sr);
+ color.a *=min(1.,pos.y/St);
+ color.a *=min(1.,(1.-pos.y)/Sb);
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/12.multi_screen_projection/nfp_33.vert b/Gem/examples/12.multi_screen_projection/nfp_33.vert
new file mode 100644
index 0000000..68066b0
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_33.vert
@@ -0,0 +1,37 @@
+uniform vec2 Vtl,Vbl,Vtr,Vbr,Vtc,Vbc,Vcl,Vcr,Vcc; // Vertex position
+uniform vec2 Ttl,Tbl,Ttr,Tbr; // texture coordinate
+uniform vec2 center;
+
+varying vec2 pos;
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+
+ vec4 position = gl_Vertex;
+ position.xy += 1.;
+ position.xy /= 2.;
+ pos = position.xy;
+
+ vec2 tex_top = mix(Ttl,Ttr,pos.x);
+ vec2 tex_bottom = mix(Tbl,Tbr,pos.x);
+ gl_TexCoord[0].st = mix(tex_top,tex_bottom, pos.y);
+
+ vec2 pos_top1 = mix(Vtl,Vtc,position.x);
+ vec2 pos_top2 = mix(Vtc,Vtr,position.x);
+ vec2 pos_top = mix(pos_top1,pos_top2,position.x);
+
+ vec2 pos_center1 = mix(Vcl,Vcc,position.x);
+ vec2 pos_center2 = mix(Vcc,Vcr,position.x);
+ vec2 pos_center = mix(pos_center1,pos_center2,position.x);
+
+ vec2 pos_bottom1 = mix(Vbl,Vbc,position.x);
+ vec2 pos_bottom2 = mix(Vbc,Vbr,position.x);
+ vec2 pos_bottom = mix(pos_bottom1,pos_bottom2,position.x);
+
+ vec2 position1 = mix(pos_top,pos_center,position.y);
+ vec2 position2 = mix(pos_center,pos_bottom,position.y);
+ position.xy = mix(position1,position2, position.y);
+
+ gl_Position = gl_ModelViewProjectionMatrix * position;
+}
diff --git a/Gem/examples/12.multi_screen_projection/nfp_curved_wall.pd b/Gem/examples/12.multi_screen_projection/nfp_curved_wall.pd
new file mode 100644
index 0000000..2222a6a
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_curved_wall.pd
@@ -0,0 +1,413 @@
+#N canvas 32 138 1230 634 10;
+#X obj 46 203 pix_texture;
+#X obj 55 113 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 46 78 alpha;
+#X obj 46 224 mesh_square 50 50;
+#N canvas 160 123 480 574 glsl 0;
+#X obj 78 179 glsl_vertex;
+#X msg 32 178 print;
+#X obj 78 466 glsl_program;
+#X obj 163 395 pack 0 0;
+#X msg 30 316 print;
+#X obj 163 351 change;
+#X obj 150 198 change;
+#X msg 163 419 link \$1 \$2;
+#X msg 32 460 print;
+#X obj 77 330 glsl_fragment;
+#X floatatom 163 375 2 0 0 0 ID - -;
+#X floatatom 150 221 2 0 0 0 ID - -;
+#X obj 181 440 print linking;
+#X obj 15 21 inlet;
+#X obj 78 502 outlet;
+#X obj 418 21 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 487 change;
+#X obj 157 508 t b;
+#X obj 158 530 outlet;
+#X obj 90 266 symbol;
+#X obj 90 241 t b;
+#X msg 287 438 0;
+#X obj 15 65 t b b b;
+#X msg 118 147 open nfp_33.vert;
+#X msg 91 292 open nfp_33.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 46 130 pd glsl;
+#X obj 46 51 gemhead \$1;
+#X obj 501 216 cnv 15 238 130 empty empty empty 20 12 0 14 -233017
+-66577 0;
+#X text 522 219 Texture position (Pixel);
+#X obj 519 247 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 105 256;
+#X obj 519 267 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 13 256;
+#X obj 619 247 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 367 256;
+#X obj 619 267 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 0 256;
+#X obj 519 297 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 0 256;
+#X obj 519 317 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 227 256;
+#X obj 619 297 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 416 256;
+#X obj 619 317 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 265 256;
+#X obj 501 349 cnv 15 238 180 empty empty empty 20 12 0 14 -233017
+-66577 0;
+#X obj 608 370 vsl 15 63 1 0 0 0 empty empty top 18 6 0 10 -262130
+-1 -1 6200 1;
+#X obj 608 453 vsl 15 63 0 1 0 0 empty empty bottom 18 60 0 10 -262130
+-1 -1 0 1;
+#X obj 626 436 hsl 63 15 1 0 0 0 empty empty right 30 -8 0 10 -262130
+-1 -1 5686 1;
+#X obj 543 436 hsl 63 15 0 1 0 0 empty empty left 2 -8 0 10 -262130
+-1 -1 430 1;
+#X text 509 367 Shade size;
+#X obj 501 33 cnv 15 238 180 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 514 64 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 -1.16 256;
+#X obj 514 84 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 3.35 256;
+#X obj 675 64 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 1.31 256;
+#X obj 675 84 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 3.95 256;
+#X obj 514 164 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 -1.21 256;
+#X obj 514 184 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -2.83 256;
+#X obj 675 164 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 1.52 256;
+#X obj 675 184 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -3.37 256;
+#X text 522 36 Vertex position;
+#X obj 99 105 r \$0-glsl;
+#X obj 98 152 s \$0-init;
+#X obj 754 20 r \$0-init;
+#X obj 203 372 pack f f;
+#X obj 249 347 t b f;
+#X obj 309 373 pack f f;
+#X obj 355 348 t b f;
+#X obj 233 419 pack f f;
+#X obj 279 394 t b f;
+#X obj 339 420 pack f f;
+#X obj 385 395 t b f;
+#X msg 203 439 Ttl \$1 \$2;
+#X msg 309 441 Ttr \$1 \$2;
+#X msg 323 461 Tbr \$1 \$2;
+#X msg 216 459 Tbl \$1 \$2;
+#X obj 203 484 s \$0-glsl;
+#X msg 204 515 Sl \$1;
+#X msg 253 515 Sr \$1;
+#X msg 300 515 St \$1;
+#X msg 346 515 Sb \$1;
+#X obj 204 539 s \$0-glsl;
+#X obj 120 182 r nfp_fb;
+#X obj 806 61 saved VP_TL_X-\$1;
+#X obj 806 81 saved VP_TL_Y-\$1;
+#X obj 806 161 saved VP_BL_X-\$1;
+#X obj 806 181 saved VP_BL_Y-\$1;
+#X obj 1036 61 saved VP_TR_X-\$1;
+#X obj 1036 81 saved VP_TR_Y-\$1;
+#X obj 1036 161 saved VP_BR_X-\$1;
+#X obj 1036 181 saved VP_BR_Y-\$1;
+#X obj 756 247 saved TP_TL_X-\$1;
+#X obj 756 267 saved TP_TL_Y-\$1;
+#X obj 756 297 saved TP_BL_X-\$1;
+#X obj 756 317 saved TP_BL_Y-\$1;
+#X obj 866 247 saved TP_TR_X-\$1;
+#X obj 866 267 saved TP_TR_Y-\$1;
+#X obj 866 297 saved TP_BR_X-\$1;
+#X obj 866 317 saved TP_BR_Y-\$1;
+#X obj 758 420 saved Shade_L-\$1;
+#X obj 759 444 saved Shade_R-\$1;
+#X obj 755 384 saved Shade_T-\$1;
+#X obj 761 473 saved Shade_B-\$1;
+#X obj 754 216 r \$0-init;
+#X obj 754 356 r \$0-init;
+#X obj 106 131 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 185 118 pack f f;
+#X obj 231 93 t b f;
+#X obj 391 119 pack f f;
+#X obj 437 94 t b f;
+#X obj 215 168 pack f f;
+#X obj 261 143 t b f;
+#X obj 421 169 pack f f;
+#X obj 467 144 t b f;
+#X msg 405 268 Vbr \$1 \$2;
+#X msg 198 266 Vbl \$1 \$2;
+#X obj 289 119 pack f f;
+#X obj 335 94 t b f;
+#X obj 319 169 pack f f;
+#X obj 365 144 t b f;
+#X msg 303 268 Vbc \$1 \$2;
+#X obj 205 68 pack f f;
+#X obj 251 43 t b f;
+#X obj 411 69 pack f f;
+#X obj 457 44 t b f;
+#X obj 309 69 pack f f;
+#X obj 355 44 t b f;
+#X obj 185 301 s \$0-glsl;
+#X obj 594 64 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 0.00999991 256;
+#X obj 594 84 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 3.7 256;
+#X obj 594 164 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 0.2 256;
+#X obj 594 184 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -3.96001 256;
+#X obj 916 61 saved VP_TC_X-\$1;
+#X obj 916 81 saved VP_TC_Y-\$1;
+#X obj 916 161 saved VP_BC_X-\$1;
+#X obj 916 181 saved VP_BC_Y-\$1;
+#X obj 514 114 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 -0.730001 256;
+#X obj 514 134 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 0.76 256;
+#X obj 675 114 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 1.79 256;
+#X obj 675 134 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 2.34 256;
+#X obj 594 114 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 0.55 256;
+#X obj 594 134 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -0.35 256;
+#X obj 806 111 saved VP_CL_X-\$1;
+#X obj 806 131 saved VP_CL_Y-\$1;
+#X obj 916 111 saved VP_CC_X-\$1;
+#X obj 916 131 saved VP_CC_Y-\$1;
+#X obj 1036 111 saved VP_CR_X-\$1;
+#X obj 1036 131 saved VP_CR_Y-\$1;
+#X msg 195 206 Vtl \$1 \$2;
+#X msg 299 210 Vtc \$1 \$2;
+#X msg 401 210 Vtr \$1 \$2;
+#X msg 185 236 Vcl \$1 \$2;
+#X msg 289 240 Vcc \$1 \$2;
+#X msg 391 240 Vcr \$1 \$2;
+#X connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 4 0;
+#X connect 4 0 0 0;
+#X connect 4 1 33 0;
+#X connect 5 0 2 0;
+#X connect 8 0 62 0;
+#X connect 8 0 35 0;
+#X connect 9 0 63 0;
+#X connect 9 0 36 0;
+#X connect 10 0 66 0;
+#X connect 10 0 37 0;
+#X connect 11 0 67 0;
+#X connect 11 0 38 0;
+#X connect 12 0 64 0;
+#X connect 12 0 39 0;
+#X connect 13 0 65 0;
+#X connect 13 0 40 0;
+#X connect 14 0 68 0;
+#X connect 14 0 41 0;
+#X connect 15 0 69 0;
+#X connect 15 0 42 0;
+#X connect 17 0 72 0;
+#X connect 17 0 50 0;
+#X connect 18 0 73 0;
+#X connect 18 0 51 0;
+#X connect 19 0 71 0;
+#X connect 19 0 49 0;
+#X connect 20 0 70 0;
+#X connect 20 0 48 0;
+#X connect 23 0 54 0;
+#X connect 23 0 92 0;
+#X connect 24 0 55 0;
+#X connect 24 0 93 0;
+#X connect 25 0 58 0;
+#X connect 25 0 94 0;
+#X connect 26 0 59 0;
+#X connect 26 0 95 0;
+#X connect 27 0 56 0;
+#X connect 27 0 81 0;
+#X connect 28 0 57 0;
+#X connect 28 0 82 0;
+#X connect 29 0 60 0;
+#X connect 29 0 83 0;
+#X connect 30 0 61 0;
+#X connect 30 0 84 0;
+#X connect 32 0 4 1;
+#X connect 34 0 25 0;
+#X connect 34 0 26 0;
+#X connect 34 0 23 0;
+#X connect 34 0 24 0;
+#X connect 34 0 29 0;
+#X connect 34 0 30 0;
+#X connect 34 0 27 0;
+#X connect 34 0 28 0;
+#X connect 34 0 99 0;
+#X connect 34 0 100 0;
+#X connect 34 0 101 0;
+#X connect 34 0 102 0;
+#X connect 34 0 107 0;
+#X connect 34 0 108 0;
+#X connect 34 0 111 0;
+#X connect 34 0 112 0;
+#X connect 34 0 109 0;
+#X connect 34 0 110 0;
+#X connect 35 0 43 0;
+#X connect 36 0 35 0;
+#X connect 36 1 35 1;
+#X connect 37 0 44 0;
+#X connect 38 0 37 0;
+#X connect 38 1 37 1;
+#X connect 39 0 46 0;
+#X connect 40 0 39 0;
+#X connect 40 1 39 1;
+#X connect 41 0 45 0;
+#X connect 42 0 41 0;
+#X connect 42 1 41 1;
+#X connect 43 0 47 0;
+#X connect 44 0 47 0;
+#X connect 45 0 47 0;
+#X connect 46 0 47 0;
+#X connect 48 0 52 0;
+#X connect 49 0 52 0;
+#X connect 50 0 52 0;
+#X connect 51 0 52 0;
+#X connect 53 0 0 1;
+#X connect 54 0 23 0;
+#X connect 55 0 24 0;
+#X connect 56 0 27 0;
+#X connect 57 0 28 0;
+#X connect 58 0 25 0;
+#X connect 59 0 26 0;
+#X connect 60 0 29 0;
+#X connect 61 0 30 0;
+#X connect 62 0 8 0;
+#X connect 63 0 9 0;
+#X connect 64 0 12 0;
+#X connect 65 0 13 0;
+#X connect 66 0 10 0;
+#X connect 67 0 11 0;
+#X connect 68 0 14 0;
+#X connect 69 0 15 0;
+#X connect 70 0 20 0;
+#X connect 71 0 19 0;
+#X connect 72 0 17 0;
+#X connect 73 0 18 0;
+#X connect 74 0 8 0;
+#X connect 74 0 10 0;
+#X connect 74 0 9 0;
+#X connect 74 0 11 0;
+#X connect 74 0 12 0;
+#X connect 74 0 14 0;
+#X connect 74 0 13 0;
+#X connect 74 0 15 0;
+#X connect 75 0 17 0;
+#X connect 75 0 19 0;
+#X connect 75 0 20 0;
+#X connect 75 0 18 0;
+#X connect 76 0 33 0;
+#X connect 77 0 122 0;
+#X connect 78 0 77 0;
+#X connect 78 1 77 1;
+#X connect 79 0 124 0;
+#X connect 80 0 79 0;
+#X connect 80 1 79 1;
+#X connect 81 0 86 0;
+#X connect 82 0 81 0;
+#X connect 82 1 81 1;
+#X connect 83 0 85 0;
+#X connect 84 0 83 0;
+#X connect 84 1 83 1;
+#X connect 85 0 98 0;
+#X connect 86 0 98 0;
+#X connect 87 0 123 0;
+#X connect 88 0 87 0;
+#X connect 88 1 87 1;
+#X connect 89 0 91 0;
+#X connect 90 0 89 0;
+#X connect 90 1 89 1;
+#X connect 91 0 98 0;
+#X connect 92 0 119 0;
+#X connect 93 0 92 0;
+#X connect 93 1 92 1;
+#X connect 94 0 121 0;
+#X connect 95 0 94 0;
+#X connect 95 1 94 1;
+#X connect 96 0 120 0;
+#X connect 97 0 96 0;
+#X connect 97 1 96 1;
+#X connect 99 0 103 0;
+#X connect 99 0 96 0;
+#X connect 100 0 104 0;
+#X connect 100 0 97 0;
+#X connect 101 0 105 0;
+#X connect 101 0 89 0;
+#X connect 102 0 106 0;
+#X connect 102 0 90 0;
+#X connect 103 0 99 0;
+#X connect 104 0 100 0;
+#X connect 105 0 101 0;
+#X connect 106 0 102 0;
+#X connect 107 0 113 0;
+#X connect 107 0 77 0;
+#X connect 108 0 114 0;
+#X connect 108 0 78 0;
+#X connect 109 0 117 0;
+#X connect 109 0 79 0;
+#X connect 110 0 118 0;
+#X connect 110 0 80 0;
+#X connect 111 0 115 0;
+#X connect 111 0 87 0;
+#X connect 112 0 116 0;
+#X connect 112 0 88 0;
+#X connect 113 0 107 0;
+#X connect 114 0 108 0;
+#X connect 115 0 111 0;
+#X connect 116 0 112 0;
+#X connect 117 0 109 0;
+#X connect 118 0 110 0;
+#X connect 119 0 98 0;
+#X connect 120 0 98 0;
+#X connect 121 0 98 0;
+#X connect 122 0 98 0;
+#X connect 123 0 98 0;
+#X connect 124 0 98 0;
+#X coords 0 -1 1 1 240 520 1 500 10;
diff --git a/Gem/examples/12.multi_screen_projection/nfp_flat_wall.pd b/Gem/examples/12.multi_screen_projection/nfp_flat_wall.pd
new file mode 100644
index 0000000..d3a9146
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/nfp_flat_wall.pd
@@ -0,0 +1,313 @@
+#N canvas 329 146 948 576 10;
+#X obj 46 203 pix_texture;
+#X obj 55 113 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 46 78 alpha;
+#X obj 46 224 mesh_square 50 50;
+#N canvas 162 116 480 574 glsl 0;
+#X obj 78 179 glsl_vertex;
+#X msg 32 178 print;
+#X obj 78 466 glsl_program;
+#X obj 163 395 pack 0 0;
+#X msg 30 316 print;
+#X obj 163 351 change;
+#X obj 150 198 change;
+#X msg 163 419 link \$1 \$2;
+#X msg 32 460 print;
+#X obj 77 330 glsl_fragment;
+#X floatatom 163 375 2 0 0 0 ID - -;
+#X floatatom 150 221 2 0 0 0 ID - -;
+#X obj 181 440 print linking;
+#X obj 15 21 inlet;
+#X obj 78 502 outlet;
+#X obj 418 21 inlet;
+#X obj 15 44 route bang;
+#X obj 255 11 gemhead 1;
+#X msg 255 33 1;
+#X obj 255 57 change;
+#X obj 255 81 t b;
+#X obj 157 487 change;
+#X obj 157 508 t b;
+#X obj 158 530 outlet;
+#X obj 90 266 symbol;
+#X obj 90 241 t b;
+#X msg 287 438 0;
+#X obj 15 65 t b b b;
+#X msg 118 147 open nfp_22.vert;
+#X msg 90 293 open nfp_22.frag;
+#X connect 0 0 9 0;
+#X connect 0 1 6 0;
+#X connect 1 0 0 0;
+#X connect 2 0 14 0;
+#X connect 2 1 21 0;
+#X connect 3 0 7 0;
+#X connect 4 0 9 0;
+#X connect 5 0 10 0;
+#X connect 6 0 11 0;
+#X connect 6 0 25 0;
+#X connect 7 0 2 0;
+#X connect 7 0 12 0;
+#X connect 8 0 2 0;
+#X connect 9 0 2 0;
+#X connect 9 1 5 0;
+#X connect 10 0 3 0;
+#X connect 11 0 3 1;
+#X connect 13 0 16 0;
+#X connect 15 0 2 0;
+#X connect 16 0 27 0;
+#X connect 16 1 0 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 20 0;
+#X connect 20 0 28 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 24 0 29 0;
+#X connect 25 0 24 0;
+#X connect 26 0 21 0;
+#X connect 27 0 26 0;
+#X connect 27 1 10 0;
+#X connect 27 2 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 9 0;
+#X restore 46 130 pd glsl;
+#X obj 46 51 gemhead \$1;
+#X obj 501 166 cnv 15 198 130 empty empty empty 20 12 0 14 -233017
+-66577 0;
+#X text 522 169 Texture position (Pixel);
+#X obj 519 197 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 12 256;
+#X obj 519 217 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 13 256;
+#X obj 619 197 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 316 256;
+#X obj 619 217 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 11 256;
+#X obj 519 247 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 16 256;
+#X obj 519 267 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 181 256;
+#X obj 619 247 nbx 5 16 0 20000 0 0 empty empty x -10 7 0 12 -203904
+-1 -1 307 256;
+#X obj 619 267 nbx 5 16 0 20000 0 0 empty empty y -10 7 0 12 -203904
+-1 -1 195 256;
+#X obj 501 299 cnv 15 198 180 empty empty empty 20 12 0 14 -233017
+-66577 0;
+#X obj 608 320 vsl 15 63 1 0 0 0 empty empty top 18 6 0 10 -262130
+-1 -1 0 1;
+#X obj 608 403 vsl 15 63 0 1 0 0 empty empty bottom 18 60 0 10 -262130
+-1 -1 0 1;
+#X obj 626 386 hsl 63 15 1 0 0 0 empty empty right 30 -8 0 10 -262130
+-1 -1 0 1;
+#X obj 543 386 hsl 63 15 0 1 0 0 empty empty left 2 -8 0 10 -262130
+-1 -1 0 1;
+#X text 509 317 Shade size;
+#X obj 501 33 cnv 15 198 130 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 519 64 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 -3.66001 256;
+#X obj 519 84 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 1.52 256;
+#X obj 619 64 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 0.62 256;
+#X obj 619 84 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 1.92 256;
+#X obj 519 114 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 -2.9 256;
+#X obj 519 134 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -1.61 256;
+#X obj 619 114 nbx 5 16 -1000 1000 0 0 empty empty x -10 7 0 12 -261234
+-1 -1 0.49 256;
+#X obj 619 134 nbx 5 16 -1000 1000 0 0 empty empty y -10 7 0 12 -261234
+-1 -1 -1.69 256;
+#X text 522 36 Vertex position;
+#X obj 201 206 pack f f;
+#X obj 247 181 t b f;
+#X obj 307 207 pack f f;
+#X obj 353 182 t b f;
+#X obj 231 256 pack f f;
+#X obj 277 231 t b f;
+#X obj 337 257 pack f f;
+#X obj 383 232 t b f;
+#X msg 201 277 Vtl \$1 \$2;
+#X msg 337 299 Vbr \$1 \$2;
+#X msg 230 297 Vbl \$1 \$2;
+#X msg 307 279 Vtr \$1 \$2;
+#X obj 99 105 r \$0-glsl;
+#X obj 98 152 s \$0-init;
+#X obj 704 36 r \$0-init;
+#X obj 203 372 pack f f;
+#X obj 249 347 t b f;
+#X obj 309 373 pack f f;
+#X obj 355 348 t b f;
+#X obj 233 419 pack f f;
+#X obj 279 394 t b f;
+#X obj 339 420 pack f f;
+#X obj 385 395 t b f;
+#X msg 203 439 Ttl \$1 \$2;
+#X msg 309 441 Ttr \$1 \$2;
+#X msg 323 461 Tbr \$1 \$2;
+#X msg 216 459 Tbl \$1 \$2;
+#X obj 201 325 s \$0-glsl;
+#X obj 203 484 s \$0-glsl;
+#X msg 204 515 Sl \$1;
+#X msg 253 515 Sr \$1;
+#X msg 300 515 St \$1;
+#X msg 346 515 Sb \$1;
+#X obj 204 539 s \$0-glsl;
+#X obj 120 182 r nfp_fb;
+#X obj 706 61 saved VP_TL_X-\$1;
+#X obj 706 81 saved VP_TL_Y-\$1;
+#X obj 706 111 saved VP_BL_X-\$1;
+#X obj 706 131 saved VP_BL_Y-\$1;
+#X obj 816 61 saved VP_TR_X-\$1;
+#X obj 816 81 saved VP_TR_Y-\$1;
+#X obj 816 111 saved VP_BR_X-\$1;
+#X obj 816 131 saved VP_BR_Y-\$1;
+#X obj 706 197 saved TP_TL_X-\$1;
+#X obj 706 217 saved TP_TL_Y-\$1;
+#X obj 706 247 saved TP_BL_X-\$1;
+#X obj 706 267 saved TP_BL_Y-\$1;
+#X obj 816 197 saved TP_TR_X-\$1;
+#X obj 816 217 saved TP_TR_Y-\$1;
+#X obj 816 247 saved TP_BR_X-\$1;
+#X obj 816 267 saved TP_BR_Y-\$1;
+#X obj 708 370 saved Shade_L-\$1;
+#X obj 709 394 saved Shade_R-\$1;
+#X obj 705 334 saved Shade_T-\$1;
+#X obj 711 423 saved Shade_B-\$1;
+#X obj 704 166 r \$0-init;
+#X obj 704 306 r \$0-init;
+#X obj 106 131 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 226 44 r \$0-init;
+#X obj 226 85 s \$0-glsl;
+#X msg 226 65 center 1 1;
+#X connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 4 0;
+#X connect 4 0 0 0;
+#X connect 4 1 45 0;
+#X connect 5 0 2 0;
+#X connect 8 0 75 0;
+#X connect 8 0 47 0;
+#X connect 9 0 76 0;
+#X connect 9 0 48 0;
+#X connect 10 0 79 0;
+#X connect 10 0 49 0;
+#X connect 11 0 80 0;
+#X connect 11 0 50 0;
+#X connect 12 0 77 0;
+#X connect 12 0 51 0;
+#X connect 13 0 78 0;
+#X connect 13 0 52 0;
+#X connect 14 0 81 0;
+#X connect 14 0 53 0;
+#X connect 15 0 82 0;
+#X connect 15 0 54 0;
+#X connect 17 0 85 0;
+#X connect 17 0 63 0;
+#X connect 18 0 86 0;
+#X connect 18 0 64 0;
+#X connect 19 0 84 0;
+#X connect 19 0 62 0;
+#X connect 20 0 83 0;
+#X connect 20 0 61 0;
+#X connect 23 0 32 0;
+#X connect 23 0 67 0;
+#X connect 24 0 33 0;
+#X connect 24 0 68 0;
+#X connect 25 0 34 0;
+#X connect 25 0 71 0;
+#X connect 26 0 35 0;
+#X connect 26 0 72 0;
+#X connect 27 0 36 0;
+#X connect 27 0 69 0;
+#X connect 28 0 37 0;
+#X connect 28 0 70 0;
+#X connect 29 0 38 0;
+#X connect 29 0 73 0;
+#X connect 30 0 39 0;
+#X connect 30 0 74 0;
+#X connect 32 0 40 0;
+#X connect 33 0 32 0;
+#X connect 33 1 32 1;
+#X connect 34 0 43 0;
+#X connect 35 0 34 0;
+#X connect 35 1 34 1;
+#X connect 36 0 42 0;
+#X connect 37 0 36 0;
+#X connect 37 1 36 1;
+#X connect 38 0 41 0;
+#X connect 39 0 38 0;
+#X connect 39 1 38 1;
+#X connect 40 0 59 0;
+#X connect 41 0 59 0;
+#X connect 42 0 59 0;
+#X connect 43 0 59 0;
+#X connect 44 0 4 1;
+#X connect 46 0 25 0;
+#X connect 46 0 26 0;
+#X connect 46 0 23 0;
+#X connect 46 0 24 0;
+#X connect 46 0 29 0;
+#X connect 46 0 30 0;
+#X connect 46 0 27 0;
+#X connect 46 0 28 0;
+#X connect 47 0 55 0;
+#X connect 48 0 47 0;
+#X connect 48 1 47 1;
+#X connect 49 0 56 0;
+#X connect 50 0 49 0;
+#X connect 50 1 49 1;
+#X connect 51 0 58 0;
+#X connect 52 0 51 0;
+#X connect 52 1 51 1;
+#X connect 53 0 57 0;
+#X connect 54 0 53 0;
+#X connect 54 1 53 1;
+#X connect 55 0 60 0;
+#X connect 56 0 60 0;
+#X connect 57 0 60 0;
+#X connect 58 0 60 0;
+#X connect 61 0 65 0;
+#X connect 62 0 65 0;
+#X connect 63 0 65 0;
+#X connect 64 0 65 0;
+#X connect 66 0 0 1;
+#X connect 67 0 23 0;
+#X connect 68 0 24 0;
+#X connect 69 0 27 0;
+#X connect 70 0 28 0;
+#X connect 71 0 25 0;
+#X connect 72 0 26 0;
+#X connect 73 0 29 0;
+#X connect 74 0 30 0;
+#X connect 75 0 8 0;
+#X connect 76 0 9 0;
+#X connect 77 0 12 0;
+#X connect 78 0 13 0;
+#X connect 79 0 10 0;
+#X connect 80 0 11 0;
+#X connect 81 0 14 0;
+#X connect 82 0 15 0;
+#X connect 83 0 20 0;
+#X connect 84 0 19 0;
+#X connect 85 0 17 0;
+#X connect 86 0 18 0;
+#X connect 87 0 8 0;
+#X connect 87 0 10 0;
+#X connect 87 0 9 0;
+#X connect 87 0 11 0;
+#X connect 87 0 12 0;
+#X connect 87 0 14 0;
+#X connect 87 0 13 0;
+#X connect 87 0 15 0;
+#X connect 88 0 17 0;
+#X connect 88 0 19 0;
+#X connect 88 0 20 0;
+#X connect 88 0 18 0;
+#X connect 89 0 45 0;
+#X connect 90 0 92 0;
+#X connect 92 0 91 0;
+#X coords 0 -1 1 1 200 470 1 500 10;
diff --git a/Gem/examples/12.multi_screen_projection/save_system-help.pd b/Gem/examples/12.multi_screen_projection/save_system-help.pd
new file mode 100644
index 0000000..9345cbe
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/save_system-help.pd
@@ -0,0 +1,20 @@
+#N canvas 219 286 450 300 10;
+#X obj 19 67 load_save;
+#X obj 19 9 loadbang;
+#X obj 27 47 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 84 47 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X floatatom 277 88 5 0 0 0 - - -;
+#X floatatom 277 108 5 0 0 0 - - -;
+#X obj 171 86 saved data1;
+#X obj 171 106 saved data2;
+#X text 103 48 save;
+#X text 43 49 load;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 1;
+#X connect 4 0 6 0;
+#X connect 5 0 7 0;
+#X connect 6 0 4 0;
+#X connect 7 0 5 0;
diff --git a/Gem/examples/12.multi_screen_projection/saved.pd b/Gem/examples/12.multi_screen_projection/saved.pd
new file mode 100644
index 0000000..499c0bd
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/saved.pd
@@ -0,0 +1,24 @@
+#N canvas 545 325 474 372 10;
+#X obj 268 0 t b;
+#X obj 53 124 f;
+#X obj 268 220 f;
+#X obj 53 -21 inlet;
+#X obj 53 284 outlet;
+#X obj 268 266 list trim;
+#X obj 268 247 list prepend \$1;
+#X obj 268 285 s save_system_data;
+#X obj 268 -26 r save_system_save;
+#X obj 105 10 r save_system_saved;
+#X obj 105 36 route \$1;
+#X msg 53 263 set \$1;
+#X connect 0 0 2 0;
+#X connect 1 0 2 1;
+#X connect 1 0 11 0;
+#X connect 2 0 6 0;
+#X connect 3 0 1 0;
+#X connect 5 0 7 0;
+#X connect 6 0 5 0;
+#X connect 8 0 0 0;
+#X connect 9 0 10 0;
+#X connect 10 0 1 0;
+#X connect 11 0 4 0;
diff --git a/Gem/examples/12.multi_screen_projection/soft_edge.frag b/Gem/examples/12.multi_screen_projection/soft_edge.frag
new file mode 100644
index 0000000..1c2e35f
--- /dev/null
+++ b/Gem/examples/12.multi_screen_projection/soft_edge.frag
@@ -0,0 +1,62 @@
+// Cyrille Henry 2010
+
+//#extension GL_ARB_texture_rectangle : enable
+//uniform sampler2DRect MyTex;
+uniform sampler2D MyTex;
+uniform vec2 overlap, geometry_screen, geometry_computer;
+
+void main (void)
+{
+// FSAA
+
+// change coord from computer matrix to screen matrice
+ vec2 coord = (gl_TextureMatrix[0] * gl_TexCoord[0]).st;
+ vec2 pos_new = coord;
+ pos_new *= geometry_computer;
+ float screen_num = floor(pos_new.x)+floor(pos_new.y)*geometry_computer.x; // number of the screen
+ pos_new = fract(pos_new); // coord in 1 screen (from 0 to 1)
+ pos_new.x += fract(screen_num/geometry_screen.x)*geometry_screen.x;
+ pos_new.y += floor(screen_num/geometry_screen.x);
+ pos_new /= geometry_screen;
+
+// compute position regarding to the overlap
+ vec2 pos = pos_new;
+ pos *= geometry_screen;
+
+ vec2 pos_over = fract(pos);
+ pos_over *= overlap;
+ pos_over -= overlap/2.;
+ pos += pos_over;
+ pos += overlap/2.;
+ pos /= geometry_screen + overlap;
+ vec4 color = texture2D(MyTex, pos);
+
+// compute fade on Top and Right
+ vec2 black = pos_new;
+ black *= geometry_screen;
+ black = fract(black);
+ black *= 1. + (overlap/ (geometry_screen/2.));
+ black -= 1.;
+ black = max(black,0.);
+ black *= (geometry_screen / 2.) / overlap;
+ if ( ( floor(pos_new.x*geometry_screen.x) < geometry_screen.x-1. ) && (overlap.x != 0.) )
+ color *= (1.-black.x);
+ if ( ( floor(pos_new.y*geometry_screen.y) < geometry_screen.y-1. ) && (overlap.x != 0.) )
+ color *= (1.-black.y);
+
+// compute fade on Left and bottom
+ black = pos_new;
+ black *= geometry_screen;
+ black = fract(black);
+ black = vec2(1.) - black;
+ black *= 1. + (overlap/ (geometry_screen/2.));
+ black -= 1.;
+ black = max(black,0.);
+ black *= (geometry_screen / 2.) / overlap;
+ if ( ( floor(pos_new.x*geometry_screen.x) > 0. ) && (overlap.x != 0.) )
+ color *= (1.-black.x);
+ if ( ( floor(pos_new.y*geometry_screen.y) > 0. ) && (overlap.x != 0.) )
+ color *= (1.-black.y);
+
+ gl_FragColor = color;
+}
diff --git a/Gem/examples/13.recursion/01.repetition_is_futile.pd b/Gem/examples/13.recursion/01.repetition_is_futile.pd
new file mode 100644
index 0000000..2fe7232
--- /dev/null
+++ b/Gem/examples/13.recursion/01.repetition_is_futile.pd
@@ -0,0 +1,61 @@
+#N canvas 0 0 602 516 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 48 10 create;
+#X msg 55 33 destroy;
+#X obj 14 93 gemhead;
+#X obj 14 123 t a a;
+#X obj 59 123 circle;
+#X obj 14 153 separator;
+#X obj 14 213 scale 0.7;
+#X obj 14 173 rotate 45 0 0 1;
+#X obj 14 243 t a a;
+#X obj 59 243 circle;
+#X obj 14 273 separator;
+#X obj 14 333 scale 0.7;
+#X obj 14 293 rotate 45 0 0 1;
+#X obj 14 363 t a a;
+#X obj 59 363 circle;
+#X obj 14 193 translate 2 0 1 0;
+#X obj 14 313 translate 2 0 1 0;
+#X obj 14 393 separator;
+#X obj 14 453 scale 0.7;
+#X obj 14 413 rotate 45 0 0 1;
+#X obj 14 433 translate 2 0 1 0;
+#X obj 14 483 t a a;
+#X obj 59 483 circle;
+#X text 170 17 A tutorial on recursion in Gem;
+#X text 170 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X text 170 77 The simplest and most obvious way of working with Gem
+is to create all the objects statically. That is \, the Gem chain (or
+tree) is exactly what is visible in the patch.;
+#X text 170 127 Say we way we want to make a spiral of circles. Even
+with just 4 circles the repetition is painfully obvious \, and if we
+wanted more the duplication would be painfully tedious.;
+#X text 170 177 There is a powerful way to avoid this pain \, however
+\, using recursion.;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 5 0;
+#X connect 5 0 7 0;
+#X connect 5 1 6 0;
+#X connect 7 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 17 0;
+#X connect 10 0 12 0;
+#X connect 10 1 11 0;
+#X connect 12 0 14 0;
+#X connect 13 0 15 0;
+#X connect 14 0 18 0;
+#X connect 15 0 19 0;
+#X connect 15 1 16 0;
+#X connect 17 0 8 0;
+#X connect 18 0 13 0;
+#X connect 19 0 21 0;
+#X connect 20 0 23 0;
+#X connect 21 0 22 0;
+#X connect 22 0 20 0;
+#X connect 23 1 24 0;
diff --git a/Gem/examples/13.recursion/02.iteration_is_insufficient.pd b/Gem/examples/13.recursion/02.iteration_is_insufficient.pd
new file mode 100644
index 0000000..fad24c1
--- /dev/null
+++ b/Gem/examples/13.recursion/02.iteration_is_insufficient.pd
@@ -0,0 +1,33 @@
+#N canvas 0 0 602 259 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 48 10 create;
+#X msg 55 33 destroy;
+#X obj 14 93 gemhead;
+#X obj 14 153 t a a;
+#X obj 59 153 circle;
+#X obj 14 223 scale 0.7;
+#X obj 14 183 rotate 45 0 0 1;
+#X obj 14 203 translate 2 0 1 0;
+#X text 170 17 A tutorial on recursion in Gem;
+#X text 170 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X text 170 77 A common idiom in Gem is to use the [repeat] object
+found in the Zexy library \, to generate multiple copies of the same
+object. Let's try using it to make our spiral.;
+#X obj 14 123 repeat 64;
+#X text 170 127 And indeed \, it works well. But a spiral is a linear
+structure \, without branches. Iteration has solved one problem \,
+only to present us with another: what if we want a branching structure?
+;
+#X text 170 187 Recursion is an elegant solution to this problem.;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 13 0;
+#X connect 5 0 8 0;
+#X connect 5 1 6 0;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X connect 13 0 5 0;
diff --git a/Gem/examples/13.recursion/03.recursive_spiral.pd b/Gem/examples/13.recursion/03.recursive_spiral.pd
new file mode 100644
index 0000000..2783fc8
--- /dev/null
+++ b/Gem/examples/13.recursion/03.recursive_spiral.pd
@@ -0,0 +1,71 @@
+#N canvas 3 2 602 516 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 48 10 create;
+#X msg 55 33 destroy;
+#X obj 14 93 gemhead;
+#X obj 14 213 t a a;
+#X obj 59 213 circle;
+#X obj 14 283 scale 0.7;
+#X obj 14 243 rotate 45 0 0 1;
+#X obj 14 263 translate 2 0 1 0;
+#X text 170 17 A tutorial on recursion in Gem;
+#X text 170 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X text 170 77 A common idiom in Gem is to use the [repeat] object
+found in the Zexy library \, to generate multiple copies of the same
+object. Let's try using it to make our spiral.;
+#X obj 14 183 separator;
+#X obj 24 163 r \$0-recurse;
+#X obj 68 133 v \$0-depth;
+#X obj 14 113 t a b;
+#X obj 68 113 f 16;
+#X floatatom 91 96 5 0 0 2 max-depth - -;
+#X obj 36 433 s \$0-recurse;
+#X obj 14 313 t b a b;
+#X obj 99 343 v \$0-depth;
+#X obj 99 363 - 1;
+#X obj 99 383 max 0;
+#X obj 99 403 v \$0-depth;
+#X obj 36 413 spigot;
+#X obj 14 343 v \$0-depth;
+#X obj 14 383 v \$0-depth;
+#X obj 14 363 + 1;
+#X text 170 127 First \, we need to limit the depth of the recursion
+\, to avoid the dreaded "stack overflow" errors from both Pd and OpenGL.
+We set the maximum depth before doing anything else in the Gem chain.
+;
+#X text 170 187 Next \, we draw the circle and set up the transformations
+for the recursive call.;
+#X text 170 227 Finally \, we check that we are within the allowed
+depth \, and recurse (after decrementing the maximum depth).;
+#X text 170 267 At first glance \, this recursive solution is much
+less elegant than the iterative solution with [repeat] \, and it is
+-- for non-branching structures. The power of recursion comes from
+the ease with which branching structures can be created.;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 16 0;
+#X connect 5 0 8 0;
+#X connect 5 1 6 0;
+#X connect 7 0 20 0;
+#X connect 8 0 9 0;
+#X connect 9 0 7 0;
+#X connect 13 0 5 0;
+#X connect 14 0 13 0;
+#X connect 16 0 13 0;
+#X connect 16 1 17 0;
+#X connect 17 0 15 0;
+#X connect 18 0 17 1;
+#X connect 20 0 26 0;
+#X connect 20 1 25 0;
+#X connect 20 2 21 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 0;
+#X connect 23 0 24 0;
+#X connect 23 0 25 1;
+#X connect 25 0 19 0;
+#X connect 26 0 28 0;
+#X connect 28 0 27 0;
diff --git a/Gem/examples/13.recursion/04.binary_tree.pd b/Gem/examples/13.recursion/04.binary_tree.pd
new file mode 100644
index 0000000..ef8f69f
--- /dev/null
+++ b/Gem/examples/13.recursion/04.binary_tree.pd
@@ -0,0 +1,98 @@
+#N canvas 3 2 602 516 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 48 10 create;
+#X msg 55 33 destroy;
+#X obj 14 93 gemhead;
+#X text 170 17 A tutorial on recursion in Gem;
+#X text 170 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X obj 24 163 r \$0-recurse;
+#X obj 68 133 v \$0-depth;
+#X obj 14 113 t a b;
+#X floatatom 91 96 5 0 0 2 max-depth - -;
+#X obj 14 253 t a a;
+#X obj 59 253 circle;
+#X obj 14 223 separator;
+#X obj 36 473 s \$0-recurse;
+#X obj 14 353 t b a b;
+#X obj 99 383 v \$0-depth;
+#X obj 99 403 - 1;
+#X obj 99 423 max 0;
+#X obj 99 443 v \$0-depth;
+#X obj 36 453 spigot;
+#X obj 14 383 v \$0-depth;
+#X obj 14 423 v \$0-depth;
+#X obj 14 403 + 1;
+#X obj 184 253 t a a;
+#X obj 229 253 circle;
+#X obj 206 473 s \$0-recurse;
+#X obj 184 353 t b a b;
+#X obj 269 383 v \$0-depth;
+#X obj 269 403 - 1;
+#X obj 269 423 max 0;
+#X obj 269 443 v \$0-depth;
+#X obj 206 453 spigot;
+#X obj 184 383 v \$0-depth;
+#X obj 184 423 v \$0-depth;
+#X obj 184 403 + 1;
+#X obj 184 223 separator;
+#X obj 14 183 t a a;
+#X obj 184 303 translate 1.5 0 1 0;
+#X obj 184 323 scale 0.5;
+#X obj 14 323 scale 0.5;
+#X obj 14 303 translate 1.5 0 1 0;
+#X obj 14 283 rotate -30 0 0 1;
+#X obj 184 283 rotate 30 0 0 1;
+#X obj 68 113 f 4;
+#X text 170 77 The simplest recursive branching structure is one that
+splits into two at each branch. Essentially what we are creating is
+a circle \, plus two transformed copies of the whole structure \, limited
+to a maximums depth of recursion.;
+#X text 170 137 Be careful not to increase the max-depth too much:
+the splitting at each recursion leads to an exponential increase in
+the number of circles to be drawn.;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 9 0;
+#X connect 7 0 37 0;
+#X connect 9 0 37 0;
+#X connect 9 1 44 0;
+#X connect 10 0 44 1;
+#X connect 11 0 42 0;
+#X connect 11 1 12 0;
+#X connect 13 0 11 0;
+#X connect 15 0 21 0;
+#X connect 15 1 20 0;
+#X connect 15 2 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 18 0 20 1;
+#X connect 20 0 14 0;
+#X connect 21 0 23 0;
+#X connect 23 0 22 0;
+#X connect 24 0 43 0;
+#X connect 24 1 25 0;
+#X connect 27 0 33 0;
+#X connect 27 1 32 0;
+#X connect 27 2 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 30 0 32 1;
+#X connect 32 0 26 0;
+#X connect 33 0 35 0;
+#X connect 35 0 34 0;
+#X connect 36 0 24 0;
+#X connect 37 0 13 0;
+#X connect 37 1 36 0;
+#X connect 38 0 39 0;
+#X connect 39 0 27 0;
+#X connect 40 0 15 0;
+#X connect 41 0 40 0;
+#X connect 42 0 41 0;
+#X connect 43 0 38 0;
+#X connect 44 0 8 0;
diff --git a/Gem/examples/13.recursion/05.n-ary_tree.pd b/Gem/examples/13.recursion/05.n-ary_tree.pd
new file mode 100644
index 0000000..91d0565
--- /dev/null
+++ b/Gem/examples/13.recursion/05.n-ary_tree.pd
@@ -0,0 +1,81 @@
+#N canvas 3 2 600 605 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 48 10 create;
+#X msg 55 33 destroy;
+#X obj 14 93 gemhead;
+#X text 170 17 A tutorial on recursion in Gem;
+#X text 170 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X obj 30 159 r \$0-recurse;
+#X obj 68 133 v \$0-depth;
+#X obj 14 113 t a b;
+#X floatatom 84 70 5 0 0 2 max-depth - -;
+#X obj 14 187 t a a;
+#X obj 60 188 circle;
+#X obj 14 325 separator;
+#X obj 36 536 s \$0-recurse;
+#X obj 14 416 t b a b;
+#X obj 99 446 v \$0-depth;
+#X obj 99 466 - 1;
+#X obj 99 486 max 0;
+#X obj 99 506 v \$0-depth;
+#X obj 36 516 spigot;
+#X obj 14 446 v \$0-depth;
+#X obj 14 486 v \$0-depth;
+#X obj 14 466 + 1;
+#X obj 68 113 f 4;
+#X obj 14 346 rotate 0 0 0 1;
+#X obj 126 303 * 72;
+#X obj 14 366 translate 2 0 1 0;
+#X obj 14 386 scale 0.35;
+#X obj 14 270 nrepeat 5;
+#X obj 119 236 t f f;
+#X floatatom 118 196 5 0 0 2 count - -;
+#X obj 149 259 swap 360;
+#X obj 149 282 /;
+#X obj 118 215 clip 1 16;
+#X obj 84 89 clip 1 6;
+#X text 170 77 Recursion can be combined with iteration to make complex
+structures. However \, using the [repeat] from Zexy is no longer enough.
+Trying to use it with an external counter leads to re-entrancy bugs
+\, because the [repeat] is retriggered before the counter has finished
+\, which messes up the counter's internal state. [nrepeat] is a "repeat
+with a built in counter" \, which is re-entrancy safe.;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 0 0;
+#X connect 4 0 9 0;
+#X connect 7 0 11 0;
+#X connect 9 0 11 0;
+#X connect 9 1 24 0;
+#X connect 10 0 35 0;
+#X connect 11 0 29 0;
+#X connect 11 1 12 0;
+#X connect 13 0 25 0;
+#X connect 15 0 21 0;
+#X connect 15 1 20 0;
+#X connect 15 2 16 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 18 0 20 1;
+#X connect 20 0 14 0;
+#X connect 21 0 23 0;
+#X connect 23 0 22 0;
+#X connect 24 0 8 0;
+#X connect 25 0 27 0;
+#X connect 26 0 25 1;
+#X connect 27 0 28 0;
+#X connect 28 0 15 0;
+#X connect 29 0 13 0;
+#X connect 29 1 26 0;
+#X connect 30 0 29 1;
+#X connect 30 1 32 0;
+#X connect 31 0 34 0;
+#X connect 32 0 33 0;
+#X connect 32 1 33 1;
+#X connect 33 0 26 1;
+#X connect 34 0 30 0;
+#X connect 35 0 24 1;
diff --git a/Gem/examples/13.recursion/06.breaking_symmetry.pd b/Gem/examples/13.recursion/06.breaking_symmetry.pd
new file mode 100644
index 0000000..c409aaf
--- /dev/null
+++ b/Gem/examples/13.recursion/06.breaking_symmetry.pd
@@ -0,0 +1,384 @@
+#N canvas 4 2 673 560 10;
+#X obj 14 66 gemwin;
+#X obj 14 9 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
+;
+#X msg 55 33 destroy;
+#X obj 14 92 gemhead;
+#X text 220 17 A tutorial on recursion in Gem;
+#X text 220 37 (GPL) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+;
+#X obj 30 273 r \$0-recurse;
+#X obj 14 301 t a a;
+#X floatatom 72 360 5 0 0 2 count - -;
+#X obj 72 379 clip 1 6;
+#N canvas 0 0 368 384 \$0-transformations 0;
+#X obj 19 19 inlet;
+#X obj 250 19 inlet;
+#X obj 19 343 outlet;
+#X text 299 20 count;
+#X text 72 19 gem;
+#X text 74 344 gem;
+#X obj 19 44 separator;
+#X obj 19 315 scaleXYZ;
+#X obj 19 225 translateXYZ;
+#X obj 19 135 rotateXYZ;
+#X obj 38 74 tabread \$0-rotate-X;
+#X obj 57 94 tabread \$0-rotate-Y;
+#X obj 77 114 tabread \$0-rotate-Z;
+#X obj 45 164 tabread \$0-translate-X;
+#X obj 71 184 tabread \$0-translate-Y;
+#X obj 98 204 tabread \$0-translate-Z;
+#X obj 36 254 tabread \$0-scale-X;
+#X obj 53 274 tabread \$0-scale-Y;
+#X obj 70 294 tabread \$0-scale-Z;
+#X text 135 230 Transform the recursion branch \,;
+#X connect 0 0 6 0;
+#X connect 1 0 10 0;
+#X connect 1 0 11 0;
+#X connect 1 0 12 0;
+#X connect 1 0 13 0;
+#X connect 1 0 14 0;
+#X connect 1 0 15 0;
+#X connect 1 0 16 0;
+#X connect 1 0 17 0;
+#X connect 1 0 18 0;
+#X connect 6 0 9 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 9 0 8 0;
+#X connect 10 0 9 1;
+#X connect 11 0 9 2;
+#X connect 12 0 9 3;
+#X connect 13 0 8 1;
+#X connect 14 0 8 2;
+#X connect 15 0 8 3;
+#X connect 16 0 7 1;
+#X connect 17 0 7 2;
+#X connect 18 0 7 3;
+#X restore 63 442 pd \$0-transformations;
+#N canvas 0 0 679 337 \$0-colourize-and-limit-depth 0;
+#X obj 297 19 inlet;
+#X obj 293 298 outlet;
+#X text 343 299 gem;
+#X text 347 21 gem;
+#X obj 436 18 inlet;
+#X text 487 18 count;
+#X obj 352 171 v \$0-depth;
+#X obj 352 191 - 1;
+#X obj 352 211 max 0;
+#X obj 352 231 v \$0-depth;
+#X obj 294 246 spigot;
+#X obj 264 174 v \$0-depth;
+#X obj 264 214 v \$0-depth;
+#X obj 264 194 + 1;
+#X obj 436 189 v \$0-R;
+#X obj 436 229 v \$0-R;
+#X obj 486 189 v \$0-G;
+#X obj 486 229 v \$0-G;
+#X obj 536 229 v \$0-B;
+#X obj 536 189 v \$0-B;
+#X obj 436 71 tabread \$0-colour-R;
+#X obj 486 105 tabread \$0-colour-G;
+#X obj 536 128 tabread \$0-colour-B;
+#X text 442 248 Transform colours.;
+#X text 251 271 Limit recursion depth.;
+#X obj 536 209 + 1;
+#X obj 486 209 + 1;
+#X obj 435 209 + 1;
+#X obj 297 52 t b a b;
+#X obj 436 167 t b f;
+#X obj 486 167 t b f;
+#X obj 536 167 t b f;
+#X obj 46 18 inlet;
+#X text 97 18 count;
+#X obj 46 189 v \$0-R;
+#X obj 46 229 v \$0-R;
+#X obj 96 189 v \$0-G;
+#X obj 96 229 v \$0-G;
+#X obj 146 229 v \$0-B;
+#X obj 146 189 v \$0-B;
+#X obj 46 71 tabread \$0-colour-R;
+#X obj 96 105 tabread \$0-colour-G;
+#X obj 146 128 tabread \$0-colour-B;
+#X obj 46 167 t b f;
+#X obj 96 167 t b f;
+#X obj 146 167 t b f;
+#X text 52 252 Untransform colours.;
+#X obj 45 209 - 1;
+#X obj 96 209 - 1;
+#X obj 146 209 - 1;
+#X connect 0 0 28 0;
+#X connect 4 0 20 0;
+#X connect 4 0 21 0;
+#X connect 4 0 22 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 8 0 9 0;
+#X connect 8 0 10 1;
+#X connect 10 0 1 0;
+#X connect 11 0 13 0;
+#X connect 13 0 12 0;
+#X connect 14 0 27 0;
+#X connect 16 0 26 0;
+#X connect 19 0 25 0;
+#X connect 20 0 29 0;
+#X connect 21 0 30 0;
+#X connect 22 0 31 0;
+#X connect 25 0 18 0;
+#X connect 26 0 17 0;
+#X connect 27 0 15 0;
+#X connect 28 0 11 0;
+#X connect 28 1 10 0;
+#X connect 28 2 6 0;
+#X connect 29 0 14 0;
+#X connect 29 1 27 1;
+#X connect 30 0 16 0;
+#X connect 30 1 26 1;
+#X connect 31 0 19 0;
+#X connect 31 1 25 1;
+#X connect 32 0 40 0;
+#X connect 32 0 41 0;
+#X connect 32 0 42 0;
+#X connect 34 0 47 0;
+#X connect 36 0 48 0;
+#X connect 39 0 49 0;
+#X connect 40 0 43 0;
+#X connect 41 0 44 0;
+#X connect 42 0 45 0;
+#X connect 43 0 34 0;
+#X connect 43 1 47 1;
+#X connect 44 0 36 0;
+#X connect 44 1 48 1;
+#X connect 45 0 39 0;
+#X connect 45 1 49 1;
+#X connect 47 0 35 0;
+#X connect 48 0 37 0;
+#X connect 49 0 38 0;
+#X restore 14 479 pd \$0-colourize-and-limit-depth;
+#X obj 14 499 s \$0-recurse;
+#X obj 14 223 t a b;
+#N canvas 22 26 435 181 \$0-initialize 0;
+#X obj 23 20 inlet;
+#X text 68 19 bang;
+#X obj 23 122 v \$0-depth;
+#X obj 23 102 f 4;
+#X obj 103 122 v \$0-R;
+#X obj 153 122 v \$0-G;
+#X obj 203 122 v \$0-B;
+#X obj 160 21 inlet;
+#X text 205 20 max depth;
+#X text 18 146 Initialize the variables: recursion depth and object
+colours.;
+#X obj 203 98 f 0;
+#X obj 153 99 f 0;
+#X obj 103 98 f 0;
+#X connect 0 0 3 0;
+#X connect 0 0 10 0;
+#X connect 0 0 11 0;
+#X connect 0 0 12 0;
+#X connect 3 0 2 0;
+#X connect 7 0 3 1;
+#X connect 10 0 6 0;
+#X connect 11 0 5 0;
+#X connect 12 0 4 0;
+#X restore 44 243 pd \$0-initialize;
+#X floatatom 151 200 5 0 0 2 depth - -;
+#N canvas 0 0 340 391 \$0-draw-object 0;
+#X obj 23 14 inlet;
+#X text 69 13 gem;
+#X obj 23 67 t a b b b;
+#X obj 23 321 colorRGB;
+#X obj 23 358 cube;
+#X obj 240 291 inlet;
+#X text 286 291 alpha;
+#X obj 42 106 v \$0-R;
+#X obj 120 104 v \$0-G;
+#X obj 198 104 v \$0-B;
+#X text 125 76 Normalize the colour range.;
+#X obj 23 41 separator;
+#X obj 42 253 expr $f1/$f4 \; $f2/$f4 \; $f3/$f4;
+#X obj 42 128 expr $f1 \; $f2 \; $f3 \; max(max(max($f1 \, $f2) \,
+$f3) \, 1);
+#X connect 0 0 11 0;
+#X connect 2 0 3 0;
+#X connect 2 1 7 0;
+#X connect 2 2 8 0;
+#X connect 2 3 9 0;
+#X connect 3 0 4 0;
+#X connect 5 0 3 4;
+#X connect 7 0 13 0;
+#X connect 8 0 13 1;
+#X connect 9 0 13 2;
+#X connect 11 0 2 0;
+#X connect 12 0 3 1;
+#X connect 12 1 3 2;
+#X connect 12 2 3 3;
+#X connect 13 0 12 0;
+#X connect 13 1 12 1;
+#X connect 13 2 12 2;
+#X connect 13 3 12 3;
+#X restore 44 321 pd \$0-draw-object;
+#X floatatom 158 279 5 0 0 2 alpha - -;
+#X obj 158 299 / 100;
+#N canvas 0 0 650 615 \$0-gui 0;
+#X obj 11 11 xform-gui 0;
+#X obj 167 263 t a;
+#X msg 167 293 \$3 \$1 \$2;
+#X obj 167 329 unpack f f s;
+#X obj 246 355 select cR cG cB rX rY rZ tX tY tZ sX sY sZ;
+#X obj 167 576 tabwrite;
+#X obj 246 485 symbol \$0-colour-R;
+#X obj 270 465 symbol \$0-colour-G;
+#X obj 294 445 symbol \$0-colour-B;
+#X obj 318 425 symbol \$0-rotate-X;
+#X obj 342 405 symbol \$0-rotate-Y;
+#X obj 366 385 symbol \$0-rotate-Z;
+#X obj 390 485 symbol \$0-translate-X;
+#X obj 414 465 symbol \$0-translate-Y;
+#X obj 438 445 symbol \$0-translate-Z;
+#X obj 462 425 symbol \$0-scale-X;
+#X obj 486 405 symbol \$0-scale-Y;
+#X obj 510 385 symbol \$0-scale-Z;
+#X obj 374 552 list prepend set;
+#X obj 374 572 list trim;
+#X obj 495 112 inlet;
+#X obj 71 11 xform-gui 1;
+#X obj 131 11 xform-gui 2;
+#X obj 191 11 xform-gui 3;
+#X obj 251 11 xform-gui 4;
+#X obj 311 11 xform-gui 5;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 5 0;
+#X connect 3 1 5 1;
+#X connect 3 2 4 0;
+#X connect 4 0 6 0;
+#X connect 4 1 7 0;
+#X connect 4 2 8 0;
+#X connect 4 3 9 0;
+#X connect 4 4 10 0;
+#X connect 4 5 11 0;
+#X connect 4 6 12 0;
+#X connect 4 7 13 0;
+#X connect 4 8 14 0;
+#X connect 4 9 15 0;
+#X connect 4 10 16 0;
+#X connect 4 11 17 0;
+#X connect 6 0 18 0;
+#X connect 7 0 18 0;
+#X connect 8 0 18 0;
+#X connect 9 0 18 0;
+#X connect 10 0 18 0;
+#X connect 11 0 18 0;
+#X connect 12 0 18 0;
+#X connect 13 0 18 0;
+#X connect 14 0 18 0;
+#X connect 15 0 18 0;
+#X connect 16 0 18 0;
+#X connect 17 0 18 0;
+#X connect 18 0 19 0;
+#X connect 19 0 5 0;
+#X connect 20 0 0 0;
+#X connect 20 0 21 0;
+#X connect 20 0 22 0;
+#X connect 20 0 23 0;
+#X connect 20 0 24 0;
+#X connect 20 0 25 0;
+#X connect 21 0 1 0;
+#X connect 22 0 1 0;
+#X connect 23 0 1 0;
+#X connect 24 0 1 0;
+#X connect 25 0 1 0;
+#X coords 0 -1 1 1 362 212 2 10 10;
+#X restore 275 286 pd \$0-gui;
+#X text 460 263 transformation parameters;
+#N canvas 0 0 360 364 \$0-transformation-parameters 0;
+#X obj 21 318 table \$0-scale-Z 6;
+#X obj 21 298 table \$0-scale-Y 6;
+#X obj 21 278 table \$0-scale-X 6;
+#X obj 21 208 table \$0-translate-X 6;
+#X obj 21 228 table \$0-translate-Y 6;
+#X obj 21 248 table \$0-translate-Z 6;
+#X obj 21 178 table \$0-rotate-Z 6;
+#X obj 21 158 table \$0-rotate-Y 6;
+#X obj 21 138 table \$0-rotate-X 6;
+#X obj 21 68 table \$0-colour-R 6;
+#X obj 21 88 table \$0-colour-G 6;
+#X obj 21 108 table \$0-colour-B 6;
+#X text 21 29 Tables to store transformation parameters.;
+#X restore 418 506 pd \$0-transformation-parameters;
+#X obj 14 191 alpha;
+#X msg 37 164 auto \$1;
+#X obj 38 139 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+1;
+#N canvas 0 0 471 288 \$0-scene-transformation 0;
+#X obj 20 20 inlet;
+#X obj 20 42 t a b;
+#X obj 20 149 rotateXYZ;
+#X obj 50 67 f 0;
+#X obj 88 67 + 1;
+#X obj 62 98 / 1.618;
+#X obj 82 122 / 1.618;
+#X obj 20 217 scale 0.05;
+#X obj 53 191 inlet;
+#X obj 20 252 outlet;
+#X text 152 215 Scale the whole scene.;
+#X text 158 67 Rotate the whole scene continuously.;
+#X connect 0 0 1 0;
+#X connect 1 0 2 0;
+#X connect 1 1 3 0;
+#X connect 2 0 7 0;
+#X connect 3 0 4 0;
+#X connect 3 0 2 1;
+#X connect 3 0 5 0;
+#X connect 4 0 3 1;
+#X connect 5 0 2 2;
+#X connect 5 0 6 0;
+#X connect 6 0 2 3;
+#X connect 7 0 9 0;
+#X connect 8 0 7 1;
+#X restore 14 115 pd \$0-scene-transformation;
+#X floatatom 158 69 5 0 0 2 scale - -;
+#X obj 158 89 / 100;
+#X obj 151 221 clip 0 6;
+#X text 219 182 Subpatches are used to hide the implementation details
+of each part of the patch. Further comments are inside.;
+#X obj 275 260 bng 15 250 50 1 empty empty randomize 17 7 0 10 -262144
+-1 -1;
+#X obj 14 404 nnrepeat 5;
+#X text 220 77 Another new object is necessary for full effect: [nnrepeat]
+which outputs the repeat count both before and after the repeated value
+\, thus we can do and undo actions before and after \, such as colourizing
+the geos according to the transformations. Allowing different parameters
+for each transformation means we can create non-symmetric structures
+with some sort of self-similarity.;
+#X msg 48 13 create;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 25 0;
+#X connect 6 0 7 0;
+#X connect 7 0 31 0;
+#X connect 7 1 16 0;
+#X connect 8 0 9 0;
+#X connect 9 0 31 1;
+#X connect 10 0 11 1;
+#X connect 11 0 12 0;
+#X connect 13 0 7 0;
+#X connect 13 1 14 0;
+#X connect 15 0 28 0;
+#X connect 17 0 18 0;
+#X connect 18 0 16 1;
+#X connect 22 0 13 0;
+#X connect 23 0 22 0;
+#X connect 24 0 23 0;
+#X connect 25 0 22 0;
+#X connect 26 0 27 0;
+#X connect 27 0 25 1;
+#X connect 28 0 14 1;
+#X connect 30 0 19 0;
+#X connect 31 0 11 0;
+#X connect 31 1 10 0;
+#X connect 31 2 10 1;
+#X connect 31 2 11 2;
+#X connect 33 0 0 0;
diff --git a/Gem/examples/13.recursion/README b/Gem/examples/13.recursion/README
new file mode 100644
index 0000000..90b5cf4
--- /dev/null
+++ b/Gem/examples/13.recursion/README
@@ -0,0 +1,23 @@
+gem-recursion -- a tutorial on using recursion with Gem
+Copyright (C) 2007 Claude Heiland-Allen <claude@mathr.co.uk>
+
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+Requirements:
+(*) pd-0.40-2 or greater
+(*) Gem for pd
+(*) Zexy for pd
diff --git a/Gem/examples/13.recursion/nnrepeat-help.pd b/Gem/examples/13.recursion/nnrepeat-help.pd
new file mode 100644
index 0000000..b23304e
--- /dev/null
+++ b/Gem/examples/13.recursion/nnrepeat-help.pd
@@ -0,0 +1,28 @@
+#N canvas 0 0 506 325 10;
+#X floatatom 87 195 5 0 0 0 - - -;
+#X text 94 11 - repeat a message several times with counter;
+#X obj 54 273 print repeat;
+#X msg 22 110 bang;
+#X msg 49 136 1 1 2 3 5 8 13 21 44 fibonacchi;
+#X text 63 111 repeat bangs;
+#X text 282 138 repeat a list;
+#X msg 69 166 set 5;
+#X text 117 167 repeat anything;
+#X text 127 194 reset the number of repetitions;
+#X text 100 220 creation argument initializes the number of repeats
+;
+#X obj 19 12 nnrepeat 1;
+#X obj 22 219 nnrepeat 3;
+#X obj 87 250 print n1;
+#X obj 22 297 print n2;
+#X text 19 44 Similar to [repeat] from Zexy but outputs the repetition
+count from the right-hand outlet then outputs the repeated input from
+the middle outlet \, then outputs the repetition count again from the
+left-hand outlet.;
+#X connect 0 0 12 1;
+#X connect 3 0 12 0;
+#X connect 4 0 12 0;
+#X connect 7 0 12 0;
+#X connect 12 0 14 0;
+#X connect 12 1 2 0;
+#X connect 12 2 13 0;
diff --git a/Gem/examples/13.recursion/nnrepeat-test.pd b/Gem/examples/13.recursion/nnrepeat-test.pd
new file mode 100644
index 0000000..91b5c94
--- /dev/null
+++ b/Gem/examples/13.recursion/nnrepeat-test.pd
@@ -0,0 +1,55 @@
+#N canvas 0 0 481 517 10;
+#X obj 71 95 r \$0-recurse;
+#X obj 71 380 s \$0-recurse;
+#X obj 140 270 t b a b;
+#X obj 224 290 v \$0-depth;
+#X obj 224 310 - 1;
+#X obj 224 330 max 0;
+#X obj 162 350 spigot;
+#X obj 224 350 v \$0-depth;
+#X obj 185 160 t b f;
+#X obj 185 183 v \$0-depth;
+#X obj 185 208 pack f f;
+#X obj 140 290 v \$0-depth;
+#X obj 140 330 v \$0-depth;
+#X obj 140 310 + 1;
+#X obj 108 50 t a b;
+#X msg 108 21 nrepeat test;
+#X obj 285 108 v \$0-depth;
+#X floatatom 262 77 5 0 0 2 max-depth - -;
+#X floatatom 261 38 5 0 0 2 repetitions - -;
+#X obj 246 108 f 3;
+#X obj 185 235 print ->;
+#X obj 98 160 t b f;
+#X obj 98 183 v \$0-depth;
+#X obj 98 208 pack f f;
+#X obj 98 235 print <-;
+#X obj 108 135 nnrepeat 2;
+#X connect 0 0 25 0;
+#X connect 2 0 11 0;
+#X connect 2 1 6 0;
+#X connect 2 2 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 1;
+#X connect 5 0 7 0;
+#X connect 6 0 1 0;
+#X connect 8 0 9 0;
+#X connect 8 1 10 1;
+#X connect 9 0 10 0;
+#X connect 10 0 20 0;
+#X connect 11 0 13 0;
+#X connect 13 0 12 0;
+#X connect 14 0 25 0;
+#X connect 14 1 19 0;
+#X connect 15 0 14 0;
+#X connect 17 0 19 1;
+#X connect 18 0 25 1;
+#X connect 19 0 16 0;
+#X connect 21 0 22 0;
+#X connect 21 1 23 1;
+#X connect 22 0 23 0;
+#X connect 23 0 24 0;
+#X connect 25 0 21 0;
+#X connect 25 1 2 0;
+#X connect 25 2 8 0;
diff --git a/Gem/examples/13.recursion/nnrepeat.pd b/Gem/examples/13.recursion/nnrepeat.pd
new file mode 100644
index 0000000..c0e89d1
--- /dev/null
+++ b/Gem/examples/13.recursion/nnrepeat.pd
@@ -0,0 +1,27 @@
+#N canvas 0 0 400 328 10;
+#X obj 61 94 nrepeat \$1;
+#X obj 136 21 inlet;
+#X text 178 21 count;
+#X obj 27 20 inlet;
+#X text 68 21 repeatee;
+#X obj 88 175 stack;
+#X obj 61 136 t b a;
+#X obj 126 137 t f f;
+#X obj 25 262 outlet;
+#X text 75 263 count;
+#X obj 132 263 outlet;
+#X text 182 264 repeated;
+#X obj 256 263 outlet;
+#X text 311 265 count;
+#X obj 132 209 print nnrepeat-internal-error;
+#X text 23 295 nnrepeat.pd (GPL) <claude@mathr.co.uk>;
+#X connect 0 0 6 0;
+#X connect 0 1 7 0;
+#X connect 1 0 0 1;
+#X connect 3 0 0 0;
+#X connect 5 0 8 0;
+#X connect 5 1 14 0;
+#X connect 6 0 5 0;
+#X connect 6 1 10 0;
+#X connect 7 0 12 0;
+#X connect 7 1 5 1;
diff --git a/Gem/examples/13.recursion/nrepeat-help.pd b/Gem/examples/13.recursion/nrepeat-help.pd
new file mode 100644
index 0000000..41f21de
--- /dev/null
+++ b/Gem/examples/13.recursion/nrepeat-help.pd
@@ -0,0 +1,25 @@
+#N canvas 0 0 506 325 10;
+#X floatatom 80 196 5 0 0 0 - - -;
+#X obj 19 12 nrepeat 1;
+#X text 94 11 - repeat a message several times with counter;
+#X text 19 44 Similar to [repeat] from Zexy but also outputs the repetition
+count from the right-hand outlet before it outputs the repeated input
+from the left-hand outlet.;
+#X obj 22 219 nrepeat 3;
+#X obj 22 273 print repeat;
+#X obj 80 249 print n;
+#X msg 22 110 bang;
+#X msg 49 136 1 1 2 3 5 8 13 21 44 fibonacchi;
+#X text 63 111 repeat bangs;
+#X text 282 138 repeat a list;
+#X msg 69 166 set 5;
+#X text 117 167 repeat anything;
+#X text 127 194 reset the number of repetitions;
+#X text 100 220 creation argument initializes the number of repeats
+;
+#X connect 0 0 4 1;
+#X connect 4 0 5 0;
+#X connect 4 1 6 0;
+#X connect 7 0 4 0;
+#X connect 8 0 4 0;
+#X connect 11 0 4 0;
diff --git a/Gem/examples/13.recursion/nrepeat-test.pd b/Gem/examples/13.recursion/nrepeat-test.pd
new file mode 100644
index 0000000..48348b3
--- /dev/null
+++ b/Gem/examples/13.recursion/nrepeat-test.pd
@@ -0,0 +1,46 @@
+#N canvas 0 0 481 517 10;
+#X obj 71 95 r \$0-recurse;
+#X obj 71 380 s \$0-recurse;
+#X obj 108 260 t b a b;
+#X obj 192 280 v \$0-depth;
+#X obj 192 300 - 1;
+#X obj 192 320 max 0;
+#X obj 130 340 spigot;
+#X obj 192 340 v \$0-depth;
+#X obj 166 160 t b f;
+#X obj 166 183 v \$0-depth;
+#X obj 166 208 pack f f;
+#X obj 165 239 print nrepeat;
+#X obj 108 280 v \$0-depth;
+#X obj 108 320 v \$0-depth;
+#X obj 108 300 + 1;
+#X obj 108 50 t a b;
+#X msg 108 21 nrepeat test;
+#X obj 285 108 v \$0-depth;
+#X floatatom 262 77 5 0 0 2 max-depth - -;
+#X floatatom 261 38 5 0 0 2 repetitions - -;
+#X obj 246 108 f 3;
+#X obj 108 135 nrepeat 2;
+#X connect 0 0 21 0;
+#X connect 2 0 12 0;
+#X connect 2 1 6 0;
+#X connect 2 2 3 0;
+#X connect 3 0 4 0;
+#X connect 4 0 5 0;
+#X connect 5 0 6 1;
+#X connect 5 0 7 0;
+#X connect 6 0 1 0;
+#X connect 8 0 9 0;
+#X connect 8 1 10 1;
+#X connect 9 0 10 0;
+#X connect 10 0 11 0;
+#X connect 12 0 14 0;
+#X connect 14 0 13 0;
+#X connect 15 0 21 0;
+#X connect 15 1 20 0;
+#X connect 16 0 15 0;
+#X connect 18 0 20 1;
+#X connect 19 0 21 1;
+#X connect 20 0 17 0;
+#X connect 21 0 2 0;
+#X connect 21 1 8 0;
diff --git a/Gem/examples/13.recursion/nrepeat.pd b/Gem/examples/13.recursion/nrepeat.pd
new file mode 100644
index 0000000..4d26d68
--- /dev/null
+++ b/Gem/examples/13.recursion/nrepeat.pd
@@ -0,0 +1,49 @@
+#N canvas 0 0 413 451 10;
+#X obj 78 26 inlet;
+#X obj 78 60 t b a b;
+#X obj 131 121 repeat \$1;
+#X obj 189 24 inlet;
+#X obj 92 239 stack;
+#X msg 122 192 0;
+#X msg 146 239 0;
+#X obj 78 192 t b b;
+#X obj 131 142 t a b;
+#X obj 161 193 t b b;
+#X msg 176 240 1;
+#X obj 92 267 list prepend;
+#X obj 92 295 route 0 1;
+#X text 86 312 nop;
+#X obj 121 321 t f f;
+#X obj 236 195 + 1;
+#X obj 121 361 outlet;
+#X obj 10 205 outlet;
+#X obj 187 298 print nrepeat-stack-underflow;
+#X obj 187 328 print nrepeat-internal-error;
+#X text 119 24 repeatee;
+#X text 233 23 count;
+#X text 8 225 repeated;
+#X text 119 381 counter;
+#X text 30 419 nrepeat.pd (GPL) <claude@mathr.co.uk>;
+#X connect 0 0 1 0;
+#X connect 1 0 7 0;
+#X connect 1 1 2 0;
+#X connect 1 2 5 0;
+#X connect 2 0 8 0;
+#X connect 3 0 2 1;
+#X connect 4 0 11 0;
+#X connect 4 1 18 0;
+#X connect 5 0 4 1;
+#X connect 6 0 11 1;
+#X connect 7 0 4 0;
+#X connect 7 1 6 0;
+#X connect 8 0 17 0;
+#X connect 8 1 9 0;
+#X connect 9 0 4 0;
+#X connect 9 1 10 0;
+#X connect 10 0 11 1;
+#X connect 11 0 12 0;
+#X connect 12 1 14 0;
+#X connect 12 2 19 0;
+#X connect 14 0 16 0;
+#X connect 14 1 15 0;
+#X connect 15 0 4 1;
diff --git a/Gem/examples/13.recursion/stack-help.pd b/Gem/examples/13.recursion/stack-help.pd
new file mode 100644
index 0000000..b891067
--- /dev/null
+++ b/Gem/examples/13.recursion/stack-help.pd
@@ -0,0 +1,20 @@
+#N canvas 0 0 411 333 10;
+#X obj 43 199 stack;
+#X obj 43 269 print popped;
+#X obj 73 249 print empty;
+#X msg 130 163 list foo 2 bar;
+#X floatatom 73 108 5 0 0 1 float - -;
+#X obj 43 79 bng 15 250 50 0 empty empty pop 17 7 0 10 -262144 -1 -1
+;
+#X symbolatom 101 135 10 0 0 1 symbol - -;
+#X text 241 164 mixture of stuff;
+#X text 13 9 A stack is a "first in \, last out" structure.;
+#X text 13 48 Right inlet stores atom(s).;
+#X text 13 29 Left inlet unstores the most recently stored atom.;
+#X text 11 301 stack-help.pd (GPL) <claude@mathr.co.uk>;
+#X connect 0 0 1 0;
+#X connect 0 1 2 0;
+#X connect 3 0 0 1;
+#X connect 4 0 0 1;
+#X connect 5 0 0 0;
+#X connect 6 0 0 1;
diff --git a/Gem/examples/13.recursion/stack.pd b/Gem/examples/13.recursion/stack.pd
new file mode 100644
index 0000000..789ea8f
--- /dev/null
+++ b/Gem/examples/13.recursion/stack.pd
@@ -0,0 +1,38 @@
+#N canvas 0 0 351 366 10;
+#X obj 25 19 inlet;
+#X text 69 18 pop;
+#X obj 166 18 inlet;
+#X text 213 17 push;
+#X obj 25 53 t b b;
+#X obj 25 152 list prepend;
+#X msg 88 127 0;
+#X msg 121 127 1;
+#X obj 25 183 route 0 1;
+#X obj 25 251 list split 1;
+#X obj 25 298 outlet;
+#X obj 25 97 list;
+#X text 79 298 popped;
+#X obj 166 299 outlet;
+#X text 220 298 empty;
+#X obj 166 47 t b a b;
+#X obj 109 217 list prepend;
+#X obj 120 182 print stack-internal-error;
+#X text 17 330 stack.pd (GPL) <claude@mathr.co.uk>;
+#X connect 0 0 4 0;
+#X connect 2 0 15 0;
+#X connect 4 0 11 0;
+#X connect 4 1 6 0;
+#X connect 5 0 8 0;
+#X connect 6 0 5 1;
+#X connect 7 0 5 1;
+#X connect 8 0 9 0;
+#X connect 8 1 16 0;
+#X connect 8 2 17 0;
+#X connect 9 0 10 0;
+#X connect 9 1 11 1;
+#X connect 9 2 13 0;
+#X connect 11 0 5 0;
+#X connect 15 0 11 0;
+#X connect 15 1 16 1;
+#X connect 15 2 7 0;
+#X connect 16 0 11 1;
diff --git a/Gem/examples/13.recursion/xform-gui.pd b/Gem/examples/13.recursion/xform-gui.pd
new file mode 100644
index 0000000..efe1e89
--- /dev/null
+++ b/Gem/examples/13.recursion/xform-gui.pd
@@ -0,0 +1,120 @@
+#N canvas 0 0 476 324 10;
+#X obj 340 251 list prepend \$1;
+#X obj 340 275 outlet;
+#X floatatom 220 13 5 0 0 0 cR - -;
+#X floatatom 220 29 5 0 0 0 cG - -;
+#X floatatom 220 45 5 0 0 0 cB - -;
+#X floatatom 220 66 5 0 0 0 rX - -;
+#X floatatom 220 82 5 0 0 0 rY - -;
+#X floatatom 220 98 5 0 0 0 rZ - -;
+#X floatatom 220 119 5 0 0 0 tX - -;
+#X floatatom 220 135 5 0 0 0 tY - -;
+#X floatatom 220 151 5 0 0 0 tZ - -;
+#X floatatom 220 172 5 0 0 0 sX - -;
+#X floatatom 220 188 5 0 0 0 sY - -;
+#X floatatom 220 204 5 0 0 0 sZ - -;
+#X obj 282 173 / 100;
+#X obj 282 193 / 100;
+#X obj 282 213 / 100;
+#X obj 282 111 / 10;
+#X obj 282 131 / 10;
+#X obj 282 151 / 10;
+#X obj 341 5 list prepend cR;
+#X obj 341 65 list prepend rX;
+#X obj 341 85 list prepend rY;
+#X obj 341 105 list prepend rZ;
+#X obj 341 125 list prepend tX;
+#X obj 341 145 list prepend tY;
+#X obj 341 165 list prepend tZ;
+#X obj 341 185 list prepend sX;
+#X obj 341 205 list prepend sY;
+#X obj 341 225 list prepend sZ;
+#X obj 341 25 list prepend cG;
+#X obj 341 45 list prepend cB;
+#X obj 67 70 random 360;
+#X obj 67 90 random 360;
+#X obj 67 110 random 360;
+#X obj 147 110 - 180;
+#X obj 147 90 - 180;
+#X obj 147 70 - 180;
+#X obj 67 130 random 360;
+#X obj 67 150 random 360;
+#X obj 67 170 random 360;
+#X obj 147 170 - 180;
+#X obj 147 150 - 180;
+#X obj 147 130 - 180;
+#X obj 8 6 inlet;
+#X obj 67 10 random 5;
+#X obj 67 30 random 5;
+#X obj 67 50 random 5;
+#X obj 67 190 random 50;
+#X obj 67 210 random 50;
+#X obj 67 230 random 50;
+#X obj 147 190 + 50;
+#X obj 147 210 + 50;
+#X obj 147 230 + 50;
+#X connect 0 0 1 0;
+#X connect 2 0 20 0;
+#X connect 3 0 30 0;
+#X connect 4 0 31 0;
+#X connect 5 0 21 0;
+#X connect 6 0 22 0;
+#X connect 7 0 23 0;
+#X connect 8 0 17 0;
+#X connect 9 0 18 0;
+#X connect 10 0 19 0;
+#X connect 11 0 14 0;
+#X connect 12 0 15 0;
+#X connect 13 0 16 0;
+#X connect 14 0 27 0;
+#X connect 15 0 28 0;
+#X connect 16 0 29 0;
+#X connect 17 0 24 0;
+#X connect 18 0 25 0;
+#X connect 19 0 26 0;
+#X connect 20 0 0 0;
+#X connect 21 0 0 0;
+#X connect 22 0 0 0;
+#X connect 23 0 0 0;
+#X connect 24 0 0 0;
+#X connect 25 0 0 0;
+#X connect 26 0 0 0;
+#X connect 27 0 0 0;
+#X connect 28 0 0 0;
+#X connect 29 0 0 0;
+#X connect 30 0 0 0;
+#X connect 31 0 0 0;
+#X connect 32 0 37 0;
+#X connect 33 0 36 0;
+#X connect 34 0 35 0;
+#X connect 35 0 7 0;
+#X connect 36 0 6 0;
+#X connect 37 0 5 0;
+#X connect 38 0 43 0;
+#X connect 39 0 42 0;
+#X connect 40 0 41 0;
+#X connect 41 0 10 0;
+#X connect 42 0 9 0;
+#X connect 43 0 8 0;
+#X connect 44 0 32 0;
+#X connect 44 0 33 0;
+#X connect 44 0 34 0;
+#X connect 44 0 38 0;
+#X connect 44 0 39 0;
+#X connect 44 0 40 0;
+#X connect 44 0 45 0;
+#X connect 44 0 46 0;
+#X connect 44 0 47 0;
+#X connect 44 0 48 0;
+#X connect 44 0 49 0;
+#X connect 44 0 50 0;
+#X connect 45 0 2 0;
+#X connect 46 0 3 0;
+#X connect 47 0 4 0;
+#X connect 48 0 51 0;
+#X connect 49 0 52 0;
+#X connect 50 0 53 0;
+#X connect 51 0 11 0;
+#X connect 52 0 12 0;
+#X connect 53 0 13 0;
+#X coords 0 -1 1 1 60 210 2 200 10;
diff --git a/Gem/examples/14.multiple_windows/01.basic_example.pd b/Gem/examples/14.multiple_windows/01.basic_example.pd
new file mode 100644
index 0000000..078ca67
--- /dev/null
+++ b/Gem/examples/14.multiple_windows/01.basic_example.pd
@@ -0,0 +1,29 @@
+#N canvas 602 711 828 296 10;
+#X obj 88 241 gemwin 20 a;
+#X obj 295 79 square;
+#X obj 295 49 color 1 0 0 1;
+#X obj 94 77 square;
+#X obj 94 47 color 0 0 1 1;
+#X obj 94 25 gemhead a;
+#X msg 88 199 title a \, create \, 1;
+#X msg 268 199 title b \, create \, 1;
+#X obj 223 158 b;
+#X obj 223 138 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 240 136 create window;
+#X text 405 85 You can have multiple window and display diffenrents
+things on each.;
+#X obj 268 241 gemwin 20 b;
+#X text 405 119 Basically \, use [gemwin fps context_name] to create
+a named context then use [gemhead context_name] to render to this context
+only.;
+#X obj 295 27 gemhead b;
+#X connect 2 0 1 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 0 0;
+#X connect 7 0 12 0;
+#X connect 8 0 6 0;
+#X connect 8 0 7 0;
+#X connect 9 0 8 0;
+#X connect 14 0 2 0;
diff --git a/Gem/examples/14.multiple_windows/02.switch_context.pd b/Gem/examples/14.multiple_windows/02.switch_context.pd
new file mode 100644
index 0000000..ac8f1c3
--- /dev/null
+++ b/Gem/examples/14.multiple_windows/02.switch_context.pd
@@ -0,0 +1,28 @@
+#N canvas 625 735 655 237 10;
+#X obj 33 129 gemwin 20 a;
+#X obj 396 181 square;
+#X obj 396 159 color 0 0 1 1;
+#X msg 33 87 title a \, create \, 1;
+#X obj 168 46 b;
+#X obj 168 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 168 129 gemwin 20 b;
+#X obj 396 137 gemhead a;
+#X msg 466 52 context b;
+#X msg 396 52 context a;
+#X text 185 24 1 create windows;
+#X text 411 24 2 switch between rendering context;
+#X msg 475 106 set \$1;
+#X floatatom 475 88 5 0 0 0 - - -, f 5;
+#X msg 168 87 title b \, create \, 1 \, view 1 1 6;
+#X connect 2 0 1 0;
+#X connect 3 0 0 0;
+#X connect 4 0 3 0;
+#X connect 4 0 14 0;
+#X connect 5 0 4 0;
+#X connect 7 0 2 0;
+#X connect 8 0 7 0;
+#X connect 9 0 7 0;
+#X connect 12 0 7 0;
+#X connect 13 0 12 0;
+#X connect 14 0 6 0;
diff --git a/Gem/examples/14.multiple_windows/03.texture_sharing.pd b/Gem/examples/14.multiple_windows/03.texture_sharing.pd
new file mode 100644
index 0000000..6c5fd71
--- /dev/null
+++ b/Gem/examples/14.multiple_windows/03.texture_sharing.pd
@@ -0,0 +1,38 @@
+#N canvas 224 736 1147 233 10;
+#X obj 33 169 gemwin 20 a;
+#X obj 396 181 square;
+#X msg 33 87 title a \, create \, 1;
+#X obj 168 46 b;
+#X obj 168 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 396 37 gemhead a;
+#X text 185 24 1 create windows;
+#X obj 396 104 pix_texture;
+#X obj 596 181 square;
+#X obj 596 155 pix_texture;
+#X obj 396 72 pix_image ../data/fractal.JPG;
+#X obj 596 59 translateXYZ 2 0 0;
+#X obj 596 37 gemhead b;
+#X msg 168 87 title b \, create \, 1;
+#X obj 168 169 gemwin 20 b;
+#X msg 596 4 context a;
+#X msg 669 4 context b;
+#X msg 90 118 destroy;
+#X text 729 90 on Linux \, this is only supported by [gemglxwindow]
+and [gemglutwindow].;
+#X connect 2 0 0 0;
+#X connect 3 0 2 0;
+#X connect 3 0 13 0;
+#X connect 4 0 3 0;
+#X connect 5 0 10 0;
+#X connect 7 0 1 0;
+#X connect 7 1 9 1;
+#X connect 9 0 8 0;
+#X connect 10 0 7 0;
+#X connect 11 0 9 0;
+#X connect 12 0 11 0;
+#X connect 13 0 14 0;
+#X connect 15 0 12 0;
+#X connect 16 0 12 0;
+#X connect 17 0 14 0;
+#X connect 17 0 0 0;
diff --git a/Gem/examples/99.games/puzzle.pd b/Gem/examples/99.games/puzzle.pd
new file mode 100644
index 0000000..d02322c
--- /dev/null
+++ b/Gem/examples/99.games/puzzle.pd
@@ -0,0 +1,158 @@
+#N canvas 14 64 584 223 12;
+#X obj 171 14 cnv 15 200 130 empty empty empty 20 12 0 14 -233017 -66577
+0;
+#X obj 258 30 bng 30 250 50 0 up y up 8 -8 192 12 -261681 -1 -1;
+#X obj 258 90 bng 30 250 50 0 down y down -5 38 192 12 -261681 -1 -1
+;
+#X obj 288 60 bng 30 250 50 0 right y right 33 15 192 12 -261681 -1
+-1;
+#X obj 228 60 bng 30 250 50 0 left y left -53 15 192 12 -261681 -1
+-1;
+#N canvas 133 127 818 527 code 0;
+#X obj 128 45 gemkeyname;
+#X obj 128 77 select 1;
+#X obj 128 104 symbol;
+#X msg 128 131 \$1 0;
+#X obj 411 229 r reset;
+#X obj 411 255 t b b;
+#X msg 505 229 bang;
+#X obj 418 194 gemwin;
+#X msg 415 132 create;
+#X msg 422 157 destroy;
+#X obj 501 147 tgl 30 0 empty empty empty 20 8 0 8 -262144 -1 -1 1
+1;
+#X obj 342 79 del 100;
+#X msg 342 130 1;
+#X obj 342 17 r start;
+#X msg 509 113 reset;
+#X obj 584 204 gemmouse;
+#X obj 617 239 s help;
+#X obj 342 45 t b b b;
+#X obj 342 103 t b b b;
+#N canvas 81 93 600 400 original 0;
+#X obj 86 109 gemhead;
+#X obj 86 345 square 4;
+#X obj 86 30 r help;
+#X obj 86 73 != 0;
+#X obj 173 45 loadbang;
+#X msg 173 68 0;
+#X obj 86 143 pix_image ../data/fractal.JPG;
+#X obj 86 272 pix_texture;
+#X connect 0 0 6 0;
+#X connect 2 0 3 0;
+#X connect 3 0 0 0;
+#X connect 4 0 5 0;
+#X connect 5 0 3 0;
+#X connect 6 0 7 0;
+#X connect 7 0 1 0;
+#X restore 445 390 pd original image;
+#N canvas 4 20 450 300 control 0;
+#X obj 149 48 route Left Right Up Down;
+#X msg 191 206 move \$1;
+#X msg 191 138 5;
+#X msg 149 138 4;
+#X msg 231 138 6;
+#X msg 192 111 8;
+#X msg 193 165 2;
+#X obj 48 98 r up;
+#X obj 47 167 r down;
+#X obj 0 129 r left;
+#X obj 71 131 r right;
+#X obj 194 256 outlet;
+#X obj 146 18 inlet;
+#X obj 295 109 inlet;
+#X connect 0 0 3 0;
+#X connect 0 1 4 0;
+#X connect 0 2 5 0;
+#X connect 0 3 6 0;
+#X connect 1 0 11 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 1 0;
+#X connect 5 0 1 0;
+#X connect 6 0 1 0;
+#X connect 7 0 5 0;
+#X connect 8 0 6 0;
+#X connect 9 0 3 0;
+#X connect 10 0 4 0;
+#X connect 12 0 0 0;
+#X connect 13 0 2 0;
+#X restore 128 276 pd control;
+#N canvas 113 141 600 498 puzzled 0;
+#X obj 120 110 gemhead;
+#X obj 120 415 square 4;
+#X floatatom 179 389 5 0 0 0 - - -;
+#X obj 120 309 pix_puzzle 4 4;
+#X msg 221 203 size 4 4;
+#X obj 120 213 pix_image;
+#X msg 153 175 open ../data/fractal.JPG;
+#X obj 204 97 loadbang;
+#X obj 204 125 t b b;
+#X obj 221 48 t b a;
+#X obj 341 56 t b b;
+#X obj 117 40 r help;
+#X obj 120 79 == 0;
+#X obj 37 27 loadbang;
+#X msg 38 52 0;
+#X obj 120 342 pix_texture;
+#X obj 343 27 inlet scramble!;
+#X obj 222 18 inlet move!;
+#X connect 0 0 5 0;
+#X connect 2 0 1 1;
+#X connect 3 0 15 0;
+#X connect 4 0 3 0;
+#X connect 5 0 3 0;
+#X connect 6 0 5 0;
+#X connect 7 0 8 0;
+#X connect 8 0 4 0;
+#X connect 8 1 6 0;
+#X connect 9 0 6 0;
+#X connect 9 1 3 0;
+#X connect 10 0 6 0;
+#X connect 10 1 3 0;
+#X connect 11 0 12 0;
+#X connect 12 0 0 0;
+#X connect 13 0 14 0;
+#X connect 14 0 12 0;
+#X connect 15 0 1 0;
+#X connect 16 0 10 0;
+#X connect 17 0 9 0;
+#X restore 128 390 pd puzzled image;
+#X obj 213 249 loadbang;
+#X text 116 439 we use [pix_puzzle] to scramble the image. this is
+not very effective (as we could use openGL-texture coordinates too).
+anyhow it is just simple;
+#X connect 0 0 1 0;
+#X connect 0 1 2 1;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 20 0;
+#X connect 4 0 5 0;
+#X connect 5 0 20 1;
+#X connect 5 1 21 1;
+#X connect 6 0 5 0;
+#X connect 8 0 7 0;
+#X connect 9 0 7 0;
+#X connect 10 0 7 0;
+#X connect 11 0 18 0;
+#X connect 12 0 7 0;
+#X connect 13 0 17 0;
+#X connect 14 0 7 0;
+#X connect 15 2 16 0;
+#X connect 17 0 11 0;
+#X connect 17 1 14 0;
+#X connect 17 2 9 0;
+#X connect 18 0 12 0;
+#X connect 18 1 8 0;
+#X connect 18 2 6 0;
+#X connect 20 0 21 0;
+#X connect 22 0 20 1;
+#X restore 420 99 pd code;
+#X obj 435 39 bng 50 250 50 0 reset empty RESET 0 -8 128 12 -258699
+-1 -1;
+#X obj 50 38 bng 50 250 50 0 start empty start 0 -8 128 12 -24198 -1
+-1;
+#X obj 257 60 tgl 30 0 help help ? 7 15 192 24 -262144 -258699 -1 0
+1;
+#X text 61 168 on linux you can use the arrow-keys too...;
+#X text 46 187 first mouse-button toggles between help/game;
diff --git a/Gem/examples/data/64shade.tif b/Gem/examples/data/64shade.tif
new file mode 100644
index 0000000..7091b2a
--- /dev/null
+++ b/Gem/examples/data/64shade.tif
Binary files differ
diff --git a/Gem/examples/data/COPYING.txt b/Gem/examples/data/COPYING.txt
new file mode 100644
index 0000000..a80de72
--- /dev/null
+++ b/Gem/examples/data/COPYING.txt
@@ -0,0 +1,89 @@
+COPYRIGHT issues of the examples data files
+===========================================
+
+This data is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+--------------------------------------------
+
+The contents of the examples/data folder provides data-files for
+showcase use within the pd/Gem environment.
+
+I try to only include files that are free to use (as in Free Speech
+and Free Beer).
+However, for legacy reasons some of the files here may have non-free
+clauses in their license agreements.
+These files will be removed from this package as soon as their
+problematic state is discovered.
+
+If you notice such a problematic case, please contact me
+(zmoelnig[AT]iem[DOT]at) immediately, so i can remove it and replace it
+by a free alternative.
+
+
+===========================================
+
+
+vera.ttf
+--------------------------------------------
+
+Bitstream Vera Fonts Copyright
+
+The fonts have a generous copyright, allowing derivative works (as
+long as "Bitstream" or "Vera" are not in the names), and full
+redistribution (so long as they are not *sold* by themselves). They
+can be be bundled, redistributed and sold with any software.
+
+The fonts are distributed under the following copyright:
+
+Copyright
+=========
+
+Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream
+Vera is a trademark of Bitstream, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the fonts accompanying this license ("Fonts") and associated
+documentation files (the "Font Software"), to reproduce and distribute
+the Font Software, including without limitation the rights to use,
+copy, merge, publish, distribute, and/or sell copies of the Font
+Software, and to permit persons to whom the Font Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright and trademark notices and this permission notice
+shall be included in all copies of one or more of the Font Software
+typefaces.
+
+The Font Software may be modified, altered, or added to, and in
+particular the designs of glyphs or characters in the Fonts may be
+modified and additional glyphs or characters may be added to the
+Fonts, only if the fonts are renamed to names not containing either
+the words "Bitstream" or the word "Vera".
+
+This License becomes null and void to the extent applicable to Fonts
+or Font Software that has been modified and is distributed under the
+"Bitstream Vera" names.
+
+The Font Software may be sold as part of a larger software package but
+no copy of one or more of the Font Software typefaces may be sold by
+itself.
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
+BITSTREAM OR THE GNOME FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT
+SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
+
+Except as contained in this notice, the names of Gnome, the Gnome
+Foundation, and Bitstream Inc., shall not be used in advertising or
+otherwise to promote the sale, use or other dealings in this Font
+Software without prior written authorization from the Gnome Foundation
+or Bitstream Inc., respectively. For further information, contact:
+fonts at gnome dot org.
+
diff --git a/Gem/examples/data/Toon.frag b/Gem/examples/data/Toon.frag
new file mode 100644
index 0000000..268bdab
--- /dev/null
+++ b/Gem/examples/data/Toon.frag
@@ -0,0 +1,61 @@
+//
+// Fragment shader for cartoon-style shading
+//
+// Author: Philip Rideout
+//
+// Copyright (c) 2005 3Dlabs Inc. Ltd.
+//
+/************************************************************************
+* *
+* Copyright (C) 2002-2006 3Dlabs Inc. Ltd. *
+* *
+* All rights reserved. *
+* *
+* Redistribution and use in source and binary forms, with or without *
+* modification, are permitted provided that the following conditions *
+* are met: *
+* *
+* Redistributions of source code must retain the above copyright *
+* notice, this list of conditions and the following disclaimer. *
+* *
+* Redistributions in binary form must reproduce the above *
+* copyright notice, this list of conditions and the following *
+* disclaimer in the documentation and/or other materials provided *
+* with the distribution. *
+* *
+* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
+* contributors may be used to endorse or promote products derived *
+* from this software without specific prior written permission. *
+* *
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
+* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+* POSSIBILITY OF SUCH DAMAGE. *
+* *
+************************************************************************/
+
+const vec3 DiffuseColor= vec3( 0.1,0.1,0.1);
+const vec3 PhongColor = vec3( 0.5,0.5,0.5);
+const float Edge= 0.2;
+uniform float Phong;
+varying vec3 Normal;
+
+void main (void)
+{
+ vec3 color = DiffuseColor;
+ float f = dot(vec3(0,0,1),Normal);
+ if (abs(f) < Edge)
+ color = vec3(0);
+ if (f > Phong)
+ color = PhongColor;
+
+ gl_FragColor = vec4(color, 1);
+}
diff --git a/Gem/examples/data/Toon.vert b/Gem/examples/data/Toon.vert
new file mode 100644
index 0000000..2f7d51c
--- /dev/null
+++ b/Gem/examples/data/Toon.vert
@@ -0,0 +1,54 @@
+//
+// Vertex shader for cartoon-style shading
+//
+// Author: Philip Rideout
+//
+// Copyright (c) 2005 3Dlabs Inc. Ltd.
+//
+//
+//
+/************************************************************************
+* *
+* Copyright (C) 2002-2006 3Dlabs Inc. Ltd. *
+* *
+* All rights reserved. *
+* *
+* Redistribution and use in source and binary forms, with or without *
+* modification, are permitted provided that the following conditions *
+* are met: *
+* *
+* Redistributions of source code must retain the above copyright *
+* notice, this list of conditions and the following disclaimer. *
+* *
+* Redistributions in binary form must reproduce the above *
+* copyright notice, this list of conditions and the following *
+* disclaimer in the documentation and/or other materials provided *
+* with the distribution. *
+* *
+* Neither the name of 3Dlabs Inc. Ltd. nor the names of its *
+* contributors may be used to endorse or promote products derived *
+* from this software without specific prior written permission. *
+* *
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT *
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS *
+* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE *
+* COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, *
+* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, *
+* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; *
+* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER *
+* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT *
+* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN *
+* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE *
+* POSSIBILITY OF SUCH DAMAGE. *
+* *
+************************************************************************/
+
+
+varying vec3 Normal;
+
+void main(void)
+{
+ Normal = normalize(gl_NormalMatrix * gl_Normal);
+ gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
+}
diff --git a/Gem/examples/data/alea.mpg b/Gem/examples/data/alea.mpg
new file mode 100644
index 0000000..adeb521
--- /dev/null
+++ b/Gem/examples/data/alea.mpg
Binary files differ
diff --git a/Gem/examples/data/anim-1.mov b/Gem/examples/data/anim-1.mov
new file mode 100644
index 0000000..40ebf9d
--- /dev/null
+++ b/Gem/examples/data/anim-1.mov
Binary files differ
diff --git a/Gem/examples/data/bitmap_font_6x8.bmp b/Gem/examples/data/bitmap_font_6x8.bmp
new file mode 100644
index 0000000..3a9fc0b
--- /dev/null
+++ b/Gem/examples/data/bitmap_font_6x8.bmp
Binary files differ
diff --git a/Gem/examples/data/blob0.tif b/Gem/examples/data/blob0.tif
new file mode 100644
index 0000000..f595a3c
--- /dev/null
+++ b/Gem/examples/data/blob0.tif
Binary files differ
diff --git a/Gem/examples/data/blob1.tif b/Gem/examples/data/blob1.tif
new file mode 100644
index 0000000..4f27652
--- /dev/null
+++ b/Gem/examples/data/blob1.tif
Binary files differ
diff --git a/Gem/examples/data/blob2.tif b/Gem/examples/data/blob2.tif
new file mode 100644
index 0000000..57debc5
--- /dev/null
+++ b/Gem/examples/data/blob2.tif
Binary files differ
diff --git a/Gem/examples/data/dancer.JPG b/Gem/examples/data/dancer.JPG
new file mode 100644
index 0000000..ba50f1a
--- /dev/null
+++ b/Gem/examples/data/dancer.JPG
Binary files differ
diff --git a/Gem/examples/data/ducks.png b/Gem/examples/data/ducks.png
new file mode 100644
index 0000000..1491078
--- /dev/null
+++ b/Gem/examples/data/ducks.png
Binary files differ
diff --git a/Gem/examples/data/fractal.JPG b/Gem/examples/data/fractal.JPG
new file mode 100644
index 0000000..330b82c
--- /dev/null
+++ b/Gem/examples/data/fractal.JPG
Binary files differ
diff --git a/Gem/examples/data/fractalAlpha.TIF b/Gem/examples/data/fractalAlpha.TIF
new file mode 100644
index 0000000..754ccdf
--- /dev/null
+++ b/Gem/examples/data/fractalAlpha.TIF
Binary files differ
diff --git a/Gem/examples/data/homer.avi b/Gem/examples/data/homer.avi
new file mode 100644
index 0000000..f27ec00
--- /dev/null
+++ b/Gem/examples/data/homer.avi
Binary files differ
diff --git a/Gem/examples/data/random.fp b/Gem/examples/data/random.fp
new file mode 100644
index 0000000..651fdeb
--- /dev/null
+++ b/Gem/examples/data/random.fp
@@ -0,0 +1,111 @@
+!!ARBfp1.0
+# Based on an algorithm described by Francois Grieu, sci.crypt, 5th February 2004
+#ATTRIB tex0 = fragment.texcoord[0];
+ATTRIB tex0 = fragment.position;
+ATTRIB col = fragment.color;
+
+#PARAM bounds = program.local[1];
+#PARAM seed = program.local[2];
+PARAM bounds = 10.0;
+PARAM seed = 1234;
+PARAM coordsOffset = { -100, 100, 0, 0 };
+PARAM cMult = 0.0001002707309736288;
+PARAM aSubtract = 0.2727272727272727;
+PARAM coordMult0 = { 0.67676, 0.000058758, 0, 0 };
+PARAM coordMult1 = { 0.0000696596, 0.797976, 0, 0 };
+PARAM coordMult2 = { 0.587976, 0.0000233443, 0, 0 };
+
+TEMP tableCoord, a, b, c, floorA, seedCoords, res;
+
+ADD seedCoords, tex0, coordsOffset;
+
+# gFastRngA = (((currentX*multX)/(currentY*multY))+
+MUL tableCoord, seedCoords, coordMult0;
+RCP tableCoord.y, tableCoord.y;
+MUL a.x, tableCoord.x, tableCoord.y;
+
+# (((height-currentY)*multX2)/((width-currentX)*multY2))+
+SUB tableCoord, bounds, seedCoords;
+MUL tableCoord, tableCoord, coordMult1;
+RCP tableCoord.x, tableCoord.x;
+MAD a.x, tableCoord.x, tableCoord.y, a.x;
+
+# (((height-currentX)*multX3)/((width-currentY)*multY3)));
+SUB tableCoord.x, bounds.y, seedCoords.x;
+SUB tableCoord.y, bounds.x, seedCoords.y;
+MUL tableCoord, tableCoord, coordMult2;
+RCP tableCoord.y, tableCoord.y;
+MAD a.x, tableCoord.x, tableCoord.y, a.x;
+
+# gFastRngA = fmod(gFastRngA,1);
+FRC a.x, a.x;
+ADD a.x, a.x, seed;
+
+MOV c.x, 0;
+MOV b.x, 0;
+
+# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
+FRC floorA.x, a.x;
+SUB floorA.x, a.x, floorA.x;
+SUB floorA.x, aSubtract.x, floorA.x;
+ADD floorA.x, floorA.x, a.x;
+MAD a.x, c.x, cMult.x, floorA.x;
+
+# (gFastRngB += (gFastRngA *= gFastRngA))
+MUL a.x, a.x, a.x;
+ADD b.x, b.x, a.x;
+
+# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
+FRC b.x, b.x;
+ADD c.x, c.x, b.x;
+
+# (gFastRngC -= floor(gFastRngC))
+FRC c.x, c.x;
+
+# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
+FRC floorA.x, a.x;
+SUB floorA.x, a.x, floorA.x;
+SUB floorA.x, aSubtract.x, floorA.x;
+ADD floorA.x, floorA.x, a.x;
+MAD a.x, c.x, cMult.x, floorA.x;
+
+# (gFastRngB += (gFastRngA *= gFastRngA))
+MUL a.x, a.x, a.x;
+ADD b.x, b.x, a.x;
+
+# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
+FRC b.x, b.x;
+ADD c.x, c.x, b.x;
+
+# (gFastRngC -= floor(gFastRngC))
+FRC c.x, c.x;
+
+# (gFastRngA += gFastRngC*(1./9973)+(3./11)-floor(gFastRngA))
+FRC floorA.x, a.x;
+SUB floorA.x, a.x, floorA.x;
+SUB floorA.x, aSubtract.x, floorA.x;
+ADD floorA.x, floorA.x, a.x;
+MAD a.x, c.x, cMult.x, floorA.x;
+
+# (gFastRngB += (gFastRngA *= gFastRngA))
+MUL a.x, a.x, a.x;
+ADD b.x, b.x, a.x;
+
+# (gFastRngC += (gFastRngB -= floor(gFastRngB)))
+FRC b.x, b.x;
+ADD c.x, c.x, b.x;
+
+# (gFastRngC -= floor(gFastRngC))
+FRC c.x, c.x;
+
+
+MOV res, c.x;
+MOV res.a, 1;
+
+MUL res, res, -0.5;
+
+ADD res, res, col;
+
+MOV result.color, res;
+
+END
diff --git a/Gem/examples/data/temp0.JPG b/Gem/examples/data/temp0.JPG
new file mode 100644
index 0000000..ba50f1a
--- /dev/null
+++ b/Gem/examples/data/temp0.JPG
Binary files differ
diff --git a/Gem/examples/data/temp1.JPG b/Gem/examples/data/temp1.JPG
new file mode 100644
index 0000000..330b82c
--- /dev/null
+++ b/Gem/examples/data/temp1.JPG
Binary files differ
diff --git a/Gem/examples/data/temp2.JPG b/Gem/examples/data/temp2.JPG
new file mode 100644
index 0000000..0152c1b
--- /dev/null
+++ b/Gem/examples/data/temp2.JPG
Binary files differ
diff --git a/Gem/examples/data/toon.vp b/Gem/examples/data/toon.vp
new file mode 100644
index 0000000..621670b
--- /dev/null
+++ b/Gem/examples/data/toon.vp
@@ -0,0 +1,36 @@
+!!ARBvp1.0
+
+# Toon Shader by James A. McCombe, Tue Jun 17 2003
+#
+# Implements a very crude toon shader. Basically, a simple dot product between a
+# light direction vector and the vertex normal is performed. The output of this is
+# used to set the texture coordinates to lookup inside a special texture which
+# effectively quantises the light intensity into 3 bands.
+#
+# Parameters:
+# program.env[0] - Light direction vector
+
+ATTRIB vPosition = vertex.position;
+ATTRIB vNormal = vertex.normal;
+
+PARAM lightDirection = program.env[0];
+
+TEMP t0, transVertex;
+
+DP4 result.position.x, state.matrix.mvp.row[0], vPosition;
+DP4 result.position.y, state.matrix.mvp.row[1], vPosition;
+DP4 result.position.z, state.matrix.mvp.row[2], vPosition;
+DP4 result.position.w, state.matrix.mvp.row[3], vPosition;
+
+DP3 t0.x, state.matrix.modelview[0].invtrans.row[0], vNormal;
+DP3 t0.z, state.matrix.modelview[0].invtrans.row[1], vNormal;
+DP3 t0.y, state.matrix.modelview[0].invtrans.row[2], vNormal;
+
+# Dot product of normal and light vector to do tone lookup
+DP3 t0, t0, lightDirection;
+SWZ result.texcoord[0], t0, x,1,1,1;
+
+# Write the primary vertex color
+MOV result.color, vertex.color;
+
+END
diff --git a/Gem/examples/data/valcolor.tab b/Gem/examples/data/valcolor.tab
new file mode 100644
index 0000000..43a8523
--- /dev/null
+++ b/Gem/examples/data/valcolor.tab
@@ -0,0 +1,6 @@
+0. 0. 0.
+1. 1. 1.
+.5 .0 1.
+0. 1. 0.
+1. 1. 1.
+0. 0. 0.
diff --git a/Gem/examples/data/valmotion.tab b/Gem/examples/data/valmotion.tab
new file mode 100644
index 0000000..1a3f2ac
--- /dev/null
+++ b/Gem/examples/data/valmotion.tab
@@ -0,0 +1,8 @@
+0. 0. 0.
+0. 0. 0.
+2. 2. -2.
+-3. -1. .5
+-2. 4. -1.
+.5 -.5 0.
+0. 0. 0.
+0. 0. 0.
diff --git a/Gem/examples/data/venus.mtl b/Gem/examples/data/venus.mtl
new file mode 100644
index 0000000..dc43199
--- /dev/null
+++ b/Gem/examples/data/venus.mtl
@@ -0,0 +1,9 @@
+#
+# venus.mtl
+#
+
+newmtl vskin
+Ka 0.6 0.6 0.45
+Kd 0.6 0.6 0.45
+Ks 0.2 0.1 0.1
+Ns 5.0
diff --git a/Gem/examples/data/venus.obj b/Gem/examples/data/venus.obj
new file mode 100644
index 0000000..1dc1749
--- /dev/null
+++ b/Gem/examples/data/venus.obj
@@ -0,0 +1,2147 @@
+# Tue Oct 22 14:45:37 1991
+#
+#
+
+mtllib venus.mtl
+
+g default
+v -27.430000 147.320007 -3.300000
+v -30.480000 135.380005 -9.400000
+v -21.590000 150.619995 -15.490000
+v -26.670000 129.789993 3.300000
+v -24.129999 142.490005 13.460000
+v -15.240000 124.459999 12.450000
+v -13.970000 135.889999 19.049999
+v -18.799999 114.050003 6.350000
+v -31.500000 120.400002 -1.520000
+v -35.810001 128.020004 -13.720000
+v -27.180000 138.429993 -22.610001
+v -35.310001 130.809998 -28.959999
+v -23.879999 140.460007 -27.690001
+v -16.510000 142.240005 -28.450001
+v -13.720000 151.380005 -18.030001
+v -19.049999 134.869995 -38.860001
+v -30.990000 132.330002 -36.830002
+v -8.130000 143.000000 -26.670000
+v -4.320000 138.940002 -31.750000
+v -9.650000 150.110001 -18.799999
+v -40.889999 126.489998 -32.509998
+v -5.840000 149.610001 -15.490000
+v -0.760000 140.210007 -18.799999
+v 0.760000 138.429993 -5.590000
+v 0.250000 145.289993 -3.810000
+v 4.570000 130.050003 -7.870000
+v 0.000000 132.080002 4.830000
+v -0.510000 139.190002 8.890000
+v 2.030000 137.919998 -24.129999
+v 2.790000 135.639999 -34.040001
+v 8.640000 133.600006 -21.080000
+v 0.250000 134.369995 -39.119999
+v -6.100000 142.750000 2.540000
+v -12.190000 145.800003 -7.370000
+v -6.100000 138.940002 11.680000
+v -14.990000 143.759995 4.060000
+v -12.950000 138.679993 16.260000
+v -25.910000 147.830002 -1.020000
+v -21.590000 148.839996 -5.840000
+v -41.150002 125.980003 -25.150000
+v 9.910000 131.830002 -39.619999
+v -20.570000 129.289993 -45.209999
+v -9.910000 124.709999 -48.509998
+v 3.050000 129.289993 -45.209999
+v 18.030001 127.250000 -43.430000
+v 31.500000 124.970001 -35.560001
+v 29.209999 127.000000 -26.420000
+v 10.670000 133.860001 -30.230000
+v 41.660000 121.669998 -27.690001
+v 38.610001 123.699997 -20.070000
+v 26.420000 125.480003 -17.020000
+v 24.889999 120.139999 -9.140000
+v 35.810001 121.160004 -10.920000
+v 0.760000 121.410004 1.270000
+v -6.350000 116.330002 5.080000
+v -6.350000 126.489998 10.410000
+v -7.370000 135.380005 15.490000
+v 38.099998 114.809998 -4.830000
+v 24.889999 110.489998 -1.780000
+v 10.670000 109.220001 4.830000
+v 8.890000 100.330002 9.400000
+v -5.840000 99.059998 11.680000
+v -13.720000 105.160004 9.650000
+v -32.770000 107.190002 5.590000
+v -24.639999 103.629997 9.400000
+v -22.350000 93.980003 13.460000
+v -34.290001 98.040001 9.650000
+v -44.959999 105.160004 1.020000
+v -51.820000 111.760002 -9.140000
+v -52.070000 114.550003 -17.270000
+v -60.709999 108.709999 -16.000000
+v -51.560001 116.589996 -26.160000
+v -58.419998 111.250000 -27.180000
+v -50.040001 118.110001 -34.290001
+v -46.480000 118.110001 -43.689999
+v -55.880001 112.519997 -36.070000
+v -34.799999 117.860001 -52.320000
+v -59.180000 98.550003 0.510000
+v -63.750000 103.120003 -5.840000
+v -53.340000 91.190002 5.840000
+v -47.240002 92.459999 7.620000
+v -41.400002 92.959999 9.910000
+v -36.580002 88.650002 12.950000
+v -46.740002 87.629997 9.140000
+v -30.990000 81.029999 16.000000
+v -19.559999 80.769997 17.530001
+v -4.830000 85.849998 16.000000
+v 6.860000 90.169998 13.970000
+v 18.290001 88.900002 12.190000
+v 19.559999 100.839996 6.350000
+v 28.190001 96.010002 5.840000
+v 33.020000 103.889999 0.760000
+v 44.700001 106.169998 -4.570000
+v 37.080002 98.040001 0.510000
+v 49.279999 97.790001 -6.100000
+v 51.820000 106.930000 -14.730000
+v 46.230000 116.589996 -13.460000
+v 41.150002 120.400002 -12.700000
+v 46.480000 118.360001 -18.799999
+v 51.049999 110.739998 -21.590000
+v 43.939999 116.330002 -34.290001
+v 34.799999 118.870003 -42.419998
+v 26.670000 118.620003 -48.259998
+v 9.140000 116.839996 -55.880001
+v 1.270000 117.599998 -55.119999
+v -4.320000 118.620003 -52.830002
+v -24.379999 119.889999 -51.560001
+v -9.650000 109.980003 -54.860001
+v -7.110000 109.220001 -55.880001
+v -12.950000 109.220001 -55.119999
+v -29.209999 106.169998 -58.930000
+v -24.639999 106.930000 -58.169998
+v -38.349998 104.389999 -56.389999
+v -48.259998 99.820000 -51.049999
+v -56.389999 101.089996 -44.200001
+v -60.450001 106.680000 -36.580002
+v -63.500000 99.059998 -36.070000
+v -64.769997 103.889999 -26.670000
+v -67.559998 101.089996 -14.730000
+v -68.830002 92.459999 -23.370001
+v -72.139999 88.139999 -10.160000
+v 1.780000 109.730003 -59.180000
+v 7.110000 109.220001 -59.939999
+v 18.290001 106.430000 -57.400002
+v 30.230000 104.900002 -52.070000
+v 37.590000 103.120003 -46.230000
+v 44.959999 102.110001 -42.419998
+v 51.049999 93.470001 -38.860001
+v 55.880001 98.040001 -24.889999
+v 56.639999 96.519997 -18.799999
+v 56.130001 94.739998 -14.730000
+v 53.340000 91.949997 -10.160000
+v -66.550003 93.980003 -0.760000
+v -59.180000 86.610001 5.330000
+v -54.099998 79.760002 4.830000
+v -49.529999 80.260002 4.570000
+v -45.470001 79.760002 9.140000
+v -41.910000 84.839996 11.940000
+v 5.080000 80.260002 16.000000
+v 29.209999 88.650002 7.620000
+v 44.200001 92.959999 -4.060000
+v 36.580002 92.459999 -0.510000
+v -61.470001 80.260002 4.830000
+v -67.559998 76.449997 1.780000
+v -71.370003 77.220001 -2.030000
+v -71.879997 72.900002 -14.480000
+v -71.120003 82.040001 -19.299999
+v -66.800003 83.309998 -30.730000
+v -61.470001 92.459999 -39.619999
+v -59.689999 87.879997 -39.880001
+v -53.849998 87.879997 -45.470001
+v -47.500000 86.610001 -52.070000
+v -63.500000 79.500000 -33.529999
+v -63.250000 69.089996 -2.030000
+v -63.250000 74.419998 4.320000
+v -57.660000 70.870003 5.590000
+v -58.930000 67.059998 1.780000
+v -55.880001 75.440002 5.590000
+v -45.209999 70.099998 4.060000
+v -51.049999 68.070000 4.830000
+v -52.320000 66.800003 5.080000
+v -54.860001 61.720001 -1.520000
+v -56.130001 60.709999 -12.950000
+v -49.779999 60.450001 0.510000
+v -53.849998 57.150002 -7.870000
+v -49.020000 54.360001 -6.100000
+v -42.669998 54.099998 -4.570000
+v -45.209999 62.990002 2.540000
+v -39.619999 76.709999 12.700000
+v -32.000000 72.900002 20.320000
+v -38.099998 69.849998 17.270000
+v -40.889999 65.790001 13.970000
+v -41.400002 61.980000 12.700000
+v -41.400002 54.860001 3.810000
+v -24.129999 73.150002 21.340000
+v -18.799999 73.150002 20.830000
+v -10.410000 75.949997 18.030001
+v -3.300000 77.980003 16.260000
+v 11.430000 77.470001 17.780001
+v 17.530001 77.720001 18.799999
+v 22.860001 83.059998 15.750000
+v 28.959999 84.839996 11.180000
+v 34.040001 85.339996 2.540000
+v 34.799999 85.849998 -4.830000
+v 44.700001 84.330002 -7.110000
+v 50.549999 76.199997 -10.920000
+v 56.900002 81.279999 -15.750000
+v 58.669998 85.599998 -22.860001
+v 35.810001 75.180000 -8.890000
+v 32.770000 82.040001 8.130000
+v 32.259998 79.500000 12.700000
+v 29.459999 80.010002 15.240000
+v 24.889999 76.449997 19.049999
+v 16.000000 72.900002 19.299999
+v 8.130000 72.139999 17.530001
+v 1.270000 67.309998 15.750000
+v -4.060000 66.550003 15.750000
+v -14.480000 63.750000 22.100000
+v -17.020000 68.580002 22.860001
+v -21.840000 66.550003 24.129999
+v -21.080000 57.910000 23.879999
+v -29.209999 59.689999 24.639999
+v -29.459999 65.790001 24.379999
+v -34.040001 67.059998 22.860001
+v -36.320000 65.790001 21.340000
+v -37.590000 64.010002 20.570000
+v -37.590000 61.720001 20.320000
+v -39.880001 56.639999 12.950000
+v -37.080002 59.439999 20.070000
+v -32.000000 53.849998 19.809999
+v -33.270000 57.910000 22.610001
+v -27.180000 55.119999 22.610001
+v -35.310001 49.529999 10.410000
+v -35.810001 46.480000 1.780000
+v -42.930000 51.560001 -16.260000
+v -29.459999 48.770000 16.000000
+v -17.270000 52.320000 19.049999
+v -12.450000 58.169998 19.299999
+v -4.830000 57.150002 13.210000
+v -0.250000 53.849998 11.430000
+v -34.540001 61.980000 23.879999
+v 2.790000 58.419998 12.950000
+v 9.910000 64.519997 16.510000
+v 17.270000 68.580002 19.049999
+v 24.129999 73.910004 20.070000
+v 29.719999 76.449997 17.780001
+v 32.770000 73.910004 13.970000
+v 30.230000 71.879997 16.260000
+v 26.160000 72.389999 19.049999
+v 34.799999 78.230003 6.600000
+v 34.540001 71.879997 8.380000
+v 36.070000 73.410004 1.020000
+v 35.049999 74.169998 -4.570000
+v 57.400002 89.150002 -28.450001
+v 57.150002 85.599998 -28.959999
+v 49.020000 74.169998 -23.620001
+v 43.180000 74.169998 -33.529999
+v 52.320000 86.360001 -37.590000
+v 44.450001 84.839996 -42.930000
+v 43.430000 94.739998 -43.430000
+v -8.130000 52.070000 12.700000
+v -48.509998 53.849998 -14.730000
+v -48.770000 58.419998 -21.590000
+v -56.389999 64.769997 -28.190001
+v -47.750000 67.559998 -43.939999
+v -54.099998 79.760002 -37.080002
+v -45.470001 60.959999 -25.400000
+v -60.709999 67.820000 -28.959999
+v -64.769997 69.339996 -26.670000
+v -67.820000 74.169998 -26.920000
+v -59.939999 78.989998 -35.049999
+v -56.130001 72.900002 -32.509998
+v -49.779999 79.250000 -47.240002
+v -37.340000 95.000000 -58.930000
+v -41.150002 79.500000 -56.389999
+v -32.259998 92.199997 -60.959999
+v -24.379999 92.459999 -60.959999
+v -11.430000 94.489998 -58.930000
+v -6.600000 96.010002 -59.180000
+v 2.540000 100.080002 -61.720001
+v 5.590000 100.580002 -61.720001
+v 15.750000 99.059998 -59.939999
+v -36.830002 68.070000 -57.150002
+v -28.190001 72.900002 -61.720001
+v -19.299999 81.529999 -61.720001
+v -9.910000 84.330002 -60.709999
+v -4.570000 84.580002 -61.470001
+v 5.590000 87.379997 -63.250000
+v 13.970000 85.089996 -62.740002
+v 11.430000 69.339996 -62.740002
+v 3.300000 71.629997 -64.010002
+v -3.300000 70.870003 -62.740002
+v -7.370000 70.099998 -62.230000
+v -16.000000 64.769997 -63.750000
+v -25.150000 60.959999 -63.250000
+v -33.529999 57.660000 -59.439999
+v -42.930000 62.230000 -44.450001
+v -38.610001 41.910000 -5.840000
+v -36.070000 34.040001 -7.870000
+v -40.389999 49.020000 -23.110001
+v -34.290001 25.400000 -11.430000
+v -37.340000 31.240000 -28.190001
+v -35.560001 40.130001 -43.180000
+v -34.799999 52.320000 -53.590000
+v -29.209999 43.939999 -57.660000
+v -22.100000 46.990002 -63.250000
+v -15.490000 49.279999 -62.990002
+v -6.600000 52.580002 -63.500000
+v -2.790000 51.820000 -64.260002
+v 4.060000 51.820000 -65.279999
+v 10.160000 48.509998 -64.010002
+v 3.050000 30.730000 -61.209999
+v 8.640000 26.420000 -60.200001
+v -0.760000 31.500000 -59.439999
+v -6.100000 31.240000 -60.200001
+v -13.720000 28.700001 -59.180000
+v -19.299999 27.180000 -60.959999
+v -28.190001 22.860001 -53.340000
+v -33.270000 21.590000 -44.450001
+v 2.290000 6.860000 -53.849998
+v -2.290000 12.950000 -53.090000
+v -11.940000 12.950000 -55.880001
+v -22.350000 14.220000 -57.150002
+v 37.340000 96.519997 -43.939999
+v 36.070000 90.419998 -42.160000
+v 35.810001 80.769997 -40.130001
+v 40.130001 80.010002 -41.660000
+v 34.290001 73.150002 -37.849998
+v 35.810001 64.519997 -27.940001
+v 31.240000 82.300003 -51.310001
+v 29.209999 64.519997 -50.799999
+v 33.270000 92.709999 -48.770000
+v 27.430000 96.010002 -55.369999
+v 24.379999 82.550003 -59.689999
+v 20.830000 66.800003 -58.930000
+v 19.299999 52.830002 -60.959999
+v 28.959999 52.580002 -51.049999
+v 28.959999 46.230000 -49.779999
+v 18.290001 44.450001 -60.200001
+v 36.830002 53.849998 -29.719999
+v 37.849998 53.340000 -23.620001
+v 36.830002 65.279999 -13.720000
+v 38.099998 52.830002 -16.260000
+v 36.830002 41.400002 -30.230000
+v 37.849998 39.369999 -20.570000
+v 47.500000 72.139999 -16.510000
+v 36.070000 69.339996 -10.410000
+v 35.310001 67.309998 -4.570000
+v 32.770000 63.500000 5.590000
+v 29.719999 67.059998 13.460000
+v 21.340000 65.019997 17.530001
+v 17.780001 57.910000 13.210000
+v 6.860000 54.610001 11.430000
+v 28.190001 59.939999 8.130000
+v 33.020000 58.930000 -1.780000
+v 29.719999 55.880001 1.270000
+v 23.620001 53.340000 6.350000
+v 16.510000 52.320000 9.140000
+v -11.940000 48.009998 12.700000
+v -18.799999 44.200001 11.430000
+v 36.580002 51.560001 -10.160000
+v 31.240000 48.259998 -2.290000
+v 24.379999 42.669998 3.560000
+v 19.049999 34.290001 6.350000
+v 14.220000 33.020000 8.890000
+v 2.030000 40.389999 10.920000
+v -10.160000 34.540001 11.430000
+v 3.300000 29.719999 8.380000
+v -10.920000 25.650000 9.140000
+v -2.290000 20.570000 5.330000
+v 11.180000 20.570000 5.330000
+v -9.650000 18.799999 5.080000
+v 18.030001 21.080000 2.030000
+v 25.400000 27.430000 -1.520000
+v 26.920000 35.310001 0.000000
+v 31.750000 36.070000 -4.830000
+v 36.580002 38.349998 -13.460000
+v -25.400000 43.430000 9.400000
+v -17.530001 30.230000 8.640000
+v -23.110001 35.810001 7.110000
+v -18.799999 17.270000 1.520000
+v -24.639999 28.959999 3.810000
+v -29.459999 21.080000 -4.570000
+v -31.750000 29.969999 -2.030000
+v -31.500000 37.849998 1.270000
+v 18.540001 15.490000 1.020000
+v 24.889999 17.270000 -5.080000
+v 33.020000 23.370001 -13.210000
+v 36.070000 27.940001 -18.540001
+v -2.790000 14.220000 5.080000
+v 11.430000 11.180000 3.560000
+v 6.100000 12.450000 4.320000
+v 34.540001 17.270000 -20.070000
+v 34.540001 22.100000 -30.990000
+v 36.070000 32.770000 -30.990000
+v 28.450001 33.020000 -47.750000
+v -9.400000 13.970000 5.080000
+v 33.529999 1.270000 -11.680000
+v 39.369999 -1.520000 -19.049999
+v 24.379999 8.890000 -6.350000
+v 19.049999 6.860000 -1.020000
+v 13.210000 5.840000 2.790000
+v 7.620000 4.320000 3.560000
+v 4.060000 7.110000 3.560000
+v -1.270000 5.080000 3.050000
+v -9.140000 3.300000 5.330000
+v -14.480000 5.590000 4.060000
+v -22.350000 11.430000 -1.020000
+v -28.700001 16.000000 -5.080000
+v -36.070000 13.720000 -13.460000
+v -27.430000 7.870000 -4.830000
+v -39.119999 -2.540000 -4.570000
+v -47.500000 -6.600000 -12.190000
+v -22.100000 5.590000 -0.760000
+v -26.420000 -2.030000 0.000000
+v -42.930000 -10.920000 -3.560000
+v -37.340000 -13.970000 1.020000
+v -23.879999 -19.049999 7.870000
+v -18.030001 -10.410000 8.380000
+v -15.490000 -0.510000 5.840000
+v -9.400000 -1.780000 7.110000
+v -9.400000 -11.680000 10.410000
+v -10.160000 -22.350000 11.180000
+v 1.270000 -11.940000 9.400000
+v -5.080000 -5.840000 8.130000
+v -4.570000 -1.270000 5.840000
+v -3.810000 1.270000 3.810000
+v 2.290000 4.060000 1.520000
+v 4.060000 3.050000 2.030000
+v 4.320000 -1.020000 3.560000
+v 6.600000 -2.540000 5.840000
+v -0.250000 -3.810000 5.080000
+v 0.250000 0.760000 0.000000
+v 14.730000 0.760000 4.060000
+v 19.809999 -2.030000 1.780000
+v 27.690001 -6.600000 -3.560000
+v 36.320000 -10.410000 -9.400000
+v 41.660000 -13.460000 -16.260000
+v 32.259998 -16.000000 -3.560000
+v 26.160000 -19.809999 0.760000
+v 20.570000 -14.730000 4.830000
+v 17.530001 -9.650000 5.840000
+v 14.220000 -6.350000 6.860000
+v 8.890000 -9.140000 8.640000
+v 11.940000 -15.750000 9.140000
+v 2.790000 -22.860001 10.670000
+v 12.190000 -29.969999 8.380000
+v 21.080000 -27.690001 4.060000
+v 38.610001 4.320000 -31.500000
+v 42.419998 -12.190000 -29.719999
+v 43.430000 -23.879999 -14.730000
+v 44.959999 -25.650000 -26.670000
+v 47.240002 -39.369999 -23.620001
+v 46.480000 -40.389999 -10.920000
+v 46.990002 -56.389999 -6.350000
+v 48.770000 -62.230000 -17.780001
+v 43.689999 -44.700001 -4.060000
+v 39.880001 -35.560001 -3.560000
+v 37.340000 -24.129999 -5.840000
+v 28.450001 -25.910000 0.000000
+v 32.509998 -36.320000 1.020000
+v 34.799999 -42.930000 1.520000
+v 25.400000 -41.400002 4.320000
+v 23.370001 -32.770000 3.560000
+v 14.220000 -38.349998 7.370000
+v 16.760000 -42.669998 6.600000
+v 4.830000 -31.500000 10.410000
+v 7.620000 -43.689999 9.650000
+v -1.020000 -45.470001 10.920000
+v -10.670000 -32.259998 10.670000
+v -9.650000 -45.720001 10.920000
+v -22.100000 -41.910000 9.140000
+v -15.750000 -49.279999 10.410000
+v -28.190001 -46.990002 8.890000
+v -29.459999 -30.990000 6.600000
+v -33.529999 -25.650000 4.830000
+v -36.580002 -29.969999 4.830000
+v -45.970001 -21.840000 -2.540000
+v -51.560001 -21.590000 -8.640000
+v -50.799999 -9.910000 -18.799999
+v -46.230000 1.520000 -31.500000
+v -42.419998 7.870000 -23.879999
+v -38.099998 18.030001 -32.259998
+v -55.369999 -40.639999 -5.840000
+v -56.389999 -37.080002 -12.190000
+v -49.020000 -39.369999 1.020000
+v -49.529999 -48.770000 3.300000
+v -57.400002 -57.660000 -3.560000
+v -37.590000 -43.939999 8.130000
+v -35.810001 -57.400002 14.220000
+v -41.150002 10.410000 -41.660000
+v -52.320000 -19.049999 -29.459999
+v -53.849998 -22.100000 -14.990000
+v -54.360001 -31.240000 -26.920000
+v -49.279999 -25.650000 -44.959999
+v -54.360001 -45.209999 -36.320000
+v -46.740002 -12.450000 -45.209999
+v -41.150002 3.560000 -44.700001
+v -29.969999 13.460000 -51.049999
+v -35.310001 4.570000 -50.040001
+v -25.910000 5.590000 -53.849998
+v -30.480000 -4.570000 -55.630001
+v -40.889999 -8.380000 -51.310001
+v -45.470001 -24.379999 -50.799999
+v -45.970001 -34.799999 -51.310001
+v -41.150002 -24.639999 -54.860001
+v -39.880001 -38.610001 -58.669998
+v -29.969999 -28.190001 -60.450001
+v -30.230000 -16.000000 -57.660000
+v 15.240000 18.030001 -56.389999
+v 28.190001 18.540001 -45.970001
+v 21.590000 12.700000 -52.580002
+v 26.670000 2.540000 -51.049999
+v 8.380000 7.110000 -55.880001
+v -4.570000 6.860000 -53.340000
+v -13.970000 5.840000 -54.860001
+v -18.799999 7.110000 -55.369999
+v -25.150000 -1.520000 -54.610001
+v -18.799999 -25.150000 -60.709999
+v -21.840000 -34.040001 -61.720001
+v -19.299999 -18.030001 -59.939999
+v -24.639999 -12.450000 -57.400002
+v -20.320000 -2.540000 -55.369999
+v -14.730000 -3.810000 -55.630001
+v -8.890000 -4.830000 -55.369999
+v -1.270000 -5.330000 -54.610001
+v 8.380000 0.000000 -55.369999
+v 12.950000 3.810000 -55.369999
+v 20.070000 -4.060000 -53.590000
+v 27.940001 -8.640000 -52.070000
+v 19.809999 -17.020000 -58.169998
+v 26.920000 -20.570000 -56.130001
+v 33.529999 -22.350000 -50.799999
+v 33.020000 -13.210000 -48.009998
+v 10.160000 -21.590000 -58.669998
+v 2.540000 -16.760000 -57.660000
+v -4.570000 -13.210000 -56.900002
+v -13.460000 -16.760000 -58.669998
+v -17.780001 -11.430000 -57.400002
+v -8.890000 -27.430000 -59.439999
+v 2.790000 -30.480000 -59.939999
+v 17.530001 -26.420000 -60.709999
+v 24.129999 -35.560001 -59.689999
+v 32.259998 -30.480000 -52.830002
+v 12.450000 -41.910000 -65.019997
+v 20.320000 -50.290001 -62.990002
+v 0.510000 -47.750000 -64.519997
+v -4.060000 -38.099998 -58.669998
+v -9.650000 -34.040001 -58.169998
+v -14.480000 -31.750000 -59.689999
+v -16.760000 -38.349998 -61.209999
+v 35.310001 -1.020000 -41.910000
+v 32.509998 -4.060000 -47.240002
+v 36.580002 -15.750000 -44.200001
+v 40.639999 -20.320000 -38.610001
+v 37.849998 -24.889999 -44.450001
+v 40.889999 -41.400002 -39.619999
+v -9.650000 -44.200001 -56.389999
+v -21.840000 -38.349998 -62.740002
+v -29.719999 -39.119999 -62.740002
+v 28.450001 -41.400002 -55.880001
+v 25.910000 -53.590000 -58.419998
+v 16.000000 -62.480000 -65.019997
+v 4.830000 -57.910000 -67.059998
+v 13.460000 -54.610001 -66.550003
+v 6.600000 -65.019997 -66.290001
+v 9.400000 -69.599998 -65.019997
+v 11.430000 -74.169998 -62.480000
+v 23.370001 -73.150002 -57.660000
+v 13.970000 -80.260002 -57.910000
+v 19.299999 -82.300003 -53.590000
+v 24.889999 -83.570000 -48.009998
+v 30.480000 -74.419998 -48.770000
+v 41.400002 -60.959999 -36.320000
+v 48.770000 -73.150002 -15.240000
+v 41.150002 -75.690002 -33.020000
+v 37.080002 -75.440002 -39.119999
+v 26.670000 -86.360001 -44.700001
+v 32.259998 -90.419998 -38.349998
+v 41.660000 -84.580002 -30.480000
+v 43.180000 -92.459999 -27.430000
+v 50.040001 -82.800003 -11.180000
+v 35.810001 -48.509998 2.540000
+v 43.939999 -68.580002 7.370000
+v 48.009998 -73.660004 1.520000
+v 50.040001 -94.489998 12.950000
+v -14.480000 -52.320000 -61.720001
+v -8.890000 -53.849998 -56.639999
+v -9.400000 -63.500000 -56.389999
+v -14.480000 -65.279999 -60.959999
+v -14.220000 -72.389999 -56.900002
+v -9.400000 -70.870003 -53.090000
+v -0.250000 -73.660004 -60.709999
+v -14.480000 -75.180000 -54.360001
+v -8.890000 -76.199997 -45.970001
+v 2.030000 -82.040001 -54.610001
+v -0.760000 -65.790001 -63.750000
+v -21.590000 -77.980003 -55.880001
+v -18.290001 -65.019997 -62.480000
+v -23.879999 -73.910004 -59.939999
+v -24.889999 -57.660000 -65.019997
+v -22.860001 -51.820000 -65.790001
+v -29.459999 -52.070000 -65.279999
+v -39.619999 -43.430000 -59.689999
+v -4.570000 -51.310001 -61.470001
+v -5.330000 -62.230000 -61.470001
+v -4.830000 -73.150002 -57.660000
+v -2.540000 -82.040001 -51.049999
+v -4.830000 -80.260002 -49.020000
+v -0.250000 -60.200001 -65.019997
+v -39.119999 -53.590000 -60.959999
+v -29.459999 -61.720001 -64.010002
+v -39.880001 -60.200001 -60.200001
+v -38.349998 -68.830002 -58.669998
+v -32.770000 -74.169998 -57.660000
+v -42.930000 -73.150002 -50.290001
+v -39.880001 -80.519997 -46.480000
+v -35.560001 -81.029999 -48.770000
+v -32.000000 -80.519997 -51.560001
+v -19.049999 -80.010002 -52.580002
+v -15.240000 -78.739998 -49.529999
+v -26.670000 -68.330002 -62.480000
+v 52.830002 -103.889999 -2.030000
+v 44.450001 -112.519997 -21.590000
+v 38.099998 -115.059998 -26.920000
+v 36.580002 -96.269997 -33.529999
+v 26.670000 -91.690002 -40.639999
+v 20.570000 -99.309998 -37.080002
+v 22.610001 -115.059998 -31.240000
+v 10.410000 -112.269997 -29.209999
+v 9.140000 -99.309998 -34.040001
+v 8.640000 -91.440002 -38.349998
+v 17.530001 -92.459999 -41.660000
+v 20.070000 -86.870003 -47.750000
+v 15.490000 -86.110001 -50.799999
+v 3.050000 -84.580002 -51.310001
+v 6.100000 -87.379997 -46.230000
+v 17.020000 -89.919998 -44.700001
+v 0.250000 -86.110001 -42.930000
+v 3.810000 -89.150002 -35.310001
+v 0.000000 -86.110001 -31.500000
+v 2.790000 -98.040001 -28.700001
+v -3.300000 -83.059998 -41.400002
+v -5.080000 -83.570000 -27.430000
+v -2.290000 -96.519997 -22.350000
+v 3.810000 -102.110001 -27.430000
+v 0.250000 -103.889999 -20.830000
+v -1.780000 -106.169998 -22.860001
+v -8.380000 -78.739998 -37.590000
+v -12.950000 -83.059998 -35.810001
+v -7.620000 -97.790001 -29.209999
+v -9.140000 -113.790001 -30.990000
+v -16.000000 -98.550003 -35.810001
+v -19.809999 -85.089996 -40.389999
+v -28.190001 -84.070000 -46.230000
+v -37.080002 -86.110001 -40.889999
+v -27.430000 -85.849998 -41.400002
+v -27.690001 -91.440002 -40.889999
+v -24.639999 -98.040001 -38.610001
+v -18.290001 -115.320000 -34.799999
+v -26.160000 -114.550003 -35.049999
+v -34.290001 -96.519997 -37.849998
+v -37.849998 -113.540001 -30.990000
+v -41.660000 -94.739998 -34.540001
+v -49.779999 -92.709999 -26.670000
+v -46.740002 -112.010002 -22.860001
+v -49.279999 -81.029999 -34.290001
+v -43.430000 -84.070000 -38.349998
+v -50.799999 -69.849998 -39.119999
+v -47.500000 -68.070000 -47.500000
+v -41.150002 -65.790001 -57.400002
+v -44.450001 -60.959999 -54.860001
+v -48.009998 -55.119999 -48.259998
+v -53.590000 -57.660000 -38.610001
+v -54.860001 -68.830002 -30.730000
+v -53.090000 -78.989998 -28.959999
+v -54.360001 -89.919998 -13.970000
+v -56.639999 -76.709999 -15.490000
+v -50.799999 -111.000000 -10.670000
+v -42.669998 -46.480000 -56.389999
+v -42.930000 -54.610001 -57.150002
+v -48.509998 -42.930000 -46.740002
+v -51.560001 -48.770000 -41.910000
+v -55.880001 -57.660000 -33.020000
+v -58.669998 -57.660000 -19.809999
+v -56.639999 -42.419998 -24.639999
+v -55.880001 -74.680000 -1.020000
+v -54.099998 -86.870003 0.510000
+v -50.549999 -107.440002 5.590000
+v -46.990002 -83.059998 11.940000
+v -34.540001 -70.360001 18.799999
+v -48.770000 -64.519997 8.130000
+v -33.270000 -79.760002 21.340000
+v -30.990000 -101.599998 25.650000
+v -43.180000 -104.650002 17.270000
+v -57.150002 -41.910000 -11.180000
+v -58.419998 -57.660000 -6.350000
+v -58.930000 -65.019997 -10.920000
+v -25.400000 -56.389999 14.220000
+v -18.540001 -78.739998 21.590000
+v -14.480000 -98.809998 25.650000
+v -18.540001 -53.090000 9.400000
+v -4.570000 -55.369999 11.180000
+v -6.860000 -58.669998 10.410000
+v -7.870000 -61.470001 7.370000
+v -8.640000 -70.870003 13.720000
+v -6.100000 -86.110001 17.270000
+v -4.060000 -96.769997 19.559999
+v -0.760000 -95.250000 14.730000
+v -0.250000 -82.800003 8.130000
+v -0.510000 -68.070000 1.020000
+v -1.780000 -60.959999 9.400000
+v 2.540000 -56.389999 10.670000
+v 5.080000 -59.689999 8.890000
+v 7.370000 -62.990002 6.600000
+v 6.860000 -72.389999 13.210000
+v 6.600000 -85.339996 18.799999
+v 6.860000 -97.279999 22.610001
+v 13.720000 -88.389999 24.129999
+v 14.220000 -98.300003 27.690001
+v 13.720000 -79.760002 20.830000
+v 12.950000 -67.559998 14.220000
+v 12.700000 -58.169998 6.600000
+v 9.910000 -54.860001 9.140000
+v 23.879999 -49.279999 5.080000
+v 34.799999 -80.519997 21.840000
+v 36.070000 -64.010002 11.680000
+v 34.799999 -89.410004 26.160000
+v 24.639999 -58.169998 10.670000
+v 23.370001 -73.410004 19.809999
+v 24.379999 -91.440002 27.940001
+# 711 vertices
+
+# 0 texture vertices
+
+# 0 normals
+
+g d
+usemtl vskin
+s 1
+f 3 2 1
+f 2 4 1
+f 5 1 4
+f 6 5 4
+f 7 5 6
+f 6 4 8
+f 9 8 4
+f 2 9 4
+f 10 9 2
+f 2 11 10
+f 3 11 2
+f 12 10 11
+f 12 11 13
+f 3 13 11
+f 3 15 14
+f 14 13 3
+f 14 16 13
+f 13 16 17
+f 19 16 18
+f 18 16 14
+f 20 18 14
+f 15 20 14
+f 12 17 21
+f 17 12 13
+f 23 18 22
+f 22 18 20
+f 22 25 24
+f 23 24 26
+f 24 23 22
+f 28 27 25
+f 25 27 24
+f 24 27 26
+f 29 18 23
+f 18 29 19
+f 30 19 29
+f 30 29 31
+f 31 29 23
+f 23 26 31
+f 19 30 32
+f 32 16 19
+f 28 25 33
+f 33 25 34
+f 33 35 28
+f 33 36 35
+f 35 36 37
+f 37 36 5
+f 5 36 38
+f 38 36 39
+f 38 39 3
+f 1 38 3
+f 1 5 38
+f 3 39 34
+f 15 3 34
+f 20 15 34
+f 22 20 34
+f 25 22 34
+f 36 33 34
+f 39 36 34
+f 40 10 12
+f 12 21 40
+f 30 41 32
+f 42 16 32
+f 32 43 42
+f 44 43 32
+f 32 41 44
+f 45 44 41
+f 41 46 45
+f 41 47 46
+f 47 41 48
+f 30 48 41
+f 31 48 30
+f 47 48 31
+f 47 50 49
+f 49 46 47
+f 50 47 51
+f 51 47 31
+f 51 31 52
+f 53 51 52
+f 51 53 50
+f 31 26 52
+f 26 54 52
+f 26 27 54
+f 54 27 55
+f 55 27 56
+f 56 27 57
+f 57 27 28
+f 57 28 35
+f 37 57 35
+f 7 57 37
+f 58 53 52
+f 59 58 52
+f 60 59 52
+f 54 60 52
+f 55 60 54
+f 61 60 55
+f 61 55 62
+f 62 55 63
+f 63 55 8
+f 55 6 8
+f 56 6 55
+f 57 7 56
+f 6 56 7
+f 8 9 64
+f 64 65 8
+f 63 8 65
+f 63 65 66
+f 66 62 63
+f 66 65 67
+f 65 64 67
+f 64 68 67
+f 68 64 9
+f 69 68 9
+f 9 10 69
+f 71 69 70
+f 70 69 10
+f 70 72 71
+f 71 72 73
+f 5 7 37
+f 10 40 70
+f 70 40 72
+f 72 40 74
+f 40 21 74
+f 74 21 75
+f 21 17 75
+f 73 72 74
+f 74 76 73
+f 74 75 76
+f 17 77 75
+f 42 77 17
+f 17 16 42
+f 79 78 69
+f 78 68 69
+f 68 78 80
+f 81 68 80
+f 81 82 68
+f 68 82 67
+f 82 83 67
+f 84 83 82
+f 82 81 84
+f 84 81 80
+f 83 66 67
+f 66 83 85
+f 86 66 85
+f 66 86 87
+f 62 66 87
+f 88 62 87
+f 62 88 61
+f 89 61 88
+f 61 89 90
+f 59 60 90
+f 60 61 90
+f 89 91 90
+f 91 59 90
+f 59 91 92
+f 58 59 92
+f 93 58 92
+f 94 93 92
+f 91 94 92
+f 94 95 93
+f 96 93 95
+f 97 93 96
+f 58 93 97
+f 97 98 58
+f 53 58 98
+f 53 98 50
+f 99 50 98
+f 100 99 97
+f 98 97 99
+f 97 96 100
+f 99 49 50
+f 101 49 99
+f 99 100 101
+f 46 49 101
+f 101 102 46
+f 102 103 46
+f 45 46 103
+f 104 45 103
+f 44 45 104
+f 104 105 44
+f 106 44 105
+f 44 106 43
+f 42 43 107
+f 43 106 108
+f 108 106 109
+f 43 108 110
+f 107 43 110
+f 107 77 42
+f 77 107 111
+f 107 112 111
+f 112 107 110
+f 113 77 111
+f 113 114 77
+f 75 77 114
+f 75 114 115
+f 115 116 75
+f 76 75 116
+f 116 115 117
+f 117 118 116
+f 116 73 76
+f 73 116 118
+f 73 118 71
+f 71 118 119
+f 118 117 120
+f 119 118 120
+f 121 119 120
+f 109 106 122
+f 122 106 105
+f 105 104 122
+f 104 123 122
+f 124 123 104
+f 103 124 104
+f 124 103 125
+f 103 102 125
+f 125 102 126
+f 126 102 101
+f 101 127 126
+f 128 127 101
+f 128 101 100
+f 100 129 128
+f 129 100 130
+f 130 100 96
+f 95 131 96
+f 96 131 130
+f 132 131 95
+f 79 69 71
+f 71 119 79
+f 133 119 121
+f 119 133 79
+f 78 79 133
+f 133 134 78
+f 78 134 80
+f 134 135 80
+f 136 84 80
+f 135 136 80
+f 136 137 84
+f 138 84 137
+f 84 138 83
+f 83 138 85
+f 139 88 87
+f 88 139 89
+f 140 91 89
+f 91 140 94
+f 94 142 141
+f 94 140 142
+f 95 94 141
+f 132 95 141
+f 135 134 143
+f 143 134 133
+f 133 144 143
+f 133 145 144
+f 121 145 133
+f 146 145 121
+f 121 120 147
+f 121 147 146
+f 147 120 148
+f 120 117 148
+f 148 117 149
+f 117 115 149
+f 115 151 150
+f 115 114 151
+f 151 114 152
+f 153 148 149
+f 150 153 149
+f 145 146 154
+f 144 145 154
+f 155 144 154
+f 144 155 143
+f 156 143 155
+f 157 155 154
+f 155 157 156
+f 158 143 156
+f 143 158 135
+f 135 158 159
+f 158 160 159
+f 158 156 160
+f 156 161 160
+f 156 157 161
+f 161 157 162
+f 163 162 157
+f 161 162 164
+f 163 165 162
+f 166 162 165
+f 162 166 164
+f 166 167 164
+f 167 168 164
+f 168 161 164
+f 168 160 161
+f 160 168 159
+f 136 135 159
+f 137 136 159
+f 169 138 137
+f 138 169 85
+f 169 170 85
+f 170 169 171
+f 171 169 159
+f 169 137 159
+f 172 171 159
+f 173 172 159
+f 168 173 159
+f 173 168 174
+f 168 167 174
+f 170 175 85
+f 175 86 85
+f 86 175 176
+f 177 86 176
+f 163 157 154
+f 146 163 154
+f 86 177 87
+f 177 178 87
+f 178 139 87
+f 89 139 179
+f 180 89 179
+f 180 181 89
+f 89 181 182
+f 140 89 182
+f 142 140 183
+f 183 140 182
+f 142 184 141
+f 184 185 141
+f 185 132 141
+f 132 185 186
+f 186 187 132
+f 187 131 132
+f 188 131 187
+f 186 185 189
+f 189 185 184
+f 190 183 182
+f 191 190 182
+f 181 192 182
+f 193 192 181
+f 181 180 193
+f 180 194 193
+f 194 180 179
+f 195 194 179
+f 139 195 179
+f 196 195 139
+f 139 178 196
+f 196 178 197
+f 197 178 177
+f 198 197 177
+f 199 198 177
+f 199 177 176
+f 200 199 176
+f 199 200 198
+f 198 200 201
+f 202 201 200
+f 202 200 203
+f 200 175 203
+f 175 170 203
+f 175 200 176
+f 170 204 203
+f 171 204 170
+f 205 204 171
+f 206 205 171
+f 171 172 206
+f 207 206 172
+f 172 173 207
+f 208 207 173
+f 208 173 174
+f 209 207 208
+f 208 210 209
+f 211 209 210
+f 210 202 211
+f 202 210 212
+f 201 202 212
+f 213 208 174
+f 167 214 174
+f 214 213 174
+f 215 167 166
+f 213 210 208
+f 213 216 210
+f 210 216 212
+f 216 217 212
+f 217 201 212
+f 201 217 218
+f 198 201 218
+f 197 198 218
+f 219 197 218
+f 197 219 220
+f 221 204 205
+f 205 206 221
+f 207 221 206
+f 209 221 207
+f 209 211 221
+f 221 211 202
+f 221 202 203
+f 204 221 203
+f 220 222 197
+f 196 197 222
+f 196 222 223
+f 195 196 223
+f 194 195 223
+f 224 194 223
+f 224 225 194
+f 193 194 225
+f 193 225 226
+f 192 193 226
+f 191 192 226
+f 227 191 226
+f 228 227 226
+f 229 228 226
+f 225 229 226
+f 192 191 182
+f 183 184 142
+f 183 190 230
+f 190 191 230
+f 191 227 230
+f 227 231 230
+f 231 232 230
+f 232 183 230
+f 183 232 233
+f 233 184 183
+f 189 184 233
+f 130 131 188
+f 188 234 130
+f 129 130 234
+f 234 128 129
+f 235 234 188
+f 236 235 188
+f 235 236 237
+f 237 238 235
+f 238 128 234
+f 235 238 234
+f 237 239 238
+f 128 238 239
+f 239 240 128
+f 240 127 128
+f 126 127 240
+f 241 220 219
+f 242 165 163
+f 166 242 215
+f 165 242 166
+f 163 243 242
+f 244 243 163
+f 247 246 245
+f 242 243 215
+f 163 248 244
+f 249 248 163
+f 163 146 249
+f 249 146 250
+f 147 250 146
+f 250 147 148
+f 148 153 250
+f 250 153 249
+f 251 249 153
+f 248 249 251
+f 251 252 248
+f 248 252 244
+f 244 252 247
+f 243 244 247
+f 247 215 243
+f 252 246 247
+f 251 246 252
+f 153 150 251
+f 251 150 246
+f 150 149 115
+f 150 151 246
+f 253 246 151
+f 245 246 253
+f 253 151 152
+f 114 113 152
+f 254 152 113
+f 254 113 111
+f 253 255 245
+f 152 255 253
+f 255 152 254
+f 255 254 256
+f 256 254 111
+f 257 256 111
+f 112 257 111
+f 257 112 110
+f 258 257 110
+f 108 258 110
+f 108 259 258
+f 259 108 109
+f 122 259 109
+f 259 122 260
+f 260 122 123
+f 123 261 260
+f 123 262 261
+f 262 123 124
+f 263 245 255
+f 264 263 255
+f 264 255 256
+f 256 265 264
+f 265 256 257
+f 257 258 265
+f 258 266 265
+f 267 258 259
+f 266 258 267
+f 268 267 259
+f 268 260 261
+f 259 260 268
+f 261 262 268
+f 262 269 268
+f 268 269 270
+f 270 271 268
+f 268 271 267
+f 271 272 267
+f 267 272 273
+f 273 266 267
+f 273 265 266
+f 265 273 274
+f 274 264 265
+f 275 264 274
+f 263 264 275
+f 275 276 263
+f 276 277 263
+f 245 263 277
+f 247 245 277
+f 167 215 278
+f 215 279 278
+f 215 280 279
+f 279 280 281
+f 280 282 281
+f 282 280 283
+f 280 277 283
+f 280 247 277
+f 247 280 215
+f 277 284 283
+f 284 285 283
+f 284 277 276
+f 276 285 284
+f 286 285 276
+f 275 286 276
+f 274 286 275
+f 274 287 286
+f 288 287 274
+f 273 288 274
+f 289 288 273
+f 273 272 289
+f 272 271 289
+f 271 290 289
+f 270 290 271
+f 291 290 270
+f 292 290 291
+f 291 293 292
+f 290 292 289
+f 294 289 292
+f 295 289 294
+f 288 289 295
+f 295 287 288
+f 296 287 295
+f 297 287 296
+f 286 287 297
+f 297 285 286
+f 285 297 298
+f 285 298 283
+f 298 299 283
+f 299 282 283
+f 292 293 300
+f 300 294 292
+f 301 294 300
+f 295 294 301
+f 302 295 301
+f 302 296 295
+f 296 302 297
+f 297 302 303
+f 298 297 303
+f 126 240 304
+f 240 305 304
+f 240 239 305
+f 305 239 306
+f 237 307 239
+f 308 307 237
+f 237 236 309
+f 309 308 237
+f 306 307 308
+f 307 306 239
+f 306 308 310
+f 305 306 310
+f 311 308 309
+f 310 308 311
+f 312 305 310
+f 305 312 304
+f 312 125 304
+f 125 126 304
+f 125 262 124
+f 313 262 125
+f 312 313 125
+f 313 312 314
+f 312 310 314
+f 310 311 314
+f 311 315 314
+f 315 270 314
+f 270 269 314
+f 269 262 314
+f 262 313 314
+f 291 270 316
+f 270 315 316
+f 315 311 316
+f 311 317 316
+f 317 318 316
+f 318 319 316
+f 319 291 316
+f 320 318 317
+f 317 311 320
+f 320 311 309
+f 309 321 320
+f 309 322 321
+f 321 322 323
+f 321 324 320
+f 324 318 320
+f 325 324 321
+f 321 323 325
+f 188 187 236
+f 236 187 326
+f 309 236 326
+f 187 186 326
+f 322 309 326
+f 186 322 326
+f 186 327 322
+f 189 327 186
+f 327 189 328
+f 233 328 189
+f 232 328 233
+f 328 232 329
+f 232 231 329
+f 330 231 227
+f 227 228 330
+f 330 228 229
+f 229 331 330
+f 229 225 331
+f 331 225 224
+f 333 332 223
+f 332 331 223
+f 331 224 223
+f 331 332 334
+f 334 330 331
+f 330 334 329
+f 231 330 329
+f 335 328 329
+f 336 335 329
+f 334 336 329
+f 336 334 337
+f 334 332 337
+f 332 338 337
+f 333 338 332
+f 333 222 220
+f 241 219 218
+f 217 241 218
+f 241 217 339
+f 339 217 340
+f 340 217 216
+f 328 322 327
+f 323 322 341
+f 341 322 328
+f 328 335 341
+f 341 335 342
+f 335 336 342
+f 336 343 342
+f 343 336 337
+f 338 343 337
+f 343 338 344
+f 338 345 344
+f 346 345 338
+f 338 333 346
+f 346 333 220
+f 220 241 346
+f 346 241 339
+f 347 346 339
+f 346 347 348
+f 347 349 348
+f 349 350 348
+f 345 346 348
+f 351 345 348
+f 350 351 348
+f 352 350 349
+f 351 353 345
+f 345 353 344
+f 353 354 344
+f 354 355 344
+f 355 343 344
+f 343 355 342
+f 355 356 342
+f 354 356 355
+f 356 341 342
+f 341 356 357
+f 341 357 323
+f 357 325 323
+f 222 333 223
+f 339 340 347
+f 216 358 340
+f 340 360 359
+f 340 358 360
+f 347 340 359
+f 349 347 359
+f 361 349 359
+f 361 352 349
+f 362 361 359
+f 363 361 362
+f 362 364 363
+f 279 363 364
+f 363 279 281
+f 279 364 365
+f 279 365 278
+f 365 214 278
+f 214 167 278
+f 358 216 213
+f 213 214 358
+f 214 365 358
+f 365 360 358
+f 360 362 359
+f 362 360 365
+f 365 364 362
+f 354 353 366
+f 367 354 366
+f 354 367 368
+f 368 356 354
+f 357 356 368
+f 368 369 357
+f 353 351 366
+f 351 350 370
+f 351 372 371
+f 351 371 366
+f 368 367 373
+f 369 368 373
+f 373 374 369
+f 375 369 374
+f 325 369 375
+f 357 369 325
+f 375 324 325
+f 375 318 324
+f 376 318 375
+f 374 376 375
+f 352 361 377
+f 350 352 370
+f 352 377 370
+f 372 351 370
+f 379 373 378
+f 373 380 378
+f 373 367 380
+f 380 367 366
+f 381 380 366
+f 382 381 366
+f 371 382 366
+f 382 371 383
+f 371 384 383
+f 384 371 372
+f 384 372 370
+f 385 384 370
+f 386 385 370
+f 377 386 370
+f 387 386 377
+f 377 361 387
+f 387 361 388
+f 361 363 388
+f 363 389 388
+f 389 363 281
+f 390 389 281
+f 390 391 389
+f 392 391 390
+f 390 393 392
+f 389 391 388
+f 391 394 388
+f 394 391 395
+f 395 391 392
+f 392 393 396
+f 392 396 397
+f 395 392 397
+f 398 395 397
+f 398 399 395
+f 395 399 400
+f 394 395 400
+f 387 394 400
+f 394 387 388
+f 386 387 400
+f 401 386 400
+f 402 401 400
+f 399 402 400
+f 399 398 402
+f 403 402 398
+f 402 403 404
+f 405 402 404
+f 405 401 402
+f 401 405 406
+f 386 401 406
+f 407 386 406
+f 385 386 407
+f 384 385 408
+f 408 409 384
+f 384 409 383
+f 409 410 383
+f 410 411 383
+f 410 412 411
+f 411 412 404
+f 412 405 404
+f 405 412 406
+f 412 407 406
+f 385 407 413
+f 408 385 413
+f 409 408 413
+f 410 409 413
+f 412 410 413
+f 407 412 413
+f 411 414 383
+f 414 381 382
+f 414 382 383
+f 415 381 414
+f 416 381 415
+f 380 381 416
+f 380 416 378
+f 416 417 378
+f 417 379 378
+f 418 379 417
+f 417 416 419
+f 416 420 419
+f 420 416 421
+f 416 422 421
+f 415 422 416
+f 415 414 423
+f 414 411 423
+f 411 424 423
+f 424 411 404
+f 425 424 404
+f 426 425 404
+f 403 426 404
+f 425 426 427
+f 428 425 427
+f 425 428 421
+f 428 420 421
+f 422 425 421
+f 425 422 423
+f 424 425 423
+f 422 415 423
+f 429 374 373
+f 373 379 429
+f 430 429 379
+f 379 418 430
+f 430 418 431
+f 431 432 430
+f 433 432 431
+f 431 434 433
+f 433 434 435
+f 433 435 436
+f 435 434 437
+f 437 434 438
+f 434 431 438
+f 431 439 438
+f 431 418 439
+f 439 418 417
+f 439 417 419
+f 440 439 419
+f 439 440 438
+f 440 441 438
+f 441 442 438
+f 442 437 438
+f 442 441 443
+f 441 444 443
+f 441 440 444
+f 420 440 419
+f 420 428 440
+f 444 440 428
+f 428 445 444
+f 446 444 445
+f 444 446 443
+f 445 428 427
+f 447 445 427
+f 445 447 448
+f 446 445 448
+f 447 449 448
+f 449 447 450
+f 447 426 450
+f 426 447 427
+f 426 403 450
+f 451 449 450
+f 452 451 450
+f 452 454 453
+f 454 452 455
+f 455 452 450
+f 398 455 450
+f 403 398 450
+f 456 398 397
+f 398 456 455
+f 457 455 456
+f 456 458 457
+f 458 456 397
+f 396 458 397
+f 458 396 393
+f 393 459 458
+f 459 393 460
+f 460 393 461
+f 393 390 462
+f 390 463 462
+f 459 464 458
+f 464 459 465
+f 458 464 466
+f 466 464 467
+f 468 467 464
+f 466 467 469
+f 467 470 469
+f 454 455 469
+f 455 457 469
+f 457 458 469
+f 458 466 469
+f 282 463 281
+f 463 390 281
+f 282 299 463
+f 463 299 471
+f 461 463 471
+f 463 461 462
+f 461 393 462
+f 461 472 460
+f 460 472 473
+f 473 459 460
+f 465 459 473
+f 473 474 465
+f 474 473 472
+f 476 474 475
+f 474 472 475
+f 472 477 475
+f 461 477 472
+f 477 461 478
+f 471 478 461
+f 478 471 299
+f 299 298 479
+f 478 299 479
+f 480 478 479
+f 481 480 479
+f 479 303 481
+f 298 303 479
+f 481 482 480
+f 480 482 483
+f 478 480 483
+f 483 477 478
+f 484 477 483
+f 477 484 475
+f 484 485 475
+f 484 486 485
+f 485 486 487
+f 486 488 487
+f 489 488 486
+f 486 483 489
+f 483 482 489
+f 483 486 484
+f 319 293 291
+f 319 490 293
+f 493 492 491
+f 490 491 492
+f 293 490 494
+f 293 494 300
+f 300 495 301
+f 301 495 302
+f 302 495 496
+f 496 497 302
+f 303 302 497
+f 497 481 303
+f 498 482 481
+f 489 482 498
+f 499 488 489
+f 500 488 499
+f 499 489 501
+f 501 489 502
+f 489 498 502
+f 498 503 502
+f 481 497 498
+f 498 497 503
+f 503 497 496
+f 496 504 503
+f 496 505 504
+f 495 505 496
+f 506 505 495
+f 506 495 300
+f 300 507 506
+f 300 494 507
+f 494 508 507
+f 490 508 494
+f 492 508 490
+f 508 492 509
+f 509 492 493
+f 493 510 509
+f 508 509 507
+f 510 512 511
+f 510 514 513
+f 513 512 510
+f 511 509 510
+f 515 509 511
+f 507 509 515
+f 515 516 507
+f 517 507 516
+f 506 507 517
+f 517 505 506
+f 518 505 517
+f 504 505 518
+f 518 519 504
+f 503 504 519
+f 503 519 502
+f 519 501 502
+f 501 519 518
+f 501 518 499
+f 518 520 499
+f 520 518 517
+f 520 516 515
+f 517 516 520
+f 515 521 520
+f 522 521 515
+f 511 522 515
+f 511 512 522
+f 523 522 512
+f 512 524 523
+f 513 524 512
+f 523 525 522
+f 523 526 525
+f 525 521 522
+f 527 521 525
+f 521 527 528
+f 520 521 528
+f 528 529 520
+f 530 520 529
+f 530 499 520
+f 499 530 531
+f 500 499 531
+f 376 319 318
+f 319 376 490
+f 491 490 376
+f 491 376 374
+f 374 429 491
+f 491 429 532
+f 532 533 491
+f 491 533 493
+f 510 493 533
+f 533 514 510
+f 534 514 533
+f 533 532 534
+f 532 430 534
+f 429 430 532
+f 535 534 430
+f 430 432 535
+f 432 536 535
+f 537 536 432
+f 432 433 537
+f 536 534 535
+f 514 534 513
+f 513 534 536
+f 524 513 536
+f 524 536 537
+f 529 538 530
+f 530 538 531
+f 539 500 531
+f 539 540 500
+f 500 540 488
+f 488 540 487
+f 524 541 523
+f 526 523 541
+f 526 541 542
+f 542 543 526
+f 525 544 527
+f 525 545 544
+f 526 545 525
+f 543 545 526
+f 545 543 546
+f 546 544 545
+f 546 543 547
+f 548 547 543
+f 543 549 548
+f 548 549 550
+f 550 549 551
+f 552 551 549
+f 552 549 553
+f 553 549 542
+f 542 549 543
+f 553 542 554
+f 554 542 541
+f 541 537 554
+f 537 541 524
+f 436 537 433
+f 554 537 436
+f 436 555 554
+f 555 556 554
+f 556 557 554
+f 554 557 553
+f 553 557 558
+f 559 558 557
+f 559 557 560
+f 560 557 556
+f 556 555 560
+f 561 560 555
+f 555 562 561
+f 555 435 562
+f 436 435 555
+f 564 435 563
+f 435 564 565
+f 565 562 435
+f 566 562 565
+f 565 564 566
+f 528 538 529
+f 538 567 531
+f 538 568 567
+f 567 568 569
+f 569 570 567
+f 571 570 569
+f 569 572 571
+f 546 547 573
+f 547 548 573
+f 575 574 572
+f 573 548 576
+f 576 548 550
+f 574 571 572
+f 544 546 577
+f 558 552 553
+f 574 578 571
+f 580 579 571
+f 571 578 580
+f 579 570 571
+f 567 570 579
+f 581 567 579
+f 582 567 581
+f 567 582 531
+f 582 539 531
+f 539 582 540
+f 582 583 540
+f 540 583 584
+f 584 487 540
+f 528 585 538
+f 538 585 568
+f 585 586 568
+f 568 586 569
+f 587 569 586
+f 572 569 587
+f 588 572 587
+f 575 572 589
+f 588 589 572
+f 587 576 588
+f 573 576 587
+f 587 577 573
+f 573 577 546
+f 586 577 587
+f 577 586 590
+f 590 544 577
+f 590 586 585
+f 590 585 527
+f 585 528 527
+f 527 544 590
+f 591 584 583
+f 583 592 591
+f 593 591 592
+f 592 594 593
+f 592 595 594
+f 596 594 595
+f 596 595 597
+f 597 595 598
+f 598 595 599
+f 595 580 599
+f 580 578 599
+f 600 578 574
+f 574 601 600
+f 575 601 574
+f 580 595 602
+f 579 580 602
+f 592 579 602
+f 579 592 581
+f 583 581 592
+f 581 583 582
+f 595 592 602
+f 603 561 562
+f 604 561 603
+f 605 561 604
+f 606 561 605
+f 560 561 606
+f 606 559 560
+f 606 607 559
+f 608 606 605
+f 605 609 608
+f 608 609 610
+f 610 611 608
+f 611 612 608
+f 608 612 613
+f 608 613 607
+f 607 606 608
+f 607 558 559
+f 558 607 613
+f 613 614 558
+f 558 614 552
+f 552 614 551
+f 615 551 614
+f 551 615 550
+f 550 615 576
+f 576 615 616
+f 617 616 615
+f 617 615 612
+f 612 615 618
+f 618 613 612
+f 618 614 613
+f 614 618 615
+f 616 588 576
+f 588 616 617
+f 617 619 588
+f 612 619 617
+f 622 621 620
+f 612 620 619
+f 619 623 588
+f 621 625 624
+f 621 624 623
+f 622 625 621
+f 620 611 622
+f 620 612 611
+f 626 611 610
+f 626 622 611
+f 626 627 622
+f 610 627 626
+f 622 627 625
+f 627 628 625
+f 624 629 623
+f 629 575 623
+f 588 623 589
+f 630 575 629
+f 629 624 630
+f 625 630 624
+f 631 630 625
+f 631 625 628
+f 628 632 631
+f 631 632 633
+f 633 630 631
+f 634 630 633
+f 630 634 601
+f 630 601 575
+f 634 600 601
+f 578 600 599
+f 600 635 599
+f 635 636 599
+f 636 598 599
+f 636 597 598
+f 635 600 634
+f 634 637 635
+f 636 635 637
+f 636 637 638
+f 637 634 638
+f 633 638 634
+f 639 638 633
+f 640 639 633
+f 632 640 633
+f 639 640 641
+f 641 642 639
+f 642 641 643
+f 643 644 642
+f 644 643 645
+f 645 643 646
+f 645 647 644
+f 644 648 636
+f 636 642 644
+f 638 642 636
+f 639 642 638
+f 648 597 636
+f 647 648 644
+f 596 648 647
+f 648 596 597
+f 647 649 596
+f 596 649 650
+f 651 596 650
+f 651 594 596
+f 593 594 651
+f 651 652 593
+f 650 652 651
+f 652 650 653
+f 650 649 653
+f 649 654 653
+f 649 655 654
+f 655 649 647
+f 655 647 656
+f 656 647 645
+f 658 645 657
+f 645 646 657
+f 646 659 657
+f 620 621 623
+f 620 623 619
+f 660 487 584
+f 660 584 591
+f 661 660 591
+f 591 593 661
+f 661 593 652
+f 661 652 653
+f 662 660 653
+f 660 661 653
+f 662 485 660
+f 485 487 660
+f 662 663 476
+f 664 476 663
+f 654 664 663
+f 654 663 653
+f 663 662 653
+f 476 664 665
+f 666 476 665
+f 476 666 474
+f 485 662 475
+f 662 476 475
+f 655 664 654
+f 664 655 665
+f 655 658 665
+f 656 658 655
+f 647 656 655
+f 645 658 656
+f 623 575 589
+f 667 658 657
+f 668 667 657
+f 669 668 657
+f 659 669 657
+f 668 669 670
+f 670 667 668
+f 672 670 671
+f 670 673 671
+f 670 674 673
+f 675 674 670
+f 670 669 675
+f 676 666 665
+f 677 676 665
+f 676 677 468
+f 468 464 676
+f 667 468 677
+f 677 678 667
+f 678 677 665
+f 658 678 665
+f 658 667 678
+f 670 672 667
+f 468 667 672
+f 468 672 467
+f 672 470 467
+f 470 672 671
+f 470 679 469
+f 679 470 671
+f 680 679 671
+f 673 680 671
+f 680 673 674
+f 674 681 680
+f 474 666 465
+f 465 666 676
+f 464 465 676
+f 679 454 469
+f 679 682 454
+f 454 682 453
+f 451 452 453
+f 683 451 453
+f 684 683 453
+f 685 684 453
+f 453 682 685
+f 685 682 686
+f 682 679 686
+f 679 680 686
+f 680 687 686
+f 680 681 687
+f 687 681 688
+f 688 689 687
+f 690 687 689
+f 687 690 686
+f 690 691 686
+f 691 685 686
+f 685 691 692
+f 684 685 692
+f 683 684 692
+f 449 451 683
+f 683 693 449
+f 693 683 692
+f 694 693 692
+f 691 694 692
+f 691 695 694
+f 695 691 696
+f 691 690 696
+f 690 697 696
+f 697 690 689
+f 689 698 697
+f 698 700 699
+f 697 698 699
+f 701 697 699
+f 697 701 696
+f 701 702 696
+f 702 695 696
+f 702 703 695
+f 703 694 695
+f 704 694 703
+f 693 694 704
+f 693 704 448
+f 449 693 448
+f 704 446 448
+f 446 704 705
+f 446 705 443
+f 705 442 443
+f 563 442 705
+f 437 442 563
+f 563 435 437
+f 564 707 706
+f 566 564 706
+f 708 566 706
+f 563 707 564
+f 707 563 709
+f 563 705 709
+f 705 703 709
+f 703 705 704
+f 703 702 709
+f 702 710 709
+f 701 710 702
+f 701 711 710
+f 711 701 699
+f 700 711 699
+f 711 708 706
+f 710 711 706
+f 707 710 706
+f 710 707 709
+f 603 562 566
+f 610 689 627
+f 698 689 610
+f 698 610 609
+f 609 700 698
+f 711 700 609
+f 711 609 605
+f 605 708 711
+f 708 605 604
+f 604 566 708
+f 566 604 603
+f 627 689 688
+f 688 628 627
+f 628 688 681
+f 681 632 628
+f 632 681 674
+f 674 640 632
+f 641 640 674
+f 674 643 641
+f 643 674 675
+f 675 646 643
+f 669 646 675
+f 659 646 669
+# 1419 elements
diff --git a/Gem/examples/data/vera.ttf b/Gem/examples/data/vera.ttf
new file mode 100644
index 0000000..58cd6b5
--- /dev/null
+++ b/Gem/examples/data/vera.ttf
Binary files differ