mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-06-08 03:13:52 +00:00
Updated docs.
This commit is contained in:
282
bgfx.html
282
bgfx.html
@@ -280,6 +280,7 @@
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -741,8 +742,14 @@
|
||||
<dl class="cpp function">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx5frameE7uint8_t">
|
||||
<span id="_CPPv3N4bgfx5frameE7uint8_t"></span><span id="_CPPv2N4bgfx5frameE7uint8_t"></span><span id="bgfx::frame__uint8_t"></span><span class="target" id="namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"></span><span class="n"><span class="pre">uint32_t</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">bgfx</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">frame</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">uint8_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">_flags</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="n"><span class="pre">BGFX_FRAME_NONE</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N4bgfx5frameE7uint8_t" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>Advance to next frame. When using multithreaded renderer, this call just swaps internal buffers, kicks render thread, and returns. In singlethreaded renderer this call does frame rendering. </p>
|
||||
<p><dl class="simple">
|
||||
<dd><p>Advance to next frame. This is the main frame-advancement call on the API thread (the thread from which <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code> was called). </p>
|
||||
<p><strong>Multithreaded renderer</strong> (<code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=1</span></code>, default): This call waits for the render thread to finish processing the previous frame, then swaps internal submit/render buffers, signals the render thread to begin processing the new frame via <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code>, and returns immediately. The render thread and API thread then run in parallel: the API thread builds the next frame while the render thread executes GPU commands for the current frame.</p>
|
||||
<p><strong>Single-threaded renderer</strong> (<code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=0</span></code>, or when <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> and <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code> are called from the same thread): This call swaps internal buffers and performs frame rendering inline (internally calls <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code>), then returns.</p>
|
||||
<p><div class="remark admonition">
|
||||
<p class="admonition-title">Remark</p>
|
||||
<p>Must be called from the API thread (the thread that called <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code>). In multithreaded mode, this call synchronizes with <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> running on the render thread via semaphores: <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> waits for the render thread to finish, then posts a signal that <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> waits on to begin the next frame. See also: <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code>.</p>
|
||||
</div>
|
||||
<dl class="simple">
|
||||
<dt><strong>Attention</strong></dt><dd><p>C99’s equivalent binding is <code class="docutils literal notranslate"><span class="pre">bgfx_frame</span></code>. </p>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1744,9 +1751,18 @@ It is only necessary to use these APIs in conjunction with creating windows.</p>
|
||||
<dl class="cpp function">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx11renderFrameE7int32_t">
|
||||
<span id="_CPPv3N4bgfx11renderFrameE7int32_t"></span><span id="_CPPv2N4bgfx11renderFrameE7int32_t"></span><span id="bgfx::renderFrame__int32_t"></span><span class="target" id="namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"></span><a class="reference internal" href="#_CPPv4N4bgfx11RenderFrameE" title="bgfx::RenderFrame"><span class="n"><span class="pre">RenderFrame</span></span></a><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">Enum</span></span><span class="w"> </span><span class="sig-prename descclassname"><span class="n"><span class="pre">bgfx</span></span><span class="p"><span class="pre">::</span></span></span><span class="sig-name descname"><span class="n"><span class="pre">renderFrame</span></span></span><span class="sig-paren">(</span><span class="n"><span class="pre">int32_t</span></span><span class="w"> </span><span class="n sig-param"><span class="pre">_msecs</span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="o"><span class="pre">-</span></span><span class="m"><span class="pre">1</span></span><span class="sig-paren">)</span><a class="headerlink" href="#_CPPv4N4bgfx11renderFrameE7int32_t" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>Render frame. </p>
|
||||
<dd><p>Render frame. Executes the actual GPU rendering work for one frame. </p>
|
||||
<p>In the default <strong>multithreaded</strong> configuration, <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> runs on the <strong>render thread</strong> while <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> runs on the <strong>API thread</strong>. Their interaction is as follows:</p>
|
||||
<p><ol class="loweralpha simple">
|
||||
<li><p>The render thread calls <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code>, which blocks waiting for the API thread to signal that a new frame is ready.</p></li>
|
||||
<li><p>On the API thread, <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> finishes building the frame, swaps internal submit/render buffers, and signals the render thread.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> wakes up, executes pre-render commands, submits GPU draw calls, executes post-render commands, flips the back buffer, then signals back to the API thread that rendering is complete.</p></li>
|
||||
<li><p>The API thread’s next <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> call waits for this completion signal before swapping buffers again.</p></li>
|
||||
</ol>
|
||||
</p>
|
||||
<p>This double-buffered semaphore handshake allows the API thread and render thread to run in parallel, overlapping CPU frame building with GPU rendering.</p>
|
||||
<p><dl class="simple">
|
||||
<dt><strong>Attention</strong></dt><dd><p><code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> is blocking call. It waits for <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> to be called from API thread to process frame. If timeout value is passed call will timeout and return even if <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> is not called.</p>
|
||||
<dt><strong>Attention</strong></dt><dd><p><code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> is a blocking call. It waits for <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> to be called from the API thread to process the frame. If a timeout value is passed, the call will return <code class="docutils literal notranslate"><span class="pre">RenderFrame::Timeout</span></code> even if <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> has not been called. A value of -1 (default) means wait indefinitely (up to <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_API_SEMAPHORE_TIMEOUT</span></code>).</p>
|
||||
</dd>
|
||||
<dt><strong>Attention</strong></dt><dd><p>C99’s equivalent binding is <code class="docutils literal notranslate"><span class="pre">bgfx_render_frame</span></code>. </p>
|
||||
</dd>
|
||||
@@ -1754,7 +1770,7 @@ It is only necessary to use these APIs in conjunction with creating windows.</p>
|
||||
</p>
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<p>This call should be only used on platforms that don’t allow creating separate rendering thread. If it is called before to <a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref">bgfx::init</span></a>, render thread won’t be created by <a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref">bgfx::init</span></a> call.</p>
|
||||
<p>This call should only be used on platforms that don’t allow creating a separate rendering thread. If it is called before <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code>, the internal render thread won’t be created by the <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code> call, and the user is responsible for calling <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> on the render thread each frame. If both <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> and <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a3bc6e6465d91d6222b99b36909cabfdd"><span class="std std-ref"><span class="pre">bgfx::init</span></span></a></code> are called from the same thread, bgfx operates in single-threaded mode and <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code> will internally invoke <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1aa21b96113ad74bf31dd3d417ac5b3e52"><span class="std std-ref"><span class="pre">bgfx::renderFrame</span></span></a></code> automatically. See also: <code class="docutils literal notranslate"><a class="reference internal" href="#namespacebgfx_1a01586df392b8d4ee6e9af00bc6c54669"><span class="std std-ref"><span class="pre">bgfx::frame</span></span></a></code>.</p>
|
||||
</div>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
@@ -6526,229 +6542,229 @@ Otherwise, use <code class="docutils literal notranslate"><span class="pre">bgfx
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aee125d92e0e80015bd586b5621cc3d83"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>DXT1 R5G6B5A1. </p>
|
||||
<dd><p>Block Compression 1. 5-bit R, 6-bit G, 5-bit B, 1-bit A. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC2E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC2E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC2E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a4d77afc75cacfa609303940e1c9cddc2"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC2</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC2E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>DXT3 R5G6B5A4. </p>
|
||||
<dd><p>Block Compression 2. 5-bit R, 6-bit G, 5-bit B, 4-bit explicit A. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC3E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC3E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC3E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a113e64fa135fca0459a7c2ea40425c4f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC3</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC3E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>DXT5 R5G6B5A8. </p>
|
||||
<dd><p>Block Compression 3. 5-bit R, 6-bit G, 5-bit B, 8-bit interpolated A. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC4E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC4E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC4E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1937f7640ffa842f2c6678286c313e7a"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC4</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC4E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>LATC1/ATI1 R8. </p>
|
||||
<dd><p>Block Compression 4. Single 8-bit red channel, unsigned normalized. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9696af3d8af5c8b8dcdb2bba18df54c8"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>LATC2/ATI2 RG8. </p>
|
||||
<dd><p>Block Compression 5. Two 8-bit channels (RG), unsigned normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4BC6HE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4BC6HE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4BC6HE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a3e149dd90ceda8997bcf54a97debd703"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC6H</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4BC6HE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>BC6H RGB16F. </p>
|
||||
<dd><p>Block Compression 6H. Three 16-bit floating-point channels (RGB), HDR. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3BC7E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3BC7E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3BC7E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a880c61bb22f0950eec832c77e7667d96"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BC7</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3BC7E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>BC7 RGB 4-7 bits per color channel, 0-8 bits alpha. </p>
|
||||
<dd><p>RGB 4-7 bits per color channel, 0-8 bits alpha. Block Compression 7. High-quality RGBA, 4-7 bits per color, 0-8 bits alpha. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4ETC1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4ETC1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4ETC1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ac789a4e13dc4efbb9239fa89f54b8205"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ETC1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4ETC1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ETC1 RGB8. </p>
|
||||
<dd><p>Ericsson Texture Compression 1. 8-bit per channel RGB. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4ETC2E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4ETC2E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4ETC2E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aba5a8c2a63daebe7f7b6e6530e384662"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ETC2</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4ETC2E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ETC2 RGB8. </p>
|
||||
<dd><p>Ericsson Texture Compression 2. 8-bit per channel RGB. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5ETC2AE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5ETC2AE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5ETC2AE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aeae9b14b230f8576efb154b961836ca5"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ETC2A</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5ETC2AE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ETC2 RGBA8. </p>
|
||||
<dd><p>Ericsson Texture Compression 2 with full alpha. 8-bit per channel RGBA. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6ETC2A1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6ETC2A1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6ETC2A1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a971bf46d4c28a7b708a2c6df44593720"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ETC2A1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6ETC2A1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ETC2 RGB8A1. </p>
|
||||
<dd><p>Ericsson Texture Compression 2 with 1-bit punch-through alpha. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6EACR11E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6EACR11E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6EACR11E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a8c795a2056f9d540d7a7eaf6ec7518e3"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">EACR11</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6EACR11E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>EAC R11 UNORM. </p>
|
||||
<dd><p>ETC2 Alpha Compression, single 11-bit red channel, unsigned normalized. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7EACR11SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7EACR11SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7EACR11SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a392e32d57888acc4d6e821af9d638636"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">EACR11S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7EACR11SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>EAC R11 SNORM. </p>
|
||||
<dd><p>ETC2 Alpha Compression, single 11-bit red channel, signed normalized. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7EACRG11E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7EACRG11E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7EACRG11E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a16a7fbdce6125f429802dac0b28143ba"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">EACRG11</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7EACRG11E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>EAC RG11 UNORM. </p>
|
||||
<dd><p>ETC2 Alpha Compression, two 11-bit channels (RG), unsigned normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum8EACRG11SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum8EACRG11SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum8EACRG11SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aaaf76afc94dc45b9560593119cc1070d"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">EACRG11S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum8EACRG11SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>EAC RG11 SNORM. </p>
|
||||
<dd><p>ETC2 Alpha Compression, two 11-bit channels (RG), signed normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5PTC12E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5PTC12E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5PTC12E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6abf2b55f4dfd7effbfa64f27d9546512c"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC12</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5PTC12E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC1 RGB 2BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v1. 3-channel RGB. 2 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5PTC14E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5PTC14E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5PTC14E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1b68442c2e582657d2e9c5b2af7480c5"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC14</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5PTC14E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC1 RGB 4BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v1. 3-channel RGB. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6PTC12AE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6PTC12AE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6PTC12AE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a78128a646efda9393122f3a0cbb47ba7"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC12A</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6PTC12AE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC1 RGBA 2BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v1. 4-channel RGBA. 2 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6PTC14AE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6PTC14AE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6PTC14AE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a106b764dde7bcb1eb0c4ea6034ea3b24"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC14A</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6PTC14AE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC1 RGBA 4BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v1. 4-channel RGBA. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5PTC22E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5PTC22E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5PTC22E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a10791d050f8fc01881fb9ce4dfcdaa6d"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC22</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5PTC22E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC2 RGBA 2BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v2. 4-channel RGBA. 2 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5PTC24E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5PTC24E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5PTC24E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ab4e6bd17ebbcaa1085dd1285aa2c6e23"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">PTC24</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5PTC24E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>PVRTC2 RGBA 4BPP. </p>
|
||||
<dd><p>PowerVR Texture Compression v2. 4-channel RGBA. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3ATCE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3ATCE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3ATCE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6abfbaa50ea905a9af71c60cbfd80e7c66"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ATC</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3ATCE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ATC RGB 4BPP. </p>
|
||||
<dd><p>AMD Texture Compression. 3-channel RGB. 4 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4ATCEE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4ATCEE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4ATCEE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a27c3773c6bdbf033c9f14623e569a187"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ATCE</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4ATCEE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ATCE RGBA 8 BPP explicit alpha. </p>
|
||||
<dd><p>AMD Texture Compression with explicit alpha. 4-channel RGBA. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4ATCIE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4ATCIE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4ATCIE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1ba5cdc0c5cc60853fa37209452d6ec3"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ATCI</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4ATCIE" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ATCI RGBA 8 BPP interpolated alpha. </p>
|
||||
<dd><p>AMD Texture Compression with interpolated alpha. 4-channel RGBA. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC4x4E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC4x4E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC4x4E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ae992925acb9b25166b93cc445c62daea"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC4x4</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC4x4E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 4x4 8.0 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 4x4 block, RGBA. 8.00 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC5x4E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC5x4E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC5x4E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a6b60a45e97d3e31f00694d93828f08eb"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC5x4</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC5x4E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 5x4 6.40 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 5x4 block, RGBA. 6.40 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC5x5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC5x5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC5x5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a6bdec333c7fc2259310ba8252665f22a"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC5x5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC5x5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 5x5 5.12 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 5x5 block, RGBA. 5.12 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC6x5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC6x5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC6x5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a7225af3087a22971bdcec3a1ae97957e"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC6x5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC6x5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 6x5 4.27 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 6x5 block, RGBA. 4.27 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC6x6E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC6x6E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC6x6E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ade44f5a267e9e98a8e1b5506061237b4"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC6x6</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC6x6E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 6x6 3.56 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 6x6 block, RGBA. 3.56 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC8x5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC8x5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ab3d82634d3764b46e0b0b2c0101f6792"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC8x5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 8x5 3.20 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 8x5 block, RGBA. 3.20 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x6E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC8x6E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC8x6E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6acba83554ed1e182a631b6bb68204cc96"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC8x6</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x6E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 8x6 2.67 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 8x6 block, RGBA. 2.67 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7ASTC8x8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7ASTC8x8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a80346507cd0e9c2aaf40a7b94ca64521"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC8x8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7ASTC8x8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 8x8 2.00 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 8x8 block, RGBA. 2.00 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum8ASTC10x5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum8ASTC10x5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a0767d4af475f555f330fe814e7937838"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC10x5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 10x5 2.56 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 10x5 block, RGBA. 2.56 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x6E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum8ASTC10x6E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum8ASTC10x6E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a3493533d40fdbbfad9b3eaf10d3bab7c"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC10x6</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x6E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 10x6 2.13 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 10x6 block, RGBA. 2.13 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum8ASTC10x8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum8ASTC10x8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a68369858c21d6c9f50716eb1766f776b"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC10x8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum8ASTC10x8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 10x8 1.60 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 10x8 block, RGBA. 1.60 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum9ASTC10x10E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum9ASTC10x10E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum9ASTC10x10E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9738732b626beb9597104b49914847ef"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC10x10</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum9ASTC10x10E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 10x10 1.28 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 10x10 block, RGBA. 1.28 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum9ASTC12x10E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum9ASTC12x10E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum9ASTC12x10E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a04c2815b53ee2c5a27757a98c1049103"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC12x10</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum9ASTC12x10E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 12x10 1.07 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 12x10 block, RGBA. 1.07 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum9ASTC12x12E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum9ASTC12x12E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum9ASTC12x12E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1292ae8ced5ee2b58e47de4b06ad5a6e"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">ASTC12x12</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum9ASTC12x12E" title="Link to this definition"></a><br /></dt>
|
||||
<dd><p>ASTC 12x12 0.89 BPP. </p>
|
||||
<dd><p>Adaptive Scalable Texture Compression, 12x12 block, RGBA. 0.89 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
@@ -6760,262 +6776,314 @@ Otherwise, use <code class="docutils literal notranslate"><span class="pre">bgfx
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum2R1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum2R1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum2R1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ab01e6044eaff1fe4451232325ad4f9a6"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum2R1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>1-bit single-channel red. Monochrome, 1-bit per pixel. 1 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum2A8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum2A8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum2A8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9b43602e80b02cddbaa066bddc137bc6"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">A8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum2A8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit single-channel alpha, unsigned normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum2R8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum2R8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum2R8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a366a4683758cef76e007f4f33801f7b2"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum2R8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit single-channel red, unsigned normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3R8IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3R8IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3R8IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ae777e9061538de54841dfd96cc4070c2"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R8I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3R8IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit single-channel red, signed integer. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3R8UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3R8UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3R8UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aecd6d1d295020dc61bad08ab39b609df"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R8U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3R8UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit single-channel red, unsigned integer. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3R8SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3R8SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3R8SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a86b354d3bf6d634605f6d93fad966fd5"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R8S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3R8SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit single-channel red, signed normalized. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3R16E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3R16E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3R16E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9f2a1e70d71e48558cfae60650b5da1c"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R16</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3R16E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit single-channel red, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R16IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R16IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R16IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a4ea4bea5f457d7aaa855d253ae967538"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R16I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R16IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit single-channel red, signed integer. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R16UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R16UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R16UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a6509456e2fb58fc523abd92bfa4f67ce"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R16U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R16UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit single-channel red, unsigned integer. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R16FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R16FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R16FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a0808adf629c43dbaf932e62b48696b41"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R16F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R16FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit single-channel red, half-precision floating point. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R16SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R16SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R16SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aedfd375d04e3cd2a35992d35657def41"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R16S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R16SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit single-channel red, signed normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R32IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R32IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R32IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a0cfc961a23995b91f1dfba97b4778fc9"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R32I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R32IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>32-bit single-channel red, signed integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R32UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R32UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R32UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a56674c00d24eff7b1b96005d66842fed"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R32U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R32UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>32-bit single-channel red, unsigned integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4R32FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4R32FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4R32FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a6a20e5c95f27448745e6252fbaa63752"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R32F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4R32FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>32-bit single-channel red, full-precision floating point. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3RG8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3RG8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3RG8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a044f11d086916dd993181a298b713fe5"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3RG8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 8-bit channels (red, green), unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4RG8IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4RG8IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4RG8IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ac022360e199eafdc5965bb16d8e1596b"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG8I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4RG8IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 8-bit channels (red, green), signed integer. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4RG8UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4RG8UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4RG8UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ae6e1a34243df2512cde0d768fe27831d"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG8U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4RG8UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 8-bit channels (red, green), unsigned integer. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4RG8SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4RG8SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4RG8SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a30ffb32ec2a2f303f3f3c0618d3097b7"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG8S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4RG8SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 8-bit channels (red, green), signed normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4RG16E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4RG16E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4RG16E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6abd5c94677dbbcdb12c9137741f71f5a0"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG16</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4RG16E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 16-bit channels (red, green), unsigned normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG16IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG16IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG16IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a4d7378aee4f0c28a3e9dd49733cbc7d4"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG16I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG16IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 16-bit channels (red, green), signed integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG16UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG16UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG16UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6add597603c407eea23cd3a076e2799a23"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG16U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG16UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 16-bit channels (red, green), unsigned integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG16FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG16FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG16FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aa01f725e68722ccd7e8a842f697ef7b4"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG16F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG16FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 16-bit channels (red, green), half-precision floating point. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG16SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG16SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG16SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ada99abb273ad49596e5645a870913203"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG16S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG16SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 16-bit channels (red, green), signed normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG32IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG32IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG32IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1e9f0cde8652d9582ca00d3cf0522481"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG32I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG32IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 32-bit channels (red, green), signed integer. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG32UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG32UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG32UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a10202973fabca8f138748e4829a5a454"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG32U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG32UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 32-bit channels (red, green), unsigned integer. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RG32FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RG32FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RG32FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a0570aa288a4cf06073ecfc272ff66bfa"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG32F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RG32FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Two 32-bit channels (red, green), full-precision floating point. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4RGB8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4RGB8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4RGB8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a343bee8db4bf2bd967aca4422804da99"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4RGB8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Three 8-bit channels (red, green, blue), unsigned normalized. 24 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RGB8IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RGB8IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RGB8IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a86364d64bd522cd53ed3f388316f16c4"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB8I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RGB8IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Three 8-bit channels (red, green, blue), signed integer. 24 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RGB8UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RGB8UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RGB8UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a67a188a9c637a007b21a6b494497fae8"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB8U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RGB8UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Three 8-bit channels (red, green, blue), unsigned integer. 24 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RGB8SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RGB8SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RGB8SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a07efdf9e67260607b65e4c818cf5dbc2"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB8S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RGB8SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Three 8-bit channels (red, green, blue), signed normalized. 24 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGB9E5FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGB9E5FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGB9E5FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ae16f6d03d3fb347cf375b35bca2a0211"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB9E5F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGB9E5FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Shared-exponent RGB. 9 bits per RGB channel with a shared 5-bit exponent, floating point. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5BGRA8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5BGRA8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5BGRA8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a8f9737f30497f922acb85eabfab5bd8b"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BGRA8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5BGRA8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 8-bit channels (blue, green, red, alpha), unsigned normalized. BGRA byte order. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RGBA8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RGBA8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RGBA8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a76f725de734f6f57124bce94ecf6b857"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RGBA8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 8-bit channels (red, green, blue, alpha), unsigned normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6RGBA8IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6RGBA8IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6RGBA8IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9d2eaf79b30d325f6c02d91c6c83fa9d"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA8I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6RGBA8IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 8-bit channels (red, green, blue, alpha), signed integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6RGBA8UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6RGBA8UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6RGBA8UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a58a5c9b3c280930e63443e58b8b54514"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA8U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6RGBA8UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 8-bit channels (red, green, blue, alpha), unsigned integer. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6RGBA8SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6RGBA8SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6RGBA8SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a1f654f103d5ed7c2e3254402c9b25b3e"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA8S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6RGBA8SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 8-bit channels (red, green, blue, alpha), signed normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6RGBA16E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6RGBA16E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6RGBA16E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ac84e3e8918ad3ae651fa77cf7c3d1a1f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA16</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6RGBA16E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 16-bit channels (red, green, blue, alpha), unsigned normalized. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA16IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA16IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA16IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ac1ee33c840c8ca2bee1dcd21ab8fcf91"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA16I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA16IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 16-bit channels (red, green, blue, alpha), signed integer. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA16UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA16UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA16UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aa34499e3da11fe380fef67248d7b5ba6"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA16U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA16UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 16-bit channels (red, green, blue, alpha), unsigned integer. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA16FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA16FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA16FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6adadd1cd35bb81b2b43f396a5f5903ac4"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA16F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA16FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 16-bit channels (red, green, blue, alpha), half-precision floating point. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA16SE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA16SE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA16SE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a6001607ef039dd349cc48155438ab00f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA16S</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA16SE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 16-bit channels (red, green, blue, alpha), signed normalized. 64 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA32IE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA32IE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA32IE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a4b5db87abcf93819d12a7a0493bc0283"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA32I</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA32IE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 32-bit channels (red, green, blue, alpha), signed integer. 128 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA32UE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA32UE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA32UE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6acf97df6b0145396940f5ea893fc3873b"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA32U</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA32UE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 32-bit channels (red, green, blue, alpha), unsigned integer. 128 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGBA32FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGBA32FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGBA32FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ad21d8c3be31a08140a7abbafb1719166"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA32F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGBA32FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Four 32-bit channels (red, green, blue, alpha), full-precision floating point. 128 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6B5G6R5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6B5G6R5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6B5G6R5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a9132b9c53a5e2dafd1a6a6ade302f33b"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">B5G6R5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6B5G6R5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 5-bit blue, 6-bit green, 5-bit red. BGR byte order, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6R5G6B5E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6R5G6B5E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6R5G6B5E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aec8537567352a4db4088e3e9f1cf978d"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">R5G6B5</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6R5G6B5E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 5-bit red, 6-bit green, 5-bit blue. RGB byte order, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5BGRA4E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5BGRA4E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5BGRA4E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6aa45c193e57e5b9bf0a8693438f1c2256"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BGRA4</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5BGRA4E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 4-bit per channel (blue, green, red, alpha). BGRA byte order, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5RGBA4E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5RGBA4E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5RGBA4E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a4e9ceae8c33292ac988c494f79bccbe3"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGBA4</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5RGBA4E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 4-bit per channel (red, green, blue, alpha), unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6BGR5A1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6BGR5A1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6BGR5A1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a45b848a845dc1081fa04570b1bc7bc2a"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">BGR5A1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6BGR5A1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 5-bit blue, 5-bit green, 5-bit red, 1-bit alpha. BGRA byte order, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum6RGB5A1E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum6RGB5A1E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum6RGB5A1E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a38bfd7f727149e6458f39ade896d18a7"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB5A1</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum6RGB5A1E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 16-bit, 5-bit red, 5-bit green, 5-bit blue, 1-bit alpha, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum7RGB10A2E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum7RGB10A2E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum7RGB10A2E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a7c125c1a4eceb2bbc6f7600bb7ccdf92"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RGB10A2</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum7RGB10A2E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 32-bit, 10-bit red, 10-bit green, 10-bit blue, 2-bit alpha, unsigned normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum8RG11B10FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum8RG11B10FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum8RG11B10FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a41ac710aca293e8831029481b9636a8f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">RG11B10F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum8RG11B10FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>Packed 32-bit, 11-bit red, 11-bit green, 10-bit blue, unsigned floating point. No alpha. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum12UnknownDepthE">
|
||||
@@ -7026,42 +7094,50 @@ Otherwise, use <code class="docutils literal notranslate"><span class="pre">bgfx
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3D16E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3D16E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3D16E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a086d2b11ba5e98dd6453f26a306366d0"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D16</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3D16E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit depth, unsigned normalized. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3D24E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3D24E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3D24E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a27a39685dd5aaafcad65736692fa5eff"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D24</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3D24E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>24-bit depth, unsigned normalized (stored as 32-bit with 8 bits unused). 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5D24S8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum5D24S8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum5D24S8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a21a275083cbc63cf567bbe435de52628"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D24S8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum5D24S8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>24-bit depth, unsigned normalized, with 8-bit stencil. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum3D32E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum3D32E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum3D32E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a993af3f99854f2b0b1d879f652da5ea3"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D32</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum3D32E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>32-bit depth, unsigned normalized. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4D16FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4D16FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4D16FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6a0322a3bb98e826a25a3f63d369eb341f"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D16F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4D16FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>16-bit depth, floating point. 16 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4D24FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4D24FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4D24FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ad0e87f93c89a2d4661764eb56956b64e"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D24F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4D24FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>24-bit depth, floating point (stored as 32-bit). 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4D32FE">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4D32FE"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4D32FE"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6acb8eb8bd274644a29aac381ef53c5c69"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D32F</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4D32FE" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>32-bit depth, floating point. 32 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum4D0S8E">
|
||||
<span id="_CPPv3N4bgfx13TextureFormat4Enum4D0S8E"></span><span id="_CPPv2N4bgfx13TextureFormat4Enum4D0S8E"></span><span class="target" id="structbgfx_1_1_texture_format_1a4fa5bcce97c848cf091d954362e501e6ab21986c97b19c1b8d198c171f34e4471"></span><span class="k"><span class="pre">enumerator</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">D0S8</span></span></span><a class="headerlink" href="#_CPPv4N4bgfx13TextureFormat4Enum4D0S8E" title="Link to this definition"></a><br /></dt>
|
||||
<dd></dd></dl>
|
||||
<dd><p>8-bit stencil only, no depth. 8 BPP. </p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="cpp enumerator">
|
||||
<dt class="sig sig-object cpp" id="_CPPv4N4bgfx13TextureFormat4Enum5CountE">
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
353
idl.html
Normal file
353
idl.html
Normal file
@@ -0,0 +1,353 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html class="writer-html5" lang="en" data-content_root="./">
|
||||
<head>
|
||||
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>IDL — Interface Definition Language — bgfx 1.136.9083 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=03e43079" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
||||
|
||||
|
||||
<script src="_static/jquery.js?v=5d32c60e"></script>
|
||||
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
||||
<script src="_static/documentation_options.js?v=f601d78d"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="License" href="license.html" />
|
||||
<link rel="prev" title="Internals" href="internals.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
<div class="wy-grid-for-nav">
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-scroll">
|
||||
<div class="wy-side-nav-search" >
|
||||
|
||||
|
||||
|
||||
<a href="index.html" class="icon icon-home">
|
||||
bgfx
|
||||
</a>
|
||||
<div role="search">
|
||||
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
||||
<input type="hidden" name="check_keywords" value="yes" />
|
||||
<input type="hidden" name="area" value="default" />
|
||||
</form>
|
||||
</div>
|
||||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||
<ul class="current">
|
||||
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="build.html">Building</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="examples.html">Examples</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">IDL — Interface Definition Language</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#purpose">Purpose</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#file-overview">File overview</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#running-the-code-generators">Running the code generators</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#idl-syntax-reference">IDL syntax reference</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#version">version</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#typedef">typedef</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#handle">handle</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#enum">enum</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#flag">flag</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#struct">struct</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#func">func</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#funcptr">funcptr</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#section">section</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#documentation-comments">Documentation comments</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#adding-a-new-api-function">Adding a new API function</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
||||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||
<a href="index.html">bgfx</a>
|
||||
</nav>
|
||||
|
||||
<div class="wy-nav-content">
|
||||
<div class="rst-content">
|
||||
<div role="navigation" aria-label="Page navigation">
|
||||
<ul class="wy-breadcrumbs">
|
||||
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
||||
<li class="breadcrumb-item active">IDL — Interface Definition Language</li>
|
||||
<li class="wy-breadcrumbs-aside">
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<div itemprop="articleBody">
|
||||
|
||||
<section id="idl-interface-definition-language">
|
||||
<h1>IDL — Interface Definition Language<a class="headerlink" href="#idl-interface-definition-language" title="Link to this heading"></a></h1>
|
||||
<p>bgfx uses a custom Interface Definition Language (IDL) to define its entire public API in a single
|
||||
source-of-truth file: <code class="docutils literal notranslate"><span class="pre">scripts/bgfx.idl</span></code>. From this file, code generators produce the C99 API,
|
||||
C++ API, language bindings, and documentation — ensuring that all representations stay in sync.</p>
|
||||
<p>For additional background and motivation, see the blog post:
|
||||
<a class="reference external" href="https://bkaradzic.github.io/posts/idl/">IDL — Interface Definition Language</a>.</p>
|
||||
<section id="purpose">
|
||||
<h2>Purpose<a class="headerlink" href="#purpose" title="Link to this heading"></a></h2>
|
||||
<p>The IDL serves several goals:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Single source of truth</strong> — The API (types, functions, flags, enums, structs, handles) is
|
||||
declared once in <code class="docutils literal notranslate"><span class="pre">bgfx.idl</span></code>. All generated outputs derive from this file.</p></li>
|
||||
<li><p><strong>Multi-language bindings</strong> — Code generators read the IDL and produce bindings for C99, C#, D,
|
||||
Zig, Beef, C3, and potentially other languages.</p></li>
|
||||
<li><p><strong>Documentation generation</strong> — The <code class="docutils literal notranslate"><span class="pre">docs-rst.lua</span></code> generator produces reStructuredText API
|
||||
reference documentation from the IDL.</p></li>
|
||||
<li><p><strong>Consistency</strong> — Changes to the API only need to be made in one place. The code generators
|
||||
ensure that all bindings and documentation are updated automatically.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="file-overview">
|
||||
<h2>File overview<a class="headerlink" href="#file-overview" title="Link to this heading"></a></h2>
|
||||
<p>All IDL-related files live under <code class="docutils literal notranslate"><span class="pre">scripts/</span></code>:</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">bgfx.idl</span></code></dt><dd><p>The IDL source file. Contains all type definitions, function declarations, flag/enum
|
||||
definitions, struct layouts, handle types, documentation comments, and the section hierarchy
|
||||
for the generated docs.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">idl.lua</span></code></dt><dd><p>The IDL parser/runtime. Sets up the Lua environment that <code class="docutils literal notranslate"><span class="pre">bgfx.idl</span></code> executes in. Provides
|
||||
the DSL keywords (<code class="docutils literal notranslate"><span class="pre">typedef</span></code>, <code class="docutils literal notranslate"><span class="pre">enum</span></code>, <code class="docutils literal notranslate"><span class="pre">flag</span></code>, <code class="docutils literal notranslate"><span class="pre">struct</span></code>, <code class="docutils literal notranslate"><span class="pre">handle</span></code>, <code class="docutils literal notranslate"><span class="pre">func</span></code>,
|
||||
<code class="docutils literal notranslate"><span class="pre">funcptr</span></code>, <code class="docutils literal notranslate"><span class="pre">section</span></code>, <code class="docutils literal notranslate"><span class="pre">version</span></code>, etc.) as Lua metatable-driven constructors.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">codegen.lua</span></code></dt><dd><p>Shared code generation utilities. Reads the parsed IDL, resolves types, converts between
|
||||
naming conventions (CamelCase ↔ underscore_case), and provides template expansion for
|
||||
function signatures.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">bgfx-codegen.lua</span></code></dt><dd><p>The main code generator. Reads the IDL via <code class="docutils literal notranslate"><span class="pre">codegen.lua</span></code> and produces the C99 header,
|
||||
C++ header, C99-to-C++ bridge implementation, and the internal function ID tables.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">bindings-*.lua</span></code></dt><dd><p>Per-language binding generators (<code class="docutils literal notranslate"><span class="pre">bindings-cs.lua</span></code>, <code class="docutils literal notranslate"><span class="pre">bindings-d.lua</span></code>, <code class="docutils literal notranslate"><span class="pre">bindings-zig.lua</span></code>,
|
||||
<code class="docutils literal notranslate"><span class="pre">bindings-bf.lua</span></code>, <code class="docutils literal notranslate"><span class="pre">bindings-c3.lua</span></code>). Each reads the IDL and outputs the API in the
|
||||
target language’s syntax and conventions.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">docs-rst.lua</span></code></dt><dd><p>Generates reStructuredText API reference documentation (<code class="docutils literal notranslate"><span class="pre">docs/bgfx.rst</span></code>) from the IDL.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section id="running-the-code-generators">
|
||||
<h2>Running the code generators<a class="headerlink" href="#running-the-code-generators" title="Link to this heading"></a></h2>
|
||||
<p>The code generators are invoked via the makefile at the repository root:</p>
|
||||
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>make<span class="w"> </span>idl
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>This runs the Lua scripts that regenerate all C/C++ headers, language bindings, and documentation
|
||||
from <code class="docutils literal notranslate"><span class="pre">scripts/bgfx.idl</span></code>.</p>
|
||||
</section>
|
||||
<section id="idl-syntax-reference">
|
||||
<h2>IDL syntax reference<a class="headerlink" href="#idl-syntax-reference" title="Link to this heading"></a></h2>
|
||||
<p>The IDL file is valid Lua, executed in a special environment that provides the DSL keywords.
|
||||
Comments prefixed with <code class="docutils literal notranslate"><span class="pre">---</span></code> become documentation comments attached to the next declaration.</p>
|
||||
<section id="version">
|
||||
<h3>version<a class="headerlink" href="#version" title="Link to this heading"></a></h3>
|
||||
<p>Declares the API version number:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nf">version</span><span class="p">(</span><span class="mi">140</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="typedef">
|
||||
<h3>typedef<a class="headerlink" href="#typedef" title="Link to this heading"></a></h3>
|
||||
<p>Declares a type alias. These map IDL type names to their C/C++ equivalents:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">typedef</span><span class="w"> </span><span class="s2">"uint32_t"</span>
|
||||
<span class="nv">typedef</span><span class="w"> </span><span class="s2">"ViewId"</span>
|
||||
<span class="nv">typedef</span><span class="w"> </span><span class="s2">"CallbackI"</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">cname</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"callback_interface"</span><span class="w"> </span><span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The optional table provides attributes. <code class="docutils literal notranslate"><span class="pre">cname</span></code> overrides the C binding name.</p>
|
||||
</section>
|
||||
<section id="handle">
|
||||
<h3>handle<a class="headerlink" href="#handle" title="Link to this heading"></a></h3>
|
||||
<p>Declares an opaque handle type. Handles are type-safe 16-bit integers used to reference GPU
|
||||
resources:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">handle</span><span class="w"> </span><span class="s2">"TextureHandle"</span>
|
||||
<span class="nv">handle</span><span class="w"> </span><span class="s2">"VertexBufferHandle"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="enum">
|
||||
<h3>enum<a class="headerlink" href="#enum" title="Link to this heading"></a></h3>
|
||||
<p>Declares an enumeration. Each member can have a <code class="docutils literal notranslate"><span class="pre">---</span></code> documentation comment:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">enum</span><span class="p">.</span><span class="py">TextureFormat</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">comment</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Texture formats:"</span><span class="p">,</span><span class="w"> </span><span class="nv">section</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Textures"</span><span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">BC1</span><span class="w"> </span><span class="c1">--- DXT1 R5G6B5A1.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="py">BC2</span><span class="w"> </span><span class="c1">--- DXT3 R5G6B5A4.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nf">Unknown</span><span class="w"> </span><span class="c1">--- Compressed formats above.</span>
|
||||
<span class="w"> </span><span class="p">()</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The <code class="docutils literal notranslate"><span class="pre">()</span></code> sentinel marks the end of the enum (generates a <code class="docutils literal notranslate"><span class="pre">Count</span></code> member). The <code class="docutils literal notranslate"><span class="pre">section</span></code>
|
||||
attribute controls where this type appears in the generated documentation hierarchy.</p>
|
||||
</section>
|
||||
<section id="flag">
|
||||
<h3>flag<a class="headerlink" href="#flag" title="Link to this heading"></a></h3>
|
||||
<p>Declares a bitfield flag type. Similar to <code class="docutils literal notranslate"><span class="pre">enum</span></code>, but members represent individual bits:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">flag</span><span class="p">.</span><span class="py">StateWrite</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">bits</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">64</span><span class="p">,</span><span class="w"> </span><span class="nv">base</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">,</span><span class="w"> </span><span class="nv">section</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"State Flags"</span><span class="p">,</span><span class="w"> </span><span class="nv">label</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Write"</span><span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">R</span><span class="w"> </span><span class="c1">--- Enable R write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="py">G</span><span class="w"> </span><span class="c1">--- Enable G write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="py">B</span><span class="w"> </span><span class="c1">--- Enable B write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="py">A</span><span class="w"> </span><span class="c1">--- Enable alpha write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nf">Z</span><span class="w"> </span><span class="p">(</span><span class="mi">39</span><span class="p">)</span><span class="w"> </span><span class="c1">--- Enable depth write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">Rgb</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"R"</span><span class="p">,</span><span class="w"> </span><span class="s2">"G"</span><span class="p">,</span><span class="w"> </span><span class="s2">"B"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">--- Enable RGB write.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">Mask</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="s2">"Rgb"</span><span class="p">,</span><span class="w"> </span><span class="s2">"A"</span><span class="p">,</span><span class="w"> </span><span class="s2">"Z"</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">--- Write all channels mask.</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Attributes:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">bits</span></code> — Total bit width (32 or 64).</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">shift</span></code> — Bit offset where this flag group starts.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">range</span></code> — Number of bits in this group.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">base</span></code> — Starting value for auto-numbering.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">section</span></code> — Documentation section.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">label</span></code> — Display label for documentation grouping.</p></li>
|
||||
</ul>
|
||||
<p>A member with a number in parentheses (e.g. <code class="docutils literal notranslate"><span class="pre">.Z</span> <span class="pre">(39)</span></code>) sets an explicit bit position. Members
|
||||
with a table of names (e.g. <code class="docutils literal notranslate"><span class="pre">.Rgb</span> <span class="pre">{</span> <span class="pre">"R",</span> <span class="pre">"G",</span> <span class="pre">"B"</span> <span class="pre">}</span></code>) define combined masks.</p>
|
||||
</section>
|
||||
<section id="struct">
|
||||
<h3>struct<a class="headerlink" href="#struct" title="Link to this heading"></a></h3>
|
||||
<p>Declares a data structure with typed fields:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">struct</span><span class="p">.</span><span class="py">Init</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">ctor</span><span class="p">,</span><span class="w"> </span><span class="nv">section</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Initialization and Shutdown"</span><span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nb">type</span><span class="w"> </span><span class="s2">"RendererType::Enum"</span><span class="w"> </span><span class="c1">--- Select rendering backend.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">vendorId</span><span class="w"> </span><span class="s2">"uint16_t"</span><span class="w"> </span><span class="c1">--- Vendor PCI ID. See: `BGFX_PCI_ID_*`.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">deviceId</span><span class="w"> </span><span class="s2">"uint16_t"</span><span class="w"> </span><span class="c1">--- Device ID.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">capabilities</span><span class="w"> </span><span class="s2">"uint64_t"</span><span class="w"> </span><span class="c1">--- Capabilities initialization mask.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">debug</span><span class="w"> </span><span class="s2">"bool"</span><span class="w"> </span><span class="c1">--- Enable device for debugging.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">profile</span><span class="w"> </span><span class="s2">"bool"</span><span class="w"> </span><span class="c1">--- Enable device for profiling.</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Attributes:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">ctor</span></code> — Generate a constructor with default values.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">namespace</span></code> — Nest this struct inside another (e.g. <code class="docutils literal notranslate"><span class="pre">namespace</span> <span class="pre">=</span> <span class="pre">"Caps"</span></code> produces
|
||||
<code class="docutils literal notranslate"><span class="pre">Caps::Limits</span></code>).</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">section</span></code> — Documentation section.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="func">
|
||||
<h3>func<a class="headerlink" href="#func" title="Link to this heading"></a></h3>
|
||||
<p>Declares a function. The first string is the return type, followed by named parameters:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="c1">--- Advance to next frame.</span>
|
||||
<span class="nv">func</span><span class="p">.</span><span class="py">frame</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">section</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Frame"</span><span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="s2">"uint32_t"</span><span class="w"> </span><span class="c1">--- Current frame number.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">flags</span><span class="w"> </span><span class="s2">"uint8_t"</span><span class="w"> </span><span class="c1">--- Frame flags.</span>
|
||||
<span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">default</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"BGFX_FRAME_NONE"</span><span class="w"> </span><span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Attributes:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">section</span></code> — Documentation section.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">const</span></code> — Mark as a const method (for class member functions).</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">conly</span></code> — Only emit in the C99 API, not in C++.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">cpponly</span></code> — Only emit in the C++ API, not in C99.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">cppinline</span></code> — Provide an inline C++ implementation string.</p></li>
|
||||
</ul>
|
||||
<p>Parameters can have:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">default</span> <span class="pre">=</span> <span class="pre">"value"</span> <span class="pre">}</span></code> — Default argument value.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">out</span> <span class="pre">}</span></code> — Output parameter.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">inout</span> <span class="pre">}</span></code> — Input/output parameter.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="funcptr">
|
||||
<h3>funcptr<a class="headerlink" href="#funcptr" title="Link to this heading"></a></h3>
|
||||
<p>Declares a function pointer type:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nv">funcptr</span><span class="p">.</span><span class="py">ReleaseFn</span>
|
||||
<span class="w"> </span><span class="s2">"void"</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">ptr</span><span class="w"> </span><span class="s2">"void*"</span><span class="w"> </span><span class="c1">--- Pointer to allocated data.</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">userData</span><span class="w"> </span><span class="s2">"void*"</span><span class="w"> </span><span class="c1">--- User defined data if needed.</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="section">
|
||||
<h3>section<a class="headerlink" href="#section" title="Link to this heading"></a></h3>
|
||||
<p>Declares a documentation section for organizing the generated API reference. Sections form a
|
||||
hierarchy based on their level (0 = top-level heading, 1 = chapter, 2+ = subsections):</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="nf">section</span><span class="p">(</span><span class="s2">"API Reference"</span><span class="p">,</span><span class="w"> </span><span class="mi">0</span><span class="p">)</span>
|
||||
<span class="nf">section</span><span class="p">(</span><span class="s2">"General"</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">)</span>
|
||||
<span class="nf">section</span><span class="p">(</span><span class="s2">"Initialization and Shutdown"</span><span class="p">,</span><span class="w"> </span><span class="mi">2</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Types and functions reference their section via the <code class="docutils literal notranslate"><span class="pre">section</span></code> attribute. The documentation
|
||||
generator (<code class="docutils literal notranslate"><span class="pre">docs-rst.lua</span></code>) uses the section tree to organize the output.</p>
|
||||
</section>
|
||||
<section id="documentation-comments">
|
||||
<h3>Documentation comments<a class="headerlink" href="#documentation-comments" title="Link to this heading"></a></h3>
|
||||
<p>Lines starting with <code class="docutils literal notranslate"><span class="pre">---</span></code> before a declaration become documentation comments. These are emitted
|
||||
as Doxygen-style comments in the C/C++ headers and as descriptions in the generated docs:</p>
|
||||
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="c1">--- Render frame.</span>
|
||||
<span class="c1">---</span>
|
||||
<span class="c1">--- @attention `bgfx::renderFrame` is a blocking call.</span>
|
||||
<span class="c1">---</span>
|
||||
<span class="c1">--- @warning This call should only be used on platforms that don't</span>
|
||||
<span class="c1">--- allow creating a separate rendering thread.</span>
|
||||
<span class="c1">---</span>
|
||||
<span class="nv">func</span><span class="p">.</span><span class="py">renderFrame</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">section</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">"Platform specific"</span><span class="w"> </span><span class="p">}</span>
|
||||
<span class="w"> </span><span class="s2">"RenderFrame::Enum"</span>
|
||||
<span class="w"> </span><span class="p">.</span><span class="nv">msecs</span><span class="w"> </span><span class="s2">"int32_t"</span>
|
||||
<span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="nv">default</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">-</span><span class="mi">1</span><span class="w"> </span><span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Supported Doxygen tags in comments: <code class="docutils literal notranslate"><span class="pre">@attention</span></code>, <code class="docutils literal notranslate"><span class="pre">@warning</span></code>, <code class="docutils literal notranslate"><span class="pre">@remarks</span></code>, <code class="docutils literal notranslate"><span class="pre">@param</span></code>,
|
||||
<code class="docutils literal notranslate"><span class="pre">@returns</span></code>.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="adding-a-new-api-function">
|
||||
<h2>Adding a new API function<a class="headerlink" href="#adding-a-new-api-function" title="Link to this heading"></a></h2>
|
||||
<p>To add a new function to the bgfx API:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p>Add the function declaration in <code class="docutils literal notranslate"><span class="pre">scripts/bgfx.idl</span></code> with the appropriate <code class="docutils literal notranslate"><span class="pre">section</span></code> attribute
|
||||
and <code class="docutils literal notranslate"><span class="pre">---</span></code> documentation comments.</p></li>
|
||||
<li><p>Run <code class="docutils literal notranslate"><span class="pre">make</span> <span class="pre">idl</span></code> to regenerate all headers, bindings, and documentation.</p></li>
|
||||
<li><p>Implement the function in <code class="docutils literal notranslate"><span class="pre">src/bgfx.cpp</span></code> (and the renderer backends if needed).</p></li>
|
||||
<li><p>Verify the generated output in <code class="docutils literal notranslate"><span class="pre">include/bgfx/bgfx.h</span></code>, <code class="docutils literal notranslate"><span class="pre">include/bgfx/c99/bgfx.h</span></code>, and the
|
||||
binding files under <code class="docutils literal notranslate"><span class="pre">bindings/</span></code>.</p></li>
|
||||
</ol>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="internals.html" class="btn btn-neutral float-left" title="Internals" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
<a href="license.html" class="btn btn-neutral float-right" title="License" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
<div role="contentinfo">
|
||||
<p>© Copyright 2010-2025, Branimir Karadžić.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
jQuery(function () {
|
||||
SphinxRtdTheme.Navigation.enable(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
index.html
36
index.html
@@ -48,6 +48,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -256,17 +257,48 @@ licensed under permissive BSD-2 clause open source license.</p>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#sort-based-draw-call-bucketing">Sort based draw call bucketing</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#api-and-render-thread">API and render thread</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#sort-based-draw-call-bucketing">Sort-based draw call bucketing</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#sort-key-layout">Sort key layout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#api-thread-and-render-thread">API thread and render thread</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#api-thread">API thread</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#render-thread">Render thread</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#double-buffered-frame-pipeline">Double-buffered frame pipeline</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#multithreaded-mode">Multithreaded mode</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#single-threaded-mode">Single-threaded mode</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#resource-api">Resource API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#view-api">View API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#encoder-api">Encoder API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#transient-buffers">Transient buffers</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="internals.html#customization">Customization</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="internals.html#options">Options</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="idl.html#purpose">Purpose</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="idl.html#file-overview">File overview</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="idl.html#running-the-code-generators">Running the code generators</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="idl.html#idl-syntax-reference">IDL syntax reference</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#version">version</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#typedef">typedef</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#handle">handle</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#enum">enum</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#flag">flag</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#struct">struct</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#func">func</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#funcptr">funcptr</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#section">section</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="idl.html#documentation-comments">Documentation comments</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="idl.html#adding-a-new-api-function">Adding a new API function</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="license.html#license-bsd-2-clause">License (BSD 2-clause)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="license.html#rd-party-libraries">3rd Party Libraries</a></li>
|
||||
|
||||
220
internals.html
220
internals.html
@@ -19,7 +19,7 @@
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="next" title="License" href="license.html" />
|
||||
<link rel="next" title="IDL — Interface Definition Language" href="idl.html" />
|
||||
<link rel="prev" title="Tools" href="tools.html" />
|
||||
</head>
|
||||
|
||||
@@ -49,17 +49,39 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">Internals</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#sort-based-draw-call-bucketing">Sort based draw call bucketing</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#api-and-render-thread">API and render thread</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#sort-based-draw-call-bucketing">Sort-based draw call bucketing</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#sort-key-layout">Sort key layout</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#api-thread-and-render-thread">API thread and render thread</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#api-thread">API thread</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#render-thread">Render thread</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#double-buffered-frame-pipeline">Double-buffered frame pipeline</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#multithreaded-mode">Multithreaded mode</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#single-threaded-mode">Single-threaded mode</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#resource-api">Resource API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#view-api">View API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#encoder-api">Encoder API</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#transient-buffers">Transient buffers</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#customization">Customization</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#options">Options</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="#options">Options</a><ul>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#threading-and-synchronisation">Threading and synchronisation</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#renderer-backends">Renderer backends</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#resource-limits">Resource limits</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#buffer-sizes">Buffer sizes</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#sort-key">Sort key</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#swap-chain">Swap chain</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#debugging-and-profiling">Debugging and profiling</a></li>
|
||||
<li class="toctree-l4"><a class="reference internal" href="#miscellaneous">Miscellaneous</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
@@ -89,42 +111,194 @@
|
||||
<section id="internals">
|
||||
<h1>Internals<a class="headerlink" href="#internals" title="Link to this heading"></a></h1>
|
||||
<section id="sort-based-draw-call-bucketing">
|
||||
<h2>Sort based draw call bucketing<a class="headerlink" href="#sort-based-draw-call-bucketing" title="Link to this heading"></a></h2>
|
||||
<p>bgfx is using sort-based draw call bucketing. This means that submission order doesn’t necessarily match the rendering order, but on the low-level they will be sorted and ordered correctly. On the high level bgfx uses <strong>declarative API</strong> and internal sorting allows more optimal way of submitting draw calls for all passes at one place, and on the low-level this allows better optimization of rendering order. This sometimes creates undesired results usually for GUI rendering, where draw order should usually match submit order. bgfx provides way to enable sequential rendering for these cases (see <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code>).</p>
|
||||
<blockquote>
|
||||
<div><ul class="simple">
|
||||
<h2>Sort-based draw call bucketing<a class="headerlink" href="#sort-based-draw-call-bucketing" title="Link to this heading"></a></h2>
|
||||
<p>bgfx uses sort-based draw call bucketing. This means that the order in which draw calls are submitted does not necessarily match the order in which they are rendered. Instead, draw calls are assigned a 64-bit <strong>sort key</strong> and sorted before execution on the render thread, enabling more optimal GPU state management and batching.</p>
|
||||
<p>On the high level bgfx uses a <strong>declarative API</strong>: the user declares views, their render targets, clear parameters, and transforms up front, then submits draw calls in any order. Internally, the sort key ensures that draw calls are grouped by view first, then ordered within each view according to the active <strong>view mode</strong> (see <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code>):</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Default</strong> - Sort by program first, then by depth. This groups draw calls with the same shader program together to minimise state changes, using depth as a secondary key.</p></li>
|
||||
<li><p><strong>Sequential</strong> - Preserve submission order. Draw calls are rendered in exactly the order <code class="docutils literal notranslate"><span class="pre">submit</span></code> was called. Useful for UI/GUI rendering where painter’s-order matters.</p></li>
|
||||
<li><p><strong>DepthAscending</strong> - Sort by depth (front-to-back). Helps maximise early-Z rejection for opaque geometry.</p></li>
|
||||
<li><p><strong>DepthDescending</strong> - Sort by depth (back-to-front). Required for correct blending of transparent geometry.</p></li>
|
||||
</ul>
|
||||
<section id="sort-key-layout">
|
||||
<h3>Sort key layout<a class="headerlink" href="#sort-key-layout" title="Link to this heading"></a></h3>
|
||||
<p>Each draw call is encoded into a 64-bit sort key. The highest bits encode the <strong>view ID</strong>, so draw calls are always grouped by view first. Below the view bits, a <strong>draw bit</strong> distinguishes draw calls from compute dispatches. For draw calls, a <strong>draw type</strong> field selects one of three encodings to implement the view modes above:</p>
|
||||
<ul class="simple">
|
||||
<li><p><strong>Program sort</strong> (Default mode): <code class="docutils literal notranslate"><span class="pre">[view</span> <span class="pre">|</span> <span class="pre">draw</span> <span class="pre">|</span> <span class="pre">type=0</span> <span class="pre">|</span> <span class="pre">blend</span> <span class="pre">|</span> <span class="pre">alphaRef</span> <span class="pre">|</span> <span class="pre">program</span> <span class="pre">|</span> <span class="pre">depth]</span></code></p></li>
|
||||
<li><p><strong>Depth sort</strong> (DepthAscending/DepthDescending): <code class="docutils literal notranslate"><span class="pre">[view</span> <span class="pre">|</span> <span class="pre">draw</span> <span class="pre">|</span> <span class="pre">type=1</span> <span class="pre">|</span> <span class="pre">depth</span> <span class="pre">|</span> <span class="pre">blend</span> <span class="pre">|</span> <span class="pre">alphaRef</span> <span class="pre">|</span> <span class="pre">program]</span></code></p></li>
|
||||
<li><p><strong>Sequence sort</strong> (Sequential mode): <code class="docutils literal notranslate"><span class="pre">[view</span> <span class="pre">|</span> <span class="pre">draw</span> <span class="pre">|</span> <span class="pre">type=2</span> <span class="pre">|</span> <span class="pre">sequence</span> <span class="pre">|</span> <span class="pre">blend</span> <span class="pre">|</span> <span class="pre">alphaRef</span> <span class="pre">|</span> <span class="pre">program]</span></code></p></li>
|
||||
</ul>
|
||||
<p>Compute dispatches always use sequential ordering: <code class="docutils literal notranslate"><span class="pre">[view</span> <span class="pre">|</span> <span class="pre">compute</span> <span class="pre">|</span> <span class="pre">sequence</span> <span class="pre">|</span> <span class="pre">program]</span></code>.</p>
|
||||
<p>Sort keys are sorted via radix sort on the render thread just before GPU submission.</p>
|
||||
<ul class="simple">
|
||||
<li><p>More detailed description of sort-based draw call bucketing can be found at: <a class="reference external" href="http://realtimecollisiondetection.net/blog/?p=86">Order your graphics draw calls around!</a></p></li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
</section>
|
||||
<section id="api-and-render-thread">
|
||||
<h2>API and render thread<a class="headerlink" href="#api-and-render-thread" title="Link to this heading"></a></h2>
|
||||
<p>API thread is thread from which <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> is called. Once <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> is called on thread, internally bgfx assumes that all API calls will be called from the same thread with exception of Resource, View, and Encoder API.</p>
|
||||
<p>Render thread from where internal rendering <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> is called. On most of OS’ it’s required that this call be called on thread that OS created when executing process (some refer to this thread as “main” thread, or thread where <code class="docutils literal notranslate"><span class="pre">main</span></code> function is called).</p>
|
||||
<p>When bgfx is compiled with option <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=1</span></code> (default is on) <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> can be called by user. It’s required to be called before <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> from thread that will be used as render thread. If both <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> and <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> are called from the same thread, bgfx will switch to execute in single threaded mode, and calling <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> is not required, since it will be called automatically during <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> call.</p>
|
||||
</section>
|
||||
<section id="api-thread-and-render-thread">
|
||||
<h2>API thread and render thread<a class="headerlink" href="#api-thread-and-render-thread" title="Link to this heading"></a></h2>
|
||||
<p>bgfx separates work into two threads: the <strong>API thread</strong> and the <strong>render thread</strong>.</p>
|
||||
<section id="api-thread">
|
||||
<h3>API thread<a class="headerlink" href="#api-thread" title="Link to this heading"></a></h3>
|
||||
<p>The API thread is the thread from which <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> is called. Once <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> has been called, bgfx internally assumes that all subsequent API calls will be made from this same thread, with the exception of the Resource API, View API, and Encoder API (see sections below).</p>
|
||||
<p>The API thread is where application logic runs: setting up views, submitting draw calls via encoders, and calling <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> to advance to the next frame.</p>
|
||||
</section>
|
||||
<section id="render-thread">
|
||||
<h3>Render thread<a class="headerlink" href="#render-thread" title="Link to this heading"></a></h3>
|
||||
<p>The render thread is where <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> executes. This is the thread that talks to the GPU: it processes the command buffer, sorts draw calls, submits them to the graphics API, and performs the back-buffer flip.</p>
|
||||
<p>On most operating systems, certain graphics APIs require that rendering happens on the “main” thread (the thread on which the process was started, i.e. the thread that called <code class="docutils literal notranslate"><span class="pre">main</span></code>). When using bgfx in multithreaded mode, the render thread is typically the main thread, while the API thread runs on a user-created secondary thread.</p>
|
||||
</section>
|
||||
<section id="double-buffered-frame-pipeline">
|
||||
<h3>Double-buffered frame pipeline<a class="headerlink" href="#double-buffered-frame-pipeline" title="Link to this heading"></a></h3>
|
||||
<p>bgfx maintains two <code class="docutils literal notranslate"><span class="pre">Frame</span></code> objects internally: the <strong>submit buffer</strong> (written by the API thread) and the <strong>render buffer</strong> (read by the render thread). This double buffering allows the API thread and the render thread to run in parallel:</p>
|
||||
<ol class="arabic simple">
|
||||
<li><p><strong>API thread</strong> builds a frame by recording draw calls, state changes, and resource commands into the submit buffer.</p></li>
|
||||
<li><p>When the API thread calls <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code>, it waits for the render thread to finish the previous frame, then swaps the submit and render buffers (via <code class="docutils literal notranslate"><span class="pre">bx::swap</span></code>) and signals the render thread to begin.</p></li>
|
||||
<li><p><strong>Render thread</strong> (in <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code>) wakes up, executes pre-render commands (resource creation/updates), sorts draw calls by sort key via radix sort, submits them to the GPU, executes post-render commands, flips the back buffer, and then signals back to the API thread.</p></li>
|
||||
<li><p>The API thread is now free to start building the next frame while the render thread is still executing GPU commands.</p></li>
|
||||
</ol>
|
||||
<p>The synchronisation between the two threads uses a pair of semaphores:</p>
|
||||
<ul class="simple">
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">apiSemPost</span></code> / <code class="docutils literal notranslate"><span class="pre">apiSemWait</span></code> - the API thread signals the render thread that a new frame is ready to process.</p></li>
|
||||
<li><p><code class="docutils literal notranslate"><span class="pre">renderSemPost</span></code> / <code class="docutils literal notranslate"><span class="pre">renderSemWait</span></code> - the render thread signals the API thread that it has finished processing.</p></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section id="multithreaded-mode">
|
||||
<h3>Multithreaded mode<a class="headerlink" href="#multithreaded-mode" title="Link to this heading"></a></h3>
|
||||
<p>When bgfx is compiled with <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=1</span></code> (the default on all platforms that support threading), the user can call <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> directly. Calling <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> before <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> from the intended render thread prevents bgfx from creating its own internal render thread - the user takes responsibility for calling <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> externally each frame.</p>
|
||||
<p>If both <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> and <code class="docutils literal notranslate"><span class="pre">bgfx::init</span></code> are called from the same thread, bgfx detects this and switches to <strong>single-threaded mode</strong>: <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> will internally invoke <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> automatically, and the user does not need to call it separately.</p>
|
||||
</section>
|
||||
<section id="single-threaded-mode">
|
||||
<h3>Single-threaded mode<a class="headerlink" href="#single-threaded-mode" title="Link to this heading"></a></h3>
|
||||
<p>When compiled with <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED=0</span></code>, or when single-threaded mode is detected at runtime, there is no separate render thread. The call to <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> swaps buffers and immediately performs rendering inline (calls <code class="docutils literal notranslate"><span class="pre">bgfx::renderFrame</span></code> internally). The double-buffer swap still happens, but both sides execute on the same thread sequentially.</p>
|
||||
</section>
|
||||
</section>
|
||||
<section id="resource-api">
|
||||
<h2>Resource API<a class="headerlink" href="#resource-api" title="Link to this heading"></a></h2>
|
||||
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::create*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::destroy*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::update*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::alloc*</span></code> is considered part of resource API. Internally resource API calls are guarded by mutex. There is no limit of number of threads that can call resource API simultaneously. Calling any resource API is infrequent, and functions are cheap since most of work with resource is done at later point on render thread.</p>
|
||||
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::create*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::destroy*</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::update*</span></code>, or <code class="docutils literal notranslate"><span class="pre">bgfx::alloc*</span></code> is considered part of the Resource API. Internally, Resource API calls are guarded by a mutex (<code class="docutils literal notranslate"><span class="pre">m_resourceApiLock</span></code>), so there is no limit on the number of threads that can call Resource API functions simultaneously.</p>
|
||||
<p>Calling any Resource API function is generally infrequent and cheap on the API thread side, because the actual GPU work (uploading textures, creating buffers, etc.) is deferred: the commands are recorded into the frame’s command buffer and executed later on the render thread via <code class="docutils literal notranslate"><span class="pre">rendererExecCommands</span></code>.</p>
|
||||
<p>Resource handles (<code class="docutils literal notranslate"><span class="pre">TextureHandle</span></code>, <code class="docutils literal notranslate"><span class="pre">VertexBufferHandle</span></code>, etc.) are returned immediately on creation and can be used in draw calls right away, even though the GPU resource may not yet exist. The render thread will process the creation command before it processes any draw calls that reference the handle.</p>
|
||||
</section>
|
||||
<section id="view-api">
|
||||
<h2>View API<a class="headerlink" href="#view-api" title="Link to this heading"></a></h2>
|
||||
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::setView*</span></code> is considered part of view API. View API is not designed to be thread safe at all since all views are independentent from each other. Calling any view API for different views from different threads is safe. What’s not safe is to update the same view from multiple threads. This will lead to undefined behavior. Only view API that has to be set before any draw calls are issued is view mode <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code>. Internal encoder requires view mode to select sort key encoding and if user changes view mode after submit it will cause incorrect sort behavior within the view.</p>
|
||||
<p>Any API call starting with <code class="docutils literal notranslate"><span class="pre">bgfx::setView*</span></code> is considered part of the View API. The View API is <strong>not</strong> internally thread safe - but it doesn’t need to be, because views are independent from each other. Calling any view API for different views from different threads is safe. What is <strong>not</strong> safe is updating the same view from multiple threads simultaneously; doing so leads to undefined behaviour.</p>
|
||||
<p>One important constraint: <code class="docutils literal notranslate"><span class="pre">bgfx::setViewMode</span></code> must be set <strong>before</strong> any draw calls are submitted to that view within a frame. The internal encoder reads the view mode at submit time to select the sort key encoding. Changing the view mode after draw calls have already been submitted to that view will cause incorrect sort behaviour.</p>
|
||||
<p>The maximum number of views is configured by <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VIEWS</span></code> (default: 256, must be a power of 2). Views are referenced by <code class="docutils literal notranslate"><span class="pre">ViewId</span></code> (a 16-bit integer).</p>
|
||||
</section>
|
||||
<section id="encoder-api">
|
||||
<h2>Encoder API<a class="headerlink" href="#encoder-api" title="Link to this heading"></a></h2>
|
||||
<p>Encoder API can be obtained by calling <code class="docutils literal notranslate"><span class="pre">bgfx::begin</span></code>. bgfx by default allows 8 simultaneous threads to use encoders. This can be configured by changing <code class="docutils literal notranslate"><span class="pre">Limits.maxEncoders</span></code> init option of <code class="docutils literal notranslate"><span class="pre">bgfx::Init</span></code> structure.</p>
|
||||
<p>The Encoder API is used for submitting draw calls and dispatches from multiple threads. An encoder is obtained by calling <code class="docutils literal notranslate"><span class="pre">bgfx::begin</span></code> and returned with <code class="docutils literal notranslate"><span class="pre">bgfx::end</span></code>.</p>
|
||||
<p>By default, bgfx allows up to <strong>8 simultaneous encoders</strong> (configurable via <code class="docutils literal notranslate"><span class="pre">Limits.maxEncoders</span></code> in <code class="docutils literal notranslate"><span class="pre">bgfx::Init</span></code>). Each encoder writes into its own <code class="docutils literal notranslate"><span class="pre">UniformBuffer</span></code>, so there is no contention between threads when recording draw calls.</p>
|
||||
<p>When <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code> is called, it waits for all active encoders to finish (<code class="docutils literal notranslate"><span class="pre">encoderApiWait</span></code>), then locks the encoder mutex to prevent new encoders from being created. The submit buffer is then finalized and swapped.</p>
|
||||
<p>Encoder 0 is special: it is the “default encoder” used by the legacy non-encoder API (<code class="docutils literal notranslate"><span class="pre">bgfx::setState</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::submit</span></code>, etc.) and is always allocated internally. The remaining encoder slots are available for user-created encoders for multithreaded submission.</p>
|
||||
</section>
|
||||
<section id="transient-buffers">
|
||||
<h2>Transient buffers<a class="headerlink" href="#transient-buffers" title="Link to this heading"></a></h2>
|
||||
<p>Transient vertex and index buffers are per-frame temporary allocations intended for dynamic geometry that changes every frame (e.g. debug rendering, particles, UI). They are allocated from a ring buffer that is reset each frame.</p>
|
||||
<p>Each of the two <code class="docutils literal notranslate"><span class="pre">Frame</span></code> objects owns its own transient vertex buffer and transient index buffer. When the frame buffers are swapped, the new submit buffer gets a fresh transient allocation. This means that pointers obtained from <code class="docutils literal notranslate"><span class="pre">bgfx::allocTransientVertexBuffer</span></code> / <code class="docutils literal notranslate"><span class="pre">bgfx::allocTransientIndexBuffer</span></code> are only valid until the next call to <code class="docutils literal notranslate"><span class="pre">bgfx::frame</span></code>.</p>
|
||||
<p>The maximum size of transient buffers can be configured via <code class="docutils literal notranslate"><span class="pre">Limits.maxTransientVbSize</span></code> and <code class="docutils literal notranslate"><span class="pre">Limits.maxTransientIbSize</span></code> in <code class="docutils literal notranslate"><span class="pre">bgfx::Init</span></code>.</p>
|
||||
</section>
|
||||
<section id="customization">
|
||||
<h2>Customization<a class="headerlink" href="#customization" title="Link to this heading"></a></h2>
|
||||
<p>By default each platform has sane default values. For example on Windows default renderer is DirectX, on Linux it is OpenGL, and on macOS it’s Metal. On Windows platform almost all rendering backends are available. For OpenGL ES on desktop you can find more information at:- <a class="reference external" href="http://www.g-truc.net/post-0457.html">OpenGL ES 2.0 and EGL on desktop</a></p>
|
||||
<p>If you’re targeting specific mobile hardware, you can find GLES support in their official SDKs: <a class="reference external" href="http://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-and-resources">Adreno
|
||||
SDK</a>, <a class="reference external" href="http://www.malideveloper.com/">Mali SDK</a>, <a class="reference external" href="http://www.imgtec.com/powervr/insider/sdkdownloads/">PowerVR SDK</a>.</p>
|
||||
<p>By default each platform has sane default values. For example on Windows the default renderer is Direct3D 12, on Linux it is Vulkan, and on macOS it’s Metal. On Windows, almost all rendering backends are available. For OpenGL ES on desktop you can find more information at: <a class="reference external" href="http://www.g-truc.net/post-0457.html">OpenGL ES 2.0 and EGL on desktop</a></p>
|
||||
<p>If you’re targeting specific mobile hardware, you can find GLES support in their official SDKs: <a class="reference external" href="http://developer.qualcomm.com/mobile-development/mobile-technologies/gaming-graphics-optimization-adreno/tools-and-resources">Adreno SDK</a>, <a class="reference external" href="http://www.malideveloper.com/">Mali SDK</a>, <a class="reference external" href="http://www.imgtec.com/powervr/insider/sdkdownloads/">PowerVR SDK</a>.</p>
|
||||
<p>All configuration settings are located inside <a class="reference external" href="https://github.com/bkaradzic/bgfx/blob/master/src/config.h">src/config.h</a>.</p>
|
||||
<p>Every <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_*</span></code> setting can be changed by passing defines thru compiler switches. For example setting preprocessor define <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL=1</span></code> will change backend renderer to OpenGL 2.1. on Windows. Since rendering APIs are platform specific, this obviously won’t work nor make sense in all cases.</p>
|
||||
<p>Every <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_*</span></code> setting can be changed by passing defines through compiler switches. For example setting preprocessor define <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL=1</span></code> will change the backend renderer to OpenGL 2.1 on Windows. Since rendering APIs are platform specific, this obviously won’t work nor make sense in all cases.</p>
|
||||
<section id="options">
|
||||
<h3>Options<a class="headerlink" href="#options" title="Link to this heading"></a></h3>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED</span></code> is used to enable/disable threading support inside bgfx. By default set to 1 on all platforms that support threading.</p>
|
||||
<section id="threading-and-synchronisation">
|
||||
<h4>Threading and synchronisation<a class="headerlink" href="#threading-and-synchronisation" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MULTITHREADED</span></code> - Enable/disable multithreaded rendering. When enabled, bgfx can use a separate render thread for GPU submission. Default is 1 on all platforms that support threading (0 on Emscripten).</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_API_SEMAPHORE_TIMEOUT</span></code> - Timeout in milliseconds for the API/render thread semaphore wait. Default is 5000 ms. If the semaphore times out, it typically indicates a deadlock or the other thread has stalled.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEFAULT_MAX_ENCODERS</span></code> - Default maximum number of simultaneous encoders for multithreaded draw call submission. Default is 8 when multithreaded, 1 otherwise. Can be overridden at runtime via <code class="docutils literal notranslate"><span class="pre">Limits.maxEncoders</span></code> in <code class="docutils literal notranslate"><span class="pre">bgfx::Init</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_ENCODER_API_ONLY</span></code> - When set to 1, disable the legacy non-encoder API (<code class="docutils literal notranslate"><span class="pre">bgfx::setState</span></code>, <code class="docutils literal notranslate"><span class="pre">bgfx::submit</span></code>, etc.) and require all submissions to go through the Encoder API (<code class="docutils literal notranslate"><span class="pre">bgfx::begin</span></code> / <code class="docutils literal notranslate"><span class="pre">bgfx::end</span></code>). Default is 0.</p>
|
||||
</section>
|
||||
<section id="renderer-backends">
|
||||
<h4>Renderer backends<a class="headerlink" href="#renderer-backends" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_AGC</span></code> - Enable AGC renderer backend (PS5). Default is auto-detected per platform.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_DIRECT3D11</span></code> - Enable Direct3D 11 renderer backend. Default is 1 on Windows/Linux.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_DIRECT3D12</span></code> - Enable Direct3D 12 renderer backend. Default is 1 on Windows/Linux.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_GNM</span></code> - Enable GNM renderer backend (PS4). Default is auto-detected per platform.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_METAL</span></code> - Enable Metal renderer backend. Default is 1 on iOS/macOS/visionOS.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_NVN</span></code> - Enable NVN renderer backend (Nintendo Switch). Default is auto-detected per platform.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL</span></code> - Enable OpenGL renderer backend. Set to the minimum GL version (e.g. 21 for OpenGL 2.1, 33 for 3.3, 44 for 4.4). Default is auto-detected per platform; minimum is 21 if enabled.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGLES</span></code> - Enable OpenGL ES renderer backend. Set to the minimum GLES version (e.g. 20 for ES 2.0, 30 for ES 3.0). Default is auto-detected per platform; minimum is 20 if enabled. Cannot be combined with <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_OPENGL</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_VULKAN</span></code> - Enable Vulkan renderer backend. Default is 1 on Android/Linux/Windows/macOS/NX.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_WEBGPU</span></code> - Enable WebGPU renderer backend. Default is 1 on Linux/macOS/Windows.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_USE_EXTENSIONS</span></code> - Enable use of renderer-specific API extensions (e.g. OpenGL extensions, Vulkan extensions). Default is 1.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_DIRECT3D11_USE_STAGING_BUFFER</span></code> - Enable use of staging buffers in the Direct3D 11 renderer for texture and buffer updates. Default is 0.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERER_VULKAN_MAX_DESCRIPTOR_SETS_PER_FRAME</span></code> - Maximum number of Vulkan descriptor sets allocated per frame. Default is 1024. Each draw/compute call may consume one descriptor set.</p>
|
||||
</section>
|
||||
<section id="resource-limits">
|
||||
<h4>Resource limits<a class="headerlink" href="#resource-limits" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_DRAW_CALLS</span></code> - Maximum number of draw/compute calls per frame. Default is 65535 (64K - 1).</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_BLIT_ITEMS</span></code> - Maximum number of blit items per frame. Default is 1024.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VIEWS</span></code> - Maximum number of views. Default is 256. Must be a power of 2.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VIEW_NAME</span></code> - Maximum length of a view name string. Default is 256.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VERTEX_LAYOUTS</span></code> - Maximum number of vertex layout declarations. Default is 64.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_INDEX_BUFFERS</span></code> - Maximum number of static index buffer handles. Default is 4096.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VERTEX_BUFFERS</span></code> - Maximum number of static vertex buffer handles. Default is 4096.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_VERTEX_STREAMS</span></code> - Maximum number of vertex streams per draw call. Default is 4.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_DYNAMIC_INDEX_BUFFERS</span></code> - Maximum number of dynamic index buffer handles. Default is 4096.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_DYNAMIC_VERTEX_BUFFERS</span></code> - Maximum number of dynamic vertex buffer handles. Default is 4096.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_SHADERS</span></code> - Maximum number of shader handles (vertex + fragment + compute). Default is 512.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_TEXTURES</span></code> - Maximum number of texture handles. Default is 4096.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_TEXTURE_SAMPLERS</span></code> - Maximum number of texture samplers per draw call. Default is 16.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_FRAME_BUFFERS</span></code> - Maximum number of frame buffer handles. Default is 128.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS</span></code> - Maximum number of attachments (color + depth/stencil) per frame buffer. Default is 8.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_UNIFORMS</span></code> - Maximum number of uniform handles. Default is 512.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_OCCLUSION_QUERIES</span></code> - Maximum number of occlusion query handles. Default is 256.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT</span></code> - Maximum number of instance data vec4 attributes per draw call. Default is 5. Total instance stride is count × 16 bytes.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_COLOR_PALETTE</span></code> - Maximum number of color palette entries for indexed clear colors. Default is 16.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_SCREENSHOTS</span></code> - Maximum number of screenshot requests that can be queued per frame. Default is 4.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_PROGRAMS</span></code> - Maximum number of linked programs. Derived from <code class="docutils literal notranslate"><span class="pre">2^BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM</span></code>. Default is 512. Cannot be configured directly.</p>
|
||||
</section>
|
||||
<section id="buffer-sizes">
|
||||
<h4>Buffer sizes<a class="headerlink" href="#buffer-sizes" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DYNAMIC_INDEX_BUFFER_SIZE</span></code> - Initial size in bytes of the dynamic index buffer backing store. Default is 1 MB. The backing store grows as needed via sub-allocation.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DYNAMIC_VERTEX_BUFFER_SIZE</span></code> - Initial size in bytes of the dynamic vertex buffer backing store. Default is 3 MB. The backing store grows as needed via sub-allocation.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_TRANSIENT_VERTEX_BUFFER_SIZE</span></code> - Maximum transient vertex buffer size. There is no growth; all transient vertices must fit into this buffer. Default is 6 MB.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_TRANSIENT_INDEX_BUFFER_SIZE</span></code> - Maximum transient index buffer size. There is no growth; all transient indices must fit into this buffer. Default is 2 MB.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MIN_RESOURCE_COMMAND_BUFFER_SIZE</span></code> - Minimum initial size of the resource command buffer (pre/post render commands for resource creation and updates). Default is 64 KB. The buffer grows as needed.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MIN_UNIFORM_BUFFER_SIZE</span></code> - Minimum initial size in bytes of the per-encoder uniform buffer. Default is 1 MB. This buffer will resize on demand.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_UNIFORM_BUFFER_RESIZE_THRESHOLD_SIZE</span></code> - Maximum amount of unused uniform buffer space (in bytes) before the buffer is shrunk. Default is 64 KB.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_UNIFORM_BUFFER_RESIZE_INCREMENT_SIZE</span></code> - Increment size for uniform buffer resize. Default is 1 MB.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_CACHED_DEVICE_MEMORY_ALLOCATIONS_SIZE</span></code> - Amount of allowed memory allocations left on device to use for recycling during later allocations. This can be beneficial in case the driver is slow allocating memory on the device. Default is 128 MB. Currently only used by the Vulkan backend.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_STAGING_SCRATCH_BUFFER_SIZE</span></code> - Threshold of data size above which the staging scratch buffer will not be used; instead a separate device memory allocation will take place to stage the data. Default is 16 MB.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_SCRATCH_STAGING_BUFFER_PER_FRAME_SIZE</span></code> - Amount of scratch buffer size (per in-flight frame) reserved for staging data for copying to the device (vertex buffers, textures, etc.). Default is 32 MB. Currently only used by the Vulkan backend.</p>
|
||||
</section>
|
||||
<section id="sort-key">
|
||||
<h4>Sort key<a class="headerlink" href="#sort-key" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_SORT_KEY_NUM_BITS_DEPTH</span></code> - Number of bits used for depth in the sort key. Default is 32. Reducing this allows more bits for other sort key fields.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_SORT_KEY_NUM_BITS_SEQ</span></code> - Number of bits used for sequence number in the sort key. Default is 20. Determines the maximum number of draw calls per view in sequential mode (2^20 ≈ 1M).</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_SORT_KEY_NUM_BITS_PROGRAM</span></code> - Number of bits used for program index in the sort key. Default is 9. Determines <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_PROGRAMS</span></code> (2^9 = 512).</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_MATRIX_CACHE</span></code> - Maximum number of cached transform matrices per frame. Default is <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_DRAW_CALLS</span> <span class="pre">+</span> <span class="pre">1</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_RECT_CACHE</span></code> - Maximum number of cached scissor rectangles per frame. Default is 4096.</p>
|
||||
</section>
|
||||
<section id="swap-chain">
|
||||
<h4>Swap chain<a class="headerlink" href="#swap-chain" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_BACK_BUFFERS</span></code> - Maximum number of back buffers for the swap chain. Default is 4. The actual number used is specified via <code class="docutils literal notranslate"><span class="pre">bgfx::Resolution::numBackBuffers</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MAX_FRAME_LATENCY</span></code> - Maximum frame latency (number of frames that can be queued ahead). Default is 3. The actual value is specified via <code class="docutils literal notranslate"><span class="pre">bgfx::Resolution::maxFrameLatency</span></code>.</p>
|
||||
</section>
|
||||
<section id="debugging-and-profiling">
|
||||
<h4>Debugging and profiling<a class="headerlink" href="#debugging-and-profiling" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_TEXT_MAX_SCALE</span></code> - Debug text maximum scale factor for <code class="docutils literal notranslate"><span class="pre">bgfx::dbgTextPrintf</span></code>. Default is 4.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_PERFHUD</span></code> - Enable nVidia PerfHUD integration. Default is 0.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_ANNOTATION</span></code> - Enable annotation for graphics debuggers (e.g. RenderDoc, PIX). Default matches <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_OBJECT_NAME</span></code> - Enable debug names on graphics API objects (Direct3D 11/12, Vulkan, etc.). Default matches <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_ANNOTATION</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_UNIFORM</span></code> - Enable runtime validation that uniforms are set before each draw call. Default matches <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG_OCCLUSION</span></code> - Enable runtime validation that occlusion queries are not reused within the same frame. Default matches <code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DEBUG</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_PROFILER</span></code> - Enable internal profiler instrumentation. When enabled, bgfx will emit profiler scopes for frame, submit, resource, and view operations. Default is 0.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERDOC_LOG_FILEPATH</span></code> - File path for RenderDoc capture log output. Default is <code class="docutils literal notranslate"><span class="pre">"temp/bgfx"</span></code>.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_RENDERDOC_CAPTURE_KEYS</span></code> - Key(s) to trigger a RenderDoc capture. Default is <code class="docutils literal notranslate"><span class="pre">{</span> <span class="pre">eRENDERDOC_Key_F11</span> <span class="pre">}</span></code>.</p>
|
||||
</section>
|
||||
<section id="miscellaneous">
|
||||
<h4>Miscellaneous<a class="headerlink" href="#miscellaneous" title="Link to this heading"></a></h4>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_USE_TINYSTL</span></code> - Enable use of tinystl instead of std containers for internal data structures. Default is 1. Reduces binary size and avoids std library dependency.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_MIP_LOD_BIAS</span></code> - Global MIP level-of-detail bias applied to all texture sampling. Default is 0. Positive values select coarser MIP levels, negative values select finer MIP levels.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_DRAW_INDIRECT_STRIDE</span></code> - Stride in bytes of each draw indirect command. Fixed at 32 bytes. Not configurable.</p>
|
||||
<p><code class="docutils literal notranslate"><span class="pre">BGFX_CONFIG_PREFER_DISCRETE_GPU</span></code> - On laptops with integrated and discrete GPU, prefer selection of the discrete GPU (nVidia and AMD). Default is 1 on Windows, 0 elsewhere.</p>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
</section>
|
||||
@@ -134,7 +308,7 @@ SDK</a>, <a class="reference external" href="http://www.malideveloper.com/">Mali
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="tools.html" class="btn btn-neutral float-left" title="Tools" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
<a href="license.html" class="btn btn-neutral float-right" title="License" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
<a href="idl.html" class="btn btn-neutral float-right" title="IDL — Interface Definition Language" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<script src="_static/js/theme.js"></script>
|
||||
<link rel="index" title="Index" href="genindex.html" />
|
||||
<link rel="search" title="Search" href="search.html" />
|
||||
<link rel="prev" title="Internals" href="internals.html" />
|
||||
<link rel="prev" title="IDL — Interface Definition Language" href="idl.html" />
|
||||
</head>
|
||||
|
||||
<body class="wy-body-for-nav">
|
||||
@@ -48,6 +48,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1 current"><a class="current reference internal" href="#">License</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#license-bsd-2-clause">License (BSD 2-clause)</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="#rd-party-libraries">3rd Party Libraries</a></li>
|
||||
@@ -256,7 +257,7 @@ directory.</p>
|
||||
</div>
|
||||
</div>
|
||||
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
||||
<a href="internals.html" class="btn btn-neutral float-left" title="Internals" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
<a href="idl.html" class="btn btn-neutral float-left" title="IDL — Interface Definition Language" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
@@ -70,6 +70,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="bgfx.html">API Reference</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="tools.html">Tools</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -63,6 +63,7 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="internals.html">Internals</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="idl.html">IDL — Interface Definition Language</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="license.html">License</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user