Fine control of GSG loading process?

For an app I’m doing I want to try to load pandadx9 on startup, if it fails I want to give the user 2 options via a system dialog:

  1. Go to microsoft website to download the DX web installer
  2. Start the game without hardware acceleration (tiny)

The first part is easy but I don’t know how to reinitialize panda with tiny in runtime.

I’m trying something like this:

    } else { // User chose to use software rendering
      load_prc_file_data("", "aux-display tinydisplay");
      window = framework.open_window();
      if (!window){
        cout << "COULD NOT OPEN" << endl;
        return;
      }
    }

Which naturally doesn’t work because the gsg is statically and lazily initialized. So how would you go about creating a gsg manually? Also, could we change the gsg initialization process to give users more control over this?

You can call framework.open_window(pipe), where pipe is the particular GraphicsPipe (i.e. API) that you wish to use. If you don’t specify pipe, you get the default.

You can use the GraphicsPipeSelection interface to make a pipe of the desired type.

David