Home | All Classes | Grouped Classes | Index | Search

# CL_ShaderObject::CL_ShaderObject

Constructs an OpenGL shader.

    	CL_ShaderObject(
    		CL_ShaderType type);

    	CL_ShaderObject(
    		CL_ShaderType type, const std::string& source);

    	CL_ShaderObject(
    		CL_ShaderType type, const std::vector<std::string>& sources);

    	CL_ShaderObject(
    		const std::string& resource_id, CL_ResourceManager* resources);

Parameters:

type
  Shader type. Can be cl_shadertype_vertex or cl_shadertype_fragment.
source
  Shader source code, in OpenGL Shader Language (GLSL).
sources
  Shader source code as list of strings.
resource_id
  Name of shader object resource.
resources
  Resource Manager providing resource.

See also:

CL_Resource | CL_ResourceManager | CL_ShaderObject

Questions or comments, write to the ClanLib mailing list.