diff options
Diffstat (limited to 'src/effects/rotating_cube_effect.cc')
| -rw-r--r-- | src/effects/rotating_cube_effect.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/effects/rotating_cube_effect.cc b/src/effects/rotating_cube_effect.cc index e7ed52e..4bd79fe 100644 --- a/src/effects/rotating_cube_effect.cc +++ b/src/effects/rotating_cube_effect.cc @@ -1,6 +1,7 @@ // This file is part of the 64k demo project. // It implements RotatingCubeEffect (simplified v2 port). +#include "util/fatal_error.h" #include "effects/rotating_cube_effect.h" #include "gpu/bind_group_builder.h" #include "gpu/gpu.h" @@ -10,10 +11,8 @@ RotatingCubeEffect::RotatingCubeEffect(const GpuContext& ctx, const std::vector<std::string>& inputs, const std::vector<std::string>& outputs) : Effect(ctx, inputs, outputs), depth_node_(outputs[0] + "_depth") { - // Headless mode: skip GPU resource creation - if (ctx_.device == nullptr) { - return; - } + // Headless mode: skip GPU resource creation (compiled out in STRIP_ALL) + HEADLESS_RETURN_IF_NULL(ctx_.device); // Create uniform buffers uniform_buffer_ = |
