#ifndef _OF_SHADER
#define _OF_SHADER


#include "ofMain.h"



//		---------------------------------------
// 		very useful info here:
// 		http://www.evl.uic.edu/aej/594/



/*
		// how to get "compiled" ok then use it:
		
		GLint compileStatus;
		glGetObjectParameterivARB( shader, GL_COMPILE_STATUS, &compileStatus );
		glGetObjectParameterivARB( program, GL_INFO_LOG_LENGTH, &infoLogLen );
		infoLog = new GLchar[infoLogLen+1];
		glGetProgramInfoLogARB(program, infoLogLen, NULL, infoLog );
		infoLog[infoLogLen] = '\0';
		fprintf( stderr, "Info Log:\n%s\n", infoLog );	
		
*/

class ofShader{
	
	public:
		
		void 	loadShader(char * shaderName);	
		void 	loadShader(char * fragmentShaderName, char * vertexShaderName);	
		
		void 	unload();
		void 	setShaderActive(bool bActive);
		void 	setUniformVariable (char * name, float value);
		
		GLhandleARB 	vertexShader;
		GLhandleARB 	fragmentShader;
		GLhandleARB 	shader;
		
		bool			bLoaded;
};

#endif	

