diff --git a/docs/getting_started/faq.rst b/docs/getting_started/faq.rst index ad40d2cb9..367fbcd20 100644 --- a/docs/getting_started/faq.rst +++ b/docs/getting_started/faq.rst @@ -175,6 +175,7 @@ Querying an ID3D11Device for UUID ``{A7AA6116-9C8D-4BBA-9083-B4D816B71B78}`` wil It's unlikely the extension will ever be 'made official', so these enumerants can be used: +.. highlight:: c++ .. code:: c++ #define GL_DEBUG_TOOL_EXT 0x6789 diff --git a/docs/getting_started/tips_tricks.rst b/docs/getting_started/tips_tricks.rst index 840316584..a1891f146 100644 --- a/docs/getting_started/tips_tricks.rst +++ b/docs/getting_started/tips_tricks.rst @@ -24,6 +24,7 @@ This page is a random hodge-podge of different tips and tricks that might not be #. You can close tabs by middle clicking on them. #. You can trigger a capture from code. renderdoc.dll exports an :doc:`in_application_api` for this purpose, defined in ``renderdoc_app.h`` in the distributions: + .. highlight:: c++ .. code:: c++ #include "renderdoc_app.h" @@ -49,6 +50,7 @@ This page is a random hodge-podge of different tips and tricks that might not be #. To get API debug or error messages, enable "Create Debug Device" when capturing then check out the :doc:`../window/debug_messages` window. #. Detecting RenderDoc from your code can either be done by trying to load and use the renderdoc :doc:`in_application_api`, or through API specific ways: + .. highlight:: c++ .. code:: c++ // For D3D11: @@ -68,6 +70,7 @@ This page is a random hodge-podge of different tips and tricks that might not be #. RenderDoc can be informed about separated debug shader blobs through API specific ways: + .. highlight:: c++ .. code:: c++ // For D3D11: diff --git a/docs/how/how_custom_visualisation.rst b/docs/how/how_custom_visualisation.rst index d4abf7476..d7e616012 100644 --- a/docs/how/how_custom_visualisation.rst +++ b/docs/how/how_custom_visualisation.rst @@ -30,7 +30,8 @@ The shader editor when using the UI can be used to insert these snippets for you UV co-ordinates (D3D11 only) ```````````````````````````` -.. code:: c +.. highlight:: c++ +.. code:: c++ float4 main(float4 pos : SV_Position, float4 uv : TEXCOORD0) : SV_Target0 { @@ -46,7 +47,8 @@ This input is defined as two parameters to the shader entry point. The first def Texture dimensions `````````````````` -.. code:: c +.. highlight:: c++ +.. code:: c++ uint4 RENDERDOC_TexDim; // hlsl uvec4 RENDERDOC_TexDim; // glsl @@ -62,7 +64,8 @@ This variable will be filled out with the following values: Selected Mip level `````````````````` -.. code:: c +.. highlight:: c++ +.. code:: c++ uint RENDERDOC_SelectedMip; @@ -71,7 +74,8 @@ This variable will be filled out with the selected mip level in the UI. Current texture type ```````````````````` -.. code:: c +.. highlight:: c++ +.. code:: c++ uint RENDERDOC_TextureType; @@ -112,7 +116,8 @@ OpenGL / GLSL Samplers (D3D11 only) ````````````````````` -.. code:: c +.. highlight:: c++ +.. code:: c++ SamplerState pointSampler : register(s0); SamplerState linearSampler : register(s1); @@ -125,6 +130,7 @@ Resources D3D11 / HLSL ^^^^^^^^^^^^ +.. highlight:: c++ .. code:: c++ Texture1DArray texDisplayTex1DArray : register(t1); @@ -150,7 +156,8 @@ D3D11 / HLSL OpenGL / GLSL ^^^^^^^^^^^^^ -.. code:: c +.. highlight:: c++ +.. code:: c++ // Unsigned int samplers layout (binding = 1) uniform usampler1D texUInt1D; diff --git a/docs/how/how_view_texture.rst b/docs/how/how_view_texture.rst index 7cd7a7bce..ab096d8dd 100644 --- a/docs/how/how_view_texture.rst +++ b/docs/how/how_view_texture.rst @@ -10,6 +10,7 @@ It is much easier to browse and debug frames when the resources are given meanin The way this is done varies by API. In D3D11 the resource is named in this way: +.. highlight:: c++ .. code:: c++ // Creating an example resource - a 2D Texture. diff --git a/docs/window/event_browser.rst b/docs/window/event_browser.rst index 3bcaa2c64..f3cd263fa 100644 --- a/docs/window/event_browser.rst +++ b/docs/window/event_browser.rst @@ -10,6 +10,7 @@ The Event Browser becomes most useful when the application has user-defined anno Doing this is API and platform specific. Example code for D3D11 is included below, using the D3DPERF library that is defined in d3d9.lib, which can still be used in D3D11. (The newer ID3DUserDefinedAnnotation API is also supported). +.. highlight:: c++ .. code:: c++ D3DPERF_BeginEvent(0xffffffff, L"Start of example");