lock_data() not needed (pthreads disabled)
fixed znear and zfar zero clipping
fixed opengl errors and warnings (mipmap)