Method

GskGLShadercompile

deprecated: 4.16 

Declaration [src]

gboolean
gsk_gl_shader_compile (
  GskGLShader* shader,
  GskRenderer* renderer,
  GError** error
)

Description [src]

Tries to compile the shader for the given renderer.

If there is a problem, this function returns FALSE and reports an error. You should use this function before relying on the shader for rendering and use a fallback with a simpler shader or without shaders if it fails.

Note that this will modify the rendering state (for example change the current GL context) and requires the renderer to be set up. This means that the widget has to be realized. Commonly you want to call this from the realize signal of a widget, or during widget snapshot.

Deprecated since: 4.16

GTK’s new Vulkan-focused rendering does not support this feature. Use GtkGLArea for OpenGL rendering.

Parameters

renderer

Type: GskRenderer

A GskRenderer.

The data is owned by the caller of the method.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE on success, FALSE if an error occurred.