X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace%2Fd3dretrace_main.cpp;h=3de6daa6553b213d1a926a4157ed63b01200a32d;hb=HEAD;hp=4bd4b8013a924820482d6ebdbf7a2eb9ff8c6e6d;hpb=610942b9efd69d50875d0076a0957be0b8fff174;p=apitrace diff --git a/retrace/d3dretrace_main.cpp b/retrace/d3dretrace_main.cpp index 4bd4b80..3de6daa 100644 --- a/retrace/d3dretrace_main.cpp +++ b/retrace/d3dretrace_main.cpp @@ -28,56 +28,22 @@ #include "os_string.hpp" -#include "d3d9state.hpp" +#include "d3dstate.hpp" #include "retrace.hpp" #include "d3dretrace.hpp" -IDirect3DDevice9 * -d3dretrace::pLastDirect3DDevice9 = NULL; - - void retrace::setUp(void) { - if (retrace::debug) { - /* - * XXX: D3D9D only works for simple things, it often introduces errors - * on complex traces, or traces which use unofficial D3D9 features. - */ - if (0) { - g_szD3D9DllName = "d3d9d.dll"; - } - } } void retrace::addCallbacks(retrace::Retracer &retracer) { - retracer.addCallbacks(d3dretrace::d3d_callbacks); -} - - -image::Image * -retrace::getSnapshot(void) { - if (!d3dretrace::pLastDirect3DDevice9) { - return NULL; - } - - return d3dstate::getRenderTargetImage(d3dretrace::pLastDirect3DDevice9); -} - - -bool -retrace::dumpState(std::ostream &os) -{ - if (!d3dretrace::pLastDirect3DDevice9) { - return false; - } - - d3dstate::dumpDevice(os, d3dretrace::pLastDirect3DDevice9); - - return true; + retracer.addCallbacks(d3dretrace::d3d8_callbacks); + retracer.addCallbacks(d3dretrace::d3d9_callbacks); + retracer.addCallbacks(d3dretrace::dxgi_callbacks); }