Create a direct renerding context when the shared context is too. Otherwise, I got this error X Error of failed request: BadMatch (invalid parameter attributes) on nVidia.