SDL: un-hardcode some GL operations