started conversion to OpenGL, not working yet