GLProgram

OpenGL Program wrapper.

Constructors

this
this(OpenGL gl)

Creates an empty program.

this
this(OpenGL gl, GLShader[] shaders...)

Creates a program from a set of compiled shaders.

this
this(OpenGL gl, string source)

Compiles N times the same GLSL source and link to a program.

Destructor

~this
~this()

Delete the GL program. Must be destroyed by the user.

Members

Functions

attach
void attach(GLShader[] compiledShaders...)

Attaches OpenGL shaders to this program.

attrib
GLAttribute attrib(string name)

Gets an attribute by name.

close
void close()

Releases the OpenGL program resource.

getLinkLog
string getLinkLog()

Gets the linking report.

handle
GLuint handle()
hasAttrib
bool hasAttrib(string name)

Determine if the program has an attribute with specified name

inUse
bool inUse()

Is the program currently being used for drawing?

link
void link()

Links this OpenGL program.

uniform
GLUniform uniform(string name)

Gets a uniform by name.

unuse
void unuse()

Unuses this program.

use
void use()

Uses this program for following draw calls.

Meta