setup for optimizing triangle draw