+PLAYER_API void player__render( camera *cam, player_instance *player )
+{
+ shader_model_character_view_use();
+
+ glActiveTexture( GL_TEXTURE0 );
+ glBindTexture( GL_TEXTURE_2D, player->playermodel->texture );
+ shader_model_character_view_uTexMain( 0 );
+ shader_model_character_view_uCamera( cam->transform[3] );
+ shader_model_character_view_uPv( cam->mtx.pv );
+ shader_model_character_view_uTexSceneDepth( 1 );
+ render_fb_bind_texture( gpipeline.fb_main, 2, 1 );
+ v3f inverse;
+ render_fb_inverse_ratio( gpipeline.fb_main, inverse );
+ inverse[2] = main_camera.farz-main_camera.nearz;
+
+ shader_model_character_view_uInverseRatioDepth( inverse );
+ render_fb_inverse_ratio( NULL, inverse );
+ inverse[2] = cam->farz-cam->nearz;
+ shader_model_character_view_uInverseRatioMain( inverse );
+
+ world_instance *world = world_current_instance();
+ world_link_lighting_ub( world, _shader_model_character_view.id );
+ world_bind_position_texture( world, _shader_model_character_view.id,
+ _uniform_model_character_view_g_world_depth, 2 );
+ world_bind_light_array( world, _shader_model_character_view.id,
+ _uniform_model_character_view_uLightsArray, 3 );
+ world_bind_light_index( world, _shader_model_character_view.id,
+ _uniform_model_character_view_uLightsIndex, 4 );
+
+ glUniformMatrix4x3fv( _uniform_model_character_view_uTransforms,
+ player->playeravatar->sk.bone_count,
+ 0,
+ (float *)player->playeravatar->sk.final_mtx );
+
+ mesh_bind( &player->playermodel->mesh );
+ mesh_draw( &player->playermodel->mesh );
+
+ struct player_board *board = player_get_player_board( player );
+
+ render_board( cam, world, board, player->playeravatar->sk.final_mtx[
+ player->playeravatar->id_board],
+ k_board_shader_player );
+}
+