#ifndef GPUCOMPUTING_H
#define GPUCOMPUTING_H

#include "./../../lib/GLee/GLee.h"	
#include <GL/wglext.h>
#include <GL/glext.h>

#include <windows.h>
#include <cassert>


#include "./openGlSupport/FBO.h"
#include "./cgSupport/ShaderComposer.h"
#include "./cgSupport/CgShaderManager.h"
#include "./openGlSupport/OpenGLwrapper.h"
#include "./texture/TextureSupport.h"
#include <vector>
using namespace std;



const string GPU_COMPUTING_VERTEX_PROGRAM
	("																																								\
	void transformToWaveletVs(float4 position : POSITION,  float2 texCoord0 : TEXCOORD0, out float4 oPosition : POSITION, out float2 oTexCoord0 : TEXCOORD0)		\
	{																																								\
		oPosition	= 	position;																																	\
		oTexCoord0	=	texCoord0;																																	\
	}																																								\
	");

const string GPU_COMPUTING_VERTEX_PROGRAM_ENTRY
	("							\
		transformToWaveletVs	\
	");

CGprogram loadShaderComputingVS( ShaderManager& dstShaderManager );


void prepareGPUcomputationTexture( unsigned int sizeX, unsigned int sizeY, unsigned int chanelCount, Texture<float> &dstFBOtexture);



struct FragmentParam
{
	string paramName;
	vector<float> values;
   FragmentParam(const string& name, const vector<float> value) {
      this->paramName = name; 
      this->values = value;
   }
   FragmentParam() {

   }
};

struct FragmentData
{
	vector<FragmentParam> paramContainer;
	vector<unsigned int> textureContainer;
};

class ShaderComputing
{
private:
	CGprogram vertexShader;

public:

	ShaderComposer fragmentShaderComposer;
	ShaderComputing( CGprogram vertexShader, ShaderComposer fragmentShaderComposer );
	void run( FBO  &fbo, FragmentData &fragmentData );

};

#endif