more refactors..
[carveJwlIkooP6JGAAIwe30JlM.git] / player_render.h
1 #ifndef PLAYER_RENDER_H
2 #define PLAYER_RENDER_H
3
4 #include "model.h"
5 #include "skeleton.h"
6 #include "camera.h"
7 #include "world.h"
8
9 struct player_avatar
10 {
11 mdl_context meta;
12 struct skeleton sk;
13
14 u32 id_hip,
15 id_ik_hand_l,
16 id_ik_hand_r,
17 id_ik_elbow_l,
18 id_ik_elbow_r,
19 id_head,
20 id_ik_foot_l,
21 id_ik_foot_r,
22 id_ik_knee_l,
23 id_ik_knee_r,
24 id_wheel_l,
25 id_wheel_r,
26 id_board;
27 };
28
29 enum eboard_truck{
30 k_board_truck_back = 0,
31 k_board_truck_front = 1
32 };
33
34 enum eboard_wheel{
35 k_board_wheel_fl = 0,
36 k_board_wheel_fr = 1,
37 k_board_wheel_bl = 2,
38 k_board_wheel_br = 3,
39 };
40
41 struct player_board{
42 mdl_context model;
43
44 glmesh mesh;
45 GLuint texture;
46
47 v4f wheel_positions[4],
48 truck_positions[2],
49 board_position;
50
51 mdl_submesh wheels[4],
52 trucks[2],
53 board;
54 };
55
56 struct player_model{
57 glmesh mesh;
58 GLuint texture;
59 };
60
61 enum board_shader{
62 k_board_shader_player,
63 k_board_shader_entity
64 };
65
66 VG_STATIC void player_board_load( struct player_board *mdl, const char *path );
67 VG_STATIC void player_board_unload( struct player_board *mdl );
68 VG_STATIC void render_board( camera *cam, world_instance *world,
69 struct player_board *board, m4x3f root,
70 enum board_shader shader );
71
72 #endif /* PLAYER_RENDER_H */