X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_render.h;h=f25f68b6ffc8794226fc78a59321dbe29b9012e8;hb=eb28dee29482c7ffe8bc0203d302e3ee6dbfd943;hp=f6c8194373c0d0abfc8b44f7881babef9225fbfd;hpb=342fcbf6fda017bdd38d56ce0fa7c9e59e589f3b;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_render.h b/player_render.h index f6c8194..f25f68b 100644 --- a/player_render.h +++ b/player_render.h @@ -26,12 +26,6 @@ struct player_avatar id_board; }; -struct player_model -{ - glmesh mesh; - GLuint texture; -}; - enum eboard_truck{ k_board_truck_back = 0, k_board_truck_front = 1 @@ -44,10 +38,15 @@ enum eboard_wheel{ k_board_wheel_br = 3, }; -struct player_board -{ +/* TODO: Fully featured dynamic models + * This is FAR from the final system we want at all, but it will do for now */ +struct dynamic_model_1texture{ glmesh mesh; GLuint texture; +}; + +struct player_board{ + struct dynamic_model_1texture mdl; v4f wheel_positions[4], truck_positions[2], @@ -58,15 +57,37 @@ struct player_board board; }; +struct player_model{ + struct dynamic_model_1texture mdl; +}; + enum board_shader{ k_board_shader_player, k_board_shader_entity }; -VG_STATIC void player_board_load( struct player_board *mdl, const char *path ); -VG_STATIC void player_board_unload( struct player_board *mdl ); -VG_STATIC void render_board( camera *cam, world_instance *world, +static void dynamic_model_load( mdl_context *ctx, + struct dynamic_model_1texture *mdl, + const char *path ); +static void dynamic_model_unload( struct dynamic_model_1texture *mdl ); + +static void player_board_load( struct player_board *mdl, const char *path ); +static void player_board_unload( struct player_board *mdl ); + +static void player_model_load( struct player_model *board, const char *path); +static void player_model_unload( struct player_model *board ); + +static void render_board( camera *cam, world_instance *world, struct player_board *board, m4x3f root, + struct player_board_pose *pose, enum board_shader shader ); +static void render_playermodel( camera *cam, world_instance *world, + int depth_compare, + struct player_model *model, + struct skeleton *skeleton, + m4x3f *final_mtx ); +static void apply_full_skeleton_pose( struct skeleton *sk, player_pose *pose, + m4x3f *final_mtx ); + #endif /* PLAYER_RENDER_H */