inquiry about OpenGL32.dll version's issue using EGL 1.4 - opengl

I’m a C++ application developer on Windows system. I’m developing an application using EGL 1.4 and OpenGL ES 2.0.
In a certain kind of a OpenGL32.DLL version, I found that a PVR error message occurred. The versions of OpenGL32.DLL that cause this problem are 6.3.9600.16384 on Win8.1 and 4.0.1379.1. And the message says :
PVR Message
PVR: VFrame attempted to use one of these functions:
PVR: wglChoosePixelFormatARB
PVR: but they are not present on you machine.
Ignore?
This message appeared when I call eglChooseConfig() or eglGetConfigs() functions in EGL API to get system configs.
I think this problem occurred because OpenGL32.dll versions mentioned above don’t support wglChoosePixelFormatARB() function.
Most of versions that I tested worked well. List of working version is :
5.2.3790.3959
6.1.7600.16385
6.3.9600.16384(1000kb)
10.0.10130.0
And list of not working version is :
4.0.1379.1
5.1.2600.1280
5.1.2600.5512
6.3.9600.16384 (720kb)
To solve this problem, I want to include this dll file in my product for a commercial use. I want to know that distributing a working version of OpenGL32.dll is possible. And can you know me the list of OpenGL32.dll version without this error and license information about OpenGL32.dll?

The issue is not about the opengl32.dll (in fact its inner working hasn't changed since Windows NT-4 some 19 years ago). Your system is simply missing a graphics driver with full OpenGL support:
The graphics drivers that are installed by default on Windows (and Windows Update) have only a very limited, stripped down OpenGL support (in fact they hardly support GPU acceleration). To get proper, full OpenGL support you must download the driver package for your GPU from the GPU vendor's website and install it manually.
Using Windows standard, automatic driver installation and Windows Update will not give you proper OpenGL support.

Related

Qt 5.7 black screen on windows

I have just upgraded my project to use Qt 5.7, on Mac I am able to load the html pages using Qt Webengine but on Window 7, the pages are not displayed, instead a black screen is shown.
I have also compiled simple browser example and it too only shows a black screen.
I am using the visual studio 2013 build of Qt 5.7
Does anyone know why it is not displaying the pages.
Does Qt 5.7 need any third party libraries for it render correctly on Windows.
We had a similar problem, whenever we started an application with a QWebEngineView it would only show a black screen or even crash on another machine. The problems occured due to wrong versions of api-ms-*.dlls and d3dcompiler_47.dll we had packaged with our app.
We found the correct versions on our developer machine with installed Windows SDK under "C:\Program Files (x86)\Windows Kits\10\Redist".
On a side note: We found that deployement of QWebEngine under windows is quite a hassle.. you also need to include "qtwebengine_locales" from qtbase\translations and "resources" from qtbase as well as "QtWebEngineProcess.exe" from qtbase\bin.
A thing that helped tracking down the problem, was putting "CONFIG += console" in the pro-file. That way the console output with relevant error information is shown on deployement targets.
With help of this comment from peppe
One can use temporary workaround with graphic drivers not supporting DirectX11 but supporting DirectX9
As said here
https://doc.qt.io/qt-5/windows-requirements.html#dynamically-loading-graphics-drivers
Graphics Drivers
For Qt Quick 2 to work, a graphics driver that provides OpenGL 2.1 or higher is required. The default driver from Windows is OpenGL 1.1. Qt includes a version of the ANGLE project which is included from the Windows Qt installers. ANGLE implements the OpenGL ES 2.0 API on top of DirectX 11 or DirectX 9. ANGLE requires that the DirectX SDK is installed when building Qt.
ANGLE chooses the render backend depending on availability. DirectX 11 is usually preferable. However, some graphics cards may not fully support it. For these cases, the environment variable QT_ANGLE_PLATFORM (introduced in Qt 5.4) can be used to control the render backend. Possible values are d3d11, d3d9 and warp.
So this may help
set QT_ANGLE_PLATFORM=d3d9
Or use mesa with
https://www.mesa3d.org/llvmpipe.html
Qt::AA_UseSoftwareOpenGL is special in the sense that it will try to load an OpenGL implementation with a non-standard name. The default name is opengl32sw.dll. This allows shipping a software-only OpenGL implementation, for example a build of Mesa with llvmpipe, under this name. If necessary, the filename can be overridden by setting the QT_OPENGL_DLL environment variable.
Edit 1:
One can use fallback method for one-time login to Dropbox Windows client ( made with QT framework ) for example
Dynamically Loading Graphics Drivers
In addition to the build time configuration, Qt supports choosing and loading the OpenGL implementation at runtime. To use this mode, pass -opengl dynamic to the configure script.
Note: As of Qt 5.5 this is the configuration used by the official, pre-built binary packages of Qt. It is strongly recommended to use it also in custom builds, especially for Qt binaries that are deployed alongside applications.
...
This configuration is the most flexible because no dependencies or assumptions are hardcoded about the OpenGL implementation during build time. It allows robust application deployment. When a given environment fails to provide a proper OpenGL 2.0 implementation, it will fall back automatically to ANGLE. This fallback will be completely transparent to the application, and will allow Qt Quick or other OpenGL code to function by translating to Direct3D. Such a fallback could, for example, take place on a Windows 7 PC with no additional graphics drivers installed. On other machines, where there is sufficient OpenGL support, the normal desktop OpenGL drivers will be used. Additionally, pure software-based OpenGL implementations may be available as additional fallbacks in the future, allowing running Qt Quick applications without a GPU.
When configured with -opengl dynamic, neither Qt nor the applications built using qmake will link to the opengl32 (standard desktop OpenGL) or QtANGLE libraries. Instead, the appropriate library is chosen at runtime. By default, Qt will determine whether the system's opengl32.dll provides OpenGL 2 functions. If these are present, opengl32.dll is used, otherwise the ANGLE libraries (libEGL.dll and libGLESv2.dll) will be used. In case the ANGLE libraries are missing or initialization fails for some reason, an additional fallback is attempted by trying to load opengl32sw.dll. See below for details.
Such a fallback could, for example, take place on a Windows 7 PC with
no additional graphics drivers installed.
To emulate this conditions one can use RDP session with mandatory 8 bpp to Windows machine

OpenGL version is few years older than laptop

When I write a java program using LWJGL, and get the OpenGL version using glGetString(GL_VERSION);. Then it displays: 2.1.0 - Build 8.15.10.1892
When I open my windows console (using the famous 'cmd' run), and I use systeminfo, it gives me not just any information about the installation date of windows.
I want to get the installation date of windows because then I know how old my laptop is. After searching the internet, I used WMIC OS GET installdate and I finally got a date: 11 November 2010.
And I assume that's true because I can remember at least the same year. And of course the device may have been some time at the factory or in the store.
When I lookup how old OpenGL 2.1.0 is, I see it's of around 2006 https://www.opengl.org/wiki/History_of_OpenGL#OpenGL_2.1_.282006.29
I'm disappointed of my OpenGL version.
I'm running 64 bit Windows 7. The device is probably at least from the end of 2010, but java displays an OpenGL version of 2006.
There are newer OpenGL versions from widely before November 2010, like version 3.0 (2008), 3.1 (2009) and 3.2 (also 2009)
Could it perhaps be that the JVM only has access to an older version of OpenGL?
Some time ago I played a CD-rom game on this laptop. I think that game would never be playable if it used OpenGL 2.1.0...
Or is this an unfair comparision?
OpenGL by itself is just a specification. The actual thing running on your computer is called an implementation which are usually part of the graphics driver. Also each OpenGL specification has very specific requirements on the implementation. And there are many things in OpenGL-3.x that simply are not supported even by hardware that were "modern" in 2010. For example Intel GPUs from around that time simply don't have everything that's required for OpenGL-3 support. Hence you'll get only OpenGL-2.x support for those and nothing more.
You could look up your laptop specification and see your gfx hardware. This will tell you which version of OpenGL your hardware supports (this information will be available from the gfx chip vendor most likely).
Using an API that supports the version of GL that you hardware does is another issue and may be with the way you have initialized or used the openGL graphics lib.
I would have thought most drivers these days support older versions. They may not support the API natively, but I would have thought provide wrappers for the functionality in the driver. Certainly I can code in OpenGL 1.1 and see the results on the same machine as an OpenGL 4.5 program (On a quadro K2200M).

What is needed to install OpenGl?

I set up OpenGl with DevC++ following a tutorial and everything works. I've looked into the main OpenGl project page (https://www.opengl.org/) but I can't find an official repository where I can download the packages that I need (I've found .zip but I can't understand the correct files that I need :(). I have seen many tutorials but they use unofficial repositories and they install packages in so many different ways even for the same IDE! :(. Is there an official repository? What files do I need? Is there a unique way to install OpenGL and if not could you tell me the most important steps of the installation ?
Is there a unique way to install OpenGL and if not could you tell me the most important steps of the installation?
Install drivers for your graphics card with OpenGL support. Done!
OpenGL is different than Direct3D or Mantle (or, soon to come, Vulkan): Back in 1996 OpenGL-1.1 was included into the Windows 32 bit platform ABI (Application Binary Interface). That means that for every Windows version after "Windows 95B" and "Windows NT 4.0" programs are assured for OpenGL-1.1 to be available.
Being part of the platform ABI has the nice side effect and consequence, that everything that's required for OpenGL development must be included in every compiler package that targets the Windows 32 bit (and by heritage the 64 bit) platform.
However the ABI covers only OpenGL-1.1. For everything that comes after the so called "extension mechanism" is provided. By using the extension mechanism programs can determine at runtime, which OpenGL capabilities (beyond v1.1) are available and load them. No extra libraries or SDKs are required for this!
Yet, since the process of enumerating available OpenGL capabilities and loading them is so tedious, a number of helper libraries exists that alleviate one from this annoying task.
you probably have OpenGL in your system as a part of your graphic card... You can see how to have a project running for different OS by taking a look at the OpenGL superbible:
https://sgar91.files.wordpress.com/2010/11/opengl-superbible-comprehensive-tutorial-and-reference-5th-edition-2010.pdf
Page 48 starts to talk about how to have a program running with OpenGL

OpenGL - Using modern libraries

Upon successful compilation of a recent program I wrote from the openGL-book using openGL 4.0 I wasn't able to run the program due to an error that stated " error XX - unsupported hardware.."
However according to a previous question I asked if I could compile/run openGL programs on my computer I got an answer that I could:
Wiki claims you can do GL 4.0 with your HD 4000 [Graphics Chip] on Windows.
My question is - is that I am using the libraries freeglut 2.8 and GLEW 1.10 (newest versions) but the tutorial I followed used functions that came with 4.0 could the reason that my program does not run follow because I am linking modern versions of openGL libaries?
Things you have to check to run modern OpenGL:
Graphics driver: Do you have the latest and most up to date drivers?
Graphics card/chipset: Can your graphics hardware support the latest OpenGL even with its most recent drivers?
Using Proper Hardware: Some laptops come with a low powered graphics chipset and a high powered alternate graphics card/chipset. The low powered one may not support new stuff, but the high powered one definitely should. Have you instructed your computer to use the right one?
Libraries: Have you properly linked to something like GLEW that gives you the ability to use modern OpenGL?
Since you're on Windows, do note that they purposefully don't give you preinstalled access to modern OpenGL, so you have to do it yourself. Usually that just means checking your drivers and downloading GLEW.
From your error message, it looks like your graphics drivers aren't up to date or the graphics card/chipset/whatever you're using doesn't support the OpenGL version you want.

What version of OpenGL comes with Visual Studio 2012 Express?

How do you install GLUT and OpenGL in Visual Studio 2012? explains that the OpenGL headers and libraries come with VS2012. How do I determine which versions of the OpenGL standard are supported by these libraries? I recently purchased the 8th Edition of the OpenGL redbook which is based on OpenGL 4.3. Will I be able to run and compile these examples with VS2012 Express?
OpenGL implementation is brought to you by your graphics card driver, not by your OS (except really old stuff). When you install the GPU driver, appropriate library (such as nvogl32.dll on my PC with NVidia card) is placed in your System32/SysWOW64 folder.
To actually acess the functions in the driver, you need a loader library (such as GLload or GLEW) that will ask the driver dll nicely where do the functions reside. You can also do it manually, but it's extremely cumbersome.
You can access the opengl version in runtime via:
glGetString(GL_VERSION)
after opening a gl context. Other usefull information about this gl call here