| 37 | } |
| 38 | |
| 39 | void UpdateState(ref_ptr<GraphicsContext> context) override |
| 40 | { |
| 41 | // Create texture before first uploading. |
| 42 | if (!m_isInitialized) |
| 43 | { |
| 44 | std::vector<uint8_t> initData(m_params.m_width * m_params.m_height * GetBytesPerPixel(m_params.m_format), 0); |
| 45 | Create(context, m_params, initData.data()); |
| 46 | m_isInitialized = true; |
| 47 | } |
| 48 | |
| 49 | ASSERT(m_indexer != nullptr, ()); |
| 50 | Bind(context); |
| 51 | m_indexer->UploadResources(context, make_ref(this)); |
| 52 | } |
| 53 | |
| 54 | TextureFormat GetFormat() const override { return m_params.m_format; } |
| 55 |
nothing calls this directly
no test coverage detected