added log appending
morten modified threedee to use more opengl