BsD3D9VertexDeclaration.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "BsVertexDeclaration.h"
  6. #include "BsD3D9Resource.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup D3D9
  10. * @{
  11. */
  12. /** DirectX 9 implementation of a vertex declaration. */
  13. class BS_D3D9_EXPORT D3D9VertexDeclarationCore : public VertexDeclarationCore, public D3D9Resource
  14. {
  15. public:
  16. ~D3D9VertexDeclarationCore();
  17. /** @copydoc D3D9Resource::notifyOnDeviceCreate */
  18. virtual void notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device) override;
  19. /** @copydoc D3D9Resource::notifyOnDeviceDestroy */
  20. virtual void notifyOnDeviceDestroy(IDirect3DDevice9* d3d9Device) override;
  21. /** Creates a DirectX 9 vertex declaration object. */
  22. IDirect3DVertexDeclaration9* getD3DVertexDeclaration();
  23. protected:
  24. friend class D3D9HardwareBufferCoreManager;
  25. D3D9VertexDeclarationCore(const List<VertexElement>& elements);
  26. /** Releases the internal DirectX 9 vertex declaration object. */
  27. void releaseDeclaration();
  28. protected:
  29. Map<IDirect3DDevice9*, IDirect3DVertexDeclaration9*> mMapDeviceToDeclaration;
  30. };
  31. /** @} */
  32. }