0.3 Rotate axis

This commit is contained in:
PedroEdiaz
2024-09-06 05:08:07 +06:00
parent 0f387f8a71
commit 6161d310bc
8 changed files with 35 additions and 36 deletions

View File

@@ -11,17 +11,16 @@
unsigned char palette[] =
{
16,
0x90,0x90,0x90,0xff,
0x91,0x91,0x91,0xff,
0x92,0x92,0x92,0xff,
0xff,0x88,0x33,0xff,
0xEB,0xD3,0xF8,0xff,
0xEB,0xD4,0xF8,0xff,
0xEB,0xD5,0xF8,0xff,
0x7A,0x1C,0xAC,0xff,
};
const char * wname = "manigraph: manifold grapher";
int main( void )
{
unsigned char rot[3] = {0,0,0};
unsigned int shader, texture;
void * m_cube, *m_axis;
@@ -31,7 +30,7 @@ int main( void )
goto error_window;
use_window( window );
set_color( 0x33, 0x00, 0x00 );
set_color( 0x2E, 0x07, 0x3F );
if( !( shader = create_shader() ) )
goto error_shader;
@@ -42,10 +41,10 @@ int main( void )
load_fix_matrix( shader, (float)WIDTH/HEIGHT );
if( !( m_cube = create_mesh( cube ) ) )
if( !( m_cube = create_mesh( d_cube ) ) )
goto error_mesh_cube;
if( !( m_axis = create_mesh( axis ) ) )
if( !( m_axis = create_mesh( d_axis ) ) )
goto error_mesh_axis;
texture=create_palette_texture( palette );
@@ -53,10 +52,10 @@ int main( void )
while( is_open_window( window ) )
{
++rot[1];
load_rot_matrix( shader, rot );
float * q;
q=poll_input( window );
load_rot_matrix( shader, q );
draw_color();
load_mdl_matrix( shader, 0, 0 );