Struct qt_gui::q_opengl_window::UpdateBehavior
source · pub struct UpdateBehavior(/* private fields */);
Expand description
This enum describes the update strategy of the QOpenGLWindow.
C++ enum: QOpenGLWindow::UpdateBehavior
.
This enum describes the update strategy of the QOpenGLWindow.
Implementations§
source§impl UpdateBehavior
impl UpdateBehavior
sourcepub const NoPartialUpdate: UpdateBehavior = _
pub const NoPartialUpdate: UpdateBehavior = _
Indicates that the entire window surface will redrawn on each update and so no additional framebuffers are needed. This is the setting used in most cases and is equivalent to how drawing directly via QWindow would function. (C++ enum variant: NoPartialUpdate = 0
)
sourcepub const PartialUpdateBlit: UpdateBehavior = _
pub const PartialUpdateBlit: UpdateBehavior = _
Indicates that the drawing performed in paintGL() does not cover the entire window. In this case an extra framebuffer object is created under the hood, and rendering performed in paintGL() will target this framebuffer. This framebuffer is then blitted onto the window surface’s default framebuffer after each paint. This allows having QPainter-based drawing code in paintGL() which only repaints a smaller area at a time, because, unlike NoPartialUpdate, the previous content is preserved. (C++ enum variant: PartialUpdateBlit = 1
)
sourcepub const PartialUpdateBlend: UpdateBehavior = _
pub const PartialUpdateBlend: UpdateBehavior = _
Similar to PartialUpdateBlit, but instead of using framebuffer blits, the contents of the extra framebuffer is rendered by drawing a textured quad with blending enabled. This, unlike PartialUpdateBlit, allows alpha blended content and works even when the glBlitFramebuffer is not available. Performance-wise this setting is likely to be somewhat slower than PartialUpdateBlit. (C++ enum variant: PartialUpdateBlend = 2
)
Trait Implementations§
source§impl Clone for UpdateBehavior
impl Clone for UpdateBehavior
source§fn clone(&self) -> UpdateBehavior
fn clone(&self) -> UpdateBehavior
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for UpdateBehavior
impl Debug for UpdateBehavior
source§impl From<UpdateBehavior> for c_int
impl From<UpdateBehavior> for c_int
source§fn from(value: UpdateBehavior) -> Self
fn from(value: UpdateBehavior) -> Self
source§impl From<i32> for UpdateBehavior
impl From<i32> for UpdateBehavior
source§impl PartialEq for UpdateBehavior
impl PartialEq for UpdateBehavior
source§fn eq(&self, other: &UpdateBehavior) -> bool
fn eq(&self, other: &UpdateBehavior) -> bool
self
and other
values to be equal, and is used
by ==
.