<!DOCTYPE html>
<html>
<head>
<title>LEXSDL_CreateRenderer</title>
<link rel="stylesheet" href="styles.css">
</head>
<header>
<h1>LEXSDL_CreateRenderer</h1>
<hr>
</header>
<body>
<p>
Creates the <a href=https://wiki.libsdl.org/SDL2/SDL_Renderer>SDL_Renderer</a> with the desired or default flags.<br>
</p>
<p>
A full list of <a href=https://wiki.libsdl.org/SDL2/SDL_RendererFlags>flags</a> and info can be found in the <a href=https://wiki.libsdl.org/SDL2/SDL_CreateRenderer>SDL documentation</a> about creating the renderer.<br>
The normal <a href=https://wiki.libsdl.org/SDL2/SDL_CreateRenderer>SDL_CreateRenderer<span style="color:#66cf8d">()</span></a> can be used but to use it with LEXSDL it need to be set with <a href=LEXSDL_SetRenderer.html>LEXSDL_SetRenderer<span style="color:#66cf8d">()</span></a>.
</p>
<p>
The <a href=https://wiki.libsdl.org/SDL2/SDL_Window>SDL_Window</a> must have been created or set. Check <a href=CategoryManagement.html#window>Management#window</a>
</p>
<p>
If creation is succesfull a SDL_Renderer<span style="color:#66cf8d">*</span> is returned, there is no need to store it since it is stored internally and can be retrieved anytime with <a href=LEXSDL_GetRenderer.html>LEXSDL_GetRenderer<span style="color:#66cf8d">()</span></a>.
</p>
<h2>Function</h2>
<code><ul>
SDL_Renderer<span style="color:#66cf8d">*</span> LEXSDL_CreateRenderer<span style="color:#66cf8d">(</span><span style="color:#2980b9">uint32_t</span> flags<span style="color:#66cf8d">);</span>
</ul></code>
<h2>Return</h2>
<ul>
<b>NULL</b> : Creation failed.<br>
<b>SDL_Renderer<span style="color:#66cf8d">*</span></b> : Creation was succesfull.<br>
</ul>
<span style="color:#66cf8d">*</span><b>Note</b> : If a error ocurres call <a href=https://wiki.libsdl.org/SDL2/SDL_GetError>SDL_GetError<span style="color:#66cf8d">()</span></a> for more information.<br>
<h2>Defaults</h2>
<ul>
<span style="color:#27ae60">LEXSDL_RENDERERINITFLAGS</span> = SDL_RENDERER_PRESENTVSYNC
</ul>
</body>
<footer>
<br>
<hr>
<a href=FrontPage.html>FrontPage</a> <b>|</b> <a href=https://gitlab.com/Alexevier/lexsdl>GitLab</a> <b>|</b> <a href=https://crates.io/crates/lexsdl>Crates.io</a>
</footer>
</html>