added functions to get the current gl/display context