Rise
The Vieneo Province
Loading...
Searching...
No Matches
Materials11.h
Go to the documentation of this file.
1#pragma once
2#include "Geometry11.h"
3#include <memory>
4
5namespace Rendering
6{
7 // The production pass numbers are retained so mesh materials and authored
8 // content keep their meaning. Every program is SM5 bytecode owned by D3D11.
10 {
11 public:
12 HRESULT Initialize(ID3D11Device* device,const std::filesystem::path& shaderDirectory={});
13 HRESULT Bind(ID3D11DeviceContext* context,UINT pass,const VertexLayout11& layout,const D3D11_VIEWPORT& viewport);
15 void Reset();
16 const std::string& Status() const {return status;}
17 private:
18 struct Key
19 {
20 UINT pass;
22 bool operator<(const Key& other) const {return pass!=other.pass ? pass<other.pass : layout<other.layout;}
23 };
24 Microsoft::WRL::ComPtr<ID3D11Device> device;
25 std::filesystem::path directory;
27 std::map<Key,std::unique_ptr<Program11>> programs;
28 std::vector<Microsoft::WRL::ComPtr<ID3D11SamplerState>> samplers;
29 std::string status;
30 };
31}
HRESULT(WINAPI *CUniBuffer::_ScriptApplyDigitSubstitution)(const SCRIPT_DIGITSUBSTITUTE *
Microsoft::WRL::ComPtr< ID3D11Device > device
Definition Materials11.h:24
Parameters11 & Values()
Definition Materials11.h:14
HRESULT Bind(ID3D11DeviceContext *context, UINT pass, const VertexLayout11 &layout, const D3D11_VIEWPORT &viewport)
const std::string & Status() const
Definition Materials11.h:16
std::map< Key, std::unique_ptr< Program11 > > programs
Definition Materials11.h:27
std::vector< Microsoft::WRL::ComPtr< ID3D11SamplerState > > samplers
Definition Materials11.h:28
HRESULT Initialize(ID3D11Device *device, const std::filesystem::path &shaderDirectory={})
std::filesystem::path directory
Definition Materials11.h:25
bool operator<(const Key &other) const
Definition Materials11.h:22