<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.7" xml:lang="en-US">
  <compounddef id="de/d9c/IGraphicsEngineRenderer_8cpp" kind="file" language="C++">
    <compoundname>IGraphicsEngineRenderer.cpp</compoundname>
    <includes local="no">iostream</includes>
    <includes local="no">string</includes>
    <includes local="no">sstream</includes>
    <includes local="no">fstream</includes>
    <includes local="no">stdlib.h</includes>
    <includes local="no">time.h</includes>
    <includes refid="d8/d4f/IGraphicsEngineRenderer_8hpp" local="yes">IGraphicsEngineRenderer.hpp</includes>
    <incdepgraph>
      <node id="8">
        <label>IGraphicsEngineRenderer.hpp</label>
        <link refid="d8/d4f/IGraphicsEngineRenderer_8hpp_source"/>
        <childnode refid="9" relation="include">
        </childnode>
      </node>
      <node id="1">
        <label>src/IGraphicsEngineRenderer.cpp</label>
        <link refid="de/d9c/IGraphicsEngineRenderer_8cpp"/>
        <childnode refid="2" relation="include">
        </childnode>
        <childnode refid="3" relation="include">
        </childnode>
        <childnode refid="4" relation="include">
        </childnode>
        <childnode refid="5" relation="include">
        </childnode>
        <childnode refid="6" relation="include">
        </childnode>
        <childnode refid="7" relation="include">
        </childnode>
        <childnode refid="8" relation="include">
        </childnode>
      </node>
      <node id="9">
        <label>SDL.h</label>
      </node>
      <node id="5">
        <label>fstream</label>
      </node>
      <node id="2">
        <label>iostream</label>
      </node>
      <node id="4">
        <label>sstream</label>
      </node>
      <node id="6">
        <label>stdlib.h</label>
      </node>
      <node id="3">
        <label>string</label>
      </node>
      <node id="7">
        <label>time.h</label>
      </node>
    </incdepgraph>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <programlisting>
<codeline lineno="1"><highlight class="preprocessor">#include<sp/>&lt;iostream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;string&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;sstream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fstream&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;stdlib.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;time.h&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&quot;IGraphicsEngineRenderer.hpp&quot;</highlight></codeline>
<codeline lineno="12"><highlight class="normal"></highlight></codeline>
<codeline lineno="13"><highlight class="normal"></highlight><highlight class="comment">//<sp/>...</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="14"><highlight class="normal"></highlight></codeline>
<codeline lineno="18" refid="d1/d7f/classSDLGraphicsEngineRenderer_1a8f098fb2c59403ec552350223528c5b0" refkind="member"><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a8f098fb2c59403ec552350223528c5b0" kindref="member">SDLGraphicsEngineRenderer::SDLGraphicsEngineRenderer</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>w,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>h)<sp/>:<sp/><ref refid="d7/dea/classIGraphicsEngineRenderer" kindref="compound">IGraphicsEngineRenderer</ref>(w,<sp/>h)<sp/>{</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>random<sp/>number<sp/>generation.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/>srand(time(</highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">));</highlight></codeline>
<codeline lineno="21"><highlight class="normal"></highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Initialize<sp/>SDL</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(SDL_Init(SDL_INIT_EVERYTHING)<sp/>&lt;<sp/>0)<sp/>{</highlight></codeline>
<codeline lineno="24"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;SDL<sp/>could<sp/>not<sp/>initialize!<sp/>SDL<sp/>Error:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>SDL_GetError()<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>exit(1);</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="27"><highlight class="normal"></highlight></codeline>
<codeline lineno="28"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Create<sp/>window</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="29"><highlight class="normal"><sp/><sp/><sp/><sp/>mWindow<sp/>=<sp/>SDL_CreateWindow(</highlight><highlight class="stringliteral">&quot;Lab&quot;</highlight><highlight class="normal">,<sp/>100,<sp/>100,<sp/>mScreenWidth,<sp/>mScreenHeight,<sp/>SDL_WINDOW_SHOWN);</highlight></codeline>
<codeline lineno="30"><highlight class="normal"></highlight></codeline>
<codeline lineno="31"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>if<sp/>Window<sp/>did<sp/>not<sp/>create.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="32"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">nullptr</highlight><highlight class="normal"><sp/>==<sp/>mWindow)<sp/>{</highlight></codeline>
<codeline lineno="33"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Window<sp/>could<sp/>not<sp/>be<sp/>created!<sp/>SDL<sp/>Error:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>SDL_GetError()<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="34"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>exit(1);</highlight></codeline>
<codeline lineno="35"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="36"><highlight class="normal"></highlight></codeline>
<codeline lineno="37"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Create<sp/>a<sp/>Renderer<sp/>to<sp/>draw<sp/>on</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="38"><highlight class="normal"><sp/><sp/><sp/><sp/>mRenderer<sp/>=<sp/>SDL_CreateRenderer(mWindow,<sp/>-1,<sp/>SDL_RENDERER_ACCELERATED);</highlight></codeline>
<codeline lineno="39"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Check<sp/>if<sp/>Renderer<sp/>did<sp/>not<sp/>create.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="40"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(</highlight><highlight class="keyword">nullptr</highlight><highlight class="normal"><sp/>==<sp/>mRenderer)<sp/>{</highlight></codeline>
<codeline lineno="41"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Renderer<sp/>could<sp/>not<sp/>be<sp/>created!<sp/>SDL<sp/>Error:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>SDL_GetError()<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="42"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>exit(1);</highlight></codeline>
<codeline lineno="43"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
<codeline lineno="44"><highlight class="normal"></highlight></codeline>
<codeline lineno="45"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>SDL<sp/>Setup<sp/>successfully</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="46"><highlight class="normal"><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;No<sp/>SDL<sp/>errors<sp/>Detected<sp/>in<sp/>during<sp/>init\n\n&quot;</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="47"><highlight class="normal">}</highlight></codeline>
<codeline lineno="48"><highlight class="normal"></highlight></codeline>
<codeline lineno="49" refid="d1/d7f/classSDLGraphicsEngineRenderer_1a1420b7422b6cbaadae4490c554716117" refkind="member"><highlight class="normal"><ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a1420b7422b6cbaadae4490c554716117" kindref="member">SDLGraphicsEngineRenderer::~SDLGraphicsEngineRenderer</ref>()<sp/>{</highlight></codeline>
<codeline lineno="50"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Destroy<sp/>Renderer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="51"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_DestroyRenderer(mRenderer);</highlight></codeline>
<codeline lineno="52"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Destroy<sp/>window</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="53"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_DestroyWindow(mWindow);</highlight></codeline>
<codeline lineno="54"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Point<sp/>mWindow<sp/>to<sp/>nullptr<sp/>to<sp/>ensure<sp/></highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="55"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>it<sp/>points<sp/>to<sp/>nothing.</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="56"><highlight class="normal"><sp/><sp/><sp/><sp/>mRenderer<sp/>=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="57"><highlight class="normal"><sp/><sp/><sp/><sp/>mWindow<sp/>=<sp/></highlight><highlight class="keyword">nullptr</highlight><highlight class="normal">;</highlight></codeline>
<codeline lineno="58"><highlight class="normal"></highlight></codeline>
<codeline lineno="59"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//Quit<sp/>SDL<sp/>subsystems</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="60"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_Quit();</highlight></codeline>
<codeline lineno="61"><highlight class="normal">}</highlight></codeline>
<codeline lineno="62"><highlight class="normal"></highlight></codeline>
<codeline lineno="63" refid="d1/d7f/classSDLGraphicsEngineRenderer_1a91b29bf19986c6ad8710238778312277" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a91b29bf19986c6ad8710238778312277" kindref="member">SDLGraphicsEngineRenderer::SetRenderDrawColor</ref>(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>r,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>g,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>b,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>a)<sp/>{</highlight></codeline>
<codeline lineno="64"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_SetRenderDrawColor(mRenderer,<sp/>r,<sp/>g,<sp/>b,<sp/>a);</highlight></codeline>
<codeline lineno="65"><highlight class="normal">}</highlight></codeline>
<codeline lineno="66"><highlight class="normal"></highlight></codeline>
<codeline lineno="67" refid="d1/d7f/classSDLGraphicsEngineRenderer_1ae6edfc67a39076c0c12101ad85be4f6a" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1ae6edfc67a39076c0c12101ad85be4f6a" kindref="member">SDLGraphicsEngineRenderer::RenderClear</ref>()<sp/>{</highlight></codeline>
<codeline lineno="68"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_RenderClear(mRenderer);</highlight></codeline>
<codeline lineno="69"><highlight class="normal">}</highlight></codeline>
<codeline lineno="70"><highlight class="normal"></highlight></codeline>
<codeline lineno="71" refid="d1/d7f/classSDLGraphicsEngineRenderer_1acddd7c456e4311d71fc1d43f29343d81" refkind="member"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/><ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1acddd7c456e4311d71fc1d43f29343d81" kindref="member">SDLGraphicsEngineRenderer::RenderPresent</ref>()<sp/>{</highlight></codeline>
<codeline lineno="72"><highlight class="normal"><sp/><sp/><sp/><sp/>SDL_RenderPresent(mRenderer);</highlight></codeline>
<codeline lineno="73"><highlight class="normal">}</highlight></codeline>
<codeline lineno="74"><highlight class="normal"></highlight></codeline>
<codeline lineno="75"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Get<sp/>Pointer<sp/>to<sp/>Window</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="76" refid="d1/d7f/classSDLGraphicsEngineRenderer_1abd24deb029577fc237b47a3cbf30c121" refkind="member"><highlight class="normal">SDL_Window<sp/>*<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1abd24deb029577fc237b47a3cbf30c121" kindref="member">SDLGraphicsEngineRenderer::GetWindow</ref>()<sp/>{</highlight></codeline>
<codeline lineno="77"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>mWindow;</highlight></codeline>
<codeline lineno="78"><highlight class="normal">}</highlight></codeline>
<codeline lineno="79"><highlight class="normal"></highlight></codeline>
<codeline lineno="80"><highlight class="normal"></highlight><highlight class="comment">//<sp/>Get<sp/>Pointer<sp/>to<sp/>Renderer</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="81" refid="d1/d7f/classSDLGraphicsEngineRenderer_1a93e5f435d003933cf3304e44c5aa7324" refkind="member"><highlight class="normal">SDL_Renderer<sp/>*<ref refid="d1/d7f/classSDLGraphicsEngineRenderer_1a93e5f435d003933cf3304e44c5aa7324" kindref="member">SDLGraphicsEngineRenderer::GetRenderer</ref>()<sp/>{</highlight></codeline>
<codeline lineno="82"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>mRenderer;</highlight></codeline>
<codeline lineno="83"><highlight class="normal">}</highlight></codeline>
    </programlisting>
    <location file="src/IGraphicsEngineRenderer.cpp"/>
  </compounddef>
</doxygen>
