
DOOM 2016, otherwise known simply as DOOM by many people, acted as a soft reboot for what was arguably the most popular video game franchise in the entire world at a time. Back in the 90s, the first person shooter series was highly famous for its intense gameplay as well as revolutionary features which made it a truly fun experience.
Eventually the series came to a halt with there being no new entry for several years. This changed a few years ago with the surprise announcement of DOOM 2016, which revived the franchise.
While many were sceptical of it at first when it was announced, DOOM was loved by a majority of people and critics alike as it had lots to enjoy about it. However, the game itself did have some issues related to errors, bugs and whatnots.
While most of these were easily fixed, there are some issues which are still present as they have been from the start. An example of this is the DOOM “fatal error: wglcreatecontextattribsarb failed” issue. Here are some reasons and solutions for all those encountering this issue to learn about.
- Minimum Requirements
This is an issue that usually occurs when users try to run DOOM on a system that isn’t capable of handling the game. In other words, trying to launch the game on a system that doesn’t match the minimum requirements for the game will inevitably lead to this annoying error.
Because of this, users won’t be able to launch the game let alone play it at all. This is the most common reason for the error, and unfortunately it is also one of the most difficult ones to get through since there is only one possible solution for it.
This solution is to of course improve your PC or laptop to the point where it is capable of running DOOM. Read up on the minimum requirements for the game online and learn exactly what they are. Then get all the new components that users need for their device.
Just set them all up and install the associated drivers depending on what you bought. Once all of this is done the only thing left to do is running DOOM to see if it works or not this time around. There likely shouldn’t be any issues with it if the PC or laptop now match the minimum requirements.
- Designated GPU
It could be that your computer matches the minimum requirements for the game and even surpasses them but the issue still occurs. The reason for this is that the wrong GPU could be set as the activated one.
Most systems actually have two graphic cards inside of them, with one of them being the mobile one and the other one being the primary one which you usually use for all of your games. The mobile GPU is a part of the system from the start and is usually quite weak, not capable of running a majority of games, if any at all.
It especially isn’t capable of running games like this one. Long story short users will need to go into the system settings in order to change the activated GPU and ensure that DOOM is running on the right one.
Once that is done, try launching the game once these changes have been applied to the system and see if the error message pops up this time. If it finally works, players can enjoy DOOM all they like. However, if it doesn’t, there is one last thing which can be tried out.
- Update Graphic Card Drivers
Even if the correct graphic card is activated and meets the minimum requirements, users will still encounter the issue if said graphic card’s drivers aren’t up to date. This is another common reason for this issue, and this specific problem is perhaps the easiest one of them all to solve.
The only thing needed to solve it is to go online and check for any new updates available for the GPU players are using and installing whatever new version is available for it, if there is one.
ContextWin32::ContextWin32(WindowHandle parent, NLOpenGLSettings settings)
: IPlatformContext(parent, settings)
{
int pf = 0;
PIXELFORMATDESCRIPTOR pfd = {0};
OSVERSIONINFO osvi = {0};
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
// Obtain HDC for this window.
if (!(m_hdc = GetDC((HWND)parent)))
{
NLError("[ContextWin32] GetDC() failed.");
throw NLException("GetDC() failed.", true);
}
// Create and set a pixel format for the window.
pfd.nSize = sizeof(pfd);
pfd.nVersion = 1;
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = settings.BPP;
pfd.cDepthBits = settings.BPP;
pfd.iLayerType = PFD_MAIN_PLANE;
// Obtain Windows Version
if (!GetVersionEx(&osvi))
{
NLError("[ContextWin32] GetVersionEx() failed.");
throw NLException("[ContextWin32] GetVersionEx() failed.");
}
// Get a pixelformat, based on our settings
pf = ChoosePixelFormat(m_hdc, &pfd);
// Set the pixelformat
if (!SetPixelFormat(m_hdc, pf, &pfd))
{
NLError("[ContextWin32] GetVersionEx() failed.");
throw NLException("[ContextWin32] SetPixelFormat() failed.");
}
// When running under Windows Vista or later support desktop composition.
// This doesn't really apply when running in full screen mode.
if (osvi.dwMajorVersion > 6 || (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion >= 0))
pfd.dwFlags |= PFD_SUPPORT_COMPOSITION;
// Verify that this OpenGL implementation supports the extensions we need
std::string extensions = wglGetExtensionsStringARB(m_hdc);
if (extensions.find("WGL_ARB_create_context") == std::string::npos){
NLError("[ContextWin32] Required extension WGL_ARB_create_context is not supported.");
throw NLException("[ContextWin32] Required extension WGL_ARB_create_context is not supported.");
}
int attribList[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, settings.MAJOR,
WGL_CONTEXT_MINOR_VERSION_ARB, settings.MINOR,
WGL_ACCELERATION_ARB, WGL_FULL_ACCELERATION_ARB,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB, 32,
WGL_DEPTH_BITS_ARB, 24,
0
};
// First try creating an OpenGL context.
if (!(m_hglrc = wglCreateContextAttribsARB(m_hdc, 0, attribList)))
{
// Fall back to an OpenGL 3.0 context.
attribList[3] = 0;
if (!(m_hglrc = wglCreateContextAttribsARB(m_hdc, 0, attribList))){
NLError("[ContextWin32] wglCreateContextAttribsARB() failed for OpenGL 3 context.");
throw NLException("[ContextWin32] wglCreateContextAttribsARB() failed for OpenGL 3 context.", true);
}
}
if (!wglMakeCurrent(m_hdc, m_hglrc)){
NLError("[ContextWin32] wglMakeCurrent() failed for OpenGL 3 context.");
throw NLException("[ContextWin32] wglMakeCurrent() failed for OpenGL 3 context.");
}
// Load wglSwapIntervalExt
typedef BOOL (APIENTRY * PFNWGLSWAPINTERVALEXTPROC)(int);
static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0;
wglSwapIntervalEXT = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(wglGetProcAddress("wglSwapIntervalEXT"));
if ( wglSwapIntervalEXT )
{
if ( settings.VSYNC == true )
{
wglSwapIntervalEXT(1);
}
else if ( settings.VSYNC == false )
{
wglSwapIntervalEXT(0);
}
}
else if (wglSwapIntervalEXT == NULL )
{
NLWarning("[ContextWin32] Cannot load wglSwapIntervalEXT");
}
}
This is the code in question.
It fails on Line 77, when I try to set the Attributes.
But the very same code works on my ATI.
I do not own any NVIDIA Product and cannot reproduce it, but I need to fix it of course. Can anyone help on the issue? What did I overlook?
My Definitions:
extern "C" {
#define ERROR_INVALID_VERSION_ARB 0x2095
#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
#define WGL_CONTEXT_FLAGS_ARB 0x2094
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000
#define WGL_DRAW_TO_WINDOW_ARB 0x2001
#define WGL_DRAW_TO_BITMAP_ARB 0x2002
#define WGL_ACCELERATION_ARB 0x2003
#define WGL_NEED_PALETTE_ARB 0x2004
#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005
#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006
#define WGL_SWAP_METHOD_ARB 0x2007
#define WGL_NUMBER_OVERLAYS_ARB 0x2008
#define WGL_NUMBER_UNDERLAYS_ARB 0x2009
#define WGL_TRANSPARENT_ARB 0x200A
#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037
#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038
#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039
#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A
#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B
#define WGL_SHARE_DEPTH_ARB 0x200C
#define WGL_SHARE_STENCIL_ARB 0x200D
#define WGL_SHARE_ACCUM_ARB 0x200E
#define WGL_SUPPORT_GDI_ARB 0x200F
#define WGL_SUPPORT_OPENGL_ARB 0x2010
#define WGL_DOUBLE_BUFFER_ARB 0x2011
#define WGL_STEREO_ARB 0x2012
#define WGL_PIXEL_TYPE_ARB 0x2013
#define WGL_COLOR_BITS_ARB 0x2014
#define WGL_RED_BITS_ARB 0x2015
#define WGL_RED_SHIFT_ARB 0x2016
#define WGL_GREEN_BITS_ARB 0x2017
#define WGL_GREEN_SHIFT_ARB 0x2018
#define WGL_BLUE_BITS_ARB 0x2019
#define WGL_BLUE_SHIFT_ARB 0x201A
#define WGL_ALPHA_BITS_ARB 0x201B
#define WGL_ALPHA_SHIFT_ARB 0x201C
#define WGL_ACCUM_BITS_ARB 0x201D
#define WGL_ACCUM_RED_BITS_ARB 0x201E
#define WGL_ACCUM_GREEN_BITS_ARB 0x201F
#define WGL_ACCUM_BLUE_BITS_ARB 0x2020
#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021
#define WGL_DEPTH_BITS_ARB 0x2022
#define WGL_STENCIL_BITS_ARB 0x2023
#define WGL_AUX_BUFFERS_ARB 0x2024
#define WGL_NO_ACCELERATION_ARB 0x2025
#define WGL_GENERIC_ACCELERATION_ARB 0x2026
#define WGL_FULL_ACCELERATION_ARB 0x2027
#define WGL_SWAP_EXCHANGE_ARB 0x2028
#define WGL_SWAP_COPY_ARB 0x2029
#define WGL_SWAP_UNDEFINED_ARB 0x202A
#define WGL_TYPE_RGBA_ARB 0x202B
#define WGL_TYPE_COLORINDEX_ARB 0x202C
extern HGLRC wglCreateContextAttribsARB(HDC hDC, HGLRC hShareContext, const int *attribList);
}
Maybe I got some #defines wrong?
Any input is highly appreciated.
ps.: The little glitch regarding AttribList[3] = 0; is fixed by now, must be 1. But that was not the issue.
Содержание
- Fatal error wglcreatecontextattribsarb failed как исправить
- Fatal error при запуске
- DOOM 2016: Fatal Error wglCreateContextAttribsARB failed #488
- Comments
- Fatal error wglcreatecontextattribsarb failed что делать
- Doom Fatal Error: wglcreatecontextattribsarb Failed (3 Fixes)
- How to Solve DOOM Fatal Error: wglcreatecontextattribsarb Failed?
Fatal error wglcreatecontextattribsarb failed как исправить
На новогодних каникулах решил себя побаловать – немного поиграть в стрелялку Doom. Но запуск игрушки на ноутбуке чуть было все не испортил — при запуске Doom было выдано сообщение об ошибке «FATAL ERROR: wglCreateContextAttribsARB failed».
Такая ошибка актуальна для ноутбуков с двумя видеокартами – интегрированной на Intel’вском чипсете и NVIDIA или AMD Radeon. Ноутбуки оснащают двумя видеокартами для экономии электроэнергии – для обычной работы используется интегрированная карта, а для специальных приложений — NVIDIA или AMD Radeon.
Так вот, не всегда приложения для видеокарт определяют корректно, какую из видеокарт использовать. Иногда это нужно указать явно.
Настройка использования видеокарты AMD Radeon
Для настройки видеокарты AMD Radeon необходимо запустить утилиту AMD Catalyst Control Center и указать, что для игрушки нужно использовать именно внешний видеоадаптер. Чтобы войти в утилиту, нужно на рабочем столе нажать правой кнопкой мыши и выбрать пункт «Настройка переключаемой графики» (Рис.1).
Рис.1. Настройка переключаемой графики для видеокарты AMD Radeon
В утилите для настройки видеокарты AMD Radeon AMD Catalyst Control Center нужно для игры, например, Doomx64.exe, установить параметр «Высокая производительность» (Рис.2).
Рис.2. Установка параметров графики для приложений
После установки параметров игра должна запуститься без ошибок.
Источник
Fatal error при запуске
Купил игру, установил в стиме, когда запускаешь, вылазит синее окно и пишет в конце FATAL ERROR
Помогите друзья))) Драйвера все свежие.
деньги увидели ключ дали, все скачал в стиме а дальше синее окно:
FATAL ERROR: wglCreateContextAttribsARB failed
Нашел на буржуйском сайте..
FATAL ERROR: wglCreateContextAttribsARB ошибка» ошибка возникает в результате неудачной попытки на видео, чтобы начать игру и использовать неподдерживаемые версии OpenGL. Например, если система имеет встроенный набор микросхем Intel HD для 3000 встроенных видеокарт и игра как Wolfenstein: Старый порядок начал, «wgl. «, произойдет ошибка, потому что чипсет поддерживает только OpenGL 3.1 или ниже. Поддержка OpenGL 3.2 или выше требуется для таких игр. Как решение зависит от водителя, исправление возлагается на производителя оборудования обновление включает поддержку. На старом оборудовании это вряд ли произойдет.
Источник
DOOM 2016: Fatal Error wglCreateContextAttribsARB failed #488
The text was updated successfully, but these errors were encountered:
It’s a known problem, the AMD/Intel OpenGL drivers on linux lack support for WGL_EXT_swap_control_tear . You might have better luck by using Vulkan.
Assuming you’ve got the Vulkan drivers installed, go to Steam, click Set Launch Options and add +r_renderapi 1 .
Your mesa drivers might be outdated, see #286
With the latest mesa and vulkan packages (git) it is possible to play the game in both OpenGL and Vulkan.
Had the same problem, running the game with AMD RX 580 and Mesa 18.1.6
Did what @GabrielMajeri explained to solve the problem. The game then run flawlessy.
I have a feeling this is because my mesa is outdated. Although installing mesa-git conflicts with vulkan-intel on Arch Linux.
Here is the error I get with the launch option +r_renderapi 1 :
FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)
Looks like the same issue in #286 that @Elkasitu had. I’ll look for a workaround for using both mesa-git and vulkan-intel
Why do you need vulkan-intel ? Are you trying to run Doom off of an iGPU?
I completely forgot about minimum requirements for my laptop. 🤦♂️
I’ll try this on my desktop later then.
Hi, I use Ubuntu 18.04.1 with Ubuntu-X PPA. Now I have Mesa 8.1.5 running on a RX 580 and I can’t run Doom 2016, ever with the +r_renderapi 1 parameter enabled.
Источник
Fatal error wglcreatecontextattribsarb failed что делать
У меня выдает ошибку wglCreateContextAttribsARB failed. Что мне делать? Игра не запускается, хотя я купила лицензионную версию.
Вопрос относиться к игре: Doom 4
Эта ошибка возникает, когда система запускает игру на интегрированной видеокарте. Чтобы исправить ошибку, необходимо включить максимальную производительность. Для этого необходимо нажимаем правой клавишей мыши по рабочему столу и заходим во вкладку Настройки переключаемой графики. На ярлыке Doom 4 нажимаем максимальная производительность.
DOOM Eternal — Из первых уст. запись закреплена
Частая ошибка синего экрана #DOOM Open Beta «FATAL:ERROR GL_ARB_clip_control not available» (или «wglCreateContextAttribsARB Failed»). Давайте попробуем разобраться!
Почему так выходит?
1. Если у вас 2 видеокарты (например на ноутбуке).
Решение: принудительно включите дискретную. Можно через драйвер, а можно через диспетчер устройств (отключите в Панель управления->Диспетчер устройств->Видеоадаптеры встроенную видеокарту, затем запустите игру).
На новогодних каникулах решил себя побаловать – немного поиграть в стрелялку Doom. Но запуск игрушки на ноутбуке чуть было все не испортил — при запуске Doom было выдано сообщение об ошибке «FATAL ERROR: wglCreateContextAttribsARB failed».
Такая ошибка актуальна для ноутбуков с двумя видеокартами – интегрированной на Intel’вском чипсете и NVIDIA или AMD Radeon. Ноутбуки оснащают двумя видеокартами для экономии электроэнергии – для обычной работы используется интегрированная карта, а для специальных приложений — NVIDIA или AMD Radeon.
Так вот, не всегда приложения для видеокарт определяют корректно, какую из видеокарт использовать. Иногда это нужно указать явно.
Настройка использования видеокарты AMD Radeon
Для настройки видеокарты AMD Radeon необходимо запустить утилиту AMD Catalyst Control Center и указать, что для игрушки нужно использовать именно внешний видеоадаптер. Чтобы войти в утилиту, нужно на рабочем столе нажать правой кнопкой мыши и выбрать пункт «Настройка переключаемой графики» (Рис.1).
Рис.1. Настройка переключаемой графики для видеокарты AMD Radeon
В утилите для настройки видеокарты AMD Radeon AMD Catalyst Control Center нужно для игры, например, Doomx64.exe, установить параметр «Высокая производительность» (Рис.2).
Рис.2. Установка параметров графики для приложений
После установки параметров игра должна запуститься без ошибок.
Источник
Doom Fatal Error: wglcreatecontextattribsarb Failed (3 Fixes)
DOOM 2016, otherwise known simply as DOOM by many people, acted as a soft reboot for what was arguably the most popular video game franchise in the entire world at a time. Back in the 90s, the first person shooter series was highly famous for its intense gameplay as well as revolutionary features which made it a truly fun experience.
Eventually the series came to a halt with there being no new entry for several years. This changed a few years ago with the surprise announcement of DOOM 2016, which revived the franchise.
While many were sceptical of it at first when it was announced, DOOM was loved by a majority of people and critics alike as it had lots to enjoy about it. However, the game itself did have some issues related to errors, bugs and whatnots.
While most of these were easily fixed, there are some issues which are still present as they have been from the start. An example of this is the DOOM “fatal error: wglcreatecontextattribsarb failed” issue. Here are some reasons and solutions for all those encountering this issue to learn about.
How to Solve DOOM Fatal Error: wglcreatecontextattribsarb Failed?
- Minimum Requirements
This is an issue that usually occurs when users try to run DOOM on a system that isn’t capable of handling the game. In other words, trying to launch the game on a system that doesn’t match the minimum requirements for the game will inevitably lead to this annoying error.
Because of this, users won’t be able to launch the game let alone play it at all. This is the most common reason for the error, and unfortunately it is also one of the most difficult ones to get through since there is only one possible solution for it.
This solution is to of course improve your PC or laptop to the point where it is capable of running DOOM. Read up on the minimum requirements for the game online and learn exactly what they are. Then get all the new components that users need for their device.
Just set them all up and install the associated drivers depending on what you bought. Once all of this is done the only thing left to do is running DOOM to see if it works or not this time around. There likely shouldn’t be any issues with it if the PC or laptop now match the minimum requirements.
- Designated GPU
It could be that your computer matches the minimum requirements for the game and even surpasses them but the issue still occurs. The reason for this is that the wrong GPU could be set as the activated one.
Most systems actually have two graphic cards inside of them, with one of them being the mobile one and the other one being the primary one which you usually use for all of your games. The mobile GPU is a part of the system from the start and is usually quite weak, not capable of running a majority of games, if any at all.
It especially isn’t capable of running games like this one. Long story short users will need to go into the system settings in order to change the activated GPU and ensure that DOOM is running on the right one.
Once that is done, try launching the game once these changes have been applied to the system and see if the error message pops up this time. If it finally works, players can enjoy DOOM all they like. However, if it doesn’t, there is one last thing which can be tried out.
- Update Graphic Card Drivers
Even if the correct graphic card is activated and meets the minimum requirements, users will still encounter the issue if said graphic card’s drivers aren’t up to date. This is another common reason for this issue, and this specific problem is perhaps the easiest one of them all to solve.
The only thing needed to solve it is to go online and check for any new updates available for the GPU players are using and installing whatever new version is available for it, if there is one.
Источник
I have a feeling this is because my mesa is outdated. Although installing mesa-git conflicts with vulkan-intel on Arch Linux.
Here is the error I get with the launch option +r_renderapi 1:
FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)
Configured log listener print-redirect tags
Added structured log listener print-redirect
Added structured log listener mp-cloud-gobbler
2018-08-25T08:21:49.342-07:00 LOG: Process started
Added structured log listener aws-kinesis-logger
Winsock Initialized
------ Initializing File System ------
Current search path:
- C:/users/steamuser/Saved Games/id Software/DOOM/base/
- Z:/home/deleuze/.local/share/Steam/steamapps/common/DOOM/base/
------ File System initialized.
------ Command Line ------
"Z:homedeleuze.localshareSteamsteamappscommonDOOMDOOMx64vk.exe" +com_SkipIntroVideo 1 +r_renderAPI -2
2018-08-25T08:21:49.346-07:00 LOG: Command Line: "Z:homedeleuze.localshareSteamsteamappscommonDOOMDOOMx64vk.exe" +com_SkipIntroVideo 1 +r_renderAPI -2
------ CPU Information ------
1 CPU package, 4 physical cores, 8 logical cores
3200 MHz Intel CPU with MMX & SSE & SSE2 & SSE3 & SSSE3 & SSE41 & SSE42 & AVX & HTT
32768 kB 1st level cache, 262144 kB 2nd level cache, 6291456 kB 3rd level cache
11904 MB System Memory
initializing resource container gameresources.resources
initializing resource container gameresources.patch
idLib::SetProduction( PROD_PRODUCTION )
------- Initializing renderSystem --------
PreliminaryRenderSetup
...registered window class
-------------------------
Application Info
-------------------------
App : DOOM - 1.0.2
Engine : idTech - 6.1.1
-------------------------
Instance Extensions
-------------------------
+ VK_KHR_surface
+ VK_KHR_win32_surface
FATAL ERROR: vkCreateDevice failed with error (VK_ERROR_FEATURE_NOT_PRESENT)
Dumped console text to C:userssteamuserSaved Gamesid SoftwareDOOMbaseErrorLog_08-25-2018__08-21-49am.txt.
idRenderSystem::Shutdown()
log file 'qconsole.log' opened on Sat Aug 25 08:21:49 2018
CrashHandler: Storing data and writing local report.
idStackTracer::GetSource: /home/proton/proton/wine/dlls/winevulkan/vulkan_thunks.c address:0x7FF6317B37EF, line: 2736
No address, error: 2
idStackTracer::GetSource: Failed
No address, error: 2
idStackTracer::GetSource: Failed
No address, error: 2
idStackTracer::GetSource: Failed
No address, error: 2
idStackTracer::GetSource: Failed
No address, error: 2
idStackTracer::GetSource: Failed
No address, error: 2
idStackTracer::GetSource: Failed
idStackTracer::GetSource: Failed
@GabrielMajeri
0 Members and 1 Guest are viewing this topic.
The «FATAL ERROR: wglCreateContextAttribsARB Failed» error occurs as the result of an unsuccessful attempt by a video game to start and use a unsupported version of OpenGL. For example, if a system has an onboard Intel HD 3000 embedded graphics chipset and a game like Wolfenstein: Old Order is started, the «wgl…» error will occur because the chipset only supports OpenGL 3.1 or below. OpenGL 3.2 or above is required for such games. As the solution is driver dependant, a fix relies on the hardware manufacturer updating to include support. For older hardware this is unlikely to happen.
Note: for systems with dual graphics capabilities where one of the subsystems is Intel based, the error can be fixed by switching drivers (subject to it also providing support for the correct version of OpenGL).
that’s the gfx chipset my laptop has. does intel have newer versions of the hardware for laptops?
They do, but for a laptop or other embedded hardware, it’s obviously nothing that can be swapped out. Generically the current lowest gfx chip is the HD 4000, midrange is the HD 5000, top end is the HD 6000, although they do have other versions available depending on the CPU — HD4200, HD 4400, HD 5500, HD 6100 and so on. As has always been the case though, DirectX support is decent (for embedded tech), OpenGL not, so even if you had a newer version of the chip it’s not exactly clear that games needing OpenGL 3.2 or above will run.
understood, and why are games still using opengl?
Cross-platform open standard. DirectX ‘belongs’ to Microsoft so technically to use it permission has to be granted (through license) which essentially limits its use/availability for Linux, iOS (Apple), Android and other mobile platforms. OpenGL & OpenCL, WebGL (and others) all allow for the display of complex graphics otherwise not possible.
Я столкнулся с проблемой, пытаясь отладить мое 64-битное приложение в Visual Studio 2015. Когда я переключаю его в режим отладки, он падает при создании окна. Что не произошло в 32-битном режиме;
Вот отредактированный код инициализации окна:
int indexPF;
WNDCLASS WinClass;
WinClass.style = CS_OWNDC | CS_PARENTDC;
WinClass.lpfnWndProc = WndProc;
WinClass.cbClsExtra = 0;
WinClass.cbWndExtra = 0;
WinClass.hInstance = hInstance;
WinClass.hIcon = LoadIcon(NULL, IDC_ICON);
WinClass.hCursor = LoadCursor(NULL, IDC_ARROW);
WinClass.hbrBackground = (HBRUSH)GetStockObject(5);
WinClass.lpszMenuName = NULL;
WinClass.lpszClassName = "N2";
if (!RegisterClass(&WinClass))
{
...report error and terminate...
}
Logger::Inst() << " ~RegisterClass;" << endl;
//CREATE WINDOW
if (fullScreen)
{
if ((hwnd = CreateWindowEx(WS_EX_LEFT, "N2", "N2",
WS_POPUP,
0, 0, width, height,
NULL, NULL, hInstance, NULL)) == 0)
{
...report error and terminate...
}
}
else
{
if ((hwnd = CreateWindowEx(WS_EX_LEFT, "N2", "N2",
WS_OVERLAPPEDWINDOW,
0, 0, width, height,
NULL, NULL, hInstance, NULL)) == 0)
{
...report error and terminate...
}
}
Logger::Inst() << " ~CreateWindow;" << endl;
//PFD SETUP
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER,
PFD_TYPE_RGBA,
32,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
24,
8, 0, PFD_MAIN_PLANE, 0, 0, 0x00FF00FF, 0
};
//HDC
if ((hdc = GetDC(hwnd)) == NULL)
{
...report error and terminate...
}
Logger::Inst() << " ~GotHDC;" << endl;
//SET PIXEL FORMAT
indexPF = ChoosePixelFormat(hdc, &pfd);
if (!indexPF)
{
...report error and terminate...
}
if (!SetPixelFormat(hdc, indexPF, &pfd))
{
pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER | PFD_SWAP_EXCHANGE;
indexPF = ChoosePixelFormat(hdc, &pfd);
if (!SetPixelFormat(hdc, indexPF, &pfd))
{
...report error and terminate...
}
}
Logger::Inst() << " ~SetPFD;" << endl;
//TEMP CONTEXT TO ACQUIRE POINTER
HGLRC tempContext = wglCreateContext(hdc);
if (!tempContext) {
...report error and terminate...
}
if (!wglMakeCurrent(hdc, tempContext)) {
...report error and terminate...
}
int major, minor; glGetIntegerv(GL_MAJOR_VERSION, &major); glGetIntegerv(GL_MINOR_VERSION, &minor);
if (major < 4 || minor < 1) {
...report error and terminate...
}
const int attribs[] =
{
WGL_CONTEXT_MAJOR_VERSION_ARB, major,
WGL_CONTEXT_MINOR_VERSION_ARB, minor,
WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
0, 0
};
PFNWGLCREATEBUFFERREGIONARBPROC wglCreateContextAttribsARB = (PFNWGLCREATEBUFFERREGIONARBPROC)wglGetProcAddress("wglCreateContextAttribsARB");
if (!wglCreateContextAttribsARB) {
...report error and terminate...
}
**!!! CRASH HERE !!!**
if (!(hglrc = (HGLRC)wglCreateContextAttribsARB(hdc, 0, (UINT)attribs))) {
...report error and terminate...
}
Отладчик показывает, что это происходит именно в wglCreateContextAttribsARB (nvoglv64.dll! 0000000074ccbdfa). Это полная загадка для меня. Единственная подсказка — после перехода на x64 требуются атрибуты, переданные как «UINT» вместо «const int *», я не понимаю, какую часть, даже не уверен, что преобразование между собой должно работать, кажется подозрительным. Идеи?
2
Решение
У вас есть опечатка: тип для wglCreateContextAttribsARB неправильно. Так должно быть PFNWGLCREATECONTEXTATTRIBSARBPROC,
Причина, по которой это сработало, когда вы работали с 32-разрядной версией, заключается в том, что сигнатура этих двух элементов в 32-разрядной системе практически одинакова:
wglCreateContextAttribsARB:
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList);
wglCreateBufferRegionARB:
typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType);
Второй и третий параметры wglCreateContextAttribsARB являются указателями HGLRC это дескриптор, который является просто указателем), а второй и третий параметры wglCreateBufferRegionARB целые числа. В 32-разрядных системах указатели имеют 32-разрядный размер, поэтому сигнатуры практически одинаковы.
В 64-разрядных указатели имеют размер 64-разрядных, но целые числа по-прежнему 32-разрядные (при условии, что вы используете MSVC), поэтому эти два указателя, которые вы передавали, были усечены.
4
Другие решения
Других решений пока нет …







