<!DOCTYPE html>
<html>
<head>
<title>LEXSDL_TextureAdd</title>
<link rel="stylesheet" href="styles.css">
</head>
<header>
<h1>LEXSDL_TextureAdd</h1>
<hr>
</header>
<body>
<p>
Allows to add a existing SDL_Texture to the internals to be used with the rest of LEXSDL.<br>
Returns the <a href=LEXSDL_TextureID.html style="text-decoration:none"><span class=type>LEXSDL_TextureID</span></a> of the texture or a error.<br>
It's internally used by <a href=LEXSDL_TextureLoad.html>LEXSDL_TextureLoad<span class=symbol>()</span></a>, <a href=LEXSDL_TextureLoadBytes.html>LEXSDL_TextureLoadBytes<span class=symbol>()</span></a> to add the created texture.<br>
</p>
<p>
Since this function can fail <small>(return values listed bellow)</small> it should be check if the returned value is a valid id or a error.<br>
A fail will not cause a segfault so it can be retried to add the texture.
</p>
<h2>Function</h2>
<code><ul>
<span class=type>LEXSDL_TextureID</span> LEXSDL_TextureAdd<span class=symbol>(</span>SDL_Texture <span class=symbol>*</span>texture<span class=symbol>);</span>
</ul></code>
<h2>Return</h2>
<ul>
<small class=comment>*any other value*</small> : adding was successfull and returned value is the texture id.<br>
<a href=LEXSDL_TextureAddingFailed.html style="text-decoration:none"><span class=preprocessor>LEXSDL_TextureAddingFailed</span></a> : could not add texture.<br>
<a href=LEXSDL_TextureInvalid.html style="text-decoration:none"><span style=color:#27ae60>LEXSDL_TextureInvalid</span></a> : the SDL_Texture<span style=color:#66cf8d>*</span> was invalid.<br>
</ul>
<h2>Parameters</h2>
<ul>
SDL_Texture <span style=color:#66cf8d>*</span>textures : the pointer of the SDL_Texture to be added.
</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>