Fix segfault, need a separate method that waits till GL is initialized.