Skip to content

im trying to zoom in and out the desktop would like some helps thanks #43

Closed Answered by ehopperdietzel
okcomput3 asked this question in Support
Discussion options

You must be logged in to vote

It could be slow for two reasons:

  1. You're creating a scaled copy of the wallpaper texture each time LOutput::resizeGL() is called, just like the tutorial, which is slow but produces higher quality scaling. Instead, you could keep the texture intact and use LTextureView::setSrcRect() and LTextureView::setDstSize() to crop and scale the wallpaper view as desired without any performance penalty.

  2. Louvre uses oversampling by default when using fractional scales, which means it destroys and creates a new framebuffer each time you change the scale. You could disable it while doing the animation with LOutput::enableFractionalOversampling(). This way, everything is scaled and rendered directly …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@okcomput3
Comment options

Answer selected by ehopperdietzel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants