Set OpenGL in TargetedRHIs

Hello, Unreal doesn’t want to load my level in Vulkan so I’m trying to launch it with the -opengl flag but I’m getting the following error:

Trying to force OpenGL RHI but the project does not have it in TargetedRHIs list 

How can I fix that?

OpenGL4 is deprecated and it is highly advised to look to switch to Vulkan. What was the issue with Vulkan? If you do need to use OpenGL you can re-enable it by adding it back to your TargetedRHIs list in Engine/Config/BaseEngine.ini and look for GLSL_430 and comment that line back in

That is caused by running out of device memory on your GPU. You can run nvidia-smi if you’re using nvidia to tell how much you have and how much is being used by UE4 + your project as well as other applications but yes this is general more of an issue on Vulkan then OpenGL. Ive ran into this issue often running UE4 with only 4GB of GPU memory (as well as 4k monitors)

Well I don’t have a choice really. I always get the same error on all distros except Lubuntu when I try to load my level:

 LoginId:f3b62c12ba924882865721f4102064cc-000003e8
EpicAccountId:

Assertion failed: [File:/home/qushy/UnrealEngine/Engine/Source/Runtime/VulkanRHI/Private/VulkanMemory.cpp] [Line: 279] Out of Device Memory, Requested=8640.00Kb MemTypeIndex=7

libpthread.so.0!UnknownFunction(0x957e)
libc.so.6!clone(+0x42)

So I need to use OpenGL. I’ve filed a bug report but Epic couldn’t find what’s wrong either. :frowning:

You may have saved me here. So in 1080p it works fine? Cause I have a 4K monitor and 6GBs of memory so this may not be a bug at all.

Ok I tested in 1080p same problem. So something else must be wrong. Anyway I got it to work on OpenGL so thanx :D.

Yeah I would double check, but its something being worked on to reduce memory the editor takes but OpenGL does take less compared to Vulkan which ends up causing things like this :frowning:

Please, how?

How did you get openGL to work? What all changes you did?