BsD3D9EventQuery.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include "BsD3D9Prerequisites.h"
  3. #include "BsD3D9Resource.h"
  4. #include "BsEventQuery.h"
  5. namespace BansheeEngine
  6. {
  7. /**
  8. * @copydoc EventQuery
  9. */
  10. class BS_D3D9_EXPORT D3D9EventQuery : public EventQuery, public D3D9Resource
  11. {
  12. public:
  13. D3D9EventQuery();
  14. ~D3D9EventQuery();
  15. /**
  16. * @copydoc EventQuery::begin
  17. */
  18. virtual void begin();
  19. /**
  20. * @copydoc EventQuery::isReady
  21. */
  22. virtual bool isReady() const;
  23. /**
  24. * @copydoc D3D9Resource::notifyOnDeviceCreate
  25. */
  26. virtual void notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device);
  27. /**
  28. * @copydoc D3D9Resource::notifyOnDeviceDestroy
  29. */
  30. virtual void notifyOnDeviceDestroy(IDirect3DDevice9* d3d9Device);
  31. /**
  32. * @copydoc D3D9Resource::notifyOnDeviceLost
  33. */
  34. virtual void notifyOnDeviceLost(IDirect3DDevice9* d3d9Device);
  35. /**
  36. * @copydoc D3D9Resource::notifyOnDeviceReset
  37. */
  38. virtual void notifyOnDeviceReset(IDirect3DDevice9* d3d9Device);
  39. private:
  40. /**
  41. * @brief Creates the internal DX9 query.
  42. */
  43. void createQuery();
  44. /**
  45. * @brief Releases the internal DX9 query.
  46. */
  47. void releaseQuery();
  48. private:
  49. bool mQueryIssued;
  50. IDirect3DQuery9* mQuery;
  51. IDirect3DDevice9* mDevice;
  52. };
  53. }