fixed render issues

it turns out, initwindows is called as a event, to initopengl was run
before window is build.
move opengl element to GameEngine