mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-28 09:26:52 +00:00
Refactor public interface to be less strict C and more python friendly
* Generally this means removing ref out parameters and instead returning values. In a couple of cases we will want to avoid copies in future either by returning const references (e.g. to the pipeline state which is immutable). * At the same time, some pointless bool return values that were always true and didn't indicate errors have been removed. They can be added again if an error condition comes back. * Some free functions still have out parameters as C linkage doesn't allow returning user types by value. * The C# UI still invokes into C wrappers for all the C++ classes, which handle taking the return value and doing a copy into an out parameter still for compatibility.
This commit is contained in:
@@ -635,13 +635,12 @@ void PixelHistoryView::startDebug(EventTag tag)
|
||||
{
|
||||
m_Ctx.SetEventID({this}, tag.eventID, tag.eventID);
|
||||
|
||||
ShaderDebugTrace *trace = new ShaderDebugTrace;
|
||||
ShaderDebugTrace *trace = NULL;
|
||||
|
||||
bool success = false;
|
||||
|
||||
m_Ctx.Renderer().BlockInvoke([this, &success, trace](IReplayRenderer *r) {
|
||||
success =
|
||||
r->DebugPixel((uint32_t)m_Pixel.x(), (uint32_t)m_Pixel.y(), m_Display.sampleIdx, ~0U, trace);
|
||||
m_Ctx.Renderer().BlockInvoke([this, &success, &trace](IReplayRenderer *r) {
|
||||
trace = r->DebugPixel((uint32_t)m_Pixel.x(), (uint32_t)m_Pixel.y(), m_Display.sampleIdx, ~0U);
|
||||
});
|
||||
|
||||
if(!success || trace->states.count == 0)
|
||||
|
||||
Reference in New Issue
Block a user