client: added comments to OpenGL init code and moved errno check into SerialPort class