#[cfg(all(
feature = "wgpu-27",
any(feature = "wgpu-28", feature = "wgpu-29", feature = "wgpu-30")
))]
compile_error!(
"Features `wgpu-27`, `wgpu-28`, `wgpu-29`, and `wgpu-30` are mutually exclusive; enable only one."
);
#[cfg(all(feature = "wgpu-28", any(feature = "wgpu-29", feature = "wgpu-30")))]
compile_error!(
"Features `wgpu-27`, `wgpu-28`, `wgpu-29`, and `wgpu-30` are mutually exclusive; enable only one."
);
#[cfg(all(feature = "wgpu-29", feature = "wgpu-30"))]
compile_error!(
"Features `wgpu-27`, `wgpu-28`, `wgpu-29`, and `wgpu-30` are mutually exclusive; enable only one."
);
#[cfg(not(any(
feature = "wgpu-27",
feature = "wgpu-28",
feature = "wgpu-29",
feature = "wgpu-30"
)))]
compile_error!(
"Either feature `wgpu-27`, `wgpu-28`, `wgpu-29`, or `wgpu-30` must be enabled for dear-imgui-wgpu."
);
#[cfg(all(feature = "wgpu-27", feature = "webgl"))]
compile_error!(
"Feature `webgl` selects the wgpu-30 WebGL route; use `webgl-wgpu27` with `wgpu-27`."
);
#[cfg(all(feature = "wgpu-27", feature = "webgpu"))]
compile_error!(
"Feature `webgpu` selects the wgpu-30 WebGPU route; use `webgpu-wgpu27` with `wgpu-27`."
);
#[cfg(all(feature = "wgpu-28", feature = "webgl"))]
compile_error!(
"Feature `webgl` selects the wgpu-30 WebGL route; use `webgl-wgpu28` with `wgpu-28`."
);
#[cfg(all(feature = "wgpu-28", feature = "webgpu"))]
compile_error!(
"Feature `webgpu` selects the wgpu-30 WebGPU route; use `webgpu-wgpu28` with `wgpu-28`."
);
#[cfg(all(feature = "wgpu-29", feature = "webgl"))]
compile_error!(
"Feature `webgl` selects the wgpu-30 WebGL route; use `webgl-wgpu29` with `wgpu-29`."
);
#[cfg(all(feature = "wgpu-29", feature = "webgpu"))]
compile_error!(
"Feature `webgpu` selects the wgpu-30 WebGPU route; use `webgpu-wgpu29` with `wgpu-29`."
);
#[cfg(all(feature = "wgpu-28", feature = "webgl-wgpu27"))]
compile_error!(
"Feature `webgl-wgpu27` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-28", feature = "webgpu-wgpu27"))]
compile_error!(
"Feature `webgpu-wgpu27` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgl-wgpu28"))]
compile_error!(
"Feature `webgl-wgpu28` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgpu-wgpu28"))]
compile_error!(
"Feature `webgpu-wgpu28` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgl-wgpu27"))]
compile_error!(
"Feature `webgl-wgpu27` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgpu-wgpu27"))]
compile_error!(
"Feature `webgpu-wgpu27` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgl-wgpu28"))]
compile_error!(
"Feature `webgl-wgpu28` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgpu-wgpu28"))]
compile_error!(
"Feature `webgpu-wgpu28` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgl-wgpu27"))]
compile_error!(
"Feature `webgl-wgpu27` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgpu-wgpu27"))]
compile_error!(
"Feature `webgpu-wgpu27` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgl-wgpu28"))]
compile_error!(
"Feature `webgl-wgpu28` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgpu-wgpu28"))]
compile_error!(
"Feature `webgpu-wgpu28` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgl-wgpu29"))]
compile_error!(
"Feature `webgl-wgpu29` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-30", feature = "webgpu-wgpu29"))]
compile_error!(
"Feature `webgpu-wgpu29` is incompatible with `wgpu-30` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgl-wgpu29"))]
compile_error!(
"Feature `webgl-wgpu29` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgpu-wgpu29"))]
compile_error!(
"Feature `webgpu-wgpu29` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-28", feature = "webgl-wgpu29"))]
compile_error!(
"Feature `webgl-wgpu29` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-28", feature = "webgpu-wgpu29"))]
compile_error!(
"Feature `webgpu-wgpu29` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgl-wgpu30"))]
compile_error!(
"Feature `webgl-wgpu30` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-27", feature = "webgpu-wgpu30"))]
compile_error!(
"Feature `webgpu-wgpu30` is incompatible with `wgpu-27` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-28", feature = "webgl-wgpu30"))]
compile_error!(
"Feature `webgl-wgpu30` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-28", feature = "webgpu-wgpu30"))]
compile_error!(
"Feature `webgpu-wgpu30` is incompatible with `wgpu-28` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgl-wgpu30"))]
compile_error!(
"Feature `webgl-wgpu30` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(all(feature = "wgpu-29", feature = "webgpu-wgpu30"))]
compile_error!(
"Feature `webgpu-wgpu30` is incompatible with `wgpu-29` (would pull multiple wgpu majors)."
);
#[cfg(feature = "wgpu-27")]
pub extern crate wgpu27 as wgpu;
#[cfg(feature = "wgpu-28")]
pub extern crate wgpu28 as wgpu;
#[cfg(feature = "wgpu-29")]
pub extern crate wgpu29 as wgpu;
#[cfg(feature = "wgpu-30")]
pub extern crate wgpu30 as wgpu;
mod data;
mod error;
mod frame_resources;
mod render_resources;
mod renderer;
mod shaders;
mod texture;
mod uniforms;
#[cfg(doctest)]
mod removed_public_contracts {
struct TwoPhaseRendererInitialization;
struct ManualFramePreparation;
struct RendererInternals;
struct PerTextureSamplers;
}
pub use data::{
WgpuInitInfo, WgpuRenderState, WgpuRenderStateAccessError, WgpuViewportSurfaceConfig,
};
pub use error::{RendererError, RendererResult};
pub use renderer::{FramebufferExtent, WgpuRenderer};
pub use texture::ExternalTextureId;
pub(crate) use data::{WgpuBackendData, WgpuRenderStateStorage};
pub(crate) use frame_resources::{FrameResourceArena, FrameResources};
pub(crate) use render_resources::RenderResources;
pub(crate) use shaders::ShaderManager;
pub(crate) use texture::WgpuTextureManager;
pub(crate) use uniforms::{UniformBuffer, Uniforms};
#[cfg(feature = "multi-viewport-winit")]
pub use renderer::multi_viewport;
#[cfg(feature = "multi-viewport-sdl3")]
pub use renderer::multi_viewport_sdl3;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum GammaMode {
Auto,
Linear,
Gamma22,
}