| 128 | } |
| 129 | |
| 130 | ref<Texture> Resource::asTexture() |
| 131 | { |
| 132 | // In the past, Falcor relied on undefined behavior checking `this` for nullptr, returning nullptr if `this` was nullptr. |
| 133 | FALCOR_ASSERT(this); |
| 134 | return ref<Texture>(dynamic_cast<Texture*>(this)); |
| 135 | } |
| 136 | |
| 137 | ref<Buffer> Resource::asBuffer() |
| 138 | { |
no outgoing calls