Add syntax highlighting

This commit is contained in:
baldurk
2016-05-15 20:08:41 +02:00
parent f298b81ad2
commit 81a1b2e020
5 changed files with 19 additions and 6 deletions
+1
View File
@@ -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
+3
View File
@@ -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:
+13 -6
View File
@@ -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<float4> 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;
+1
View File
@@ -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.
+1
View File
@@ -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");