Skip to content

Expose Cogl's Snippet API

As described in #2280 (closed), Cogl's Snippet API is currently not available in GJS. This MR adds some introspection annotations to make it available.

Disclaimer: This is the first time I mess around with this stuff, so I may have overseen important things! Please tell me what I may have missed.

  • I added the annotations (transfer full) and (transfer none) according to some educated guesses. They may be wrong.
  • Maybe there are other annotations required?
  • Are there any tests of the GJS API which could be extended to cover this new API?

However, I have successfully used this new API in the Desktop Cube Extension to draw the 360° background panorama. At least for this use case (which involved a vertex and a fragment snippet hook) it worked well.

Merge request reports