Code simplification
Old: float hw = width * 0.5f; float hh = height * 0.5f; // draw dark background vsDisplayList *list = new vsDisplayList(512); vsVector3D va[4] = { vsVector2D(-hw,-hh), vsVector2D(hw,-hh), vsVector2D(-hw,hh), vsVector2D(hw,hh) }; int ts[4] = { 0,1,2,3 }; int ls[5] = { 0,1,3,2,0 }; list->SetColor(vsColor(0.0f,0.0f,0.0f,0.9f)); list->VertexArray(va,4); list->TriangleStrip(ts,4); list->SetColor( vsColor::White ); list->LineStrip(ls,5); list->ClearVertexArray(); vsFragment *fragment = new…