packages feed

FreeTypeGL 0.0.3 → 0.0.4

raw patch · 15 files changed

+3143/−7 lines, 15 files

Files

FreeTypeGL.cabal view
@@ -1,5 +1,5 @@ Name:                FreeTypeGL-Version:             0.0.3+Version:             0.0.4 Synopsis:            Loadable texture fonts for OpenGL.  Description:         Based on the freetype-gl library, with large@@ -9,11 +9,6 @@                      library, but avoids C++, which makes it easier to wrap and work with                      in Haskell-land.                      .-                     This library is completely stand-alone (comes-                     with the required C sources), so you don't need-                     to install any C library prior to installing-                     this. cabal intall FreeTypeGL should work fine.-                     .                      Unfortunately, it seems not to perform as well as                      FTGL on some setups.                      .@@ -28,7 +23,7 @@ Maintainer:          Eyal Lotem <eyal.lotem@gmail.com> Category:            Graphics Build-type:          Simple-Extra-source-files:  src/*.c+Extra-source-files:  src/*.c src/*.h                      src/demo/*.c                      src/fonts/*.ttf src/fonts/VERA-COPYRIGHT                      shaders/*.vert shaders/*.frag
+ src/arial-16.h view
@@ -0,0 +1,681 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ===============================================================================+ */+#include <stddef.h>++typedef struct+{+    wchar_t charcode;+    float kerning;+} kerning_t;++typedef struct+{+    wchar_t charcode;+    int width, height;+    int offset_x, offset_y;+    float advance_x, advance_y;+    float s0, t0, s1, t1;+    size_t kerning_count;+    kerning_t kerning[10];+} texture_glyph_t;++typedef struct+{+    size_t tex_width;+    size_t tex_height;+    size_t tex_depth;+    char tex_data[16384];+    float size;+    float height;+    float linegap;+    float ascender;+    float descender;+    size_t glyphs_count;+    texture_glyph_t glyphs[96];+} texture_font_t;++texture_font_t font = {+ 128, 128, 1,+ {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,255,255,255,255,0,0,104,236,0,0,68,255,88,172,240,0,0,0,0,232,67,0,69,230,0,0,0,0,0,37,221,+  19,0,0,0,0,0,44,167,228,142,14,0,0,0,159,133,0,0,0,0,0,0,6,111,209,203,103,0,0,0,0,0,+  76,255,80,0,0,0,0,135,123,0,0,195,62,0,0,0,0,0,118,149,0,0,0,0,0,0,0,252,88,0,0,0,+  0,32,56,1,0,2,4,4,4,3,0,30,56,3,0,0,0,0,207,80,0,0,0,79,178,237,187,49,0,0,0,0,+  0,255,255,255,255,0,0,104,236,0,0,67,255,87,171,239,0,0,0,34,252,12,0,128,173,0,0,0,43,194,252,254,+  249,162,0,0,0,0,186,175,81,215,106,0,0,40,236,16,0,0,0,0,0,0,97,242,98,126,255,55,0,0,0,0,+  75,255,79,0,0,0,29,221,10,0,0,60,201,1,0,0,46,115,114,136,98,74,0,0,0,0,0,252,88,0,0,0,+  0,148,255,8,0,128,255,255,255,212,0,140,255,16,0,0,0,23,250,14,0,0,52,252,178,95,217,240,37,0,0,0,+  0,255,255,255,255,0,0,104,236,0,0,38,255,59,142,210,0,0,0,91,208,0,0,187,116,0,0,0,210,207,45,208,+  78,253,81,0,0,4,249,61,0,126,186,0,0,170,123,0,0,0,0,0,0,0,198,167,0,0,227,138,0,0,0,0,+  50,255,52,0,0,0,161,115,0,0,0,0,189,88,0,0,56,175,241,246,184,81,0,0,4,4,4,252,90,4,4,1,+  0,0,218,2,0,26,52,52,52,43,0,0,0,0,0,0,0,93,195,0,0,0,203,172,0,0,5,222,144,0,0,0,+  0,255,255,255,255,0,0,104,236,0,0,2,244,17,95,166,0,216,255,255,255,255,255,255,255,176,0,25,255,91,4,208,+  0,145,122,0,0,0,192,137,26,191,126,0,49,232,12,0,0,0,0,0,0,0,168,233,21,54,254,72,0,0,0,0,+  8,250,9,0,0,48,252,28,0,0,0,0,101,222,6,0,0,39,219,214,63,0,0,28,255,255,255,255,255,255,255,116,+  0,89,172,0,0,0,0,0,0,0,0,0,0,0,0,0,0,164,124,0,0,9,255,87,0,0,0,138,223,0,0,0,+  0,0,0,0,0,0,0,104,236,0,0,0,0,0,0,0,0,47,56,213,133,56,88,253,63,38,0,17,254,109,4,208,+  0,0,0,0,0,0,75,224,255,195,28,0,182,113,0,0,0,0,0,0,0,0,32,241,213,246,132,1,0,0,0,0,+  0,0,0,0,0,133,202,0,0,0,0,0,21,255,60,0,0,157,106,72,198,0,0,5,52,52,52,252,122,52,52,23,+  0,34,5,0,0,0,0,0,87,243,0,0,0,0,0,0,1,233,53,0,0,40,255,55,0,0,0,107,249,0,0,0,+  0,148,255,8,0,0,0,104,236,0,0,0,0,0,0,0,0,0,3,245,51,0,89,213,0,0,0,0,189,236,106,208,+  0,0,0,0,0,0,0,1,26,0,0,59,228,8,58,188,137,21,0,0,0,0,42,221,255,181,0,0,0,0,0,0,+  144,255,12,0,0,177,164,0,0,0,0,0,0,238,104,0,0,3,3,0,7,0,0,0,0,0,0,252,88,0,0,0,+  0,0,0,0,0,0,0,56,244,244,0,0,0,0,0,0,50,236,2,0,0,72,255,37,0,0,0,89,255,19,0,0,+  0,32,56,1,0,0,0,104,236,0,0,0,0,0,0,0,0,3,49,248,9,4,143,160,4,2,0,0,15,168,250,252,+  190,83,0,0,0,0,0,0,0,0,0,192,103,43,241,73,156,173,0,0,0,86,245,163,145,255,93,6,130,44,0,0,+  31,56,2,0,0,221,136,0,0,0,0,0,0,209,148,0,0,0,0,0,0,0,0,0,0,0,0,252,88,0,0,0,+  0,0,0,0,0,5,131,251,235,244,0,0,0,0,0,0,121,168,0,0,0,75,255,36,0,0,0,89,255,16,0,0,+  0,0,0,0,0,0,0,104,236,0,0,0,0,0,0,0,0,216,255,255,255,255,255,255,255,176,0,0,0,0,24,232,+  212,255,115,0,0,0,0,0,0,0,71,221,5,110,190,0,46,239,3,0,2,229,159,0,3,189,245,123,255,57,0,0,+  0,0,0,0,1,251,116,0,0,0,0,0,0,188,179,0,0,0,0,0,0,0,0,0,0,0,0,252,88,0,0,0,+  0,0,0,0,0,68,242,112,116,244,0,0,0,0,0,0,192,97,0,0,0,50,255,54,0,0,0,108,239,0,0,0,+  0,0,0,0,0,0,0,104,236,0,0,0,0,0,0,0,0,43,171,171,52,52,247,94,52,35,0,0,0,0,4,208,+  3,172,243,3,0,0,0,0,0,0,203,93,0,155,155,0,12,255,41,0,55,255,74,0,0,20,224,255,209,0,0,0,+  0,0,0,0,0,214,147,0,0,0,0,0,0,220,139,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,24,20,0,116,244,0,0,0,0,0,13,250,27,0,0,0,23,255,84,0,0,0,138,207,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,107,0,31,254,13,0,0,0,45,160,19,4,208,+  0,96,255,22,0,0,0,0,0,82,213,2,0,103,193,0,52,241,4,0,10,240,141,0,0,0,141,255,205,13,0,0,+  0,0,0,0,0,164,187,0,0,0,0,0,7,252,89,0,0,4,82,170,232,157,62,0,0,0,0,3,96,187,235,176,+  41,0,0,0,0,0,0,0,116,244,0,0,0,0,0,78,212,0,0,0,0,0,199,171,0,0,5,222,148,0,0,0,+  0,0,0,0,0,0,0,31,56,3,0,0,0,0,0,0,0,0,238,61,0,76,223,0,0,0,0,38,255,103,4,208,+  0,159,198,0,0,0,0,0,2,213,83,0,0,37,247,105,177,175,0,0,0,146,250,156,80,159,254,173,251,199,14,0,+  0,0,0,0,0,114,227,0,0,0,0,0,44,255,38,0,0,100,247,153,82,163,255,74,0,0,0,99,247,135,85,190,+  235,31,0,0,0,0,0,0,116,244,0,0,0,0,0,149,141,0,0,0,0,0,82,255,189,95,216,233,17,0,0,0,+  0,0,0,0,0,0,0,144,255,16,0,0,0,0,0,0,0,29,255,15,0,121,178,0,0,0,0,0,193,244,122,218,+  138,249,103,0,0,0,0,0,93,205,1,0,0,0,91,215,159,32,0,0,0,4,130,217,240,192,78,0,76,198,12,0,+  0,0,0,0,0,55,254,34,0,0,0,0,105,233,1,0,0,209,153,0,0,0,189,177,0,0,6,224,149,0,0,22,+  249,114,0,0,0,0,0,0,116,244,0,0,0,0,0,220,71,0,0,0,0,0,0,93,210,236,162,54,0,0,0,0,+  0,32,56,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,159,235,254,+  183,77,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,+  31,56,2,0,0,0,179,149,0,0,0,2,219,103,0,0,19,149,52,0,0,0,132,248,2,0,3,48,22,0,0,26,+  248,123,0,0,0,0,0,0,116,244,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,148,255,8,0,0,0,0,0,0,9,218,148,0,0,0,0,16,255,255,255,255,255,184,0,0,0,0,0,0,5,208,+  0,0,0,0,0,0,0,72,169,230,147,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  144,255,12,0,0,0,37,240,21,0,0,85,209,3,0,0,0,0,0,0,0,0,218,210,0,0,0,0,0,3,53,174,+  238,38,0,0,0,0,0,0,116,244,0,0,0,58,191,238,186,97,0,0,0,64,255,255,255,255,255,255,255,43,0,0,+  0,0,218,2,0,0,0,0,0,0,140,255,148,0,0,0,0,62,255,72,56,56,56,40,0,0,0,0,0,0,4,208,+  0,0,0,0,0,0,62,255,153,83,180,246,18,0,0,0,6,130,220,232,158,46,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,138,132,0,0,203,65,0,0,0,0,0,0,0,0,113,255,87,0,0,0,0,0,119,255,255,+  97,0,0,0,0,0,0,0,116,244,0,0,60,249,164,78,150,252,72,0,0,14,56,56,56,56,58,227,207,5,0,0,+  0,89,172,0,0,0,0,0,0,54,244,236,148,0,0,0,0,108,235,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,165,198,0,0,9,239,115,0,0,0,162,249,159,83,171,229,25,0,0,0,0,0,0,0,0,0,+  0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,253,158,0,0,0,0,0,0,43,71,159,+  251,122,0,0,0,0,0,0,116,244,0,0,182,181,1,0,0,159,166,0,0,0,0,0,0,0,111,251,49,0,0,0,+  0,34,5,0,0,0,0,0,6,213,122,212,148,0,0,0,0,154,190,0,0,0,0,0,0,0,28,255,255,255,255,255,+  255,255,116,0,0,0,198,181,0,0,1,222,155,0,0,34,255,147,0,0,0,202,178,0,0,0,0,0,0,0,0,57,+  172,117,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,255,157,2,0,0,0,0,0,0,0,0,0,+  179,232,1,0,0,0,0,0,0,0,0,24,254,74,0,0,0,0,0,0,0,0,0,0,0,29,243,131,0,0,0,0,+  0,0,0,0,0,0,0,0,132,208,4,212,148,0,0,0,0,200,193,159,236,220,115,1,0,0,6,56,56,56,56,56,+  56,56,25,0,0,0,107,251,97,29,129,251,70,0,0,73,255,57,0,0,0,121,246,6,0,0,0,0,3,83,198,255,+  204,57,0,32,210,96,6,0,0,0,0,0,0,0,0,0,0,0,130,255,152,1,0,0,0,0,19,96,21,0,0,0,+  111,255,28,0,0,0,0,0,0,0,0,56,255,61,175,239,221,108,0,0,0,0,0,0,0,167,227,6,0,0,0,0,+  0,132,255,0,0,0,0,48,247,52,0,212,148,0,0,0,1,244,236,109,79,175,253,130,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,137,255,255,255,97,0,0,0,16,247,106,0,0,0,177,255,28,0,0,12,110,222,252,172,60,+  0,0,0,12,166,250,231,123,18,0,0,0,0,0,0,0,0,115,255,138,0,0,0,0,0,0,11,236,134,0,0,0,+  198,237,1,0,0,0,0,0,0,0,0,83,255,222,166,81,172,254,80,0,0,0,0,0,19,249,128,0,0,0,0,0,+  0,132,255,0,0,0,4,206,140,0,0,212,148,0,0,0,2,64,35,0,0,0,182,249,12,0,0,4,4,4,4,4,+  4,4,1,0,0,0,137,239,142,79,164,241,91,0,0,0,165,224,91,29,114,240,255,42,0,23,239,239,139,31,0,0,+  0,0,0,0,0,27,134,236,245,149,37,0,0,0,0,0,27,244,201,56,56,56,56,56,3,0,0,125,243,131,85,180,+  255,97,0,0,0,0,0,0,0,0,0,96,255,170,0,0,0,190,171,0,0,0,0,0,107,253,30,0,0,0,0,0,+  0,132,255,0,0,0,122,223,14,4,4,212,149,4,0,0,0,0,0,0,0,0,95,255,52,0,28,255,255,255,255,255,+  255,255,116,0,0,19,252,122,0,0,0,172,225,0,0,0,31,149,241,255,200,97,255,19,0,22,237,239,138,29,0,0,+  0,0,0,0,0,0,0,9,101,211,253,96,0,0,0,0,110,255,255,255,255,255,255,255,16,0,0,7,89,181,241,201,+  79,0,0,0,0,0,0,0,0,0,0,72,255,83,0,0,0,107,247,12,0,0,0,0,201,182,0,0,0,0,0,0,+  0,132,255,0,0,0,204,255,255,255,255,255,255,255,32,0,22,101,28,0,0,0,112,249,15,0,5,52,52,52,52,52,+  52,52,23,0,0,76,255,43,0,0,0,90,255,31,0,0,0,0,11,22,0,98,241,0,0,0,11,109,221,251,169,56,+  0,0,0,0,0,0,0,8,99,211,253,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,44,255,87,0,0,0,118,250,9,0,0,0,31,255,87,0,0,0,0,0,0,+  0,132,255,0,0,0,41,52,52,52,52,220,169,52,6,0,8,233,147,0,0,0,197,181,0,0,0,0,0,0,0,0,+  0,0,0,0,0,42,255,102,0,0,0,166,248,5,0,4,90,33,0,0,0,154,206,0,0,0,0,0,3,85,200,255,+  200,55,0,0,0,25,131,234,245,148,35,0,0,0,4,79,171,231,153,59,0,0,0,0,0,0,0,7,96,186,221,245,+  202,142,82,8,0,0,0,0,0,0,0,2,217,174,0,0,0,196,204,0,0,0,0,74,255,43,0,0,0,0,0,0,+  0,132,255,0,0,0,0,0,0,0,0,212,148,0,0,0,0,123,247,140,86,190,253,80,0,0,212,255,255,255,249,210,+  150,9,0,0,0,0,171,247,118,77,161,251,125,0,0,0,204,149,0,0,19,237,135,0,0,0,0,0,0,0,0,61,+  176,117,0,12,162,249,232,124,18,0,0,0,0,0,102,250,153,83,173,255,79,0,0,0,0,0,23,222,245,187,123,72,+  115,175,237,186,9,0,0,0,0,0,0,0,90,254,154,80,178,251,70,0,0,0,0,110,255,11,0,0,0,0,0,0,+  0,132,255,0,0,0,0,0,0,0,0,212,148,0,0,0,0,7,88,179,239,195,73,0,0,0,212,193,56,56,71,106,+  237,187,0,0,0,0,5,77,170,232,155,61,0,0,0,0,97,244,123,86,204,212,7,0,0,0,0,0,0,0,0,0,+  0,4,0,32,214,100,7,0,0,0,0,0,0,1,214,164,0,0,0,192,188,0,0,0,0,7,199,187,9,0,0,0,+  0,0,23,208,188,9,0,0,0,0,0,0,0,78,200,241,190,84,0,0,0,0,0,146,235,0,0,0,0,0,0,0,+  0,132,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,0,+  102,255,30,0,0,0,0,0,0,0,0,0,0,0,0,0,5,97,197,222,144,35,0,0,0,0,0,0,0,0,0,0,+  0,0,0,3,1,0,0,0,0,0,0,0,0,25,163,52,0,0,0,112,252,7,0,0,0,164,193,10,7,125,218,210,+  77,146,210,15,200,143,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,132,255,0,0,0,0,0,0,0,207,255,54,0,0,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,0,+  86,255,31,0,196,255,255,255,247,224,169,45,0,0,0,0,0,0,0,0,0,0,0,0,0,188,255,255,255,255,255,255,+  255,140,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,190,206,0,0,0,89,223,12,0,156,227,91,117,+  230,225,160,0,88,213,0,0,0,0,0,65,145,210,229,155,77,4,0,0,176,255,255,255,255,255,255,255,12,0,0,0,+  0,132,255,0,0,0,0,0,0,44,254,211,154,0,0,0,0,0,0,0,0,0,0,0,0,0,212,177,4,4,12,49,+  207,177,0,0,196,206,56,56,67,100,202,253,56,0,0,0,0,0,0,0,196,192,0,0,0,188,212,56,56,56,56,56,+  56,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,248,55,0,0,0,155,151,0,96,252,41,0,0,+  131,255,110,0,20,253,23,0,0,0,86,250,184,108,84,162,249,130,0,0,176,221,56,56,56,56,56,56,2,0,0,0,+  0,132,255,0,0,0,0,0,0,139,207,108,242,11,0,0,0,0,0,0,0,0,0,0,0,0,212,255,255,255,255,255,+  232,18,0,0,196,192,0,0,0,0,15,202,214,7,0,0,0,0,0,0,196,192,0,0,0,188,200,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,254,89,0,0,0,0,210,88,0,188,168,0,0,0,+  64,255,60,0,2,242,56,0,0,68,250,134,0,0,0,0,128,251,50,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,132,255,0,0,0,0,0,3,229,135,25,253,98,0,0,0,0,0,0,0,0,0,0,0,0,212,192,52,52,59,94,+  205,222,38,0,196,192,0,0,0,0,0,86,255,80,0,0,0,0,0,0,196,192,0,0,0,188,200,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,248,124,0,0,0,0,12,253,27,4,244,104,0,0,0,+  90,253,12,0,47,254,14,0,0,174,213,5,0,0,0,0,7,147,69,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,71,255,44,0,186,198,0,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,0,+  13,248,137,0,196,192,0,0,0,0,0,35,255,121,0,0,0,0,0,0,196,192,0,0,0,188,200,4,4,4,4,4,+  4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,63,255,31,0,0,0,0,12,253,45,23,255,92,0,0,0,+  163,215,0,0,132,206,0,0,0,229,148,0,0,0,0,0,0,0,0,0,176,212,4,4,4,4,4,0,0,0,0,0,+  0,0,0,0,0,0,0,0,165,206,0,0,92,255,42,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,0,+  0,207,195,0,196,192,0,0,0,0,0,0,240,161,0,0,0,0,0,0,196,192,0,0,0,188,255,255,255,255,255,255,+  255,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,124,7,0,0,0,0,0,212,110,0,231,161,0,0,61,+  253,167,0,77,252,61,0,0,29,255,108,0,0,0,0,0,0,0,0,0,176,255,255,255,255,255,255,52,0,0,0,0,+  0,0,0,0,0,0,0,13,245,124,16,16,26,245,142,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,0,+  12,243,153,0,196,192,0,0,0,0,0,0,239,160,0,0,0,0,0,0,196,192,0,0,0,188,211,52,52,52,52,52,+  52,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,56,11,0,0,0,0,0,160,175,0,133,251,156,137,231,+  246,208,143,245,129,0,0,0,23,255,115,0,0,0,0,0,0,0,0,0,176,220,52,52,52,52,52,10,0,0,0,0,+  0,0,0,0,0,0,0,97,255,255,255,255,255,255,235,6,0,0,0,0,0,0,0,0,0,0,212,193,56,56,57,75,+  192,247,46,0,196,192,0,0,0,0,0,15,255,127,0,0,0,0,0,0,196,192,0,0,0,188,200,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,255,52,0,0,0,0,0,61,245,87,3,148,233,192,45,+  139,242,198,87,0,42,28,0,0,229,156,0,0,0,0,0,0,27,2,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,191,202,64,64,64,64,107,255,86,0,0,0,0,0,0,0,0,0,0,212,255,255,255,253,230,+  183,59,0,0,196,192,0,0,0,0,0,70,255,78,0,0,0,0,0,0,196,192,0,0,0,188,200,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,121,255,127,0,0,0,0,+  0,0,0,22,173,232,35,0,0,179,211,3,0,0,0,0,15,236,168,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,30,254,109,0,0,0,0,3,231,186,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,196,192,0,0,0,0,1,200,222,2,0,57,129,0,0,0,203,174,0,0,0,188,200,0,0,0,0,0,+  0,0,0,0,0,0,46,128,189,241,213,164,38,0,0,0,0,0,0,0,0,0,0,0,0,1,113,237,216,164,116,70,+  87,129,171,236,191,43,0,0,0,61,251,135,0,0,0,0,132,249,37,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,123,253,25,0,0,0,0,0,144,253,31,0,184,204,0,0,0,0,0,64,255,68,0,0,0,0,+  0,0,0,0,196,206,56,56,65,97,196,248,67,0,0,72,255,25,0,1,232,136,0,0,0,188,212,56,56,56,56,56,+  56,45,0,0,0,53,243,192,107,68,105,203,243,71,0,0,0,0,0,0,0,0,0,0,0,0,0,16,125,177,212,245,+  230,194,157,70,0,0,0,0,0,0,109,255,169,96,95,184,252,133,0,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,216,194,0,0,0,0,0,0,53,255,130,0,184,204,0,0,0,0,0,64,255,68,0,0,0,0,+  0,0,0,0,196,255,255,255,250,224,168,51,0,0,0,6,242,174,77,155,251,61,0,0,0,188,255,255,255,255,255,255,+  255,208,0,0,39,235,147,2,0,0,0,6,189,211,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,81,149,213,228,148,66,3,0,0,176,212,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,204,0,0,0,0,0,64,255,68,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,59,158,235,198,85,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,150,230,9,0,0,0,0,0,59,169,21,0,212,176,0,0,0,0,45,237,216,24,0,212,176,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,208,255,160,0,0,0,0,0,24,253,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,255,255,+  255,254,238,199,91,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,244,32,0,0,0,0,52,255,+  64,0,0,0,207,173,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,38,232,217,25,0,0,212,176,0,0,0,+  0,0,0,0,0,0,0,55,172,220,235,170,101,13,0,0,0,0,0,0,68,145,211,231,164,96,8,0,0,0,0,0,+  0,0,0,0,208,254,237,4,0,0,0,0,106,255,255,32,0,0,184,204,4,4,4,4,4,67,255,68,0,196,206,56,+  56,57,75,174,255,84,0,192,255,255,255,255,247,215,170,23,0,0,0,0,0,0,0,200,255,184,0,0,0,0,52,255,+  64,0,0,11,252,127,0,0,0,1,4,4,4,4,1,0,212,176,0,0,32,227,219,26,0,0,0,212,176,0,0,0,+  0,0,0,0,0,0,118,252,177,93,77,148,234,190,7,0,0,0,0,96,254,165,90,81,154,240,172,2,0,0,0,0,+  0,0,0,0,208,197,254,68,0,0,0,0,190,209,255,32,0,0,184,255,255,255,255,255,255,255,255,68,0,196,192,0,+  0,0,0,1,220,195,0,192,209,56,56,56,69,135,232,224,4,0,0,0,0,0,0,200,240,255,93,0,0,0,52,255,+  64,0,0,16,254,129,0,0,0,104,255,255,255,255,112,0,212,176,0,26,221,220,27,0,0,0,0,212,176,0,0,0,+  0,0,0,0,0,55,254,118,0,0,0,0,46,243,171,1,0,0,75,251,99,0,0,0,0,61,249,149,0,0,0,0,+  0,0,0,0,208,168,201,150,0,0,0,21,252,124,255,32,0,0,184,214,52,52,52,52,52,103,255,68,0,196,192,0,+  0,0,0,0,167,233,0,192,196,0,0,0,0,0,105,255,62,0,0,0,0,0,0,200,172,187,235,20,0,0,52,255,+  64,0,0,0,213,179,0,0,0,21,52,52,61,255,112,0,212,176,21,215,226,29,0,0,0,0,0,212,176,0,0,0,+  0,0,0,0,0,195,211,3,0,0,0,0,0,99,255,44,0,0,196,194,0,0,0,0,0,0,119,255,23,0,0,0,+  0,0,0,0,208,168,118,230,1,0,0,102,207,88,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,192,0,+  0,0,0,2,229,161,0,192,196,0,0,0,0,0,74,255,58,0,0,0,0,0,0,200,172,34,246,165,0,0,52,255,+  64,0,0,0,155,232,7,0,0,0,0,0,12,255,112,0,212,192,207,254,241,32,0,0,0,0,0,212,176,0,0,0,+  0,0,0,0,3,249,138,0,0,0,0,0,0,32,255,99,0,5,246,115,0,0,0,0,0,0,52,255,78,0,0,0,+  0,0,0,0,208,168,35,255,58,0,0,186,122,88,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,193,4,+  4,6,63,152,255,70,0,192,196,4,4,4,19,65,217,212,0,0,0,0,0,0,0,200,172,0,117,255,72,0,52,255,+  64,0,0,0,45,237,179,5,0,0,0,0,64,255,112,0,212,255,224,59,240,195,2,0,0,0,0,212,176,0,0,0,+  0,0,0,0,35,255,106,0,0,0,0,0,0,0,240,155,0,52,255,81,0,0,0,0,0,0,8,251,133,0,0,0,+  0,0,0,0,208,168,0,208,140,0,18,251,38,88,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,255,255,+  255,255,255,243,122,2,0,192,255,255,255,255,255,237,137,30,0,0,0,0,0,0,0,200,172,0,4,206,224,12,52,255,+  64,0,0,0,0,50,238,202,124,71,104,169,254,211,50,0,212,230,34,0,97,255,122,0,0,0,0,212,176,0,0,0,+  0,0,0,0,39,255,96,0,0,0,0,0,0,0,233,156,0,52,255,81,0,0,0,0,0,0,4,250,144,0,0,0,+  0,0,0,0,208,168,0,125,221,0,98,209,0,88,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,205,52,+  52,50,25,1,0,0,0,192,208,52,53,89,232,177,12,0,0,0,0,0,0,0,0,200,172,0,0,50,252,144,52,255,+  64,0,0,0,0,0,38,121,183,239,221,177,96,2,0,0,212,176,0,0,0,181,250,51,0,0,0,212,176,0,0,0,+  0,0,0,0,1,237,132,0,0,0,0,0,0,12,255,99,0,5,246,115,0,0,0,0,0,0,38,255,101,0,0,0,+  0,0,0,0,208,168,0,42,255,47,180,124,0,88,255,32,0,0,184,204,0,0,0,0,0,64,255,68,0,196,192,0,+  0,0,0,0,0,0,0,192,196,0,0,0,53,251,164,0,0,0,0,0,0,0,0,200,172,0,0,0,139,253,106,255,+  64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,176,0,0,0,26,239,215,9,0,0,212,176,0,0,0,+  0,0,0,0,0,181,211,3,0,0,0,0,0,96,255,42,0,0,195,198,0,0,0,30,3,0,115,255,51,0,0,0,+  0,0,0,0,208,168,0,0,215,140,248,39,0,88,255,32,0,0,0,0,0,0,0,0,0,0,0,0,0,196,192,0,+  0,0,0,0,0,0,0,192,196,0,0,0,0,142,255,91,0,0,0,0,0,0,0,200,172,0,0,0,10,222,241,255,+  64,0,0,0,44,172,221,239,195,123,3,0,0,0,0,0,212,176,0,0,0,0,94,255,150,0,0,212,211,112,112,112,+  112,112,36,0,0,57,246,125,0,0,0,0,30,228,178,1,0,0,72,251,106,0,0,162,217,105,244,169,0,0,0,0,+  0,0,0,0,208,168,0,0,132,250,210,0,0,88,255,32,0,160,255,255,255,255,255,255,255,255,116,0,0,196,192,0,+  0,0,0,0,0,0,0,192,196,0,0,0,0,13,232,229,10,0,0,0,0,0,0,200,172,0,0,0,0,70,255,255,+  64,0,0,59,243,182,106,79,149,238,185,1,0,0,0,0,212,176,0,0,0,0,0,177,255,74,0,212,255,255,255,255,+  255,255,84,0,0,0,79,252,178,93,71,122,238,187,7,0,0,0,0,93,254,167,90,79,212,255,254,45,0,0,0,0,+  0,0,0,0,208,168,0,0,49,255,126,0,0,88,255,32,0,35,56,56,56,224,190,56,56,56,25,0,0,196,192,0,+  0,0,0,0,0,0,0,192,196,0,0,0,0,0,102,255,128,0,0,0,0,0,0,200,172,0,0,0,0,0,162,255,+  64,0,0,161,218,3,0,0,0,109,255,51,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,57,136,204,235,173,107,10,0,0,0,0,0,0,65,144,213,233,173,112,164,243,117,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,192,196,0,0,0,0,0,3,212,245,26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,193,215,1,0,0,0,10,122,44,0,192,196,0,0,0,0,0,64,255,68,0,189,226,1,0,0,0,0,0,+  45,255,92,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,94,0,0,0,+  0,172,220,0,0,0,0,118,255,162,0,0,0,0,182,202,0,0,0,0,0,216,172,0,0,0,0,0,4,255,255,255,+  255,255,255,255,255,48,0,0,0,0,0,0,0,0,0,0,0,0,0,31,242,188,1,0,0,0,2,190,220,12,0,0,+  0,0,0,119,255,192,97,27,0,0,0,0,0,192,196,0,0,0,0,0,64,255,68,0,94,255,58,0,0,0,0,0,+  136,241,10,0,163,253,53,0,0,0,0,0,136,253,57,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,107,255,21,0,0,0,187,237,230,0,0,0,2,239,135,0,0,0,0,0,216,172,0,0,0,0,0,0,56,56,56,+  56,56,65,233,229,16,0,176,255,255,104,0,13,212,209,1,0,0,0,0,100,255,106,0,0,0,121,251,54,0,0,0,+  0,0,0,1,140,250,255,255,216,132,12,0,0,192,196,0,0,0,0,0,64,255,68,0,11,243,145,0,0,0,0,1,+  225,156,0,0,20,235,206,3,0,0,0,45,251,141,0,0,236,255,255,48,0,220,71,0,0,0,0,0,0,0,0,0,+  0,42,255,77,0,0,8,247,126,255,44,0,0,45,255,68,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,0,+  0,0,163,253,64,0,0,38,56,255,104,0,0,33,235,81,0,0,0,0,0,181,244,34,0,54,250,123,0,0,0,0,+  0,0,0,0,0,18,98,173,238,255,211,30,0,192,196,0,0,0,0,0,64,255,68,0,0,161,230,2,0,0,0,62,+  255,61,0,0,0,93,255,112,0,0,2,199,219,9,0,0,236,152,56,10,0,149,141,0,0,0,0,0,0,0,0,0,+  0,0,233,134,0,0,68,252,18,236,113,0,0,105,248,9,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,0,+  0,99,255,127,0,0,0,0,0,255,104,0,0,0,22,24,0,0,0,0,0,25,238,190,10,219,194,2,0,0,0,0,+  0,0,0,0,0,0,0,0,4,110,251,141,0,192,196,0,0,0,0,0,64,255,68,0,0,66,255,63,0,0,0,153,+  220,0,0,0,0,0,186,243,27,0,106,254,61,0,0,0,236,124,0,0,0,78,212,0,0,0,0,0,0,0,0,0,+  0,0,169,191,0,0,136,200,0,170,182,0,0,164,190,0,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,0,+  41,245,191,2,0,0,0,0,0,255,104,0,0,0,0,0,0,0,0,0,0,0,90,255,206,239,30,0,0,0,0,0,+  0,0,32,235,77,0,0,0,0,0,187,196,0,192,196,0,0,0,0,0,64,255,68,0,0,1,225,151,0,0,6,238,+  125,0,0,0,0,0,33,245,165,20,238,145,0,0,0,0,236,124,0,0,0,13,250,27,0,0,0,0,0,0,0,0,+  0,0,104,244,3,0,205,132,0,102,244,6,0,224,123,0,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,8,+  210,235,26,0,0,0,0,0,0,255,104,0,240,120,0,0,0,0,0,0,0,0,0,183,255,109,0,0,0,0,0,0,+  0,0,0,224,182,5,0,0,0,5,220,137,0,191,196,0,0,0,0,0,64,255,67,0,0,0,133,234,3,0,79,254,+  31,0,0,0,0,0,0,116,255,194,221,11,0,0,0,0,236,124,0,0,0,0,192,97,0,0,0,0,0,0,0,0,+  0,0,40,255,49,19,253,63,0,34,255,58,27,255,56,0,0,0,0,0,0,216,172,0,0,0,0,0,0,0,0,151,+  254,73,0,0,0,0,0,0,0,255,104,0,52,26,0,0,0,0,0,0,0,0,27,237,255,203,4,0,0,0,0,0,+  0,0,0,84,246,199,107,67,98,201,221,33,0,167,213,0,0,0,0,0,78,255,43,0,0,0,38,255,69,0,169,190,+  0,0,0,0,0,0,0,3,205,255,64,0,0,0,0,0,236,124,0,0,0,0,121,168,0,0,0,0,0,0,0,0,+  0,0,0,231,106,86,244,6,0,0,222,112,87,241,3,0,0,0,0,0,0,216,172,0,0,0,0,0,0,0,83,255,+  138,0,0,0,0,0,0,0,0,255,104,0,0,0,0,0,0,0,0,0,0,1,187,230,97,255,126,0,0,0,0,0,+  0,0,0,0,51,166,209,244,209,153,21,0,0,129,244,0,0,0,0,0,103,254,9,0,0,0,0,199,156,13,246,94,+  0,0,0,0,0,0,0,0,140,248,0,0,0,0,0,0,236,124,0,0,0,0,50,236,2,0,0,0,0,0,0,0,+  0,0,0,166,159,151,183,0,0,0,154,165,144,178,0,0,0,0,0,0,0,216,172,0,0,0,0,0,0,31,239,200,+  5,0,0,0,0,0,0,0,0,255,104,0,240,120,0,0,0,0,0,0,0,114,255,75,0,169,250,50,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,86,255,71,0,0,0,0,189,218,0,0,0,0,0,105,234,89,243,11,+  0,0,0,0,0,0,0,0,140,248,0,0,0,0,0,0,236,124,0,0,0,0,1,234,53,0,0,0,0,0,0,0,+  0,0,0,102,209,211,114,0,0,0,86,219,201,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,198,239,32,+  0,0,0,0,0,0,0,0,0,255,104,0,240,120,0,0,0,0,0,0,46,248,155,0,0,19,232,213,7,0,0,0,+  0,17,245,134,0,0,0,0,0,0,0,0,0,2,173,239,125,73,126,211,246,52,0,0,0,0,0,17,248,218,159,0,+  0,0,0,0,0,0,0,0,140,248,0,0,0,0,0,0,236,124,0,0,0,0,0,164,124,0,0,0,0,0,0,0,+  0,0,0,37,252,254,46,0,0,0,19,253,251,44,0,0,0,0,8,136,210,245,218,144,10,0,0,0,127,255,131,56,+  56,56,56,56,56,21,0,0,0,255,104,0,240,120,0,0,0,0,0,8,211,222,12,0,0,0,79,255,140,0,0,0,+  0,115,244,235,8,0,0,0,0,0,0,0,0,0,8,129,186,238,212,151,61,0,0,0,0,0,0,0,171,255,63,0,+  0,0,0,0,0,0,0,0,140,248,0,0,0,0,0,0,236,124,0,0,0,0,0,93,195,0,0,0,0,0,0,0,+  0,0,0,0,228,233,1,0,0,0,0,206,232,0,0,0,0,0,174,231,110,76,144,254,132,0,0,0,176,255,255,255,+  255,255,255,255,255,96,0,0,0,255,104,0,240,120,0,0,0,0,0,145,253,62,0,0,0,0,0,162,253,62,0,0,+  2,222,111,230,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,140,248,0,0,0,0,0,0,236,124,0,0,0,0,0,23,250,14,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,184,90,0,0,0,200,190,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,255,104,0,240,120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  77,247,16,133,206,0,0,0,13,56,56,56,56,56,56,56,56,56,5,0,244,116,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,124,0,0,0,0,0,0,207,80,0,0,0,0,0,0,+  0,0,2,127,208,231,147,126,212,0,0,0,0,0,0,0,0,0,0,0,31,79,129,222,199,0,0,0,0,108,195,235,+  164,66,0,0,252,108,0,0,0,255,104,0,240,120,0,0,0,0,0,0,0,0,0,168,192,0,0,0,244,116,0,0,+  186,165,0,33,254,60,0,0,60,255,255,255,255,255,255,255,255,255,24,0,244,116,0,0,0,0,0,0,0,0,0,104,+  208,242,199,68,0,0,0,0,21,184,241,216,0,0,0,0,236,124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,130,249,150,99,219,246,212,0,0,0,0,0,0,0,0,0,85,225,255,229,168,209,200,0,0,0,111,252,168,82,+  170,244,23,0,252,108,0,38,56,255,104,0,240,120,0,0,0,0,0,0,0,0,0,168,192,0,0,0,53,25,0,40,+  254,66,0,0,186,170,0,0,0,0,0,0,0,0,0,0,0,0,0,0,244,116,0,0,0,0,0,0,0,0,126,252,+  169,89,199,252,68,0,0,0,133,250,86,53,0,0,0,0,236,152,56,10,0,244,116,0,0,0,0,0,0,0,0,0,+  0,26,253,127,0,0,13,250,212,0,0,0,0,0,0,0,0,37,251,154,35,0,0,186,200,0,0,7,251,154,0,0,+  6,205,108,0,252,108,0,176,255,255,104,0,240,120,0,0,0,0,0,0,0,0,0,168,192,0,0,0,0,0,0,60,+  122,1,0,0,54,123,2,0,240,120,0,0,0,0,0,0,0,0,0,0,244,129,164,237,211,105,0,0,0,21,246,160,+  0,0,0,182,204,0,0,0,159,204,0,0,0,0,0,0,236,255,255,48,0,244,116,0,0,0,0,0,0,0,0,0,+  0,75,255,57,0,0,0,194,212,0,0,0,0,0,0,0,0,87,255,44,0,0,23,236,203,0,0,50,255,86,0,0,+  0,0,0,0,252,108,0,0,0,0,0,0,240,120,0,0,0,0,3,129,212,227,133,169,192,0,0,0,244,116,0,0,+  0,0,0,0,0,0,0,0,240,120,0,0,0,0,0,0,0,0,0,0,244,251,203,91,174,255,110,0,0,70,255,79,+  4,4,4,104,255,12,0,220,255,255,255,104,0,0,0,0,0,0,0,0,0,244,116,0,0,0,0,0,0,0,0,0,+  0,109,255,9,0,0,0,141,212,0,0,0,0,0,0,0,0,16,245,184,79,104,213,232,215,0,0,86,255,36,0,0,+  0,0,0,0,252,108,0,0,0,0,0,0,0,0,0,0,0,0,134,248,146,101,222,250,192,0,0,0,244,116,0,244,+  98,165,235,196,100,0,0,0,240,120,0,0,0,0,0,0,0,0,0,0,244,226,0,0,0,183,231,2,0,99,255,255,+  255,255,255,255,255,45,0,48,181,212,56,22,0,244,89,154,229,225,137,4,0,244,129,156,232,220,134,1,0,0,0,0,+  0,51,255,60,0,0,0,192,212,0,0,0,0,0,0,0,0,0,80,179,240,203,87,87,251,20,0,62,255,85,0,0,+  0,51,48,0,252,108,0,0,3,72,167,239,204,86,0,0,0,25,254,128,0,0,20,254,192,0,0,0,244,116,0,244,+  237,206,91,177,254,81,0,0,240,120,0,1,166,241,52,0,0,0,0,0,244,155,0,0,0,116,255,31,0,74,255,97,+  52,52,52,52,52,11,0,0,160,200,0,0,0,244,236,175,82,131,255,117,0,244,252,166,78,144,255,113,0,0,0,0,+  0,1,229,124,0,0,9,249,212,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,247,151,0,0,+  4,228,132,0,252,108,0,0,138,251,166,87,188,255,102,0,0,71,255,64,0,0,0,209,192,0,0,0,244,116,0,244,+  229,1,0,0,184,225,0,0,240,120,0,146,246,61,0,0,0,0,0,0,244,102,0,0,0,65,255,54,0,26,250,141,+  0,0,0,110,166,7,0,0,160,200,0,0,0,244,192,0,0,0,195,187,0,244,197,1,0,0,216,172,0,0,0,0,+  0,0,143,247,147,95,210,253,208,0,244,91,159,232,210,91,14,166,234,179,64,0,0,0,0,0,0,0,133,251,162,83,+  174,241,18,0,252,108,0,32,252,138,0,0,0,182,237,8,0,104,255,16,0,0,0,153,192,0,0,0,244,116,0,244,+  159,0,0,0,115,255,19,0,240,120,123,249,71,0,0,0,0,0,0,0,244,137,0,0,0,118,255,24,0,0,139,245,+  155,77,129,252,114,0,0,0,160,200,0,0,0,244,134,0,0,0,161,201,0,244,139,0,0,0,157,204,0,0,0,0,+  0,0,3,138,222,232,145,170,195,0,244,238,154,79,184,249,209,158,78,190,218,0,0,0,0,0,0,0,1,113,213,235,+  153,51,0,0,252,108,0,81,255,66,0,0,0,107,255,46,0,67,255,69,0,0,0,198,192,0,0,0,244,116,0,244,+  101,0,0,0,65,255,51,0,240,206,255,164,0,0,0,0,0,0,0,0,244,193,0,0,0,187,221,0,0,0,1,110,+  209,241,185,109,2,0,0,0,160,200,0,0,0,244,116,0,0,0,156,204,0,244,116,0,0,0,152,208,0,0,0,0,+  0,11,90,17,0,0,2,206,158,0,244,194,0,0,46,255,199,0,0,54,255,40,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,252,108,0,111,255,13,0,0,0,54,255,67,0,17,253,139,0,0,15,252,192,0,0,0,244,116,0,244,+  146,0,0,0,119,254,13,0,240,254,184,251,46,0,0,0,0,0,0,0,244,244,156,79,180,255,85,0,0,0,0,0,+  0,0,0,0,0,0,0,0,160,200,0,0,0,244,116,0,0,0,156,204,0,244,116,0,0,0,152,208,0,0,0,0,+  0,0,193,189,87,81,165,242,49,0,244,142,0,0,5,255,126,0,0,30,255,76,0,0,2,131,213,226,131,132,192,0,+  0,0,0,0,252,108,0,85,255,66,0,0,0,111,255,26,0,0,120,251,154,95,211,244,192,0,0,0,244,116,0,244,+  214,0,0,0,187,217,0,0,240,143,6,217,197,1,0,0,0,0,0,0,244,106,170,238,209,86,0,0,0,248,112,212,+  237,84,0,0,0,0,0,0,160,200,0,0,0,244,116,0,0,0,156,204,0,244,116,0,0,0,152,208,0,0,0,0,+  0,0,44,153,218,231,173,58,0,0,244,118,0,0,4,255,100,0,0,28,255,76,0,0,136,248,148,102,227,235,192,0,+  0,0,0,0,252,108,0,33,252,138,0,0,0,182,235,0,0,0,0,118,207,232,144,142,192,0,0,0,244,116,0,244,+  254,188,88,178,250,66,0,0,240,120,0,72,255,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,248,112,+  96,23,0,0,0,0,0,0,160,200,0,0,0,244,116,0,0,0,156,204,0,244,116,0,0,0,152,208,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,244,116,0,0,4,255,100,0,0,28,255,76,0,20,255,132,0,0,25,255,192,0,+  0,0,0,0,0,0,0,0,147,251,165,86,185,253,92,0,0,0,0,0,0,0,0,0,0,0,0,11,254,93,0,244,+  135,173,238,188,81,0,0,0,240,120,0,0,176,237,21,0,0,58,195,243,223,160,19,0,0,136,180,0,0,248,176,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,244,116,0,0,0,156,204,0,244,116,0,0,0,152,208,0,0,0,0,+  0,159,217,0,0,0,0,203,163,0,244,116,0,0,4,255,100,0,0,28,255,76,0,68,255,68,0,0,0,210,192,0,+  0,0,1,0,0,0,0,0,2,117,213,241,185,86,0,0,0,85,255,104,0,0,88,255,85,0,50,131,255,47,0,244,+  116,0,0,0,0,0,0,0,240,120,0,0,33,247,161,0,15,239,174,79,104,229,186,0,0,136,180,0,0,248,134,0,+  0,0,0,252,108,0,0,0,168,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,70,255,46,0,0,34,255,73,0,244,116,0,0,4,255,100,0,0,28,255,76,0,102,255,20,0,0,0,150,192,0,+  0,71,155,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,175,237,20,21,235,167,0,0,149,230,120,4,0,244,+  116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,255,49,0,0,74,127,1,0,136,180,0,0,248,112,0,+  0,0,0,252,108,0,0,0,168,192,0,208,160,0,0,18,254,162,0,0,21,254,75,0,0,0,67,220,245,0,0,0,+  0,3,232,131,0,0,120,235,4,0,244,116,0,0,4,255,100,0,0,28,255,76,0,74,255,73,0,0,0,194,192,0,+  0,176,184,0,0,0,141,238,6,0,0,0,186,173,0,0,0,0,25,239,152,165,230,18,0,0,0,0,0,0,0,244,+  116,0,0,0,0,0,0,0,159,238,125,0,0,0,0,0,9,234,234,147,67,3,0,0,0,136,180,0,0,248,112,0,+  0,0,0,252,108,0,0,0,168,192,0,136,225,0,0,80,255,222,0,0,90,247,9,0,0,0,202,197,70,0,0,0,+  0,0,146,216,0,0,206,151,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,247,143,0,0,13,250,192,0,+  0,176,184,0,0,0,47,255,77,0,0,24,252,79,0,0,0,0,0,98,253,255,75,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,38,131,254,30,0,0,0,0,0,36,163,239,255,235,104,0,0,136,180,0,0,248,112,0,+  0,0,0,252,108,0,0,0,168,192,0,63,255,35,0,144,206,255,27,0,160,183,0,0,0,0,234,109,0,0,0,0,+  0,0,56,255,45,36,255,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,131,251,158,93,208,253,192,0,+  184,255,255,255,32,0,0,208,167,0,0,112,236,5,0,0,0,0,0,16,246,240,16,0,0,0,96,255,255,255,255,255,+  255,104,0,0,0,0,0,0,0,15,255,59,0,0,0,0,0,0,0,5,74,188,255,40,0,136,180,0,0,248,112,0,+  0,0,0,252,108,0,0,0,169,192,0,5,241,101,0,208,102,242,87,0,229,109,0,0,0,0,243,96,0,0,0,0,+  0,0,0,222,128,120,226,1,0,0,16,118,221,235,165,76,14,67,133,0,0,0,0,0,0,115,218,233,144,172,192,0,+  40,193,199,56,7,0,0,114,245,11,0,204,149,0,0,0,0,0,0,155,232,233,158,0,0,0,21,56,56,56,56,199,+  234,28,0,0,0,0,0,0,0,9,255,75,0,0,0,0,68,236,34,0,0,49,255,73,0,136,180,0,0,248,112,0,+  0,0,0,249,116,0,0,0,194,192,0,0,174,166,18,254,38,185,148,44,255,35,0,0,0,7,255,81,0,0,0,0,+  0,0,0,133,203,200,139,0,0,0,83,161,70,106,180,251,255,246,98,0,0,0,0,0,0,0,0,0,0,168,192,0,+  0,176,184,0,0,0,0,23,251,89,39,255,56,0,0,0,0,0,65,255,91,93,255,68,0,0,0,0,0,0,109,252,+  67,0,0,0,0,0,0,0,0,0,227,94,0,0,0,0,3,216,201,96,89,194,234,11,0,136,180,0,0,0,0,0,+  0,0,0,233,148,0,0,15,236,192,0,0,102,231,78,231,0,122,209,113,218,0,0,0,12,126,240,13,0,0,0,0,+  0,0,0,43,254,254,49,0,0,0,8,0,0,0,0,17,43,9,0,0,0,0,0,0,0,0,0,0,0,168,192,0,+  0,176,184,0,0,0,0,0,181,173,122,219,0,0,0,0,0,10,220,190,0,0,193,222,11,0,0,0,0,61,250,122,+  0,0,0,0,0,0,0,0,0,0,161,194,30,0,0,0,0,48,147,218,232,178,33,0,0,136,180,0,0,0,0,0,+  0,0,0,163,247,106,84,196,231,192,0,0,29,255,178,170,0,60,254,200,144,0,0,0,140,242,41,0,0,0,0,0,+  0,0,0,0,209,216,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,168,192,0,+  0,176,184,0,0,0,0,0,87,244,205,126,0,0,0,0,0,141,249,40,0,0,43,250,144,0,0,0,27,232,178,1,+  0,0,0,0,0,0,0,0,0,0,3,184,228,0,0,0,0,0,0,0,0,0,0,0,0,136,180,0,0,0,0,0,+  0,0,0,17,163,235,217,118,128,192,0,0,0,213,255,108,0,6,247,255,70,0,0,0,42,187,162,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,176,184,0,0,0,0,0,8,240,255,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,200,220,16,0,+  0,0,0,0,0,0,0,0,0,0,90,230,83,0,0,0,0,0,0,0,0,0,0,0,0,136,180,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,140,255,46,0,0,191,245,7,0,0,0,0,33,255,42,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,170,185,0,0,0,0,0,0,175,196,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,155,246,48,0,0,+  0,0,0,0,0,0,0,0,0,0,199,119,0,0,0,0,0,0,0,0,0,0,0,0,0,136,180,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,255,82,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,146,225,65,10,0,0,0,9,239,95,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,101,255,128,51,56,56,+  56,36,0,0,0,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0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,+  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},+ 16.000000, 18.400000, 0.510000, 14.490000, -3.400000, 96,+ {+  {L'\0', 0, 0, 0, 0, 0.000000, 0.000000, 0.023438, 0.023438, 0.031250, 0.031250, 0, { } },+  {L' ', 0, 0, 0, 0, 4.453125, 0.000000, 0.046875, 0.007812, 0.046875, 0.007812, 5, { {L'A', -0.882812}, {L'L', -0.593750}, {L'P', -0.289062}, {L'T', -0.289062}, {L'Y', -0.289062}} },+  {L'!', 3, 12, 1, 12, 4.453125, 0.000000, 0.054688, 0.007812, 0.078125, 0.101562, 0, { } },+  {L'"', 5, 4, 0, 12, 5.687500, 0.000000, 0.085938, 0.007812, 0.125000, 0.039062, 0, { } },+  {L'#', 9, 12, 0, 12, 8.906250, 0.000000, 0.132812, 0.007812, 0.203125, 0.101562, 0, { } },+  {L'$', 9, 15, 0, 13, 8.906250, 0.000000, 0.210938, 0.007812, 0.281250, 0.125000, 0, { } },+  {L'%', 14, 12, 0, 12, 14.234375, 0.000000, 0.289062, 0.007812, 0.398438, 0.101562, 0, { } },+  {L'&', 11, 13, 0, 12, 10.671875, 0.000000, 0.406250, 0.007812, 0.492188, 0.109375, 0, { } },+  {L'\'', 3, 4, 0, 12, 3.062500, 0.000000, 0.500000, 0.007812, 0.523438, 0.039062, 0, { } },+  {L'(', 5, 15, 0, 12, 5.328125, 0.000000, 0.531250, 0.007812, 0.570312, 0.125000, 0, { } },+  {L')', 5, 15, 0, 12, 5.328125, 0.000000, 0.578125, 0.007812, 0.617188, 0.125000, 0, { } },+  {L'*', 6, 6, 0, 12, 6.234375, 0.000000, 0.625000, 0.007812, 0.671875, 0.054688, 0, { } },+  {L'+', 9, 8, 0, 10, 9.343750, 0.000000, 0.679688, 0.007812, 0.750000, 0.070312, 0, { } },+  {L',', 3, 5, 1, 2, 4.453125, 0.000000, 0.757812, 0.007812, 0.781250, 0.046875, 10, { {L'F', -1.773438}, {L'P', -2.062500}, {L'T', -1.773438}, {L'V', -1.468750}, {L'W', -0.882812}, {L'Y', -2.062500}, {L'r', -0.882812}, {L'v', -1.187500}, {L'w', -0.882812}, {L'y', -1.187500}} },+  {L'-', 5, 3, 0, 6, 5.328125, 0.000000, 0.789062, 0.007812, 0.828125, 0.031250, 4, { {L'T', -0.882812}, {L'V', -0.882812}, {L'W', -0.289062}, {L'Y', -1.468750}} },+  {L'.', 3, 2, 1, 2, 4.453125, 0.000000, 0.835938, 0.007812, 0.859375, 0.023438, 10, { {L'F', -1.773438}, {L'P', -2.062500}, {L'T', -1.773438}, {L'V', -1.468750}, {L'W', -0.882812}, {L'Y', -2.062500}, {L'r', -0.882812}, {L'v', -1.187500}, {L'w', -0.882812}, {L'y', -1.187500}} },+  {L'/', 5, 12, 0, 12, 4.453125, 0.000000, 0.867188, 0.007812, 0.906250, 0.101562, 0, { } },+  {L'0', 9, 12, 0, 12, 8.906250, 0.000000, 0.914062, 0.007812, 0.984375, 0.101562, 0, { } },+  {L'1', 5, 12, 1, 12, 8.906250, 0.000000, 0.789062, 0.039062, 0.828125, 0.132812, 1, { {L'1', -1.187500}} },+  {L'2', 9, 12, 0, 12, 8.906250, 0.000000, 0.625000, 0.078125, 0.695312, 0.171875, 0, { } },+  {L'3', 9, 12, 0, 12, 8.906250, 0.000000, 0.703125, 0.078125, 0.773438, 0.171875, 0, { } },+  {L'4', 9, 12, 0, 12, 8.906250, 0.000000, 0.046875, 0.109375, 0.117188, 0.203125, 0, { } },+  {L'5', 9, 12, 0, 12, 8.906250, 0.000000, 0.125000, 0.109375, 0.195312, 0.203125, 0, { } },+  {L'6', 9, 12, 0, 12, 8.906250, 0.000000, 0.835938, 0.109375, 0.906250, 0.203125, 0, { } },+  {L'7', 9, 12, 0, 12, 8.906250, 0.000000, 0.914062, 0.109375, 0.984375, 0.203125, 0, { } },+  {L'8', 9, 12, 0, 12, 8.906250, 0.000000, 0.289062, 0.109375, 0.359375, 0.203125, 0, { } },+  {L'9', 9, 12, 0, 12, 8.906250, 0.000000, 0.367188, 0.117188, 0.437500, 0.210938, 0, { } },+  {L':', 3, 9, 1, 9, 4.453125, 0.000000, 0.500000, 0.046875, 0.523438, 0.117188, 4, { {L'T', -1.773438}, {L'V', -0.593750}, {L'W', -0.289062}, {L'Y', -0.882812}} },+  {L';', 3, 12, 1, 9, 4.453125, 0.000000, 0.007812, 0.046875, 0.031250, 0.140625, 4, { {L'T', -1.773438}, {L'V', -0.593750}, {L'W', -0.289062}, {L'Y', -1.039062}} },+  {L'<', 9, 10, 0, 11, 9.343750, 0.000000, 0.445312, 0.125000, 0.515625, 0.203125, 0, { } },+  {L'=', 9, 6, 0, 9, 9.343750, 0.000000, 0.203125, 0.132812, 0.273438, 0.179688, 0, { } },+  {L'>', 9, 10, 0, 11, 9.343750, 0.000000, 0.523438, 0.132812, 0.593750, 0.210938, 0, { } },+  {L'?', 9, 12, 0, 12, 8.906250, 0.000000, 0.601562, 0.179688, 0.671875, 0.273438, 0, { } },+  {L'@', 16, 15, 0, 12, 16.250000, 0.000000, 0.679688, 0.179688, 0.804688, 0.296875, 0, { } },+  {L'A', 12, 12, -1, 12, 10.671875, 0.000000, 0.039062, 0.210938, 0.132812, 0.304688, 7, { {L' ', -0.882812}, {L'F', -0.882812}, {L'P', -1.187500}, {L'T', -1.187500}, {L'V', -1.187500}, {L'W', -0.593750}, {L'Y', -1.187500}} },+  {L'B', 9, 12, 1, 12, 10.671875, 0.000000, 0.203125, 0.187500, 0.273438, 0.281250, 0, { } },+  {L'C', 11, 12, 0, 12, 11.562500, 0.000000, 0.812500, 0.210938, 0.898438, 0.304688, 0, { } },+  {L'D', 10, 12, 1, 12, 11.562500, 0.000000, 0.281250, 0.210938, 0.359375, 0.304688, 0, { } },+  {L'E', 9, 12, 1, 12, 10.671875, 0.000000, 0.445312, 0.210938, 0.515625, 0.304688, 0, { } },+  {L'F', 9, 12, 1, 12, 9.781250, 0.000000, 0.906250, 0.210938, 0.976562, 0.304688, 0, { } },+  {L'G', 12, 12, 0, 12, 12.453125, 0.000000, 0.523438, 0.281250, 0.617188, 0.375000, 0, { } },+  {L'H', 10, 12, 1, 12, 11.562500, 0.000000, 0.140625, 0.289062, 0.218750, 0.382812, 0, { } },+  {L'I', 2, 12, 1, 12, 4.453125, 0.000000, 0.007812, 0.148438, 0.023438, 0.242188, 0, { } },+  {L'J', 7, 12, 0, 12, 8.000000, 0.000000, 0.367188, 0.218750, 0.421875, 0.312500, 0, { } },+  {L'K', 10, 12, 1, 12, 10.671875, 0.000000, 0.625000, 0.304688, 0.703125, 0.398438, 0, { } },+  {L'L', 8, 12, 1, 12, 8.906250, 0.000000, 0.710938, 0.304688, 0.773438, 0.398438, 0, { } },+  {L'M', 12, 12, 1, 12, 13.328125, 0.000000, 0.031250, 0.312500, 0.125000, 0.406250, 0, { } },+  {L'N', 10, 12, 1, 12, 11.562500, 0.000000, 0.429688, 0.312500, 0.507812, 0.406250, 0, { } },+  {L'O', 12, 12, 0, 12, 12.453125, 0.000000, 0.781250, 0.312500, 0.875000, 0.406250, 1, { {L'T', -0.289062}} },+  {L'P', 9, 12, 1, 12, 10.671875, 0.000000, 0.226562, 0.312500, 0.296875, 0.406250, 0, { } },+  {L'Q', 12, 13, 0, 12, 12.453125, 0.000000, 0.882812, 0.312500, 0.976562, 0.414062, 0, { } },+  {L'R', 11, 12, 1, 12, 11.562500, 0.000000, 0.304688, 0.320312, 0.390625, 0.414062, 0, { } },+  {L'S', 10, 12, 0, 12, 10.671875, 0.000000, 0.515625, 0.382812, 0.593750, 0.476562, 0, { } },+  {L'T', 10, 12, 0, 12, 9.781250, 0.000000, 0.132812, 0.390625, 0.210938, 0.484375, 4, { {L' ', -0.289062}, {L'A', -1.187500}, {L'L', -1.187500}, {L'R', -0.289062}} },+  {L'U', 10, 12, 1, 12, 11.562500, 0.000000, 0.601562, 0.406250, 0.679688, 0.500000, 0, { } },+  {L'V', 11, 12, 0, 12, 10.671875, 0.000000, 0.687500, 0.406250, 0.773438, 0.500000, 3, { {L'A', -1.187500}, {L'L', -1.187500}, {L'R', -0.289062}} },+  {L'W', 15, 12, 0, 12, 15.109375, 0.000000, 0.007812, 0.414062, 0.125000, 0.507812, 3, { {L'A', -0.593750}, {L'L', -1.187500}, {L'R', -0.289062}} },+  {L'X', 11, 12, 0, 12, 10.671875, 0.000000, 0.398438, 0.414062, 0.484375, 0.507812, 0, { } },+  {L'Y', 11, 12, 0, 12, 10.671875, 0.000000, 0.781250, 0.414062, 0.867188, 0.507812, 4, { {L' ', -0.289062}, {L'A', -1.187500}, {L'L', -1.187500}, {L'R', -0.289062}} },+  {L'Z', 10, 12, 0, 12, 9.781250, 0.000000, 0.218750, 0.414062, 0.296875, 0.507812, 0, { } },+  {L'[', 4, 15, 1, 12, 4.453125, 0.000000, 0.875000, 0.421875, 0.906250, 0.539062, 0, { } },+  {L'\\', 5, 12, 0, 12, 4.453125, 0.000000, 0.914062, 0.421875, 0.953125, 0.515625, 0, { } },+  {L']', 4, 15, 0, 12, 4.453125, 0.000000, 0.304688, 0.421875, 0.335938, 0.539062, 0, { } },+  {L'^', 8, 7, 0, 12, 7.515625, 0.000000, 0.492188, 0.484375, 0.554688, 0.539062, 0, { } },+  {L'_', 11, 2, -1, -1, 8.906250, 0.000000, 0.562500, 0.507812, 0.648438, 0.523438, 0, { } },+  {L'`', 4, 3, 0, 12, 5.328125, 0.000000, 0.343750, 0.421875, 0.375000, 0.445312, 0, { } },+  {L'a', 9, 9, 0, 9, 8.906250, 0.000000, 0.132812, 0.492188, 0.203125, 0.562500, 4, { {L'T', -1.773438}, {L'V', -1.187500}, {L'W', -0.593750}, {L'Y', -1.187500}} },+  {L'b', 8, 12, 1, 12, 8.906250, 0.000000, 0.656250, 0.507812, 0.718750, 0.601562, 0, { } },+  {L'c', 8, 9, 0, 9, 8.000000, 0.000000, 0.210938, 0.515625, 0.273438, 0.585938, 1, { {L'T', -1.773438}} },+  {L'd', 8, 12, 0, 12, 8.906250, 0.000000, 0.382812, 0.515625, 0.445312, 0.609375, 0, { } },+  {L'e', 9, 9, 0, 9, 8.906250, 0.000000, 0.726562, 0.515625, 0.796875, 0.585938, 4, { {L'T', -1.773438}, {L'V', -0.882812}, {L'W', -0.289062}, {L'Y', -1.468750}} },+  {L'f', 5, 12, 0, 12, 4.453125, 0.000000, 0.804688, 0.515625, 0.843750, 0.609375, 1, { {L'f', -0.289062}} },+  {L'g', 8, 12, 0, 9, 8.906250, 0.000000, 0.007812, 0.515625, 0.070312, 0.609375, 0, { } },+  {L'h', 7, 12, 1, 12, 8.906250, 0.000000, 0.914062, 0.523438, 0.968750, 0.617188, 0, { } },+  {L'i', 2, 12, 1, 12, 3.562500, 0.000000, 0.343750, 0.453125, 0.359375, 0.546875, 3, { {L'T', -0.593750}, {L'V', -0.289062}, {L'Y', -0.593750}} },+  {L'j', 4, 15, -1, 12, 3.562500, 0.000000, 0.453125, 0.515625, 0.484375, 0.632812, 0, { } },+  {L'k', 7, 12, 1, 12, 8.000000, 0.000000, 0.562500, 0.531250, 0.617188, 0.625000, 0, { } },+  {L'l', 2, 12, 1, 12, 3.562500, 0.000000, 0.281250, 0.515625, 0.296875, 0.609375, 0, { } },+  {L'm', 12, 9, 1, 9, 13.328125, 0.000000, 0.078125, 0.570312, 0.171875, 0.640625, 0, { } },+  {L'n', 7, 9, 1, 9, 8.906250, 0.000000, 0.851562, 0.546875, 0.906250, 0.617188, 0, { } },+  {L'o', 9, 9, 0, 9, 8.906250, 0.000000, 0.304688, 0.554688, 0.375000, 0.625000, 4, { {L'T', -1.773438}, {L'V', -0.882812}, {L'W', -0.289062}, {L'Y', -1.468750}} },+  {L'p', 8, 12, 1, 9, 8.906250, 0.000000, 0.492188, 0.546875, 0.554688, 0.640625, 1, { {L'Y', -1.187500}} },+  {L'q', 8, 12, 0, 9, 8.906250, 0.000000, 0.179688, 0.593750, 0.242188, 0.687500, 1, { {L'Y', -1.468750}} },+  {L'r', 5, 9, 1, 9, 5.328125, 0.000000, 0.726562, 0.593750, 0.765625, 0.664062, 3, { {L'T', -0.593750}, {L'V', -0.593750}, {L'W', -0.289062}} },+  {L's', 8, 9, 0, 9, 8.000000, 0.000000, 0.625000, 0.609375, 0.687500, 0.679688, 1, { {L'T', -1.773438}} },+  {L't', 5, 13, 0, 13, 4.453125, 0.000000, 0.250000, 0.617188, 0.289062, 0.718750, 0, { } },+  {L'u', 7, 9, 1, 9, 8.906250, 0.000000, 0.773438, 0.617188, 0.828125, 0.687500, 4, { {L'T', -0.593750}, {L'V', -0.593750}, {L'W', -0.289062}, {L'Y', -0.882812}} },+  {L'v', 8, 9, 0, 9, 8.000000, 0.000000, 0.007812, 0.617188, 0.070312, 0.687500, 2, { {L'A', -0.289062}, {L'Y', -0.882812}} },+  {L'w', 12, 9, 0, 9, 11.562500, 0.000000, 0.835938, 0.625000, 0.929688, 0.695312, 2, { {L'A', -0.289062}, {L'T', -0.882812}} },+  {L'x', 8, 9, 0, 9, 8.000000, 0.000000, 0.382812, 0.617188, 0.445312, 0.687500, 0, { } },+  {L'y', 8, 12, 0, 9, 8.000000, 0.000000, 0.296875, 0.632812, 0.359375, 0.726562, 5, { {L'A', -0.289062}, {L'L', -0.593750}, {L'T', -0.882812}, {L'V', -0.593750}, {L'W', -0.140625}} },+  {L'z', 8, 9, 0, 9, 8.000000, 0.000000, 0.453125, 0.648438, 0.515625, 0.718750, 0, { } },+  {L'{', 5, 15, 0, 12, 5.343750, 0.000000, 0.937500, 0.625000, 0.976562, 0.742188, 0, { } },+  {L'|', 2, 15, 1, 12, 4.156250, 0.000000, 0.695312, 0.609375, 0.710938, 0.726562, 0, { } },+  {L'}', 5, 15, 0, 12, 5.343750, 0.000000, 0.562500, 0.632812, 0.601562, 0.750000, 0, { } },+  {L'~', 9, 4, 0, 8, 9.343750, 0.000000, 0.078125, 0.648438, 0.148438, 0.679688, 0, { } },+ }+};
+ src/edtaa3func.h view
@@ -0,0 +1,100 @@+/*+ * Copyright 2009 Stefan Gustavson (stefan.gustavson@gmail.com)+ * All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY STEFAN GUSTAVSON ''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 STEFAN GUSTAVSON 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Stefan Gustavson.+ *+ *+ * edtaa3()+ *+ * Sweep-and-update Euclidean distance transform of an+ * image. Positive pixels are treated as object pixels,+ * zero or negative pixels are treated as background.+ * An attempt is made to treat antialiased edges correctly.+ * The input image must have pixels in the range [0,1],+ * and the antialiased image should be a box-filter+ * sampling of the ideal, crisp edge.+ * If the antialias region is more than 1 pixel wide,+ * the result from this transform will be inaccurate.+ *+ * By Stefan Gustavson (stefan.gustavson@gmail.com).+ *+ * Originally written in 1994, based on a verbal+ * description of the SSED8 algorithm published in the+ * PhD dissertation of Ingemar Ragnemalm. This is his+ * algorithm, I only implemented it in C.+ *+ * Updated in 2004 to treat border pixels correctly,+ * and cleaned up the code to improve readability.+ *+ * Updated in 2009 to handle anti-aliased edges.+ *+ * Updated in 2011 to avoid a corner case infinite loop.+ *+ */+#ifndef __EDTAA3FUNC_H__+#define __EDTAA3FUNC_H__++#ifdef __cplusplus+extern "C" {+#endif+++#include <math.h>+++/*+ * Compute the local gradient at edge pixels using convolution filters.+ * The gradient is computed only at edge pixels. At other places in the+ * image, it is never used, and it's mostly zero anyway.+ */+void computegradient(double *img, int w, int h, double *gx, double *gy);++/*+ * A somewhat tricky function to approximate the distance to an edge in a+ * certain pixel, with consideration to either the local gradient (gx,gy)+ * or the direction to the pixel (dx,dy) and the pixel greyscale value a.+ * The latter alternative, using (dx,dy), is the metric used by edtaa2().+ * Using a local estimate of the edge gradient (gx,gy) yields much better+ * accuracy at and near edges, and reduces the error even at distant pixels+ * provided that the gradient direction is accurately estimated.+ */+double edgedf(double gx, double gy, double a);+++double distaa3(double *img, double *gximg, double *gyimg, int w, int c, int xc, int yc, int xi, int yi);++// Shorthand macro: add ubiquitous parameters dist, gx, gy, img and w and call distaa3()+#define DISTAA(c,xc,yc,xi,yi) (distaa3(img, gx, gy, w, c, xc, yc, xi, yi))++void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist);+++#ifdef __cplusplus+}+#endif++#endif // __EDTAA3FUNC_H__
+ src/font-desc.h view
@@ -0,0 +1,34 @@+#ifndef __FONT_DESC_H__+#define __FONT_DESC_H__++#ifdef __cplusplus+extern "C" {+#endif++typedef struct {+    char * family;+    float size;+    int bold;+    int italic;+} font_desc_t;++/**+ *  Search for a font filename that match description.+ *+ *  @param family   font family+ *  @param size     font size+ *  @param bold     whether font is bold+ *  @param italic   whether font is italic+ *+ *  @return Requested font filename (or NULL if not found).+ *          need to free() the resulting non-NULL string.+ */+char *+font_desc_find_filename( const font_desc_t * );+++#ifdef __cplusplus+}+#endif++#endif
+ src/glyph-cache.h view
@@ -0,0 +1,54 @@+#ifndef __GLYPH_CACHE_H__+#define __GLYPH_CACHE_H__++#include "texture-atlas.h"+#include "texture-font.h"++typedef struct {+    unsigned glyph_index;+    wchar_t charcode;+    ivec2 size;+    /**+     * Remember that the vertical bearing is the distance from the+     * baseline to the top-most glyph scanline, upwards y coordinates+     * being positive:+     */+    ivec2 bearing;++    vec2 advance;++    vec2 texture_pos0;+    vec2 texture_pos1;++    texture_font_t *font;+} texture_glyph_t;++typedef struct {+    texture_atlas_t atlas;+    vector_t *glyphs;           /* of texture_glyph_t */+} glyph_cache_t;++void glyph_cache_init(glyph_cache_t *, const ivec2 *size, int depth);+void glyph_cache_fini(glyph_cache_t *);++/**+ * Request a new glyph from the font. If it has not been created yet, it will+ * be.+ *+ * @param self     A valid texture font+ * @param charcode Character codepoint to be loaded.+ *+ * @return A pointer on the new glyph or 0 if the texture atlas is not big+ *         enough+ *+ */+texture_glyph_t *glyph_cache_get_glyph( glyph_cache_t *, texture_font_t *, wchar_t charcode );++float glyph_cache_get_kerning(+    glyph_cache_t *, texture_glyph_t *, wchar_t prev_char);++void glyph_cache_get_text_size(+    glyph_cache_t *, texture_font_t *font,+    wchar_t *text, vec2 *out_size );++#endif
+ src/markup.h view
@@ -0,0 +1,143 @@+/* =========================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * -------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ========================================================================= */+#ifndef __MARKUP_H__+#define __MARKUP_H__++#ifdef __cplusplus+extern "C" {+#endif++#include "vec234.h"++/**+ * @file   markup.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup markup Markup+ *+ * Simple structure that describes text properties.+ *+ * <b>Example Usage</b>:+ * @code+ * #include "markup.h"+ *+ * ...+ *+ * vec4 black  = {{0.0, 0.0, 0.0, 1.0}};+ * vec4 white  = {{1.0, 1.0, 1.0, 1.0}};+ * vec4 none   = {{1.0, 1.0, 1.0, 0.0}};+ *+ * markup_t normal = {+ *     .family  = "Droid Serif",+ *     .size = 24.0,+ *     .bold = 0,+ *     .italic = 0,+ *     .spacing = 1.0,+ *     .gamma = 1.0,+ *     .foreground_color = black, .background_color    = none,+ *     .underline        = 0,     .underline_color     = black,+ *     .overline         = 0,     .overline_color      = black,+ *     .strikethrough    = 0,     .strikethrough_color = black,+ * };+ *+ * ...+ *+ * @endcode+ *+ * @{+ */+++/**+ * Simple structure that describes text properties.+ */+typedef struct+{+    /**+     * Spacing between letters.+     */+    float spacing;++    /**+     * Gamma correction.+     */+    float gamma;++    /**+     * Text color.+     */+    vec4 foreground_color;++    /**+     * Background color.+     */+    vec4 background_color;++    /**+     * Whether underline is active.+     */+    int underline;++    /**+     * Underline color.+     */+    vec4 underline_color;++    /**+     * Whether overline is active.+     */+    int overline;++    /**+     * Overline color.+     */+    vec4 overline_color;++    /**+     * Whether strikethrough is active.+     */+    int strikethrough;++    /**+     * Strikethrough color.+     */+    vec4 strikethrough_color;+} markup_t;++/** @} */++#ifdef __cplusplus+}+#endif++#endif /* __MARKUP_H__ */
+ src/opengl.h view
@@ -0,0 +1,54 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __OPEN_GL_H__+#define __OPEN_GL_H__++#if defined(__APPLE__)+#  ifdef GL_ES_VERSION_2_0+#    include <OpenGLES/ES2/gl.h>+#  else+#    include <OpenGL/gl.h>+#  endif+#elif defined(_WIN32) || defined(_WIN64)+    #define GLEW_STATIC+    #include <GL/glew.h>+    //#include <HsOpenGL.h>       /* From Haskell Platform */+    //#include <GL/glext.h>+#else+    #define GL_GLEXT_PROTOTYPES+    #include <GL/gl.h>+    #include <GL/glext.h>+#endif++#endif /* OPEN_GL_H */
+ src/shader.h view
@@ -0,0 +1,113 @@+// ----------------------------------------------------------------------------+// OpenGL Anti-Grain Geometry (GL-AGG) - Version 0.1+// A high quality OpenGL rendering engine for C+// Copyright (C) 2012 Nicolas P. Rougier. All rights reserved.+// Contact: Nicolas.Rougier@gmail.com+//          http://code.google.com/p/gl-agg/+//+// Redistribution and use in source and binary forms, with or without+// modification, are permitted provided that the following conditions are met:+//+//  1. Redistributions of source code must retain the above copyright notice,+//     this list of conditions and the following disclaimer.+//+//  2. 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.+//+// THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+//+// The views and conclusions contained in the software and documentation are+// those of the authors and should not be interpreted as representing official+// policies, either expressed or implied, of Nicolas P. Rougier.+// ----------------------------------------------------------------------------+#ifndef __SHADER_H__+#define __SHADER_H__++#include "opengl.h"++#ifdef __cplusplus+extern "C" {+#endif++/**+ * @file   shader.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup shader Shader+ *+ * Simple functions for loading/building a shader from sources.+ *+ * <b>Example Usage</b>:+ * @code+ * #include "shader.h"+ *+ * int main( int arrgc, char *argv[] )+ * {+ *     GLuint shader = shader_load("shader.vert", "shader.frag");+ *+ *     return 0;+ * }+ * @endcode+ *+ * @{+ */++/**+ * Read a fragment or vertex shader from a file+ *+ * @param filename file to read shader from+ * @return         a newly-allocated text buffer containing code. This buffer+ *                 must be freed after usage.+ *+ */+  char *+  shader_read( const char *filename );+++/**+ * Compile a shader from a text buffer.+ *+ * @param source code of the shader+ * @param type   type of the shader+ *+ * @return a handle on the compiled program+ *+ */+  GLuint+  shader_compile( const char* source,+                  const GLenum type );+++/**+ * Load a vertex and fragment shader sources and build program+ *+ * @param  vert_filename vertex shader filename+ * @param  frag_filename fragment shader filename+ *+ * @return a handle on the built program+ *+ */+  GLuint+  shader_load( const char * vert_filename,+               const char * frag_filename );++  /* 0 to indicate success: */+  int freetypegl_init(void);++/** @} */++#ifdef __cplusplus+}+#endif++#endif // __SHADER_H__
+ src/text-buffer.h view
@@ -0,0 +1,177 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __TEXT_BUFFER_H__+#define __TEXT_BUFFER_H__++#ifdef __cplusplus+extern "C" {+#endif++#include "markup.h"+#include "texture-atlas.h"+#include "texture-font.h"+#include "glyph-cache.h"+#include "vertex-buffer.h"+++/**+ * Use LCD filtering+ */+#define LCD_FILTERING_ON    3++/**+ * Do not use LCD filtering+ */+#define LCD_FILTERING_OFF 1++/**+ * @file   text-buffer.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup text-buffer Text buffer+ *+ *+ * <b>Example Usage</b>:+ * @code+ * #include "shader.h"+ *+ * int main( int arrgc, char *argv[] )+ * {+ *+ *     return 0;+ * }+ * @endcode+ *+ * @{+ */++/**+ * Text buffer structure+ */+typedef struct {+    /**+     * Vertex buffer+     */+    vertex_buffer_t *buffer;++    glyph_cache_t cache;++    /**+     * Pen origin+     */+    vec2 origin;++    /**+     * Index (in the vertex buffer) of the line start+     */+    size_t line_start;++    /**+     * Current line ascender+     */+    float line_ascender;++    /**+     * Current line decender+     */+    float line_descender;++    /**+     * Shader handler+     */+    GLuint shader;++    /**+     * Shader "texture" location+     */+    GLuint shader_texture;++    /**+     * Shader "pixel" location+     */+    GLuint shader_pixel;++} text_buffer_t;++/**+ * Creates a new empty text buffer.+ *+ * @return  a new empty text buffer.+ *+ */+text_buffer_t *text_buffer_new( GLuint shader, const ivec2 *size, int depth );++/**+ * Delete a text buffer.+ *+ * @param self a text buffer+ *+ */+void+text_buffer_delete( text_buffer_t *self );+++/**+ * Render a text buffer.+ *+ * @param self a text buffer+ *+ */+void+text_buffer_render( text_buffer_t * self );++ /**+  * Add some text to the text buffer+  *+  * @param self   a text buffer+  * @param pen    position of text start+  * @param markup Markup to be used to add text+  * @param text   Text to be added+  * @param length Length of text to be added (or 0 for null termination)+  *+  * @return 0 for success.+  */+int+text_buffer_add_text( text_buffer_t * self,+                      vec2 * pen, markup_t * markup,+                      texture_font_t * font,+                      wchar_t * text );++/** @} */++#ifdef __cplusplus+}+#endif++#endif /* #define __TEXT_BUFFER_H__ */
+ src/texture-atlas.h view
@@ -0,0 +1,165 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ *+ * This source is based on the article by Jukka Jylänki :+ * "A Thousand Ways to Pack the Bin - A Practical Approach to+ * Two-Dimensional Rectangle Bin Packing", February 27, 2010.+ *+ * More precisely, this is an implementation of the Skyline Bottom-Left+ * algorithm based on C++ sources provided by Jukka Jylänki at:+ * http://clb.demon.fi/files/RectangleBinPack/+ *+ *  ============================================================================+ */+#ifndef __TEXTURE_ATLAS_H__+#define __TEXTURE_ATLAS_H__++#include "vector.h"+#include "vec234.h"+#include "opengl.h"+#include <stdbool.h>++/**+ * @file   texture-atlas.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup texture-atlas Texture atlas+ *+ * A texture atlas is used to pack several small regions into a single texture.+ *+ * The actual implementation is based on the article by Jukka Jylänki : "A+ * Thousand Ways to Pack the Bin - A Practical Approach to Two-Dimensional+ * Rectangle Bin Packing", February 27, 2010.+ * More precisely, this is an implementation of the Skyline Bottom-Left+ * algorithm based on C++ sources provided by Jukka Jylänki at:+ * http://clb.demon.fi/files/RectangleBinPack/+ *+ *+ * Example Usage:+ * @code+ * #include "texture-atlas.h"+ *+ * ...+ *+ * / Creates a new atlas of 512x512 with a depth of 1+ * texture_atlas_t * atlas = texture_atlas_new( 512, 512, 1 );+ *+ * // Allocates a region of 20x20+ * ivec4 region = texture_atlas_make_region( atlas, 20, 20, data, stride );+ *+ * ...+ *+ * @endcode+ *+ */+++/**+ * A texture atlas is used to pack several small regions into a single texture.+ */+typedef struct+{+    /**+     * Allocated nodes+     */+    vector_t * nodes;++    ivec2 size;++    /**+     * Depth (in bytes) of the underlying texture+     */+    size_t depth;++    /**+     * Allocated surface size+     */+    size_t used;++    /**+     * Texture identity (OpenGL)+     */+    unsigned int id;++    unsigned char * data;++    bool uploaded;++} texture_atlas_t;++++void texture_atlas_init( texture_atlas_t * self, const ivec2 *size, const size_t depth );++void texture_atlas_fini( texture_atlas_t * self );+++/**+ *  Upload atlas to video memory.+ *+ *  @param self a texture atlas structure+ *+ */+void+texture_atlas_upload( texture_atlas_t * self );+++/**+ *  Allocate a new region in the atlas.+ *+ *  @param self   a texture atlas structure+ *  @param width  width of the region to allocate+ *  @param height height of the region to allocate+ *  @param data   data to be uploaded into the specified region+ *  @param stride stride of the data+ *  @return       Coordinates of the allocated region+ *+ */+ivec4 texture_atlas_make_region(+    texture_atlas_t *, size_t width, size_t height,+    const unsigned char *data,+    size_t stride);++/**+ *  Remove all allocated regions from the atlas.+ *+ *  @param self   a texture atlas structure+ */+void texture_atlas_clear( texture_atlas_t * self );+++void texture_atlas_render(+    texture_atlas_t * self, float x, float y,+    float width, float height );++#endif /* __TEXTURE_ATLAS_H__ */
+ src/texture-font.h view
@@ -0,0 +1,230 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __TEXTURE_FONT_H__+#define __TEXTURE_FONT_H__++#include <ft2build.h>+#include FT_FREETYPE_H+#include FT_STROKER_H++#include "vec234.h"+#include "vector.h"+#include <stdbool.h>++/**+ * @file   texture-font.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup texture-font Texture font+ *+ * Texture font.+ *+ * Example Usage:+ * @code+ * #include "texture-font.h"+ *+ * int main( int arrgc, char *argv[] )+ * {+ *   return 0;+ * }+ * @endcode+ */+++/*+ * Glyph metrics:+ * --------------+ *+ *                       xmin                     xmax+ *                        |                         |+ *                        |<-------- width -------->|+ *                        |                         |+ *              |         +-------------------------+----------------- ymax+ *              |         |    ggggggggg   ggggg    |     ^        ^+ *              |         |   g:::::::::ggg::::g    |     |        |+ *              |         |  g:::::::::::::::::g    |     |        |+ *              |         | g::::::ggggg::::::gg    |     |        |+ *              |         | g:::::g     g:::::g     |     |        |+ *    offset_x -|-------->| g:::::g     g:::::g     |  offset_y    |+ *              |         | g:::::g     g:::::g     |     |        |+ *              |         | g::::::g    g:::::g     |     |        |+ *              |         | g:::::::ggggg:::::g     |     |        |+ *              |         |  g::::::::::::::::g     |     |      height+ *              |         |   gg::::::::::::::g     |     |        |+ *  baseline ---*---------|---- gggggggg::::::g-----*--------      |+ *            / |         |             g:::::g     |              |+ *     origin   |         | gggggg      g:::::g     |              |+ *              |         | g:::::gg   gg:::::g     |              |+ *              |         |  g::::::ggg:::::::g     |              |+ *              |         |   gg:::::::::::::g      |              |+ *              |         |     ggg::::::ggg        |              |+ *              |         |         gggggg          |              v+ *              |         +-------------------------+----------------- ymin+ *              |                                   |+ *              |------------- advance_x ---------->|+ */++enum texture_outline_type {+    TEXTURE_OUTLINE_NONE = 0,+    TEXTURE_OUTLINE_LINE = 1,+    TEXTURE_OUTLINE_INNER = 2,+    TEXTURE_OUTLINE_OUTER = 3,+};++/**+ *  Texture font structure.+ */+typedef struct+{++    bool is_lcd;++    /* TODO: Share a copy of the library between different fonts? */+    FT_Library library;+    FT_Face face;++    /**+     * Whether to use autohint when rendering font+     */+    int hinting;++    enum texture_outline_type outline_type;++    /**+     * Outline thickness+     */+    float outline_thickness;++    /**+     * Whether to use our own lcd filter.+     */+    int filtering;++    /**+     * LCD filter weights+     */+    unsigned char lcd_weights[5];++    /**+     * This field is simply used to compute a default line spacing (i.e., the+     * baseline-to-baseline distance) when writing text with this font. Note+     * that it usually is larger than the sum of the ascender and descender+     * taken as absolute values. There is also no guarantee that no glyphs+     * extend above or below subsequent baselines when using this distance.+     */+    float height;++    /**+     * This field is the distance that must be placed between two lines of+     * text. The baseline-to-baseline distance should be computed as:+     * ascender - descender + linegap+     */+    float linegap;++    /**+     * The ascender is the vertical distance from the horizontal baseline to+     * the highest 'character' coordinate in a font face. Unfortunately, font+     * formats define the ascender differently. For some, it represents the+     * ascent of all capital latin characters (without accents), for others it+     * is the ascent of the highest accented character, and finally, other+     * formats define it as being equal to bbox.yMax.+     */+    float ascender;++    /**+     * The descender is the vertical distance from the horizontal baseline to+     * the lowest 'character' coordinate in a font face. Unfortunately, font+     * formats define the descender differently. For some, it represents the+     * descent of all capital latin characters (without accents), for others it+     * is the ascent of the lowest accented character, and finally, other+     * formats define it as being equal to bbox.yMin. This field is negative+     * for values below the baseline.+     */+    float descender;++    /**+     * The position of the underline line for this face. It is the center of+     * the underlining stem. Only relevant for scalable formats.+     */+    float underline_position;++    /**+     * The thickness of the underline for this face. Only relevant for scalable+     * formats.+     */+    float underline_thickness;++} texture_font_t;++texture_font_t *texture_font_new(+    bool is_lcd,+    const char * filename,+    const float size );++void texture_font_delete( texture_font_t * self );++typedef struct {+    FT_Glyph ft_glyph; /* Only valid if outline_type is not+                        * TEXTURE_OUTLINE_NONE */+    FT_UInt glyph_index;+    ivec2 bearing;+    FT_Bitmap *bitmap;+    vec2 advance;+} texture_font_loaded_glyph_t;++int texture_font_load_glyph(+    texture_font_t *self, wchar_t charcode, int is_lcd,+    texture_font_loaded_glyph_t *out) __attribute__ ((warn_unused_result));+void texture_font_done_glyph(+    texture_font_t *self,+    texture_font_loaded_glyph_t *loaded);++/**+ * Get the kerning between two horizontal glyphs.+ *+ * @param self      a valid texture glyph+ * @param charcode  codepoint of the peceding glyph+ *+ * @return x kerning value+ */+float texture_font_get_kerning(+    texture_font_t *,+    FT_UInt glyph_index,+    wchar_t prev_char);++int texture_font_get_text_size(+    texture_font_t *,+    wchar_t *text, vec2 *out_size) __attribute__ ((warn_unused_result));++#endif /* __TEXTURE_FONT_H__ */
+ src/vec234.h view
@@ -0,0 +1,237 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __VEC234_H__+#define __VEC234_H__++#ifdef __cplusplus+extern "C" {+#endif+++/**+ * Tuple of 4 ints.+ *+ * Each field can be addressed using several aliases:+ *  - First component:  <b>x</b>, <b>r</b>, <b>red</b> or <b>vstart</b>+ *  - Second component: <b>y</b>, <b>g</b>, <b>green</b> or <b>vcount</b>+ *  - Third component:  <b>z</b>, <b>b</b>, <b>blue</b>, <b>width</b> or <b>istart</b>+ *  - Fourth component: <b>w</b>, <b>a</b>, <b>alpha</b>, <b>height</b> or <b>icount</b>+ *+ */+typedef union+{+    int data[4];    /**< All compoments at once     */+    struct {+        int x;      /**< Alias for first component  */+        int y;      /**< Alias for second component */+        int z;      /**< Alias for third component  */+        int w;      /**< Alias for fourht component */+    };+    struct {+        int x_;     /**< Alias for first component  */+        int y_;     /**< Alias for second component */+        int width;  /**< Alias for third component  */+        int height; /**< Alias for fourth component */+    };+    struct {+        int r;      /**< Alias for first component  */+        int g;      /**< Alias for second component */+        int b;      /**< Alias for third component  */+        int a;      /**< Alias for fourth component */+    };+    struct {+        int red;    /**< Alias for first component  */+        int green;  /**< Alias for second component */+        int blue;   /**< Alias for third component  */+        int alpha;  /**< Alias for fourth component */+    };+    struct {+        int vstart; /**< Alias for first component  */+        int vcount; /**< Alias for second component */+        int istart; /**< Alias for third component  */+        int icount; /**< Alias for fourth component */+    };+} ivec4;+++/**+ * Tuple of 3 ints.+ *+ * Each field can be addressed using several aliases:+ *  - First component:  <b>x</b>, <b>r</b> or <b>red</b>+ *  - Second component: <b>y</b>, <b>g</b> or <b>green</b>+ *  - Third component:  <b>z</b>, <b>b</b> or <b>blue</b>+ *+ */+typedef union+{+    int data[3];    /**< All compoments at once     */+    struct {+        int x;      /**< Alias for first component  */+        int y;      /**< Alias for second component */+        int z;      /**< Alias for third component  */+    };+    struct {+        int r;      /**< Alias for first component  */+        int g;      /**< Alias for second component */+        int b;      /**< Alias for third component  */+    };+    struct {+        int red;    /**< Alias for first component  */+        int green;  /**< Alias for second component */+        int blue;   /**< Alias for third component  */+    };+} ivec3;+++/**+ * Tuple of 2 ints.+ *+ * Each field can be addressed using several aliases:+ *  - First component: <b>x</b>, <b>s</b> or <b>start</b>+ *  - Second component: <b>y</b>, <b>t</b> or <b>end</b>+ *+ */+typedef union+{+    int data[2];    /**< All compoments at once     */+    struct {+        int x;      /**< Alias for first component  */+        int y;      /**< Alias for second component */+    };+    struct {+        int s;      /**< Alias for first component  */+        int t;      /**< Alias for second component */+    };+    struct {+        int start;  /**< Alias for first component  */+        int end;    /**< Alias for second component */+    };+} ivec2;+++/**+ * Tuple of 4 floats.+ *+ * Each field can be addressed using several aliases:+ *  - First component:  <b>x</b>, <b>r</b> or <b>red</b>+ *  - Second component: <b>y</b>, <b>g</b> or <b>green</b>+ *  - Third component:  <b>z</b>, <b>b</b>, <b>blue</b> or <b>width</b>+ *  - Fourth component: <b>w</b>, <b>a</b>, <b>alpha</b> or <b>height</b>+ */+typedef union+{+    float data[4];    /**< All compoments at once    */+    struct {+        float x;      /**< Alias for first component */+        float y;      /**< Alias fo second component */+        float z;      /**< Alias fo third component  */+        float w;      /**< Alias fo fourth component */+    };+    struct {+        float x_;     /**< Alias for first component */+        float y_;     /**< Alias fo second component */+        float width;  /**< Alias fo third component  */+        float height; /**< Alias fo fourth component */+    };+    struct {+        float r;      /**< Alias for first component */+        float g;      /**< Alias fo second component */+        float b;      /**< Alias fo third component  */+        float a;      /**< Alias fo fourth component */+    };+    struct {+        float red;    /**< Alias for first component */+        float green;  /**< Alias fo second component */+        float blue;   /**< Alias fo third component  */+        float alpha;  /**< Alias fo fourth component */+    };+} vec4;+++/**+ * Tuple of 3 floats+ *+ * Each field can be addressed using several aliases:+ *  - First component:  <b>x</b>, <b>r</b> or <b>red</b>+ *  - Second component: <b>y</b>, <b>g</b> or <b>green</b>+ *  - Third component:  <b>z</b>, <b>b</b> or <b>blue</b>+ */+typedef union+{+    float data[3];   /**< All compoments at once    */+    struct {+        float x;     /**< Alias for first component */+        float y;     /**< Alias fo second component */+        float z;     /**< Alias fo third component  */+    };+    struct {+        float r;     /**< Alias for first component */+        float g;     /**< Alias fo second component */+        float b;     /**< Alias fo third component  */+    };+    struct {+        float red;   /**< Alias for first component */+        float green; /**< Alias fo second component */+        float blue;  /**< Alias fo third component  */+    };+} vec3;+++/**+ * Tuple of 2 floats+ *+ * Each field can be addressed using several aliases:+ *  - First component:  <b>x</b> or <b>s</b>+ *  - Second component: <b>y</b> or <b>t</b>+ */+typedef union+{+    float data[2]; /**< All components at once     */+    struct {+        float x;   /**< Alias for first component  */+        float y;   /**< Alias for second component */+    };+    struct {+        float s;   /**< Alias for first component  */+        float t;   /**< Alias for second component */+    };+} vec2;+++#ifdef __cplusplus+}+#endif++#endif /* __VEC234_H__ */
+ src/vector.h view
@@ -0,0 +1,351 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __VECTOR_H__+#define __VECTOR_H__++#ifdef __cplusplus+extern "C" {+#endif++#include <stddef.h>++/**+ * @file   vector.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup vector Vector+ *+ * The vector structure and accompanying functions loosely mimic the STL C+++ * vector class. It is used by @ref texture-atlas (for storing nodes), @ref+ * texture-font (for storing glyphs) and @ref font-manager (for storing fonts).+ * More information at http://www.cppreference.com/wiki/container/vector/start+ *+ * <b>Example Usage</b>:+ * @code+ * #include "vector.h"+ *+ * int main( int arrgc, char *argv[] )+ * {+ *   int i,j = 1;+ *   vector_t * vector = vector_new( sizeof(int) );+ *   vector_push_back( &i );+ *+ *   j = * (int *) vector_get( vector, 0 );+ *   vector_delete( vector);+ *+ *   return 0;+ * }+ * @endcode+ *+ * @{+ */++/**+ *  Generic vector structure.+ *+ * @memberof vector+ */+typedef struct+ {+     /** Pointer to dynamically allocated items. */+     void * items;++     /** Number of items that can be held in currently allocated storage. */+     size_t capacity;++     /** Number of items. */+     size_t size;++     /** Size (in bytes) of a single item. */+     size_t item_size;+} vector_t;+++/**+ * Creates a new empty vector.+ *+ * @param   item_size    item size in bytes+ * @return               a new empty vector+ *+ */+  vector_t *+  vector_new( size_t item_size );+++/**+ *  Deletes a vector.+ *+ *  @param self a vector structure+ *+ */+  void+  vector_delete( vector_t *self );+++/**+ *  Returns a pointer to the item located at specified index.+ *+ *  @param  self  a vector structure+ *  @param  index the index of the item to be returned+ *  @return       pointer on the specified item+ */+  const void *+  vector_get( const vector_t *self,+              size_t index );+++/**+ *  Returns a pointer to the first item.+ *+ *  @param  self  a vector structure+ *  @return       pointer on the first item+ */+  const void *+  vector_front( const vector_t *self );+++/**+ *  Returns a pointer to the last item+ *+ *  @param  self  a vector structure+ *  @return pointer on the last item+ */+  const void *+  vector_back( const vector_t *self );+++/**+ *  Check if an item is contained within the vector.+ *+ *  @param  self  a vector structure+ *  @param  item  item to be searched in the vector+ *  @param  cmp   a pointer a comparison function+ *  @return       1 if item is contained within the vector, 0 otherwise+ */+  int+  vector_contains( const vector_t *self,+                   const void *item,+                   int (*cmp)(const void *, const void *) );+++/**+ *  Checks whether the vector is empty.+ *+ *  @param  self  a vector structure+ *  @return       1 if the vector is empty, 0 otherwise+ */+  int+  vector_empty( const vector_t *self );+++/**+ *  Returns the number of items+ *+ *  @param  self  a vector structure+ *  @return       number of items+ */+  size_t+  vector_size( const vector_t *self );+++/**+ *  Reserve storage such that it can hold at last size items.+ *+ *  @param  self  a vector structure+ *  @param  size  the new storage capacity+ */+  void+  vector_reserve( vector_t *self,+                  const size_t size );+++/**+ *  Returns current storage capacity+ *+ *  @param  self  a vector structure+ *  @return       storage capacity+ */+  size_t+  vector_capacity( const vector_t *self );+++/**+ *  Decrease capacity to fit actual size.+ *+ *  @param  self  a vector structure+ */+  void+  vector_shrink( vector_t *self );+++/**+ *  Removes all items.+ *+ *  @param  self  a vector structure+ */+  void+  vector_clear( vector_t *self );+++/**+ *  Replace an item.+ *+ *  @param  self  a vector structure+ *  @param  index the index of the item to be replaced+ *  @param  item  the new item+ */+  void+  vector_set( vector_t *self,+              const size_t index,+              const void *item );+++/**+ *  Erase an item.+ *+ *  @param  self  a vector structure+ *  @param  index the index of the item to be erased+ */+  void+  vector_erase( vector_t *self,+                const size_t index );+++/**+ *  Erase a range of items.+ *+ *  @param  self  a vector structure+ *  @param  first the index of the first item to be erased+ *  @param  last  the index of the last item to be erased+ */+  void+  vector_erase_range( vector_t *self,+                      const size_t first,+                      const size_t last );+++/**+ *  Appends given item to the end of the vector.+ *+ *  @param  self a vector structure+ *  @param  item the item to be inserted+ */+  void+  vector_push_back( vector_t *self,+                    const void *item );+++/**+ *  Removes the last item of the vector.+ *+ *  @param  self a vector structure+ */+  void+  vector_pop_back( vector_t *self );+++/**+ *  Resizes the vector to contain size items+ *+ *  If the current size is less than size, additional items are appended and+ *  initialized with value. If the current size is greater than size, the+ *  vector is reduced to its first size elements.+ *+ *  @param  self a vector structure+ *  @param  size the new size+ */+  void+  vector_resize( vector_t *self,+                 const size_t size );+++/**+ *  Insert a single item at specified index.+ *+ *  @param  self  a vector structure+ *  @param  index location before which to insert item+ *  @param  item  the item to be inserted+ */+  void+  vector_insert( vector_t *self,+                 const size_t index,+                 const void *item );+++/**+ *  Insert raw data at specified index.+ *+ *  @param  self  a vector structure+ *  @param  index location before which to insert item+ *  @param  data  a pointer to the items to be inserted+ *  @param  count the number of items to be inserted+ */+  void+  vector_insert_data( vector_t *self,+                      const size_t index,+                      const void * data,+                      const size_t count );+++/**+ *  Append raw data to the end of the vector.+ *+ *  @param  self  a vector structure+ *  @param  data  a pointer to the items to be inserted+ *  @param  count the number of items to be inserted+ */+  void+  vector_push_back_data( vector_t *self,+                         const void * data,+                         const size_t count );+++/**+ *  Sort vector items according to cmp function.+ *+ *  @param  self  a vector structure+ *  @param  cmp   a pointer a comparison function+ */+  void+  vector_sort( vector_t *self,+               int (*cmp)(const void *, const void *) );+++/** @} */++#ifdef __cplusplus+}+#endif++#endif /* __VECTOR_H__ */
+ src/vertex-attribute.h view
@@ -0,0 +1,453 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __VERTEX_ATTRIBUTE_H__+#define __VERTEX_ATTRIBUTE_H__++#ifdef __cplusplus+extern "C" {+#endif++#include "opengl.h"+#include "vector.h"+++/**+ * @file   vertex-attribute.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ *+ * @defgroup vertex-attribut Vertex attribute+ *+ * Besides the required vertex position, vertices can have several other+ * numeric attributes. Each is specified in the format string with a letter,+ * the number of components and the data type.+ *+ * Each of the attributes is described in the table below with the set of valid+ * format strings written as a regular expression (for example, "v[234][if]"+ * means "v2f", "v3i", "v4f", etc. are all valid formats).+ *+ * Some attributes have a "recommended" format string, which is the most+ * efficient form for the video driver as it requires less conversion.+ *+ * <table>+ *   <tr>+ *     <th>Attribute</th>+ *     <th>Formats</th>+ *     <th>Recommended</th>+ *   </tr>+ *   <tr>+ *     <td>Vertex position</td>+ *     <td>"v[234][sifd]"</td>+ *     <td>"v[234]f"</td>+ *   </tr>+ *   <tr>+ *     <td> Color             </td>+ *     <td> "c[34][bBsSiIfd]" </td>+ *     <td> "c[34]B"          </td>+ *   </tr>+ *   <tr>+ *     <td> Edge flag </td>+ *     <td> "e1[bB]"  </td>+ *     <td>           </td>+ *   </tr>+ *   <tr>+ *    <td> Fog coordinate     </td>+ *    <td> "f[1234][bBsSiIfd]"</td>+ *    <td>                    </td>+ *   </tr>+ *   <tr>+ *     <td> Normal      </td>+ *     <td> "n3[bsifd]" </td>+ *     <td> "n3f"       </td>+ *   </tr>+ *   <tr>+ *     <td> Secondary color   </td>+ *     <td> "s[34][bBsSiIfd]" </td>+ *     <td> "s[34]B"          </td>+ *   </tr>+ *   <tr>+ *     <td> Texture coordinate </td>+ *     <td> "t[234][sifd]"     </td>+ *     <td> "t[234]f"          </td>+ *   </tr>+ *   <tr>+ *     <td> Generic attribute             </td>+ *     <td> "[0-15]g(n)?[1234][bBsSiIfd]" </td>+ *     <td>                               </td>+ *   </tr>+ * </table>+ *+ * The possible data types that can be specified in the format string are described below.+ *+ * <table>+ *   <tr>+ *     <th> Format   </th>+ *     <th> Type     </th>+ *     <th> GL Type  </th>+ *   </tr>+ *   <tr>+ *     <td> "b"               </td>+ *     <td> Signed byte       </td>+ *     <td> GL_BYTE           </td>+ *   </tr>+ *   <tr>+ *     <td> "B"               </td>+ *     <td> Unsigned byte     </td>+ *     <td> GL_UNSIGNED_BYTE  </td>+ *   </tr>+ *   <tr>+ *     <td> "s"               </td>+ *     <td> Signed short      </td>+ *     <td> GL_SHORT          </td>+ *   </tr>+ *   <tr>+ *     <td> "S"               </td>+ *     <td> Unsigned short    </td>+ *     <td> GL_UNSIGNED_SHORT </td>+ *   </tr>+ *   <tr>+ *     <td> "i"               </td>+ *     <td> Signed int        </td>+ *     <td> GL_INT            </td>+ *   </tr>+ *   <tr>+ *     <td> "I"               </td>+ *     <td> Unsigned int      </td>+ *     <td> GL_UNSIGNED_INT   </td>+ *   </tr>+ *   <tr>+ *     <td> "f"               </td>+ *     <td> Float             </td>+ *     <td> GL_FLOAT          </td>+ *   </tr>+ *   <tr>+ *     <td> "d"               </td>+ *     <td> Double            </td>+ *     <td> GL_DOUBLE     T   </td>+ *   </tr>+ * </table>+ *+ * The following attributes are normalised to the range [0, 1]. The value is+ * used as-is if the data type is floating-point. If the data type is byte,+ * short or int, the value is divided by the maximum value representable by+ * that type. For example, unsigned bytes are divided by 255 to get the+ * normalised value.+ *+ *  - Color+ *  - Secondary color+ *  - Generic attributes with the "n" format given.+ *+ * Up to 16 generic attributes can be specified per vertex, and can be used by+ * shader programs for any purpose (they are ignored in the fixed-function+ * pipeline). For the other attributes, consult the OpenGL programming guide+ * for details on their effects.+ *+ * When using the draw and related functions, attribute data is specified+ * alongside the vertex position data. The following example reproduces the two+ * points from the previous page, except that the first point is blue and the+ * second green:+ *+ * It is an error to provide more than one set of data for any attribute, or to+ * mismatch the size of the initial data with the number of vertices specified+ * in the first argument.+ *+ * @{+ */+++/**+ * Maximum number of attributes per vertex+ *+ * @private+ */+#define MAX_VERTEX_ATTRIBUTE 16+++/**+ *  Generic vertex attribute.+ */+typedef struct+{+    /**+     *  a client-side capability.+     */+    GLenum target;++    /**+     *  a translated client-side capability.+     */+    unsigned char ctarget;++    /**+     * index of the generic vertex attribute to be modified.+     */+    GLuint index;++    /**+     * Number of components per generic vertex attribute.+     *+     * Must be 1, 2, 3, or 4. The initial value is 4.+     */+    GLint size;++    /**+     *  data type of each component in the array.+     *+     *  Symbolic constants GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT,+     *  GL_UNSIGNED_SHORT, GL_INT, GL_UNSIGNED_INT, GL_FLOAT, or GL_DOUBLE are+     *  accepted. The initial value is GL_FLOAT.+     */+    GLenum type;++    /**+     *  whether fixed-point data values should be normalized (GL_TRUE) or+     *  converted directly as fixed-point values (GL_FALSE) when they are+     *  accessed.+     */+    GLboolean normalized;++    /**+     *  byte offset between consecutive generic vertex attributes.+     *+     *  If stride is 0, the generic vertex attributes are understood to be+     *  tightly packed in the array. The initial value is 0.+     */+    GLsizei stride;++    /**+     *  pointer to the first component of the first attribute element in the+     *  array.+     */+    GLvoid * pointer;++    /**+     * pointer to the function that enable this attribute.+     */+    void ( * enable )(void *);++} vertex_attribute_t;++++/**+ * Create an attribute from the given parameters.+ *+ * @param target     client-side capability+ * @param index      index of the generic vertex attribute to be modified.+ * @param size       number of component+ * @param type       data type+ * @param normalized Whether fixed-point data values should be normalized+                     (GL_TRUE) or converted directly as fixed-point values+                     (GL_FALSE) when they are  accessed.+ * @param stride     byte offset between consecutive attributes.+ * @param pointer    pointer to the first component of the first attribute+ *                   element in the array.+ * @return           a new initialized vertex attribute.+ *+ * @private+ */+vertex_attribute_t *+vertex_attribute_new( GLenum target,+                      GLuint index,+                      GLint size,+                      GLenum type,+                      GLboolean normalized,+                      GLsizei stride,+                      GLvoid *pointer );++++/**+ * Delete a vertex attribute.+ *+ * @param  self a vertex attribute+ *+ */+void+vertex_attribute_delete( vertex_attribute_t * self );+++/**+ * Create an attribute from the given description.+ *+ * @param  format Format string specifies the format of a vertex attribute.+ * @return        an initialized vertex attribute+ *+ * @private+ */+  vertex_attribute_t *+  vertex_attribute_parse( char *format );+++/**+ * Enable the position vertex attribute.+ *+ * @param  attr a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_position_enable( vertex_attribute_t *attr );+++/**+ * Enable the normal vertex attribute.+ *+ * @param  attr a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_normal_enable( vertex_attribute_t *attr );+++/**+ * Enable the color vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_color_enable( vertex_attribute_t *attr );+++/**+ * Enable the texture vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_tex_coord_enable( vertex_attribute_t *attr );+++/**+ * Enable the fog vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_fog_coord_enable( vertex_attribute_t *attr );+++/**+ * Enable the edge flag vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_edge_flag_enable( vertex_attribute_t *attr );+++/**+ * Enable the secondary color vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_secondary_color_enable( vertex_attribute_t *attr );+++/**+ * Enable a generic vertex attribute.+ *+ * @param attr  a vertex attribute+ *+ * @private+ */+  void+  vertex_attribute_generic_attribute_enable( vertex_attribute_t *attr );+++/**+ * Returns the GL enum type correspond to given character.+ *+ * @param ctype  character type+ * @return       GL enum type+ *+ * @private+ */+  GLenum+  get_GL_TYPE( char ctype );+++/**+ * Get the GL name of the given target.+ *+ * @param  ctarget  a char describing target ( one of v,c,e,f,n,s,t)+ * @return          the associated GL target+ *+ * @private+ */+  GLenum+  GL_VERTEX_ATTRIBUTE_TARGET( char ctarget );+++/**+ * Returns the size of a given GL enum type.+ *+ * @param  gtype a GL enum type+ * @return       the size of the given type+ *+ * @private+ */+  GLuint+  GL_TYPE_SIZE( GLenum gtype );+++/**+ * Returns the literal string of given GL enum type.+ *+ * @param  gtype a GL enum type+ * @return       the literal string describing the type+ *+ * @private+ */+  const char *+  GL_TYPE_STRING( GLenum gtype );++/** @} */++#ifdef __cplusplus+}+#endif++#endif /* __VERTEX_ATTRIBUTE_H__ */
+ src/vertex-buffer.h view
@@ -0,0 +1,349 @@+/* ============================================================================+ * Freetype GL - A C OpenGL Freetype engine+ * Platform:    Any+ * WWW:         http://code.google.com/p/freetype-gl/+ * ----------------------------------------------------------------------------+ * Copyright 2011,2012 Nicolas P. Rougier. All rights reserved.+ *+ * Redistribution and use in source and binary forms, with or without+ * modification, are permitted provided that the following conditions are met:+ *+ *  1. Redistributions of source code must retain the above copyright notice,+ *     this list of conditions and the following disclaimer.+ *+ *  2. 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.+ *+ * THIS SOFTWARE IS PROVIDED BY NICOLAS P. ROUGIER ''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 NICOLAS P. ROUGIER 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.+ *+ * The views and conclusions contained in the software and documentation are+ * those of the authors and should not be interpreted as representing official+ * policies, either expressed or implied, of Nicolas P. Rougier.+ * ============================================================================+ */+#ifndef __VERTEX_BUFFER_H__+#define __VERTEX_BUFFER_H__++#ifdef __cplusplus+extern "C" {+#endif++#include "opengl.h"+#include "vector.h"+#include "vertex-attribute.h"++++/**+ * @file   vertex-buffer.h+ * @author Nicolas Rougier (Nicolas.Rougier@inria.fr)+ * @date   April, 2012+ *+ * @defgroup vertex-buffer Vertex buffer+ *+ * @{+ */+++/**+ * Generic vertex buffer.+ */+typedef struct+{+    /** Format of the vertex buffer. */+    char * format;++    /** Vector of vertices. */+    vector_t * vertices;++    /** GL identity of the vertices buffer. */+    GLuint vertices_id;++    /** Vector of indices. */+    vector_t * indices;++    /** GL identity of the indices buffer. */+    GLuint indices_id;++    /** Current size of the vertices buffer in GPU */+    size_t GPU_vsize;++    /** Current size of the indices buffer in GPU*/+    size_t GPU_isize;++    /** GL primitives to render. */+    GLenum mode;++    /** Whether the vertex buffer needs to be uploaded to GPU memory. */+    char state;++    /** Individual items */+    vector_t * items;++    /** Array of attributes. */+    vertex_attribute_t *attributes[MAX_VERTEX_ATTRIBUTE];+} vertex_buffer_t;+++/**+ * Creates an empty vertex buffer.+ *+ * @param  format a string describing vertex format.+ * @return        an empty vertex buffer.+ */+  vertex_buffer_t *+  vertex_buffer_new( const char *format );+++/**+ * Deletes vertex buffer and releases GPU memory.+ *+ * @param  self  a vertex buffer+ */+  void+  vertex_buffer_delete( vertex_buffer_t * self );+++/**+ *  Returns the number of items in the vertex buffer+ *+ *  @param  self  a vertex buffer+ *  @return       number of items+ */+  size_t+  vertex_buffer_size( const vertex_buffer_t *self );+++/**+ *  Returns vertex format+ *+ *  @param  self  a vertex buffer+ *  @return       vertex format+ */+  const char *+  vertex_buffer_format( const vertex_buffer_t *self );+++/**+ * Print information about a vertex buffer+ *+ * @param  self  a vertex buffer+ */+  void+  vertex_buffer_print( vertex_buffer_t * self );+++/**+ * Prepare vertex buffer for render.+ *+ * @param  self  a vertex buffer+ * @param  mode  render mode+ * @param  what  attributes to be rendered+ */+  void+  vertex_buffer_render_setup ( vertex_buffer_t *self,+                               GLenum mode, const char *what );+++/**+ * Finish rendering by setting back modified states+ *+ * @param  self  a vertex buffer+ */+  void+  vertex_buffer_render_finish ( vertex_buffer_t *self );+++/**+ * Render vertex buffer.+ *+ * @param  self  a vertex buffer+ * @param  mode  render mode+ * @param  what  attributes to be rendered+ */+  void+  vertex_buffer_render ( vertex_buffer_t *self,+                         GLenum mode, const char *what );+++/**+ * Render a specified item from the vertex buffer.+ *+ * @param  self   a vertex buffer+ * @param  index index of the item to be rendered+ */+  void+  vertex_buffer_render_item ( vertex_buffer_t *self,+                              size_t index );+++/**+ * Upload buffer to GPU memory.+ *+ * @param  self  a vertex buffer+ */+  void+  vertex_buffer_upload( vertex_buffer_t *self );+++/**+ * Clear all items.+ *+ * @param  self  a vertex buffer+ */+  void+  vertex_buffer_clear( vertex_buffer_t *self );+++/**+ * Appends indices at the end of the buffer.+ *+ * @param  self     a vertex buffer+ * @param  indices  indices to be appended+ * @param  icount   number of indices to be appended+ *+ * @private+ */+  void+  vertex_buffer_push_back_indices ( vertex_buffer_t *self,+                                    GLuint * indices,+                                    size_t icount );+++/**+ * Appends vertices at the end of the buffer.+ *+ * @note Internal use+ *+ * @param  self     a vertex buffer+ * @param  vertices vertices to be appended+ * @param  vcount   number of vertices to be appended+ *+ * @private+ */+  void+  vertex_buffer_push_back_vertices ( vertex_buffer_t *self,+                                     void * vertices,+                                     size_t vcount );+++/**+ * Insert indices in the buffer.+ *+ * @param  self    a vertex buffer+ * @param  index   location before which to insert indices+ * @param  indices indices to be appended+ * @param  icount  number of indices to be appended+ *+ * @private+ */+  void+  vertex_buffer_insert_indices ( vertex_buffer_t *self,+                                 size_t index,+                                 GLuint *indices,+                                 size_t icount );+++/**+ * Insert vertices in the buffer.+ *+ * @param  self     a vertex buffer+ * @param  index    location before which to insert vertices+ * @param  vertices vertices to be appended+ * @param  vcount   number of vertices to be appended+ *+ * @private+ */+  void+  vertex_buffer_insert_vertices ( vertex_buffer_t *self,+                                  size_t index,+                                  void *vertices,+                                  size_t vcount );++/**+ * Erase indices in the buffer.+ *+ * @param  self   a vertex buffer+ * @param  first  the index of the first index to be erased+ * @param  last   the index of the last index to be erased+ *+ * @private+ */+  void+  vertex_buffer_erase_indices ( vertex_buffer_t *self,+                                size_t first,+                                size_t last );++/**+ * Erase vertices in the buffer.+ *+ * @param  self   a vertex buffer+ * @param  first  the index of the first vertex to be erased+ * @param  last   the index of the last vertex to be erased+ *+ * @private+ */+  void+  vertex_buffer_erase_vertices ( vertex_buffer_t *self,+                                 size_t first,+                                 size_t last );+++/**+ * Append a new item to the collection.+ *+ * @param  self   a vertex buffer+ * @param  vcount   number of vertices+ * @param  vertices raw vertices data+ * @param  icount   number of indices+ * @param  indices  raw indices data+ */+  size_t+  vertex_buffer_push_back( vertex_buffer_t * self,+                           void * vertices, size_t vcount,+                           GLuint * indices, size_t icount );+++/**+ * Insert a new item into the vertex buffer.+ *+ * @param  self      a vertex buffer+ * @param  index     location before which to insert item+ * @param  vertices  raw vertices data+ * @param  vcount    number of vertices+ * @param  indices   raw indices data+ * @param  icount    number of indices+ */+  size_t+  vertex_buffer_insert( vertex_buffer_t * self,+                        size_t index,+                        void * vertices, size_t vcount,+                        GLuint * indices, size_t icount );++/**+ * Erase an item from the vertex buffer.+ *+ * @param  self     a vertex buffer+ * @param  index    index of the item to be deleted+ */+  void+  vertex_buffer_erase( vertex_buffer_t * self,+                       size_t index );++/** @} */++#ifdef __cplusplus+}+#endif++#endif /* __VERTEX_BUFFER_H__ */