diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/AUXILIARY_TEXTURE_INIT.md | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/AUXILIARY_TEXTURE_INIT.md b/doc/AUXILIARY_TEXTURE_INIT.md index e4200d1..d78c5ae 100644 --- a/doc/AUXILIARY_TEXTURE_INIT.md +++ b/doc/AUXILIARY_TEXTURE_INIT.md @@ -153,6 +153,28 @@ All 36 tests pass. Verified: - No artifacts or half-resolution bugs - Window resize works correctly +## Additional Fix Required + +After swapping init/resize order, effects with Renderer3D (FlashCubeEffect, Hybrid3DEffect) crashed when resize() tried to use uninitialized renderer. + +**Solution:** Add `initialized_` flag to track if init() was called. + +```cpp +// In header +bool initialized_ = false; + +// In init() +renderer_.init(ctx_.device, ctx_.queue, ctx_.format); +renderer_.resize(width_, height_); +initialized_ = true; // Mark as initialized + +// In resize() +if (!initialized_) + return; // Early exit if not initialized yet +``` + +**Why not check `ctx_.device`?** Device exists before init() (passed to constructor), but Renderer3D not initialized yet. + ## Related Documentation - `doc/MASKING_SYSTEM.md` - Auxiliary texture usage patterns |
