Shader
Object Hierarchy:
Description:
[ CCode ( type_id = "clutter_shader_get_type ()" ) ]
[ Version ( deprecated = true , deprecated_since = "1.8" , since = "0.6" ) ]
public class Shader : Object
Warning: Shader is deprecated since 1.8.
The Shader structure contains only private data and should be accessed using the provided API
Content:
Properties:
- public bool compiled { get; }
Whether the shader is compiled and linked, ready for use in the GL
context.
- public bool enabled { get; set; }
Whether the shader is currently used in the GL rendering pipeline.
- public string fragment_source { owned get; set; }
GLSL source code for the fragment shader part of the shader program.
- public string vertex_source { owned get; set; }
GLSL source code for the vertex shader part of the shader program, if
any
Creation methods:
Methods:
- public bool compile () throws Error
Compiles and links GLSL sources set for vertex and fragment shaders
for a Shader.
- public unowned Handle get_cogl_fragment_shader ()
Retrieves the underlying VertexBufferIndices
for the fragment shader.
- public unowned Handle get_cogl_program ()
Retrieves the underlying VertexBufferIndices
for the shader program.
- public unowned Handle get_cogl_vertex_shader ()
Retrieves the underlying VertexBufferIndices
for the vertex shader.
- public unowned string get_fragment_source ()
Query the current GLSL fragment source set on
this.
- public bool get_is_enabled ()
Checks whether this is enabled.
- public unowned string get_vertex_source ()
Query the current GLSL vertex source set on
this.
- public bool is_compiled ()
Checks whether this is is currently
compiled, linked and bound to the GL context.
- public void release ()
Frees up any GL context resources held by the shader.
- public void set_fragment_source (string data, ssize_t length)
Sets the GLSL source code to be used by a Shader
for the fragment program.
- public void set_is_enabled (bool enabled)
Enables a shader.
- public void set_uniform (string name, Value value)
Sets a user configurable variable in the GLSL shader programs attached
to a Shader.
- public void set_vertex_source (string data, ssize_t length)
Sets the GLSL source code to be used by a Shader
for the vertex program.
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref