Skip to content

Commit

Permalink
Update docs / 2024-02-08 / 21:13:35
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Feb 8, 2024
1 parent 21f601d commit 43722bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
14 changes: 2 additions & 12 deletions docs/book/_sources/doc_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ struct RunnerParams
// Options for the renderer backend
RendererBackendOptions rendererBackendOptions;

// `backendType`: _enum BackendType, default=PlatformBackendType::FirstAvailable_
// `platformBackendType`: _enum PlatformBackendType, default=PlatformBackendType::FirstAvailable_
// Select the wanted platform backend type between `Sdl`, `Glfw`.
// if `FirstAvailable`, Glfw will be preferred over Sdl when both are available.
// Only useful when multiple backend are compiled and available.
// (for compatibility with older versions, you can use BackendType instead of PlatformBackendType)
PlatformBackendType platformBackendType = PlatformBackendType::FirstAvailable;

// `renderingBackendType`: _enum RenderingBackendType, default=RenderingBackendType::FirstAvailable_
Expand Down Expand Up @@ -195,11 +194,6 @@ struct RunnerParams
// Set the application refresh rate
// (only used on emscripten: 0 stands for "let the app or the browser decide")
int emscripten_fps = 0;

// --------------- Legacy -------------------`
#ifndef HELLOIMGUI_DISABLE_OBSOLETE_BACKEND
PlatformBackendType& backendType = platformBackendType; // a synonym, for backward compatibility
#endif
};
```

Expand All @@ -209,7 +203,7 @@ struct RunnerParams
```cpp

// You can select the platform backend type (SDL, GLFW) and the rendering backend type
// via RunnerParams.backendType and RunnerParams.renderingBackendType.
// via RunnerParams.platformBackendType and RunnerParams.renderingBackendType.

// Platform backend type (SDL, GLFW)
// They are listed in the order of preference when FirstAvailable is selected.
Expand All @@ -220,10 +214,6 @@ enum class PlatformBackendType
Sdl,
};

#ifndef HELLOIMGUI_DISABLE_OBSOLETE_BACKEND
using BackendType = PlatformBackendType; // for backward compatibility
#endif

// Rendering backend type (OpenGL3, Metal, Vulkan, DirectX11, DirectX12)
// They are listed in the order of preference when FirstAvailable is selected.
enum class RendererBackendType
Expand Down
14 changes: 2 additions & 12 deletions docs/book/doc_params.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,10 @@ <h2>Full params<a class="headerlink" href="#full-params" title="Permalink to thi
<span class="w"> </span><span class="c1">// Options for the renderer backend</span>
<span class="w"> </span><span class="n">RendererBackendOptions</span><span class="w"> </span><span class="n">rendererBackendOptions</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// `backendType`: _enum BackendType, default=PlatformBackendType::FirstAvailable_</span>
<span class="w"> </span><span class="c1">// `platformBackendType`: _enum PlatformBackendType, default=PlatformBackendType::FirstAvailable_</span>
<span class="w"> </span><span class="c1">// Select the wanted platform backend type between `Sdl`, `Glfw`.</span>
<span class="w"> </span><span class="c1">// if `FirstAvailable`, Glfw will be preferred over Sdl when both are available.</span>
<span class="w"> </span><span class="c1">// Only useful when multiple backend are compiled and available.</span>
<span class="w"> </span><span class="c1">// (for compatibility with older versions, you can use BackendType instead of PlatformBackendType)</span>
<span class="w"> </span><span class="n">PlatformBackendType</span><span class="w"> </span><span class="n">platformBackendType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PlatformBackendType</span><span class="o">::</span><span class="n">FirstAvailable</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// `renderingBackendType`: _enum RenderingBackendType, default=RenderingBackendType::FirstAvailable_</span>
Expand Down Expand Up @@ -636,18 +635,13 @@ <h2>Full params<a class="headerlink" href="#full-params" title="Permalink to thi
<span class="w"> </span><span class="c1">// Set the application refresh rate</span>
<span class="w"> </span><span class="c1">// (only used on emscripten: 0 stands for &quot;let the app or the browser decide&quot;)</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">emscripten_fps</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// --------------- Legacy -------------------`</span>
<span class="cp">#ifndef HELLOIMGUI_DISABLE_OBSOLETE_BACKEND</span>
<span class="w"> </span><span class="n">PlatformBackendType</span><span class="o">&amp;</span><span class="w"> </span><span class="n">backendType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">platformBackendType</span><span class="p">;</span><span class="w"> </span><span class="c1">// a synonym, for backward compatibility</span>
<span class="cp">#endif</span>
<span class="p">};</span>
</pre></div>
</div>
<section id="backend-selection">
<h3>Backend selection<a class="headerlink" href="#backend-selection" title="Permalink to this heading">#</a></h3>
<div class="highlight-cpp notranslate"><div class="highlight"><pre><span></span><span class="c1">// You can select the platform backend type (SDL, GLFW) and the rendering backend type</span>
<span class="c1">// via RunnerParams.backendType and RunnerParams.renderingBackendType.</span>
<span class="c1">// via RunnerParams.platformBackendType and RunnerParams.renderingBackendType.</span>

<span class="c1">// Platform backend type (SDL, GLFW)</span>
<span class="c1">// They are listed in the order of preference when FirstAvailable is selected.</span>
Expand All @@ -658,10 +652,6 @@ <h3>Backend selection<a class="headerlink" href="#backend-selection" title="Perm
<span class="w"> </span><span class="n">Sdl</span><span class="p">,</span>
<span class="p">};</span>

<span class="cp">#ifndef HELLOIMGUI_DISABLE_OBSOLETE_BACKEND</span>
<span class="k">using</span><span class="w"> </span><span class="n">BackendType</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">PlatformBackendType</span><span class="p">;</span><span class="w"> </span><span class="c1">// for backward compatibility</span>
<span class="cp">#endif</span>

<span class="c1">// Rendering backend type (OpenGL3, Metal, Vulkan, DirectX11, DirectX12)</span>
<span class="c1">// They are listed in the order of preference when FirstAvailable is selected.</span>
<span class="k">enum</span><span class="w"> </span><span class="k">class</span><span class="w"> </span><span class="nc">RendererBackendType</span>
Expand Down
Loading

0 comments on commit 43722bc

Please sign in to comment.