Rise
The Vieneo Province
Loading...
Searching...
No Matches
Texture11.h
Go to the documentation of this file.
1#pragma once
2#include <d3d11.h>
3#include <wrl/client.h>
4#include <string>
5#include <cstdint>
6
7namespace Rendering
8{
9 // DDS retains authored levels/BC compression/cube and volume dimensions.
10 // WIC accepts PNG/JPEG/BMP/GIF/TIFF and creates mipmaps on the render thread.
11 // Existing assets were authored for linear UNORM sampling; color-space
12 // metadata must not silently change the old material equations.
14 {
15 public:
16 HRESULT Load(ID3D11Device* device, ID3D11DeviceContext* context, const wchar_t* path);
17 HRESULT Load(ID3D11Device* device, ID3D11DeviceContext* context, const uint8_t* data, size_t size);
18 void Reset() { view.Reset(); resource.Reset(); status.clear(); }
19 ID3D11Resource* Resource() const { return resource.Get(); }
20 ID3D11ShaderResourceView* View() const { return view.Get(); }
21 const std::string& Status() const { return status; }
22 private:
23 Microsoft::WRL::ComPtr<ID3D11Resource> resource;
24 Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> view;
25 std::string status;
26 };
27}
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
ID3D11ShaderResourceView * View() const
Definition Texture11.h:20
ID3D11Resource * Resource() const
Definition Texture11.h:19
const std::string & Status() const
Definition Texture11.h:21
HRESULT Load(ID3D11Device *device, ID3D11DeviceContext *context, const wchar_t *path)
Definition Texture11.cpp:70
Microsoft::WRL::ComPtr< ID3D11Resource > resource
Definition Texture11.h:23
Microsoft::WRL::ComPtr< ID3D11ShaderResourceView > view
Definition Texture11.h:24
std::string status
Definition Texture11.h:25