aboutsummaryrefslogtreecommitdiffstats
path: root/spritebatch_8h_source.html
diff options
context:
space:
mode:
Diffstat (limited to 'spritebatch_8h_source.html')
-rw-r--r--spritebatch_8h_source.html131
1 files changed, 0 insertions, 131 deletions
diff --git a/spritebatch_8h_source.html b/spritebatch_8h_source.html
deleted file mode 100644
index 9373c5a6..00000000
--- a/spritebatch_8h_source.html
+++ /dev/null
@@ -1,131 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
-<meta http-equiv="X-UA-Compatible" content="IE=9"/>
-<meta name="generator" content="Doxygen 1.8.13"/>
-<meta name="viewport" content="width=device-width, initial-scale=1"/>
-<title>YAGE: include/YAGE/spritebatch.h Source File</title>
-<link href="tabs.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="jquery.js"></script>
-<script type="text/javascript" src="dynsections.js"></script>
-<link href="navtree.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="resize.js"></script>
-<script type="text/javascript" src="navtreedata.js"></script>
-<script type="text/javascript" src="navtree.js"></script>
-<script type="text/javascript">
- $(document).ready(initResizable);
-</script>
-<link href="search/search.css" rel="stylesheet" type="text/css"/>
-<script type="text/javascript" src="search/searchdata.js"></script>
-<script type="text/javascript" src="search/search.js"></script>
-<link href="doxygen.css" rel="stylesheet" type="text/css" />
-</head>
-<body>
-<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
-<div id="titlearea">
-<table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">YAGE
- &#160;<span id="projectnumber">v0.1.1</span>
- </div>
- <div id="projectbrief">Yet Another Game Engine</div>
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-<!-- end header part -->
-<!-- Generated by Doxygen 1.8.13 -->
-<script type="text/javascript">
-var searchBox = new SearchBox("searchBox", "search",false,'Search');
-</script>
-<script type="text/javascript" src="menudata.js"></script>
-<script type="text/javascript" src="menu.js"></script>
-<script type="text/javascript">
-$(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
-});
-</script>
-<div id="main-nav"></div>
-</div><!-- top -->
-<div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
-</div>
-<script type="text/javascript">
-$(document).ready(function(){initNavTree('spritebatch_8h_source.html','');});
-</script>
-<div id="doc-content">
-<!-- window showing the filter options -->
-<div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
-</div>
-
-<!-- iframe showing the search results (closed by default) -->
-<div id="MSearchResultsWindow">
-<iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
-</iframe>
-</div>
-
-<div class="header">
- <div class="headertitle">
-<div class="title">spritebatch.h</div> </div>
-</div><!--header-->
-<div class="contents">
-<a href="spritebatch_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/* ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * spritebatch.h</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * Copyright (c) 2017 Yann Herklotz Grave &lt;ymherklotz@gmail.com&gt; -- MIT License</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * See file LICENSE for more details</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * ----------------------------------------------------------------------------</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#ifndef YAGE_SPRITE_BATCH_H</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#define YAGE_SPRITE_BATCH_H</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="vertex_8h.html">vertex.h</a>&quot;</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &lt;GL/glew.h&gt;</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &lt;glm/glm.hpp&gt;</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceyage.html">yage</a></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;{</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="keyword">class </span>SpriteBatch;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html"> 26</a></span>&#160;<span class="keyword">class </span><a class="code" href="classyage_1_1Glyph.html">Glyph</a></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;{</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a2efbe49c2307601731416d615ac415c8"> 29</a></span>&#160; GLuint <a class="code" href="classyage_1_1Glyph.html#a2efbe49c2307601731416d615ac415c8">texture_</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#ab27b92a62dcebccae673a7d8d0c15704"> 30</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="classyage_1_1Glyph.html#ab27b92a62dcebccae673a7d8d0c15704">depth_</a>;</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a71c5c3381928153e3eb2f67461b76a2d"> 31</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a71c5c3381928153e3eb2f67461b76a2d">top_left_</a>;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a9db1936e683cafe3b6ef72f63b3241fa"> 32</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a9db1936e683cafe3b6ef72f63b3241fa">top_right_</a>;</div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a6240a88991e31b2fc8ed5dccfc362234"> 33</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a6240a88991e31b2fc8ed5dccfc362234">bottom_right_</a>;</div><div class="line"><a name="l00034"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#add70123a08d594e4cfb627a03ae8daad"> 34</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#add70123a08d594e4cfb627a03ae8daad">bottom_left_</a>;</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <a class="code" href="classyage_1_1Glyph.html#a19ae31e594b33bb1ad3bc1763cdba38f">Glyph</a>(GLuint <a class="code" href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747">texture</a>, <span class="keywordtype">float</span> <a class="code" href="classyage_1_1Glyph.html#ab1906273e09446d9f6ccdc0a06428afa">depth</a>, <span class="keyword">const</span> <a class="code" href="structyage_1_1Vertex.html">Vertex</a> &amp;<a class="code" href="classyage_1_1Glyph.html#a6a86e79419ccea7f6921685c197453a1">top_left</a>,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">const</span> <a class="code" href="structyage_1_1Vertex.html">Vertex</a> &amp;<a class="code" href="classyage_1_1Glyph.html#aac14f7258926c0c06ec594bc616ed5d0">top_right</a>, <span class="keyword">const</span> <a class="code" href="structyage_1_1Vertex.html">Vertex</a> &amp;<a class="code" href="classyage_1_1Glyph.html#a3db3e9cd03629c6c37a597d5779d1024">bottom_right</a>,</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keyword">const</span> <a class="code" href="structyage_1_1Vertex.html">Vertex</a> &amp;<a class="code" href="classyage_1_1Glyph.html#a8d8150986db3f0985f1b5d9622f83854">bottom_left</a>);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747"> 41</a></span>&#160; GLuint <a class="code" href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747">texture</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#a2efbe49c2307601731416d615ac415c8">texture_</a>; }</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#ab1906273e09446d9f6ccdc0a06428afa"> 42</a></span>&#160; <span class="keywordtype">float</span> <a class="code" href="classyage_1_1Glyph.html#ab1906273e09446d9f6ccdc0a06428afa">depth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#ab27b92a62dcebccae673a7d8d0c15704">depth_</a>; }</div><div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a6a86e79419ccea7f6921685c197453a1"> 43</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a6a86e79419ccea7f6921685c197453a1">top_left</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#a71c5c3381928153e3eb2f67461b76a2d">top_left_</a>; }</div><div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#aac14f7258926c0c06ec594bc616ed5d0"> 44</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#aac14f7258926c0c06ec594bc616ed5d0">top_right</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#a9db1936e683cafe3b6ef72f63b3241fa">top_right_</a>; }</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a3db3e9cd03629c6c37a597d5779d1024"> 45</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a3db3e9cd03629c6c37a597d5779d1024">bottom_right</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#a6240a88991e31b2fc8ed5dccfc362234">bottom_right_</a>; }</div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classyage_1_1Glyph.html#a8d8150986db3f0985f1b5d9622f83854"> 46</a></span>&#160; <a class="code" href="structyage_1_1Vertex.html">Vertex</a> <a class="code" href="classyage_1_1Glyph.html#a8d8150986db3f0985f1b5d9622f83854">bottom_left</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#add70123a08d594e4cfb627a03ae8daad">bottom_left_</a>; }</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;};</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html"> 49</a></span>&#160;<span class="keyword">class </span><a class="code" href="classyage_1_1RenderBatch.html">RenderBatch</a></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;{</div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#ad12ecf32cf9f9244afa7e9ad15b4e78f"> 51</a></span>&#160; <span class="keyword">friend</span> <a class="code" href="classyage_1_1RenderBatch.html#ad12ecf32cf9f9244afa7e9ad15b4e78f">SpriteBatch</a>;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#a160bf0e089d392d26fd50935263762ba"> 54</a></span>&#160; GLsizei <a class="code" href="classyage_1_1RenderBatch.html#a160bf0e089d392d26fd50935263762ba">num_vertices_</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#a129b5fa960e1acc85650ce06b10905e7"> 55</a></span>&#160; GLint <a class="code" href="classyage_1_1RenderBatch.html#a129b5fa960e1acc85650ce06b10905e7">offset_</a>;</div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#a17da9d35451d55766836917699406160"> 56</a></span>&#160; GLuint <a class="code" href="classyage_1_1RenderBatch.html#a17da9d35451d55766836917699406160">texture_</a>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="classyage_1_1RenderBatch.html">RenderBatch</a>(GLint offset, GLsizei num_vertices, GLuint <a class="code" href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747">texture</a>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#a6bedb60b10b6d47b7b198d3cb53eea2a"> 61</a></span>&#160; GLint <a class="code" href="classyage_1_1RenderBatch.html#a6bedb60b10b6d47b7b198d3cb53eea2a">offset</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> offset_; }</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#ad5edaded9e6257aa2f3a3b7cae276307"> 62</a></span>&#160; GLsizei <a class="code" href="classyage_1_1RenderBatch.html#ad5edaded9e6257aa2f3a3b7cae276307">num_vertices</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> num_vertices_; }</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classyage_1_1RenderBatch.html#a54102dde86a787d06d47928de8f72c3f"> 63</a></span>&#160; GLuint <a class="code" href="classyage_1_1RenderBatch.html#a54102dde86a787d06d47928de8f72c3f">texture</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classyage_1_1Glyph.html#a2efbe49c2307601731416d615ac415c8">texture_</a>; }</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;};</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html"> 66</a></span>&#160;<span class="keyword">class </span><a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;{</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#a6e01d11880a841b153e950aa8307b1a5"> 69</a></span>&#160; <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> NUM_VERTICES = 6;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#a56e335f07826ca61ba680981d46b043c"> 72</a></span>&#160; GLuint vbo_ = 0;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#a00a06cc5f4bd47c2d5003cf2e3d7a6c1"> 73</a></span>&#160; GLuint vao_ = 0;</div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#a0ca8f0d0df0eeb22e8fc6fceebb96200"> 74</a></span>&#160; std::vector&lt;Glyph&gt; <a class="code" href="classyage_1_1SpriteBatch.html#a0ca8f0d0df0eeb22e8fc6fceebb96200">glyphs_</a>;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#a007d24cd3765e2fcea843f85dbbb475e"> 75</a></span>&#160; std::vector&lt;Glyph *&gt; <a class="code" href="classyage_1_1SpriteBatch.html#a007d24cd3765e2fcea843f85dbbb475e">glyph_ptrs_</a>;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classyage_1_1SpriteBatch.html#abf057ffe5fd9b7c35256dad147391008"> 76</a></span>&#160; std::vector&lt;RenderBatch&gt; <a class="code" href="classyage_1_1SpriteBatch.html#abf057ffe5fd9b7c35256dad147391008">render_batches_</a>;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a>();</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a>(<span class="keyword">const</span> <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a>(<a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; ~<a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a>();</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;operator=(<span class="keyword">const</span> <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;operator=(<a class="code" href="classyage_1_1SpriteBatch.html">SpriteBatch</a> &amp;&amp;) = <span class="keyword">delete</span>;</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="comment">// initialize vaos and vbos</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordtype">void</span> <a class="code" href="namespaceyage.html#a6aea783cb978923211e165efefec4a7b">init</a>();</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keywordtype">void</span> begin();</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keywordtype">void</span> end();</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160; <span class="comment">// adds a sprite to the sprite batch to be rendered later</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keywordtype">void</span> draw(<span class="keyword">const</span> glm::vec4 &amp;destination_rect, <span class="keyword">const</span> glm::vec4 &amp;uv_rect,</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; GLuint <a class="code" href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747">texture</a>, <span class="keyword">const</span> <a class="code" href="structyage_1_1Color.html">Color</a> &amp;color, <span class="keywordtype">float</span> <a class="code" href="classyage_1_1Glyph.html#ab1906273e09446d9f6ccdc0a06428afa">depth</a>);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="comment">// render the batch</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordtype">void</span> render();</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordtype">void</span> createVertexArray();</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <span class="keywordtype">void</span> createRenderBatches();</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <span class="keywordtype">void</span> sortGlyphs();</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;};</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;} <span class="comment">// namespace yage</span></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="classyage_1_1RenderBatch_html"><div class="ttname"><a href="classyage_1_1RenderBatch.html">yage::RenderBatch</a></div><div class="ttdef"><b>Definition:</b> spritebatch.h:49</div></div>
-<div class="ttc" id="namespaceyage_html_a6aea783cb978923211e165efefec4a7b"><div class="ttname"><a href="namespaceyage.html#a6aea783cb978923211e165efefec4a7b">yage::init</a></div><div class="ttdeci">bool init()</div><div class="ttdoc">Initializes YAGE. </div><div class="ttdef"><b>Definition:</b> yage.h:47</div></div>
-<div class="ttc" id="classyage_1_1SpriteBatch_html_a007d24cd3765e2fcea843f85dbbb475e"><div class="ttname"><a href="classyage_1_1SpriteBatch.html#a007d24cd3765e2fcea843f85dbbb475e">yage::SpriteBatch::glyph_ptrs_</a></div><div class="ttdeci">std::vector&lt; Glyph * &gt; glyph_ptrs_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:75</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_a17da9d35451d55766836917699406160"><div class="ttname"><a href="classyage_1_1RenderBatch.html#a17da9d35451d55766836917699406160">yage::RenderBatch::texture_</a></div><div class="ttdeci">GLuint texture_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:56</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_add70123a08d594e4cfb627a03ae8daad"><div class="ttname"><a href="classyage_1_1Glyph.html#add70123a08d594e4cfb627a03ae8daad">yage::Glyph::bottom_left_</a></div><div class="ttdeci">Vertex bottom_left_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:34</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_aac14f7258926c0c06ec594bc616ed5d0"><div class="ttname"><a href="classyage_1_1Glyph.html#aac14f7258926c0c06ec594bc616ed5d0">yage::Glyph::top_right</a></div><div class="ttdeci">Vertex top_right() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:44</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_af59de1a9642b07583d49197bc9d74747"><div class="ttname"><a href="classyage_1_1Glyph.html#af59de1a9642b07583d49197bc9d74747">yage::Glyph::texture</a></div><div class="ttdeci">GLuint texture() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:41</div></div>
-<div class="ttc" id="structyage_1_1Vertex_html"><div class="ttname"><a href="structyage_1_1Vertex.html">yage::Vertex</a></div><div class="ttdef"><b>Definition:</b> vertex.h:49</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_ab1906273e09446d9f6ccdc0a06428afa"><div class="ttname"><a href="classyage_1_1Glyph.html#ab1906273e09446d9f6ccdc0a06428afa">yage::Glyph::depth</a></div><div class="ttdeci">float depth() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:42</div></div>
-<div class="ttc" id="classyage_1_1SpriteBatch_html"><div class="ttname"><a href="classyage_1_1SpriteBatch.html">yage::SpriteBatch</a></div><div class="ttdef"><b>Definition:</b> spritebatch.h:66</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a71c5c3381928153e3eb2f67461b76a2d"><div class="ttname"><a href="classyage_1_1Glyph.html#a71c5c3381928153e3eb2f67461b76a2d">yage::Glyph::top_left_</a></div><div class="ttdeci">Vertex top_left_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:31</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_a54102dde86a787d06d47928de8f72c3f"><div class="ttname"><a href="classyage_1_1RenderBatch.html#a54102dde86a787d06d47928de8f72c3f">yage::RenderBatch::texture</a></div><div class="ttdeci">GLuint texture() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:63</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a19ae31e594b33bb1ad3bc1763cdba38f"><div class="ttname"><a href="classyage_1_1Glyph.html#a19ae31e594b33bb1ad3bc1763cdba38f">yage::Glyph::Glyph</a></div><div class="ttdeci">Glyph(GLuint texture, float depth, const Vertex &amp;top_left, const Vertex &amp;top_right, const Vertex &amp;bottom_right, const Vertex &amp;bottom_left)</div><div class="ttdef"><b>Definition:</b> spritebatch.cpp:19</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_ab27b92a62dcebccae673a7d8d0c15704"><div class="ttname"><a href="classyage_1_1Glyph.html#ab27b92a62dcebccae673a7d8d0c15704">yage::Glyph::depth_</a></div><div class="ttdeci">float depth_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:30</div></div>
-<div class="ttc" id="vertex_8h_html"><div class="ttname"><a href="vertex_8h.html">vertex.h</a></div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_ad12ecf32cf9f9244afa7e9ad15b4e78f"><div class="ttname"><a href="classyage_1_1RenderBatch.html#ad12ecf32cf9f9244afa7e9ad15b4e78f">yage::RenderBatch::SpriteBatch</a></div><div class="ttdeci">friend SpriteBatch</div><div class="ttdef"><b>Definition:</b> spritebatch.h:51</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a2efbe49c2307601731416d615ac415c8"><div class="ttname"><a href="classyage_1_1Glyph.html#a2efbe49c2307601731416d615ac415c8">yage::Glyph::texture_</a></div><div class="ttdeci">GLuint texture_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:29</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a8d8150986db3f0985f1b5d9622f83854"><div class="ttname"><a href="classyage_1_1Glyph.html#a8d8150986db3f0985f1b5d9622f83854">yage::Glyph::bottom_left</a></div><div class="ttdeci">Vertex bottom_left() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:46</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a3db3e9cd03629c6c37a597d5779d1024"><div class="ttname"><a href="classyage_1_1Glyph.html#a3db3e9cd03629c6c37a597d5779d1024">yage::Glyph::bottom_right</a></div><div class="ttdeci">Vertex bottom_right() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:45</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a6240a88991e31b2fc8ed5dccfc362234"><div class="ttname"><a href="classyage_1_1Glyph.html#a6240a88991e31b2fc8ed5dccfc362234">yage::Glyph::bottom_right_</a></div><div class="ttdeci">Vertex bottom_right_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:33</div></div>
-<div class="ttc" id="classyage_1_1SpriteBatch_html_abf057ffe5fd9b7c35256dad147391008"><div class="ttname"><a href="classyage_1_1SpriteBatch.html#abf057ffe5fd9b7c35256dad147391008">yage::SpriteBatch::render_batches_</a></div><div class="ttdeci">std::vector&lt; RenderBatch &gt; render_batches_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:76</div></div>
-<div class="ttc" id="classyage_1_1SpriteBatch_html_a0ca8f0d0df0eeb22e8fc6fceebb96200"><div class="ttname"><a href="classyage_1_1SpriteBatch.html#a0ca8f0d0df0eeb22e8fc6fceebb96200">yage::SpriteBatch::glyphs_</a></div><div class="ttdeci">std::vector&lt; Glyph &gt; glyphs_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:74</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_a129b5fa960e1acc85650ce06b10905e7"><div class="ttname"><a href="classyage_1_1RenderBatch.html#a129b5fa960e1acc85650ce06b10905e7">yage::RenderBatch::offset_</a></div><div class="ttdeci">GLint offset_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:55</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a9db1936e683cafe3b6ef72f63b3241fa"><div class="ttname"><a href="classyage_1_1Glyph.html#a9db1936e683cafe3b6ef72f63b3241fa">yage::Glyph::top_right_</a></div><div class="ttdeci">Vertex top_right_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:32</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_ad5edaded9e6257aa2f3a3b7cae276307"><div class="ttname"><a href="classyage_1_1RenderBatch.html#ad5edaded9e6257aa2f3a3b7cae276307">yage::RenderBatch::num_vertices</a></div><div class="ttdeci">GLsizei num_vertices() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:62</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_a6bedb60b10b6d47b7b198d3cb53eea2a"><div class="ttname"><a href="classyage_1_1RenderBatch.html#a6bedb60b10b6d47b7b198d3cb53eea2a">yage::RenderBatch::offset</a></div><div class="ttdeci">GLint offset() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:61</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html"><div class="ttname"><a href="classyage_1_1Glyph.html">yage::Glyph</a></div><div class="ttdoc">Glyph with information of the texture. </div><div class="ttdef"><b>Definition:</b> spritebatch.h:26</div></div>
-<div class="ttc" id="classyage_1_1Glyph_html_a6a86e79419ccea7f6921685c197453a1"><div class="ttname"><a href="classyage_1_1Glyph.html#a6a86e79419ccea7f6921685c197453a1">yage::Glyph::top_left</a></div><div class="ttdeci">Vertex top_left() const</div><div class="ttdef"><b>Definition:</b> spritebatch.h:43</div></div>
-<div class="ttc" id="namespaceyage_html"><div class="ttname"><a href="namespaceyage.html">yage</a></div><div class="ttdoc">Project namespace. </div><div class="ttdef"><b>Definition:</b> body.cpp:13</div></div>
-<div class="ttc" id="classyage_1_1RenderBatch_html_a160bf0e089d392d26fd50935263762ba"><div class="ttname"><a href="classyage_1_1RenderBatch.html#a160bf0e089d392d26fd50935263762ba">yage::RenderBatch::num_vertices_</a></div><div class="ttdeci">GLsizei num_vertices_</div><div class="ttdef"><b>Definition:</b> spritebatch.h:54</div></div>
-<div class="ttc" id="structyage_1_1Color_html"><div class="ttname"><a href="structyage_1_1Color.html">yage::Color</a></div><div class="ttdef"><b>Definition:</b> vertex.h:26</div></div>
-</div><!-- fragment --></div><!-- contents -->
-</div><!-- doc-content -->
-<!-- start footer part -->
-<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_f562165b51c585c003877be645f219b5.html">YAGE</a></li><li class="navelem"><a class="el" href="spritebatch_8h.html">spritebatch.h</a></li>
- <li class="footer">Generated on Sun Sep 3 2017 13:10:08 for YAGE by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
- </ul>
-</div>
-</body>
-</html>