<blockquote>
  <p>What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame.</p>
</blockquote>

<p>The closest to what you are asking and that I know of is <a href="https://renderdoc.org/" rel="nofollow noreferrer">RenderDoc</a>. I have not tested it myself so far, but some <a href="https://renderdoc.org/docs/getting_started/features.html" rel="nofollow noreferrer">features they list in their documentation</a> that are related to your question are:</p>

<ul>
<li>Full graphics pipeline state display</li>
<li>Shader source display</li>
<li>Flexible resource inspector</li>
<li>Mesh buffer inspection and visualisation</li>
<li>‘Raw’ buffer inspection for buffers</li>
<li>Texture/render target viewer</li>
</ul>

<blockquote>
  <p>I’m looking to somehow programmatically query the state of graphics during a PC gameplay session.</p>
  
  <p>...</p>
  
  <p>Is there any need to be game engine specific in this matter, or will all games be drawn to the screen in the same way?</p>
</blockquote>

<p>I am not sure here if you are asking to dissect the graphics state of a commercial game or software that is not written by yourself. If so, there is no guarantee that RenderDoc can capture data but it is possible. See for example <a href="https://github.com/baldurk/renderdoc/issues/666" rel="nofollow noreferrer">this issue on their GitHub page</a>, where the author says:</p>

<blockquote>
  <p>However I want to be clear that I cannot and do not support capturing 3rd party programs that you do not control. <strong>It generally works</strong> but for obvious reasons I don't provide any help with problems...</p>
</blockquote>

<p>As stated in <a href="https://renderdoc.org/docs/behind_scenes/how_works.html" rel="nofollow noreferrer">this section of their documentation</a>, RenderDoc uses a "man-in-the-middle" approach to get the data. So it intercepts any calls to the graphics API (OpenGL, DirectX, Vulkan) of the executed program, gathers the data it needs, and passes it along to the API afterward.</p>

CC BY-SA 4.0
2020-05-04T02:12:38.267Z
For Nvidia cards, O.P can also use NSight (https://developer.nvidia.com/nsight-graphics). It provides more low-level and performance information than RenderDoc. I don't think it can be used on a released commercial application however, you probably need to have access to the application sources first.
wip
CC BY-SA 4.0
2020-05-01T10:21:40.307Z
2020-05-01T10:21:40.307Z
wychmaster
<p>I’m looking to somehow programmatically query the state of graphics during a PC gameplay session. What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame. I’m mainly interested in what the graphics card is doing on a low level. </p>

<p>Is there any need to be game engine specific in this matter, or will all games be drawn to the screen in the same way?</p>

<p>I’m specifically interested in NVIDIA cards if at all possible. I’m not sure if different manufacturers do things differently, but I only have an NVIDIA card. </p>

<p>Are there any tools or APIs that will give me access to this data? </p>

CC BY-SA 4.0
2020-04-30T22:50:58.043Z
"*What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame.*" That kind of thing changes within a frame. Indeed, the graphics card doesn't even know what "lighting" or a "scene element" *is* in most cases. It's just executing user-written programs that ultimately write data into blocks of memory that the GPU will eventually send to the display device. It has no idea what any of it means.
Nicol Bolas
CC BY-SA 4.0
2020-04-30T22:51:57.707Z
GPUs do so must stuff that even if you could read that info you probably wouldn't get any meaningfull information. You're better off using a profiling tool for your game engine to view this info. Also this question seems off-topic for this stackoverflow.
zoran404
CC BY-SA 4.0
2020-05-01T09:46:45.713Z
@zoran404 After rereading the [on topic help pages](https://computergraphics.stackexchange.com/help/on-topic) I can see, why you come to the conclusion that this question might be off-topic. However, I think it is at least disputable and I would consider it okay.
wychmaster
<api>
API or Tools to query state of graphics during gameplay?
junfanbl
# API or Tools to query state of graphics during gameplay?

(Asked by: username_0 on 2020-04-30)

I’m looking to somehow programmatically query the state of graphics during a PC gameplay session. What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame. I’m mainly interested in what the graphics card is doing on a low level.

Is there any need to be game engine specific in this matter, or will all games be drawn to the screen in the same way?

I’m specifically interested in NVIDIA cards if at all possible. I’m not sure if different manufacturers do things differently, but I only have an NVIDIA card.

Are there any tools or APIs that will give me access to this data?

**Tags:** api

> **Comments:**
> **username_1**: "*What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame.*" That kind of thing changes within a frame. Indeed, the graphics card doesn't even know what "lighting" or a "scene element" *is* in most cases. It's just executing user-written programs that ultimately write data into blocks of memory that the GPU will eventually send to the display device. It has no idea what any of it means.  
> **username_2**: GPUs do so must stuff that even if you could read that info you probably wouldn't get any meaningfull information. You're better off using a profiling tool for your game engine to view this info. Also this question seems off-topic for this stackoverflow.  
> **username_3**: @username_2 After rereading the [on topic help pages](https://computergraphics.stackexchange.com/help/on-topic) I can see, why you come to the conclusion that this question might be off-topic. However, I think it is at least disputable and I would consider it okay.  

---

## 1 answers

### Answer by username_3 on 2020-05-01. Score: 1 | Accepted answer

> What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame.

The closest to what you are asking and that I know of is [RenderDoc](https://renderdoc.org/). I have not tested it myself so far, but some [features they list in their documentation](https://renderdoc.org/docs/getting_started/features.html) that are related to your question are:

* Full graphics pipeline state display
* Shader source display
* Flexible resource inspector
* Mesh buffer inspection and visualisation
* ‘Raw’ buffer inspection for buffers
* Texture/render target viewer

> I’m looking to somehow programmatically query the state of graphics during a PC gameplay session.
>
> ...
>
> Is there any need to be game engine specific in this matter, or will all games be drawn to the screen in the same way?

I am not sure here if you are asking to dissect the graphics state of a commercial game or software that is not written by yourself. If so, there is no guarantee that RenderDoc can capture data but it is possible. See for example [this issue on their GitHub page](https://github.com/baldurk/renderdoc/issues/666), where the author says:

> However I want to be clear that I cannot and do not support capturing 3rd party programs that you do not control. **It generally works** but for obvious reasons I don't provide any help with problems...

As stated in [this section of their documentation](https://renderdoc.org/docs/behind_scenes/how_works.html), RenderDoc uses a "man-in-the-middle" approach to get the data. So it intercepts any calls to the graphics API (OpenGL, DirectX, Vulkan) of the executed program, gathers the data it needs, and passes it along to the API afterward.

> **Comments:**
> **username_4**: For Nvidia cards, O.P can also use NSight (https://developer.nvidia.com/nsight-graphics). It provides more low-level and performance information than RenderDoc. I don't think it can be used on a released commercial application however, you probably need to have access to the application sources first.  

---

