NeuralAmpModeler-rs 3.0.2

An opinionated, high-performance Neural Amp Modeler (NAM) client and core implementation in Rust for Linux/PipeWire and CLAP plugins.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2026 Fábio Henrique de Lima Silva (fhl.bsb@gmail.com) All rights reserved.

use super::state::NamPluginWindow;

/// Best-effort GL resource cleanup — `destroy()` checks an internal
/// idempotency flag, so it is safe even when `destroy_gl_resources` was
/// already called in `on_frame`. The GL context may not be current here;
/// without a current context, OpenGL delete operations become no-ops or
/// silently fail (no panics).
impl Drop for NamPluginWindow {
    fn drop(&mut self) {
        self.painter.destroy();
    }
}