Modified glwidget.cpp to allow code compile

Modified sections of glwidget.cpp, will look into issues with incorrect
calls later this afternoon.