Checking opengl version windows

OpenGLChecker — Информация об OpenGL

Программа для извлечения информации о реализации OpenGL, которая позволяет проверить производительность компьютера. Она позволяет писать свои собственные сценарии для тестирования производительности OpenGL.

OpenGLChecker анализирует настройки системы, чтобы получить версию OpenGL ускорителя и запустить тест видеоадаптера.

Особенности:

  • информация о реализации OpenGL;
  • сведения обо всех существующих расширениях OpenGL;
  • бенчмарки для проверки производительности компьютера;
  • кросс-платформенность, что позволяет работать на ОС Windows и Linux;
  • возможность создания собственных тестов.

Приложение может выступать в качестве бенчмарк теста, который готов к оценке производительности видеоадаптера. Оно объединяет два различных теста «Blendermark» и «Terrain».

В ходе каждого испытания OpenGLChecker отображает 3D видео графику, которая требует много ресурсов, что позволяет оценить возможности видеоадаптера. Тест можно завершить при помощи нажатия кнопки ESC.

Сгенерированный отчет результата выводит на экран среднее количество кадров в секунду, максимальный достигнутый уровень кадров в секунду и количество обновлений в секунду.

Лицензия: BSD

Протестировано на ОС: Windows 7 x64, Windows 10 x64

Внимание, резервная копия обновляется очень редко , так как нужна на случай удаления дистрибутива с официального сайта.

How to check the Version of the OpenGL on Windows 7kl

I am using the Windows 7. I am programming using the OpenGL on it. But I found that there are some features I can use. So I want to check the version of the OpenGL on my system. I use the code below to check it

But I get a null pointer. And if I want to upgrade my OpenGL, what should I do?

4 Answers 4

You need a GL context current before you can ask which version you have.

So first, create a context, call wglMakeCurrent on it, and you should be able to call glGetString after that.

The version that gets reported is coming from the driver that you have installed. The OpenGL version that your hardware can support is not itself «upgradable» (because some hardware features will be missing to support the latest and greatest).

So the best you can do is upgrade your driver, but don’t get your hopes to high it will result in a newer OpenGL.

The easiest and fastest way is to use a diagnostic tool like GPU Caps Viewer.

You can also use glGetString(GL_VERSION) but remember that the version which you’ll have displayed is the version of a given OpenGL context — which is not necessarily the highest your GPU can do. However, if you create the context with default settings, you’ll probably get the highest possible OpenGL context in compatibility profile, so yes, this method can be useful.

Читайте также:  Удаленный рабочий стол windows 10 что это

Also, as the glGetString(GL_VERSION) refers to a given OpenGL context, you need to have it created beforehand. Actually, a GL context is required to call any gl* function.

Indeed, upgrading the drivers may give you a higher GL version, but it’s unlikely that the major version would change. For example, if you’d find yourself having support for GL 3.1, it’s very likely that the latest drivers will give you GL 3.3, but not GL 4.0.

How can i know which opengl version is supported by my system

Look at this very basic C++ code:

I do not understand how i can «detect» max opengl version i can set in the lines:

This line cannot be placed before glfwMakeContextCurrent :

So my question is how can i detect the versions of opengl my system supports at the beginning of the program.

2 Answers 2

GLFW_CONTEXT_VERSION_MAJOR and GLFW_CONTEXT_VERSION_MINOR specify the client API version that the created context must be compatible with. The exact behavior of these hints depend on the requested client API.

OpenGL: GLFW_CONTEXT_VERSION_MAJOR and GLFW_CONTEXT_VERSION_MINOR are not hard constraints, but creation will fail if the OpenGL version of the created context is less than the one requested. It is therefore perfectly safe to use the default of version 1.0 for legacy code and you will still get backwards-compatible contexts of version 3.0 and above when available.

While there is no way to ask the driver for a context of the highest supported version, GLFW will attempt to provide this when you ask for a version 1.0 context, which is the default for these hints.

This means, if you want to get the highest possible OpenGL context, then you can completely skip glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, ) and glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, ) .

After you have created a context, you can ask for the context version, with glGetString(GL_VERSION) .

But if your application requires a minimum OpenGL version, you need to tell that to GLFW, with:

glfwCreateWindow will fail, if the requirements cannot be fulfilled.

The answer to your question

How can i know which opengl version is supported by my system?

You have to create an OpenGL context first, then you can ask for the version by glGetString(GL_VERSION) .

Correction to the answer

As mentioned in the comment, this approach is going to fail when you try to create a core profile context.

This means you cannot use:

Actually, trying to query the highest supported GL version is quite useless. You should just ask for the lowest GL version (and the most strict profile) your code can work with, and if that is not available, it is not going to work anyway.

If you want to optionally support some features, use of the extension mechanism is the way to go.

If you really want some higher version context on some machines, and a lower one on others, the only reliable way will be to iteratively try to create the context, backwards from the highest version your code can make use of, to the lowest, and just stop when the creation succeeds. You won’t get any unknown newer version that way, but since the rest of your code won’t make use of any newer features, it is a moot point.

Читайте также:  Windows как поменять разрешение файла

The only reason I can see why you might want some «unknown» newer GL version would be the case of a library, where you create the context and do not know what is to be done with it — like it’s the case with GLFW itself. But GLFW has the same issue. There is simply no reliable API to query the highest supported GL version. The recommendation in the GLFW docs, mentioned in @Rabbid76’s answer will only provide you the highest available legacy GL version (which limits you to 2.1 on OSX and 3.0 on mesa/linux). It won’t work for core profiles, but core profiles are the only reliable way to get modern GL on all platforms.

Having said that all that, I have to admit that I did see code before, which actually iteratively tried the contexts, but started with 5.something, while at the time of writing this answer, the highest existing GL spec was 4.6. Not sure what they were trying to do there, and also no idea which x for 4.x they did start with, after 5.0 failed.

How To: Check the graphics card type and OpenGL version

Summary

OpenGL is an industry standard 3D graphics API. OpenGL 4.1 or later is required to run CityEngine 2019.1. For more information, refer to CityEngine 2019.1 system requirements. OpenGL drivers are usually installed together with the rest of the graphics driver and support software (such as DirectX).

Procedure

Follow the instructions provided to check the type of graphics card installed on the system and the version of OpenGL running.

  1. Check the graphics card type (Windows):
    1. Click Start, type dxdiag, and press Enter to access a diagnostic tool listing the graphics card information.
    2. Click the Display tab.

  1. Install the OpenGL Extensions Viewer to determine the OpenGL version (Windows, Mac, and Android mobile devices).
  • Windows: Go to OpenGL Extensions Viewer (Windows) to download and install the OpenGL Extensions Viewer.
  • Mac and Android mobile devices: Go to OpenGL Extensions Viewer (Windows), and click the appropriate link to download the OpenGL Extensions Viewer from the Mac App Store, iTunes Store, or the Android Market, depending on the device and operating system.

The OpenGL Extensions Viewer is a free application designed by Realtech VR. The viewer displays the current version of OpenGL installed, and provides tools to test or update the graphics card driver.

Last Published: 3/25/2020

Article ID: 000011375

Software: ArcGIS CityEngine 2019.1, 2019.0, 2018.1, 2018.0, 2017.1, 2017.0, 2016.1, 2016.0, 2015.2, 2015.1, 2015.0, 2014.1, 2014.0, 2013.1, 2012.1, 2011.2, 2011.1, 2010

Читайте также:  Connect to windows core

Обновление OpenGL в Windows 7

Пакет файлов под названием OpenGL в большинстве случаев требуется пользователям для корректного запуска определенных игр на компьютере под управлением операционной системы Windows 7. Если данный драйвер отсутствует или его версия устарела, программы просто не будут включаться, а на экране отобразится соответствующее уведомление с просьбой инсталляции или обновления ПО. В этой статье мы максимально развернуто расскажем о загрузке новых библиотек OpenGL.

Обновляем OpenGL в Windows 7

В первую очередь стоит разобраться, каким же образом инсталлируется рассматриваемый компонент на ПК. Все необходимые файлы ставятся вместе с драйверами графического адаптера. Поэтому сперва следует обновить программное обеспечение этого комплектующего, а потом переходить к разбору альтернативного метода.

Когда у вас установлен самый свежий драйвер на видеокарту и обновлений больше нет, при этом все равно появляется уведомление о необходимости обновления OpenGL, сразу переходите к третьему способу. Если и этот вариант не принес никаких результатов, значит, ваше оборудование не поддерживает последние библиотеки. Рекомендуем задуматься о выборе новой видеокарты.

Способ 1: Обновление драйверов видеокарты в Windows 7

Как уже было сказано выше, компоненты OpenGL ставятся вместе с файлами графического адаптера. В Windows 7 присутствует несколько методов их обновления. Каждый из них подходит в разных ситуациях и требует от пользователя выполнения определенных действий. Перейдите к статье по ссылке ниже, чтобы детально ознакомиться со всеми способами. Выберите подходящий и воспользуйтесь предоставленными инструкциями. По завершении процесса достаточно перезагрузить компьютер и проверить работоспособность игр или других программ, которые требовали наличия свежей версии библиотеки.

Способ 2: Обновление компонентов в фирменной утилите видеокарты

Сейчас основными производителями графических адаптеров являются AMD и NVIDIA. У каждого имеется собственный софт, который обеспечивает корректную работу с операционной системой и позволяет обновлять ПО. Обладателям видеокарт NVIDIA советуем обратиться к материалу по следующей ссылке, чтобы разобраться с установкой новой версии драйвера OpenGL в GeForce Experience.

Владельцам карточек от AMD нужно ознакомиться с другими статьями, поскольку в данном случае все действия выполняются в Catalyst Control Center либо в Radeon Software Adrenalin Edition, в зависимости от типа установленного ПО.

Способ 3: Обновление DirectX

Не самым эффективным, но иногда работающим методом является установка новых компонентов библиотеки DirectX. Порой в ней находятся подходящие файлы, которые позволяют нормально функционировать необходимым играм или программам. Сначала нужно узнать, какой DirectX уже установлен на вашем компьютере. Для этого ознакомьтесь с инструкцией в статье ниже.

На данный момент последней версией для ОС Виндовс 7 является DirectX 11. Если у вас инсталлирована более ранняя библиотека, советуем обновить ее и проверить работоспособность ПО. Развернуто на эту тему читайте в другом материале.

Как видите, в обновлении OpenGL нет ничего сложного, главным вопросом остается лишь поддержка свежих файлов данного компонента вашей видеокартой. Мы рекомендуем проверить все способы, поскольку эффективность каждого зависит от разных обстоятельств. Ознакомьтесь с инструкциями и следуйте им, тогда у вас точно все получится.

Оцените статью