pub struct RenderQuality {
pub render_scale: f32,
pub anti_aliasing: AntiAliasing,
}Expand description
Rendering controls, independent of camera and UI coordinates.
Fields§
§render_scale: f32Internal world pixels per native content pixel in each dimension: exactly 1 or 2. 2 means four times the world pixel count, resolved with bilinear filtering.
anti_aliasing: AntiAliasingWorld edge filter. UI is composed afterwards at native resolution.
Implementations§
Source§impl RenderQuality
impl RenderQuality
Sourcepub const MAX_DIMENSION: u32 = 8192
pub const MAX_DIMENSION: u32 = 8192
Maximum width or height of any target; the device limit may be lower.
Sourcepub const MAX_TARGET_BYTES: u64
pub const MAX_TARGET_BYTES: u64
Maximum estimated total allocation, 512 MiB; resize drops old targets first.
Sourcepub fn validate(self, mode: ScaleMode) -> Result<(), QualityError>
pub fn validate(self, mode: ScaleMode) -> Result<(), QualityError>
Checks supported quality/pixel-art combinations without opening a window.
Sourcepub fn plan(
self,
view: &Viewport,
dpi: Vec2,
mode: ScaleMode,
) -> Result<RenderPlan, QualityError>
pub fn plan( self, view: &Viewport, dpi: Vec2, mode: ScaleMode, ) -> Result<RenderPlan, QualityError>
Plans targets from current logical viewport and physical framebuffer DPI. Oversized requests fail explicitly rather than silently lowering quality.
Trait Implementations§
Source§impl Clone for RenderQuality
impl Clone for RenderQuality
impl Copy for RenderQuality
Source§impl Debug for RenderQuality
impl Debug for RenderQuality
Source§impl Default for RenderQuality
impl Default for RenderQuality
Source§impl PartialEq for RenderQuality
impl PartialEq for RenderQuality
impl StructuralPartialEq for RenderQuality
Auto Trait Implementations§
impl Freeze for RenderQuality
impl RefUnwindSafe for RenderQuality
impl Send for RenderQuality
impl Sync for RenderQuality
impl Unpin for RenderQuality
impl UnsafeUnpin for RenderQuality
impl UnwindSafe for RenderQuality
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more