- glBindTexture( GL_TEXTURE_2D, menu.textures[ mat->tex_diffuse ] );
- current_tex = mat->tex_diffuse;
+
+ if( mat->shader == k_shader_standard )
+ {
+ struct shader_props_standard *props = mat->props.compiled;
+
+ /* FIXME: why does menu have its own texture array?? */
+ glBindTexture( GL_TEXTURE_2D,
+ menu.textures[ props->tex_diffuse ] );
+ }
+ else
+ {
+ glBindTexture( GL_TEXTURE_2D, vg.tex_missing );
+ }
+
+ current_mat = sm->material_id;