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

























char * tesselation_textFromNumber( tesselation * this, int i ) {

		char * fileName = malloc( sizeof( char ) * 100 );

		sprintf( fileName, "%d", i );

		return fileName;

	}

void tesselation_prepare( tesselation * this ) {

		shader * vertexShader = shader_newPointer( GL_VERTEX_SHADER );

		shader_loadFromFile( vertexShader,  "assets/shaders/quadScale.vertex" );


		shader * fragmentShader = shader_newPointer( GL_FRAGMENT_SHADER );

		shader_loadFromFile( fragmentShader,  "assets/shaders/color.fragment" );


		shader * geometryShader = shader_newPointer( GL_GEOMETRY_SHADER );

		shader_loadFromFile( geometryShader,  "assets/shaders/tesselation.geometry.shader" );


		shader * tesselationControlShader = shader_newPointer( GL_TESS_CONTROL_SHADER );

		shader_loadFromFile( tesselationControlShader,  "assets/shaders/tesselation.triangle.tsc.shader" );


		shader * tesselationEvaluationShader = shader_newPointer( GL_TESS_EVALUATION_SHADER );

		shader_loadFromFile( tesselationEvaluationShader,  "assets/shaders/tesselation.triangle.shader" );



		this->program 	= program_newPointer();

		program_addShader( this->program,  vertexShader );

		program_addShader( this->program,  fragmentShader );









		program_create( this->program );




		this->mesh = mesh_newPointer();

		mesh_setProgram( this->mesh,  this->program );

		mesh_createBuffers( this->mesh );


		glUseProgram( this->program->glProgram );


	}

void tesselation_render( tesselation * this ) {

		glUseProgram( this->program->glProgram );

		glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

		int numItems	= 12;

		

		glBindVertexArray( this->mesh->vertexArrayObject );




		glDrawElements( GL_LINE_STRIP, numItems, GL_UNSIGNED_INT, ( void * ) 0 ); 

	}

tesselation tesselation_new() {

	tesselation instance;

	instance.font = fontRenderer_newPointer();

	return instance;

}

tesselation * tesselation_newPointer() {

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

	pointer->font = fontRenderer_newPointer();

	return pointer;

}

