Fix: rotations on R4

This commit is contained in:
PedroEdiaz
2024-11-28 16:23:39 -06:00
parent 1e009d5bdf
commit 6c7c22ce50
5 changed files with 21 additions and 19 deletions

View File

@@ -58,26 +58,29 @@ void main_loop(void)
{
static float angle = 0;
if( animate_index )
{
angle+=0.01;
load_uint_to_shader( shader, "i", animate_index-1 );
load_uint_to_shader( shader_plain, "i", animate_index-1 );
load_float_to_shader( shader, "angle", angle);
load_float_to_shader( shader_plain, "angle", angle);
}
if( angle > M_PI/2 && angle )
if( angle > M_PI/2 )
{
animate_index=0;
angle = 0;
load_float_to_shader( shader, "angle", angle);
load_float_to_shader( shader_plain, "angle", angle);
set_projection_mesh( projection );
}
if( animate_index )
{
load_uint_to_shader( shader, "i", animate_index-1 );
load_uint_to_shader( shader_plain, "i", animate_index-1 );
angle+=0.01;
load_float_to_shader( shader, "angle", angle);
load_float_to_shader( shader_plain, "angle", angle);
}
}
clean_context();
#ifndef DEBUG
@@ -166,7 +169,6 @@ int main(void)
projection.m = m;
projection.mesh = m_surface;
set_projection_mesh( projection );