125 lines
7.2 KiB
HTML
125 lines
7.2 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.18"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>EnTT: Crash Course: configuration</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="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">EnTT
|
|
 <span id="projectnumber">3.5.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.18 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- 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><!-- top -->
|
|
<div class="PageDoc"><div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Crash Course: configuration </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><h1><a class="anchor" id="autotoc_md1"></a>
|
|
Introduction</h1>
|
|
<p><code>EnTT</code> doesn't offer many hooks for customization but it certainly offers some.<br />
|
|
In the vast majority of cases, users will have no interest in changing the default parameters. For all other cases, the list of possible configurations with which it's possible to adjust the behavior of the library at runtime can be found below.</p>
|
|
<h1><a class="anchor" id="autotoc_md2"></a>
|
|
Definitions</h1>
|
|
<p>All options are intended as parameters to the compiler (or user-defined macros within the compilation units, if preferred).<br />
|
|
Each parameter can result in internal library definitions. It's not recommended to try to also modify these definitions, since there is no guarantee that they will remain stable over time unlike the options below.</p>
|
|
<h2><a class="anchor" id="autotoc_md3"></a>
|
|
ENTT_STANDALONE</h2>
|
|
<p><code>EnTT</code> is designed in such a way that it works (almost) everywhere out of the box. However, this is the result of many refinements over time and a compromise regarding some optimizations.<br />
|
|
It's worth noting that users can get a small performance boost by passing this definition to the compiler when the library is used in a standalone application.</p>
|
|
<h2><a class="anchor" id="autotoc_md4"></a>
|
|
ENTT_NOEXCEPT</h2>
|
|
<p>The purpose of this parameter is to suppress the use of <code>noexcept</code> by this library.<br />
|
|
To do this, simply define the variable without assigning any value to it.</p>
|
|
<h2><a class="anchor" id="autotoc_md5"></a>
|
|
ENTT_HS_SUFFIX and ENTT_HWS_SUFFIX</h2>
|
|
<p>The <code>hashed_string</code> class introduces the <code>_hs</code> and <code>_hws</code> suffixes to accompany its user defined literals.<br />
|
|
In the case of conflicts or even just to change these suffixes, it's possible to do so by associating new ones with these definitions.</p>
|
|
<h2><a class="anchor" id="autotoc_md6"></a>
|
|
ENTT_USE_ATOMIC</h2>
|
|
<p>In general, <code>EnTT</code> doesn't offer primitives to support multi-threading. Many of the features can be split over multiple threads without any explicit control and the user is the only one who knows if and when a synchronization point is required.<br />
|
|
However, some features aren't easily accessible to users and can be made thread-safe by means of this definition.</p>
|
|
<h2><a class="anchor" id="autotoc_md7"></a>
|
|
ENTT_ID_TYPE</h2>
|
|
<p><code><a class="el" href="namespaceentt.html#a13e040e7b38a8f86d1ab2f096f37b627" title="Alias declaration for type identifiers.">entt::id_type</a></code> is directly controlled by this definition and widely used within the library.<br />
|
|
By default, its type is <code>std::uint32_t</code>. However, users can define a different default type if necessary.</p>
|
|
<h2><a class="anchor" id="autotoc_md8"></a>
|
|
ENTT_PAGE_SIZE</h2>
|
|
<p>As is known, the ECS module of <code>EnTT</code> is based on <em>sparse sets</em>. What is less known perhaps is that these are paged to reduce memory consumption in some corner cases.<br />
|
|
The default size of a page is 32kB but users can adjust it if appropriate. In all case, the chosen value <b>must</b> be a power of 2.</p>
|
|
<h2><a class="anchor" id="autotoc_md9"></a>
|
|
ENTT_ASSERT</h2>
|
|
<p>For performance reasons, <code>EnTT</code> doesn't use exceptions or any other control structures. In fact, it offers many features that result in undefined behavior if not used correctly.<br />
|
|
To get around this, the library relies on a lot of <code>assert</code>s for the purpose of detecting errors in debug builds. However, these assertions may in turn affect performance to an extent.<br />
|
|
This option is meant to disable all controls.</p>
|
|
<h2><a class="anchor" id="autotoc_md10"></a>
|
|
ENTT_NO_ETO</h2>
|
|
<p>In order to reduce memory consumption and increase performance, empty types are never stored by the ECS module of <code>EnTT</code>.<br />
|
|
Use this variable to treat these types like all others and therefore to create a dedicated storage for them.</p>
|
|
<h2><a class="anchor" id="autotoc_md11"></a>
|
|
ENTT_STANDARD_CPP</h2>
|
|
<p>After many adventures, <code>EnTT</code> finally works fine across boundaries.<br />
|
|
To do this, the library mixes some non-standard language features with others that are perfectly compliant.<br />
|
|
This definition will prevent the library from using non-standard techniques, that is, functionalities that aren't fully compliant with the standard C++. </p>
|
|
</div></div><!-- contents -->
|
|
</div><!-- PageDoc -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.18
|
|
</small></address>
|
|
</body>
|
|
</html>
|