y4my4my4m / kde-shader-wallpaper

KDE / Plasma - Shader Wallpaper plugin
GNU General Public License v3.0
247 stars 13 forks source link

FPS counter is inefficient #7

Open davidedmundson opened 4 years ago

davidedmundson commented 4 years ago

You don't need to rotate a hidden object, you can access some signals from the attached window object

import QtQuick.Window 2.12 Window.window.onFrameSwapped: fps++

y4my4my4m commented 4 years ago

@davidedmundson thank you! I didn't know about this.

Can I use this as well to access the parented wallpaper shader from config.qml?

davidedmundson commented 4 years ago

Can I use this as well to access the parented wallpaper shader from config.qml?

I don't think I understand. Which object do you want to access from the config?

y4my4my4m commented 4 years ago

@davidedmundson From config.qml I want to access the TShaderToy (id=toy) used by the Item (id=main) on main.qml

y4my4my4m commented 4 years ago

Nevermind that, got it to work.

I'll improve the FPS counter now.

y4my4my4m commented 4 years ago

@davidedmundson

Turns out, kde's wallpaper app doesn't seem to use Window so I cant reference it...any idea?

y4my4my4m commented 3 years ago

Perhaps accessible using shader.parent.parent.parent