dao::render
Declared in dao/Render.h.
Classes
| Class | |
|---|---|
| Draw | One draw call. |
| Sampled | A texture a shader samples. |
| Shader | A shader bound for the draw: none (empty bytecode) for the fixed pipeline. |
| State | A render state’s value. |
| Value | One constant of a shader’s table, with what the device holds in its registers. |
| Watcher | A plugin’s watch on the draws: a handle to the library’s record of it. |
Type aliases
DrawEvent
using DrawEvent = std::function<void(const Draw &draw)>
What a watch hands a draw to, on the render thread.
PresentEvent
using PresentEvent = std::function<void(std::uint64_t frame)>
What a watch hands the end of an armed frame to, on the render thread, at the frame’s present.
Enumerations
Call
enum class Call : std::uint8_t
Which of the device’s draw calls it was.
| Value | |
|---|---|
Primitive |
DrawPrimitive. |
IndexedPrimitive |
DrawIndexedPrimitive. |
PrimitiveUp |
DrawPrimitiveUP. |
IndexedPrimitiveUp |
DrawIndexedPrimitiveUP. |
Functions
Frame()
std::uint64_t Frame()
Returns the number of the frame being drawn, counted by the presents since the device was made.
Watch()
Watcher Watch(DrawEvent draw, PresentEvent present={})
Makes a watch on the game’s draws, disarmed, and places the library’s detours on Direct3D if they are not yet.
The watch lives as long as the process; the handle may be copied.
Call it at plugin load, before the game makes its device: a device made before is not watched.