16 LogWarning(
"Input layout map is not empty on destruction.");
28 std::shared_ptr<DX11InputLayout> layout;
33 if (!
mMap.
Get(std::make_pair(vbuffer, vshader), layout))
35 layout = std::make_shared<DX11InputLayout>(device, vbuffer, vshader);
36 mMap.
Insert(std::make_pair(vbuffer, vshader), layout);
38 #if defined(GTE_GRAPHICS_USE_NAMED_OBJECTS) 41 if (vbname !=
"" || vsname !=
"")
43 layout->SetName(vbname +
" | " + vsname);
53 LogError(
"Vertex shader must be nonnull.");
62 std::vector<VBSPair> matches;
64 for (
auto match : matches)
66 std::shared_ptr<DX11InputLayout> layout;
73 LogError(
"Vertex buffer must be nonnull.");
82 std::vector<VBSPair> matches;
84 for (
auto match : matches)
86 std::shared_ptr<DX11InputLayout> layout;
93 LogError(
"Vertex shader must be nonnull.");
117 VertexBuffer const* vbuffer, std::vector<VBSPair>& matches)
121 for (
auto vbs :
mMap)
123 if (vbuffer == vbs.first.first)
125 matches.push_back(vbs.first);
133 std::vector<VBSPair>& matches)
137 for (
auto vbs :
mMap)
139 if (vshader == vbs.first.second)
141 matches.push_back(vbs.first);
void Insert(Key key, Value value)
bool Get(Key key, Value &value) const
bool Remove(Key key, Value &value)
GLsizei const GLchar *const * string
#define LogError(message)
#define LogWarning(message)
std::string const & GetName() const