#include <Texture.h>
Definition at line 12 of file Texture.h.
◆ Texture()
| IncrementalEngine::Texture::Texture |
( |
std::string |
filename | ) |
|
◆ ~Texture()
| IncrementalEngine::Texture::~Texture |
( |
| ) |
|
|
virtual |
◆ GetSize()
| D3DXVECTOR2 IncrementalEngine::Texture::GetSize |
( |
| ) |
|
◆ GetTexture()
| ID3D11ShaderResourceView * IncrementalEngine::Texture::GetTexture |
( |
| ) |
|
◆ Init()
| HRESULT IncrementalEngine::Texture::Init |
( |
ID3D11Device * |
device | ) |
|
Definition at line 18 of file Texture.cpp.
20 ID3D11Resource* resource;
21 ID3D11Texture2D* texture2D;
22 D3D11_TEXTURE2D_DESC desc;
25 HRESULT result = D3DX11CreateShaderResourceViewFromFile(
36 return CO_E_ERRORINAPP;
40 texture2D =
static_cast<ID3D11Texture2D*
>(resource);
42 if (texture2D ==
nullptr)
44 return CO_E_ERRORINAPP;
47 texture2D->GetDesc(&desc);
48 _size = D3DXVECTOR2(desc.Width, desc.Height);
◆ _filename
| std::string IncrementalEngine::Texture::_filename |
|
private |
◆ _size
| D3DXVECTOR2 IncrementalEngine::Texture::_size |
|
private |
◆ _texture
| ID3D11ShaderResourceView* IncrementalEngine::Texture::_texture |
|
private |