Shader

Abstraction over shader

Constructors

this
this(string name, Type type, uint id, bool created, bool source_set, bool compiled, bool all_ok)

Intialize shader with values.

Members

Enums

Type
enum Type
Undocumented in source.

Functions

compile
GLResult!void compile()

compile shader and check whether compilation is successful

compile_f
GLResult!void compile_f(string file_name)

Same as Shader.compile except this function can throw

compile_src
GLResult!void compile_src(string src)

compile shader and check whether compilation is successful

set_source
GLResult!void set_source(string src)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

id
uint id [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
is_compiled
bool is_compiled [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
is_created
bool is_created [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
is_source_set
bool is_source_set [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
type
Type type [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

create_shader
GLResult!Shader create_shader(string name, Type type)

Create OpenGL shader

from_file
GLResult!Shader from_file(string name, Type type, string file_name)
Undocumented in source. Be warned that the author may not have intended to support it.
from_src
GLResult!Shader from_src(string name, Type type, string src)

Create OpenGL shader and call gl_shader_source to set source in shader object

Meta