/* 
 * This file is automaticaly generated, Please dont edit this file! 
 */
#include <engine/renderPasses/renderPassCompute2.h> 























void compute2_prepare( compute2 * this ) {

		printf("\n\n\n		Prepare renderPass Compute 2\n\n\n\n\n");

		shader * computeShader = shader_newPointer( GL_COMPUTE_SHADER );

		shader_loadFromFile( computeShader,  "assets/shaders/addition2.comp" );


		this->program 			= program_newPointer();

		program_addShader( this->program,  computeShader );

		program_create( this->program );

	}

void compute2_render( compute2 * this ) {

		if( this->active ) {

			program_use( this->program );

			program_bindBlock( this->program,  "outputBlock2" );
			

			glDispatchCompute( 1, 1, 1 );


			block * outputBlock			= program_getBlock( this->program,  "outputBlock2" );

			vector_vector2 * output	= block_getMemberArray( outputBlock,  "array_d[0]" );

			int count					= vector_vector2_length( output );

			for (int i = 0; i < count; ++i)
			{

				vector2 currentVector = vector_vector2_get( output,  i );

				printf("%i  = %f %f \n", i, i, currentVector.x, currentVector.y );

			}

			printf("length:	%i\n\n", count);
		
			this->active = false;

		}

	}

compute2 compute2_new() {

	compute2 instance;

	instance.active =  true;

	return instance;

}

compute2 * compute2_newPointer() {

	struct compute2 * pointer = malloc( sizeof ( struct compute2 ) );

	pointer->active =  true;

	return pointer;

}

