kodi
TextureDX.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "D3DResource.h"
12 #include "Texture.h"
13 
14 /************************************************************************/
15 /* CDXTexture */
16 /************************************************************************/
17 class CDXTexture : public CTexture
18 {
19 public:
20  CDXTexture(unsigned int width = 0, unsigned int height = 0, XB_FMT format = XB_FMT_UNKNOWN);
21  virtual ~CDXTexture();
22 
23  void CreateTextureObject();
24  void DestroyTextureObject();
25  virtual void LoadToGPU();
26  void BindToUnit(unsigned int unit);
27 
28  ID3D11Texture2D* GetTextureObject()
29  {
30  return m_texture.Get();
31  };
32 
33  ID3D11ShaderResourceView* GetShaderResource()
34  {
35  return m_texture.GetShaderResource();
36  };
37 
38 private:
39  CD3DTexture m_texture;
40  DXGI_FORMAT GetFormat();
41 };
Definition: D3DResource.h:90
Definition: TextureDX.h:17
Base texture class, subclasses of which depend on the render spec (DX, GL etc.)
Definition: Texture.h:34