BsD3D9RenderTexture.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #pragma once
  2. #include "BsD3D9Prerequisites.h"
  3. #include "BsD3D9Resource.h"
  4. #include "BsRenderTexture.h"
  5. namespace BansheeEngine
  6. {
  7. /// RenderTexture implementation for D3D9
  8. class BS_D3D9_EXPORT D3D9RenderTexture : public RenderTexture, public D3D9Resource
  9. {
  10. public:
  11. virtual ~D3D9RenderTexture();
  12. bool requiresTextureFlipping() const { return false; }
  13. virtual void getCustomAttribute(const String& name, void* pData) const;
  14. /**
  15. * @copydoc D3D9Resource::notifyOnDeviceCreate
  16. */
  17. virtual void notifyOnDeviceCreate(IDirect3DDevice9* d3d9Device);
  18. /**
  19. * @copydoc D3D9Resource::notifyOnDeviceDestroy
  20. */
  21. virtual void notifyOnDeviceDestroy(IDirect3DDevice9* d3d9Device);
  22. /**
  23. * @copydoc D3D9Resource::notifyOnDeviceLost
  24. */
  25. virtual void notifyOnDeviceLost(IDirect3DDevice9* d3d9Device);
  26. /**
  27. * @copydoc D3D9Resource::notifyOnDeviceReset
  28. */
  29. virtual void notifyOnDeviceReset(IDirect3DDevice9* d3d9Device);
  30. protected:
  31. friend class D3D9TextureManager;
  32. D3D9RenderTexture();
  33. /**
  34. * @copydoc RenderTexture::initialize_internal().
  35. */
  36. void initialize_internal();
  37. /**
  38. * @brief Initializes the internal color and depth surfaces.
  39. */
  40. void initializeSurfaces();
  41. /**
  42. * @brief Releases the internal color and depth surfaces.
  43. */
  44. void releaseSurfaces();
  45. protected:
  46. IDirect3DSurface9* mDX9ColorSurface;
  47. IDirect3DSurface9* mDX9DepthStencilSurface;
  48. bool mIsBindableToShader;
  49. };
  50. }