added more openGL related code