🔧 Use Cogl.SnippetHook on GNOME 48

This commit is contained in:
Simon Schneegans
2025-02-15 16:55:44 +01:00
parent 7ace136e4f
commit 15ac37f746
+2 -1
View File
@@ -16,6 +16,7 @@
import Gio from 'gi://Gio';
import Shell from 'gi://Shell';
import Cogl from 'gi://Cogl';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
import Meta from 'gi://Meta';
@@ -189,7 +190,7 @@ export var Shader = GObject.registerClass({
const declarations = code.substr(0, match.index);
const main = match[1];
this.add_glsl_snippet(Shell.SnippetHook.FRAGMENT, declarations, main, true);
this.add_glsl_snippet(Cogl.SnippetHook ? Cogl.SnippetHook.FRAGMENT : Shell.SnippetHook.FRAGMENT, declarations, main, true);
}
// We use this vfunc to trigger the update as it allows calling this.get_pipeline() in