Merge: alan -> main

This commit is contained in:
PedroEdiaz
2024-10-18 17:06:19 -06:00
parent 0552616bf9
commit 6e54aa9fea
4 changed files with 105 additions and 3 deletions

View File

@@ -1,9 +1,10 @@
#include "main.h"
#include "data/cube.h"
#include "data/axis.h"
#include "data/shaders.h"
#include <stdlib.h>
#include <GL/glew.h>
#include <stdlib.h>
#include <cglm/vec3.h>
#define WIDTH 512
@@ -49,6 +50,7 @@ float * fill_normal( float * d )
}
const char * wname = "manigraph: manifold grapher";
float * generate_surface();
int main( void )
{
@@ -82,11 +84,13 @@ int main( void )
/* Fill m_cube */
{
float * n_cube;
float * n_cube, *d_cube;
d_cube = generate_surface(16);
n_cube = fill_normal( d_cube );
if( !( m_cube = create_mesh( d_cube, n_cube, coordanate ) ) )
goto error_mesh_cube;
free( n_cube );
free( d_cube);
}
/* Fill m_axis */
@@ -116,8 +120,10 @@ int main( void )
load_mdl_matrix( shader_plain, 2, 2 );
draw_mesh( m_axis );
#endif
load_mdl_matrix( shader, 0, 3 );
draw_mesh( m_cube );
}
destroy_mesh( m_axis );