video.glshader - ICE 0.1 API documentation

ICE 0.1 API documentation

# video.glshader

OpenGL shader.

struct GLShader;

  OpenGL (GLSL only right now) shader.

  this(string name, VFSDir shaderDir);

    Construct (load) a shader.

    Parameters:

    string name | File name of the shader in the "shaders/" subdirectory.
    VFSDir shaderDir | Shader data directory.

    Throws:
    ShaderException if the shader could not be loaded or was invalid.
  void start();

    Use this shader in following drawing commands.

  const GLint getAttribute(const string name);

    Get a handle to vertex attribute with specified name in the shader.

    Parameters:

    string name | Name of the attribute.

    Returns:
    Handle to the attribute or -1 if not found in the shader.
  const GLint getUniform(const string name);

    Get a handle to uniform variable with specified name in the shader.

    Parameters:

    string name | Name of the uniform.

    Returns:
    Handle to the uniform or -1 if not found in the shader.

Copyright © Ferdinand Majerech 2011. | Page generated by AutoDDoc and Ddoc.