BsD3D9Resource.cpp 990 B

12345678910111213141516171819202122232425262728293031
  1. //__________________________ Banshee Project - A modern game development toolkit _________________________________//
  2. //_____________________________________ www.banshee-project.com __________________________________________________//
  3. //________________________ Copyright (c) 2014 Marko Pintera. All rights reserved. ________________________________//
  4. #include "BsD3D9Resource.h"
  5. #include "BsD3D9ResourceManager.h"
  6. #include "BsD3D9RenderSystem.h"
  7. namespace BansheeEngine
  8. {
  9. BS_STATIC_MUTEX_INSTANCE(D3D9Resource::msDeviceAccessMutex)
  10. D3D9Resource::D3D9Resource()
  11. {
  12. D3D9RenderSystem::getResourceManager()->_notifyResourceCreated(static_cast<D3D9Resource*>(this));
  13. }
  14. D3D9Resource::~D3D9Resource()
  15. {
  16. D3D9RenderSystem::getResourceManager()->_notifyResourceDestroyed(static_cast<D3D9Resource*>(this));
  17. }
  18. void D3D9Resource::lockDeviceAccess()
  19. {
  20. D3D9_DEVICE_ACCESS_LOCK;
  21. }
  22. void D3D9Resource::unlockDeviceAccess()
  23. {
  24. D3D9_DEVICE_ACCESS_UNLOCK;
  25. }
  26. }