🔧 Set uniforms only once

This commit is contained in:
Simon Schneegans
2022-05-01 13:25:37 +02:00
parent c0b1115b23
commit fa9941ce5b
4 changed files with 10 additions and 8 deletions
+2 -1
View File
@@ -224,6 +224,8 @@ if (utils.isInShellProcess()) {
}
}
`);
this.set_uniform_value('uDustTexture', 1);
};
// This is overridden to bind the dust texture for drawing. Sadly, this seems to be
@@ -236,7 +238,6 @@ if (utils.isInShellProcess()) {
Cogl.PipelineFilter.LINEAR);
pipeline.set_layer_texture(1, this._dustTexture.get_texture());
pipeline.set_layer_wrap_mode(1, Cogl.PipelineWrapMode.REPEAT);
this.set_uniform_value('uDustTexture', 1);
super.vfunc_paint_target(node, paint_context);
}
});