mir->next = mirrors;
mirrors = mir;
- node = new FlatMirror;
- node->wplane = mir->wplane;
- node->next = planes;
+ // also add a node to the mirror plane matching list
+ FlatMirror *m = new FlatMirror;
+ m->wplane = mir->wplane;
+ m->next = planes;
planes = node;
mir->objects.push_back(obj);
objmirror[obj] = mir; // associate with object
++num_mirrors;
} else {
+ node->objects.push_back(obj);
delete mir;
}
}
void Renderer::draw_mirror(FlatMirror *mir) const
{
push_render_target(rtmirror);
- glClearColor(1, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glClearColor(1, 1, 1, 1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();