BsD3D9EventQuery.h 1.5 KB

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