- diff_loc = sprog->get_uniform_location("diffuse");
- spec_loc = sprog->get_uniform_location("specular");
- shin_loc = sprog->get_uniform_location("shininess");
- t_loc = sprog->get_uniform_location("t");
- fog_loc = sprog->get_uniform_location("fog_density");
+ if(!vbuf) {
+ vbuf = gfx_create_uniform_buffer();
+ if(!vbuf->create(sizeof vu)) {
+ fprintf(stderr, "Failed to create uniform buffer.\n");
+ return false;
+ }
+ }