
#ifndef __SHADER_H__
#define __SHADER_H__

#include <common.h>

/** 
 * loads a shader from a textfile
 *
 * @param fn: Filename
 */
void loadShader(const std::string& fn);

/**
 * loads and binds an ARB_vertex_program
 *
 * @param fn: Filename
 */
void loadVertexProgram(const std::string fn);

/**
 * loads and binds an ARB_fragment_program
 *
 * @param fn: Filename
 */
void loadFragmentProgram(const std::string fn);

/**
 * loads and binds an ARB_vertex_shader
 *
 * @param fn: Filename
 */
void loadVertexShader(const std::string fn);


/**
 * loads and binds an ARB_fragment_shader
 *
 * @param fn: Filename
 */
void loadFragmentShader(const std::string fn);

/**
 * prints the info log for an ARB-Handle
 *
 * @param obj: ARB-Handle to print log for
 */
void printInfoLog(GLhandleARB obj);

/**
 * links shader and vertex programs to a program handle
 * and prints infologs
 */
void linkShaders();

/**
 * binds and enables loaded shaders
 */
void bindShaders();

/**
 * deletes loaded shaders
 */
void delShaders();

/**
 * sends time information to the shaders
 */
void sendTime();

#endif //ifdef
