fixed build on win64; opengl initialized
removed dx9 support to keep things simpler
refactored some code