| 48 | TypedShaderVarOffset::TypedShaderVarOffset(const ReflectionType* pType, ShaderVarOffset offset) : ShaderVarOffset(offset), mpType(pType) {} |
| 49 | |
| 50 | TypedShaderVarOffset TypedShaderVarOffset::operator[](std::string_view name) const |
| 51 | { |
| 52 | if (!isValid()) |
| 53 | return *this; |
| 54 | |
| 55 | auto pType = getType(); |
| 56 | |
| 57 | if (auto pStructType = pType->asStructType()) |
| 58 | { |
| 59 | if (auto pMember = pStructType->findMember(name)) |
| 60 | { |
| 61 | return TypedShaderVarOffset(pMember->getType(), (*this) + pMember->getBindLocation()); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | FALCOR_THROW("No member named '{}' found.", name); |
| 66 | } |
| 67 | |
| 68 | TypedShaderVarOffset TypedShaderVarOffset::operator[](size_t index) const |
| 69 | { |
nothing calls this directly
no test coverage detected