Clear draw queue instead of failing if rendering skipped.

PiperOrigin-RevId: 923420183
Change-Id: I34aac76810a7bf0e4a0394ebe27b45a8fc32f110
This commit is contained in:
Haroon Qureshi
2026-05-29 08:08:47 -07:00
committed by Copybara-Service
parent 8eaf174a88
commit f63b92da5e
@@ -237,11 +237,7 @@ void Renderable::Prepare(std::span<const mjrRenderRequest*> requests) {
// We assume BindMaterialInstance will be called with the same requests in
// the same order. As such, we'll just store the draw state in a deque rather
// than trying to perform any kind of matching with the requests.
if (!draw_queue_.empty()) {
mju_error(
"Expected all previous draw calls to be bound before preparing new "
"draw calls.");
}
draw_queue_.clear();
curr_state_ = DrawState();
int num_reflections = 0;