Method

GskGLShadercompile

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.

Parameters

renderer GskRenderer
 

A GskRenderer

 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE on success, FALSE if an error occurred.