- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
std::vector<D3D11_INPUT_ELEMENT_DESC> desc;
for (auto it = descStrings.begin(); it != descStrings.end(); it++)
{
auto strIt = it->begin();
std::string SemanticName;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
SemanticName += (*strIt);
strIt++;
}
strIt++;
std::string SemanticIndex;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
SemanticIndex += (*strIt);
strIt++;
}
strIt++;
std::string Format;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
Format += (*strIt);
strIt++;
}
strIt++;
std::string InputSlot;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
InputSlot += (*strIt);
strIt++;
}
strIt++;
std::string AlignedByteOffset;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
AlignedByteOffset += (*strIt);
strIt++;
}
strIt++;
std::string InputSlotClass;
while ((*strIt) != ',' || strIt != it->end())
{
if ((*strIt) != ' ')
InputSlotClass += (*strIt);
strIt++;
}
strIt++;
std::string InstanceDataStepRate;
while ((*strIt) != '}' || strIt != it->end())
{
if((*strIt) != ' ')
InstanceDataStepRate += (*strIt);
strIt++;
}
strIt++;
D3D11_INPUT_ELEMENT_DESC element = {
SemanticName.c_str(),
atoi(SemanticIndex.c_str()),
(DXGI_FORMAT)atoi(Format.c_str()),
atoi(InputSlot.c_str()),
atoi(AlignedByteOffset.c_str()),
(D3D11_INPUT_CLASSIFICATION)atoi(InputSlotClass.c_str()),
atoi(InstanceDataStepRate.c_str())
};
desc.push_back(element);
}
inkanus-gray 13.08.2016 15:36 # +17
npocmou_xyu 05.08.2019 00:11 # 0