wglChoosePixelFormatARB order of initialization
Hi, I am trying to use GLAD2 with WGL, similar to [this example](https://github.com/Dav1dde/glad/blob/glad2/example/c/wgl.c). However, I want to request a pixel format using `wglChoosePixelFormatARB` instead. It is my understanding that one first needs to create a temporary window as the pixel format can be set only once per window (and a window with a pixel format is needed before we can call `gladLoaderLoadWGL`, before being able to request the actual pixel format). A similar scenario is described [here using GLEW](https://stackoverflow.com/questions/46655372/create-modern-opengl-context-using-wgl) and [here without a library](https://stackoverflow.com/questions/45518843/initializing-opengl-without-libraries). However, I cannot seem to get it working using GLAD. My initialization code is the following (with error checks removed for brevity):
```c++
// get instance handle
g_hInstance = GetModuleHandle(NULL);

// window class
WNDCLASSEX wc;
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = g_hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); // default icon
wc.hCursor = LoadCursor(NULL, IDC_ARROW);   // default arrow
wc.hbrBackground = NULL;                    // no background
wc.lpszMenuName = NULL;                     // no menu
wc.lpszClassName = WND_CLASS_NAME;
wc.hIconSm = LoadIcon(NULL, IDI_WINLOGO);   // windows logo small icon

// register the windows class
RegisterClassEx(&wc);

// class registered, so now create our window
HWND tmp_hwnd = CreateWindow(
        WND_CLASS_NAME,      // class name
        title,               // app name
        WS_OVERLAPPEDWINDOW, // window style
        CW_USEDEFAULT, 0,    // use default, y coord gets ignored this way
        (LONG) width,        // dimension
        (LONG) height,       // dimension
        NULL,                // handle to parent
        NULL,                // handle to menu
        g_hInstance,         // application instance
        NULL);               // no extra params

// get a device context
HDC tmp_hdc = GetDC(tmp_hwnd);

// set temporary pixel format
PIXELFORMATDESCRIPTOR tmp_pfd;
tmp_pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR); // size of structure
tmp_pfd.nVersion = 1;                          // default version
tmp_pfd.dwFlags =
        PFD_DRAW_TO_WINDOW |                   // window drawing support
        PFD_SUPPORT_OPENGL |                   // OpenGL support
        PFD_DOUBLEBUFFER;                      // double buffering support
tmp_pfd.iPixelType = PFD_TYPE_RGBA;            // RGBA color mode
tmp_pfd.cColorBits = 32;                       // 32 bits color information
tmp_pfd.cRedBits = 0;
tmp_pfd.cRedShift = 0;
tmp_pfd.cGreenBits = 0;
tmp_pfd.cGreenShift = 0;
tmp_pfd.cBlueBits = 0;
tmp_pfd.cBlueShift = 0;
tmp_pfd.cAlphaBits = 0;
tmp_pfd.cAlphaShift = 0;
tmp_pfd.cAccumBits = 0;
tmp_pfd.cAccumRedBits = 0;
tmp_pfd.cAccumGreenBits = 0;
tmp_pfd.cAccumBlueBits = 0;
tmp_pfd.cAccumAlphaBits = 0;
tmp_pfd.cDepthBits = 32;                       // 32 bits depth information
tmp_pfd.cStencilBits = 0;
tmp_pfd.cAuxBuffers = 0;
tmp_pfd.iLayerType = PFD_MAIN_PLANE;           // layer of the PFD
tmp_pfd.bReserved = 0;
tmp_pfd.dwLayerMask = 0;
tmp_pfd.dwVisibleMask = 0;
tmp_pfd.dwDamageMask = 0;

// choose best matching pixel format
int32_t tmp_pixel_format = ChoosePixelFormat(tmp_hdc, &tmp_pfd);

// set pixel format to device context
SetPixelFormat(tmp_hdc, tmp_pixel_format, &tmp_pfd);

// create temporary opengl context
HGLRC tmp_hrc = wglCreateContext(tmp_hdc);

// enable temporary context
wglMakeCurrent(tmp_hdc, tmp_hrc);

// load wgl extensions with glad
int32_t wgl_version = gladLoaderLoadWGL(tmp_hdc); // note: this correctly returns 10000

// check whether required extensions are supported
bool has_support =
        GLAD_WGL_ARB_pixel_format && // wglChoosePixelFormatARB
        GLAD_WGL_ARB_create_context; // wglCreateContextAttribsARB

// now that we have loaded wgl extensions and confirmed the ones we need
// are available, redo the entire process. required since pixel format can be set
// only once per window, but we can only request the proper pixel format once we have
// loaded wgl extensions, which requires a window and contexts

// cleanup temporary gl context, device context, and window
wglMakeCurrent(NULL, NULL);
wglDeleteContext(tmp_hrc);
ReleaseDC(tmp_hwnd, tmp_hdc);
DestroyWindow(tmp_hwnd);

// create actual window
g_hwnd = CreateWindow(
        WND_CLASS_NAME,      // class name
        title,               // app name
        WS_OVERLAPPEDWINDOW, // window style
        CW_USEDEFAULT, 0,    // use default, y coord gets ignored this way
        (LONG) width,        // dimension
        (LONG) height,       // dimension
        NULL,                // handle to parent
        NULL,                // handle to menu
        g_hInstance,         // application instance
        NULL);               // no extra params

g_hdc = GetDC(g_hwnd);

// desired pixel format attributes
const int32_t i_pixel_format_attrib_list[] = {
        WGL_DRAW_TO_WINDOW_ARB, GL_TRUE, // PFD_DRAW_TO_WINDOW
        WGL_SUPPORT_OPENGL_ARB, GL_TRUE, // PFD_SUPPORT_OPENGL
        WGL_DOUBLE_BUFFER_ARB, GL_TRUE,  // PFD_DOUBLEBUFFER
        WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB, // PFD_TYPE_RGBA
        WGL_COLOR_BITS_ARB, 32, // 32 color bits
        WGL_DEPTH_BITS_ARB, 32, // 32 depth bits
        0 // end
};

int pixel_format;
UINT pixel_format_count;

// request at most one format
wglChoosePixelFormatARB(
        g_hdc, i_pixel_format_attrib_list, NULL, 1, &pixel_format,
        &pixel_format_count);

// set actual pixel format to device context
PIXELFORMATDESCRIPTOR pdf{};
SetPixelFormat(g_hdc, pixel_format, &pdf);

int32_t attributes[] = {
        WGL_CONTEXT_MAJOR_VERSION_ARB, 3, // OpenGL MAJOR 3
        WGL_CONTEXT_MINOR_VERSION_ARB, 3, // OpenGL MINOR 3
        0 // end
};

// create the actual opengl rendering context
g_hrc = wglCreateContextAttribsARB(g_hdc, NULL, attributes);

// now make actual rendering context the active one
wglMakeCurrent(g_hdc, g_hrc);

// load gl functions with glad
int32_t version = gladLoaderLoadGL(); // note: this incorrectly returns 10001

// show the window in the foreground, and set the keyboard focus to it
ShowWindow(g_hwnd, SW_SHOW);
SetForegroundWindow(g_hwnd);
SetFocus(g_hwnd);
```
I use GLAD with CMake, the relevant part of the CMakeLists is:
```cmake
find_package(OpenGL REQUIRED)

set(GLAD_SOURCES_DIR "${PROJECT_SOURCE_DIR}/<glad_dir>/")
add_subdirectory(${GLAD_SOURCES_DIR}/cmake glad_cmake)
glad_add_library(glad_gl_core_33_wgl_loader STATIC REPRODUCIBLE LOADER API gl:core=3.3 wgl=1.0)

target_link_libraries(${PROJECT_NAME} OpenGL::GL OpenGL::GLU glad_gl_core_33_wgl_loader)
```
Everything works as expected up to the call to `gladLoaderLoadGL`, which returns `10001` but an OpenGL version of 3.3 is requested. Is the order of my initialization correct? And if not, could someone tell me what I need to be doing differently? I am on Windows.