X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_render.c;h=8f2521538ca9719b7c83b93dccf3a27553f49e0c;hb=6a6539bcfeb7bd693251f7aae31056671a65c0f0;hp=33724245771fe10b0f07a3a13d5e74ee9e883fbe;hpb=5f34184cad016aa2f8ea530b3be009703459e981;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_render.c b/player_render.c index 3372424..8f25215 100644 --- a/player_render.c +++ b/player_render.c @@ -5,6 +5,7 @@ #include "player_render.h" #include "camera.h" #include "player_model.h" +#include "ent_skateshop.h" #include "shaders/model_character_view.h" #include "shaders/model_board_view.h" @@ -60,6 +61,7 @@ VG_STATIC void player_model_load( struct player_model *mdl, const char *path ) mdl_close( &ctx ); } +/* TODO: allow error handling */ VG_STATIC void player_board_load( struct player_board *mdl, const char *path ) { vg_linear_clear( vg_mem.scratch ); @@ -159,8 +161,7 @@ VG_STATIC void player__pre_render( player_instance *player ) _player_post_animate[ player->subsystem ]( player ); struct player_avatar *av = player->playeravatar; - - struct player_board *board = player->board; + struct player_board *board = player_get_player_board( player ); v3f vp0, vp1; @@ -305,6 +306,7 @@ VG_STATIC void render_board( camera *cam, world_instance *world, shader_model_board_view_uTexSceneDepth( 1 ); render_fb_inverse_ratio( gpipeline.fb_main, inverse ); + inverse[2] = main_camera.farz-main_camera.nearz; shader_model_board_view_uInverseRatioDepth( inverse ); @@ -438,7 +440,7 @@ PLAYER_API void player__render( camera *cam, player_instance *player ) mesh_bind( &player->playermodel->mesh ); mesh_draw( &player->playermodel->mesh ); - struct player_board *board = player->board; + struct player_board *board = player_get_player_board( player ); render_board( cam, world, board, player->playeravatar->sk.final_mtx[ player->playeravatar->id_board],