Fix up GL drawing code a bit.