|
@@ -37,6 +37,7 @@
|
|
|
#include "windowManager/platformWindow.h"
|
|
|
#include "gfx/D3D11/screenshotD3D11.h"
|
|
|
#include "materials/shaderData.h"
|
|
|
+#include <d3d9.h> //ok now stressing out folks, this is just for debug events(D3DPER) :)
|
|
|
|
|
|
#ifdef TORQUE_DEBUG
|
|
|
#include "d3d11sdklayers.h"
|
|
@@ -1678,4 +1679,32 @@ GFXCubemap * GFXD3D11Device::createCubemap()
|
|
|
GFXD3D11Cubemap* cube = new GFXD3D11Cubemap();
|
|
|
cube->registerResourceWithDevice(this);
|
|
|
return cube;
|
|
|
+}
|
|
|
+
|
|
|
+//------------------------------------------------------------------------------
|
|
|
+void GFXD3D11Device::enterDebugEvent(ColorI color, const char *name)
|
|
|
+{
|
|
|
+ // BJGFIX
|
|
|
+ WCHAR eventName[260];
|
|
|
+ MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
|
|
+
|
|
|
+ D3DPERF_BeginEvent(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
|
|
|
+ (LPCWSTR)&eventName);
|
|
|
+}
|
|
|
+
|
|
|
+//------------------------------------------------------------------------------
|
|
|
+void GFXD3D11Device::leaveDebugEvent()
|
|
|
+{
|
|
|
+ D3DPERF_EndEvent();
|
|
|
+}
|
|
|
+
|
|
|
+//------------------------------------------------------------------------------
|
|
|
+void GFXD3D11Device::setDebugMarker(ColorI color, const char *name)
|
|
|
+{
|
|
|
+ // BJGFIX
|
|
|
+ WCHAR eventName[260];
|
|
|
+ MultiByteToWideChar(CP_ACP, 0, name, -1, eventName, 260);
|
|
|
+
|
|
|
+ D3DPERF_SetMarker(D3DCOLOR_ARGB(color.alpha, color.red, color.green, color.blue),
|
|
|
+ (LPCWSTR)&eventName);
|
|
|
}
|