dx & gl initialize