It's nice that you posted the code but I'm guessing the problem is mostly due to your model. In particular note that dynamic lighting is vertex based (it is Gouraud shading.) Thus the lighting on huge polygons (and a box is often just a few huge polygons) can flicker because the lighting is only affecting very few vertices on the corners. If the flickering is looking really bad and you want more realistic lighting across the box's surface try tessalating it (ie. splitting up the polygons into smaller polygons) to increase the density of vertices.