diff --git a/panda/src/dxgsg7/wdxGraphicsWindow7.cxx b/panda/src/dxgsg7/wdxGraphicsWindow7.cxx index a3a313e624..783582badd 100644 --- a/panda/src/dxgsg7/wdxGraphicsWindow7.cxx +++ b/panda/src/dxgsg7/wdxGraphicsWindow7.cxx @@ -21,6 +21,7 @@ #include "config_windisplay.h" #include "wdxGraphicsPipe7.h" #include "dxGraphicsStateGuardian7.h" +#include "pStatTimer.h" #include @@ -135,6 +136,8 @@ wdxGraphicsWindow7:: void wdxGraphicsWindow7:: make_current(void) { + PStatTimer timer(_make_current_pcollector); + DXGraphicsStateGuardian7 *dxgsg; DCAST_INTO_V(dxgsg, _gsg); //wglMakeCurrent(_hdc, wdxgsg->_context); diff --git a/panda/src/dxgsg8/wdxGraphicsWindow8.cxx b/panda/src/dxgsg8/wdxGraphicsWindow8.cxx index 0fac823953..3a603acb3d 100644 --- a/panda/src/dxgsg8/wdxGraphicsWindow8.cxx +++ b/panda/src/dxgsg8/wdxGraphicsWindow8.cxx @@ -28,10 +28,7 @@ #include "keyboardButton.h" #include "mouseButton.h" #include "throw_event.h" - -#ifdef DO_PSTATS #include "pStatTimer.h" -#endif #include #include @@ -98,6 +95,8 @@ wdxGraphicsWindow8:: void wdxGraphicsWindow8:: make_current(void) { + PStatTimer timer(_make_current_pcollector); + DXGraphicsStateGuardian8 *dxgsg; DCAST_INTO_V(dxgsg, _gsg); //wglMakeCurrent(_hdc, wdxgsg->_context); diff --git a/panda/src/dxgsg9/wdxGraphicsWindow9.cxx b/panda/src/dxgsg9/wdxGraphicsWindow9.cxx index 991dedea20..0ea0c30ae6 100755 --- a/panda/src/dxgsg9/wdxGraphicsWindow9.cxx +++ b/panda/src/dxgsg9/wdxGraphicsWindow9.cxx @@ -28,10 +28,8 @@ #include "keyboardButton.h" #include "mouseButton.h" #include "throw_event.h" - -#ifdef DO_PSTATS #include "pStatTimer.h" -#endif + #include #include @@ -98,6 +96,8 @@ wdxGraphicsWindow9:: void wdxGraphicsWindow9:: make_current(void) { + PStatTimer timer(_make_current_pcollector); + DXGraphicsStateGuardian9 *dxgsg; DCAST_INTO_V(dxgsg, _gsg); //wglMakeCurrent(_hdc, wdxgsg->_context); diff --git a/panda/src/wgldisplay/wglGraphicsBuffer.cxx b/panda/src/wgldisplay/wglGraphicsBuffer.cxx index ea7635fd15..9eb5f3dc0b 100644 --- a/panda/src/wgldisplay/wglGraphicsBuffer.cxx +++ b/panda/src/wgldisplay/wglGraphicsBuffer.cxx @@ -18,9 +18,8 @@ #include "wglGraphicsBuffer.h" #include "config_wgldisplay.h" -#include "wglGraphicsPipe.h" #include "glgsg.h" -#include "frameBufferProperties.h" +#include "pStatTimer.h" #include @@ -94,6 +93,8 @@ begin_frame() { //////////////////////////////////////////////////////////////////// void wglGraphicsBuffer:: make_current() { + PStatTimer timer(_make_current_pcollector); + wglGraphicsStateGuardian *wglgsg; DCAST_INTO_V(wglgsg, _gsg); diff --git a/panda/src/wgldisplay/wglGraphicsWindow.cxx b/panda/src/wgldisplay/wglGraphicsWindow.cxx index 34bff4ba03..d06c9737c2 100644 --- a/panda/src/wgldisplay/wglGraphicsWindow.cxx +++ b/panda/src/wgldisplay/wglGraphicsWindow.cxx @@ -20,6 +20,7 @@ #include "config_wgldisplay.h" #include "config_windisplay.h" #include "wglGraphicsPipe.h" +#include "pStatTimer.h" #include "glgsg.h" #include @@ -155,6 +156,8 @@ wglGraphicsWindow:: //////////////////////////////////////////////////////////////////// void wglGraphicsWindow:: make_current() { + PStatTimer timer(_make_current_pcollector); + wglGraphicsStateGuardian *wglgsg; DCAST_INTO_V(wglgsg, _gsg); wglMakeCurrent(_hdc, wglgsg->get_context(_hdc));