projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change shader properties to be vg_msg based
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player_glide.c
diff --git
a/player_glide.c
b/player_glide.c
index df49c37db4babbab573856d929413e4502663191..4a5958e3cc6ad3b12be4e7fc70e22701e6a09b3b 100644
(file)
--- a/
player_glide.c
+++ b/
player_glide.c
@@
-515,7
+515,7
@@
void player_glide_transition(void)
void render_glider_model( vg_camera *cam, world_instance *world,
m4x3f mmdl, enum board_shader shader )
{
void render_glider_model( vg_camera *cam, world_instance *world,
m4x3f mmdl, enum board_shader shader )
{
- u32 current_
tex
= 0xffffffff;
+ u32 current_
mat
= 0xffffffff;
glActiveTexture( GL_TEXTURE0 );
mdl_context *mdl = &player_glide.glider;
glActiveTexture( GL_TEXTURE0 );
mdl_context *mdl = &player_glide.glider;
@@
-550,20
+550,22
@@
void render_glider_model( vg_camera *cam, world_instance *world,
continue;
}
continue;
}
- mdl_material *mat = mdl_arritm( &mdl->materials, sm->material_id-1 );
- if( mat->tex_diffuse != current_tex )
+ if( sm->material_id != current_mat )
{
{
+ mdl_material *mat = mdl_arritm( &mdl->materials,sm->material_id-1 );
GLuint tex = vg.tex_missing;
GLuint tex = vg.tex_missing;
- if( mat->
tex_diffuse
)
+ if( mat->
shader == k_shader_standard
)
{
{
- u32 index = mat->tex_diffuse-1;
+ struct shader_props_standard *props = mat->props.compiled;
+
+ u32 index = props->tex_diffuse-1;
mdl_texture *ptex = mdl_arritm( &mdl->textures, index );
tex = ptex->glname;
}
glBindTexture( GL_TEXTURE_2D, tex );
mdl_texture *ptex = mdl_arritm( &mdl->textures, index );
tex = ptex->glname;
}
glBindTexture( GL_TEXTURE_2D, tex );
- current_
tex = mat->tex_diffuse
;
+ current_
mat = sm->material_id
;
}
mdl_draw_submesh( sm );
}
mdl_draw_submesh( sm );