OpenGL Reporting an old version when packaged as a Windows `.appx` or `.msix` file

Hi all,

I’m making a video game written in C, which uses SDL and OpenGL to draw the graphics. The compiled version works fine on Linux and Android.

I compiled the Windows version, and that works fine as well, only as a standalone. I tried to package all the compiled files inside an .appx or .msix format, and I found out that OpenGL reports completely different version numbers when run as a packaged app.

I’m using the following code to get some OpenGL information:

printf("Vendor graphic card: %s\n", glGetString(GL_VENDOR));
printf("Renderer: %s\n", glGetString(GL_RENDERER));
printf("Version GL: %s\n", glGetString(GL_VERSION));
printf("Version GLSL: %s\n", glGetString(GL_SHADING_LANGUAGE_VERSION));

When I run the project as a standalone, I get the following information:

Vendor graphic card: Intel
Renderer: Intel(R) HD Graphics 2000
Version GL: 3.1.0 - Build 9.17.10.4459
Version GLSL: 1.40 - Intel Build 9.17.10.4459

This all looks correct, and the app behaves as expected. However I then packaged all the files into both an .appx file and an .msix file, and they both report the same results when run:

Vendor graphic card: Microsoft Corporation
Renderer: GDI Generic
Version GL: 1.1.0
Version GLSL: (null)

And needless to say, the first call I make to glCreateShader crashes.

For reference, I packaged all the files into .appx and .msix files using the following commands in PowerShell:

MakeAppx pack /d <my_file_directory> /p project.msix
SignTool sign /a /v /fd SHA256 /f mycert.pfx /p "mypassword" project.msix

Does anyone know what could be causing this? Happy to provide more information if needed.

Cross-ref:

A little web browsing suggests APPX and MSIX are package files for the Windows Store. It appears that Windows Store apps which use UWP / WinRT do not support OpenGL natively, only offered OpenGL ES API support (also not native) which is run-time translated to Direct3D calls via the Google ANGLE library (was formerly, Microsoft’s fork), with the runtime performance and feature limitations that imposes. So unless there’s more current info, it sounds like the UWP path is out unless you’re up for a port.

Not sure about whether there’s a non-UWP path for OpenGL apps with APPX/MSIX. Hopefully others will chime in here.

Some links:

1 Like

I see! That might be explaining some of the issues I’ve been seeing.

I was planning at some point to port the project to Direct3D too, so feels like this is one more push towards that direction.

I really appreciate the help! The links you posted have a lot of the information I’ve been looking for too.

Sure thing!


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.