void SoModelWire::init(const GlProgram& prog, int part) { if (part == 0) { m.load("armmodel/rhand.m"); } else if (part == 1) { m.load("armmodel/rlowerarm.m"); } else if (part == 2) { m.load("armmodel/rupperarm.m"); } // Define buffers needed: set_program(prog); gen_vertex_arrays(1); // will use 1 vertex array gen_buffers(2); // will use 2 buffers: one for coordinates and one for colors uniform_locations(10); // will send 2 variables: the 2 matrices below uniform_location(0, "vTransf"); uniform_location(1, "vProj"); uniform_location(2, "lPos"); uniform_location(3, "la"); uniform_location(4, "ld"); uniform_location(5, "ls"); uniform_location(6, "ka"); uniform_location(7, "kd"); uniform_location(8, "ks"); uniform_location(9, "sh"); }
void SoCapsule::init(const GlProgram& prog) { // Define buffers needed: set_program(prog); gen_vertex_arrays(1); // will use 1 vertex array gen_buffers(2); // will use 2 buffers: one for coordinates and one for colors uniform_locations(2); // will send 2 variables: the 2 matrices below uniform_location(0, "vTransf"); uniform_location(1, "vProj"); }