# Set OpenGL in TargetedRHIs

**URL:** <https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943>\
**Category:** Platform & Builds\
**Tags:** opengl, Linux, unreal-engine, question\
**Created:** [September 6, 2019, 5:00pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943 "2019-09-06T17:00:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_70a7fe3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_70a7fe3a](https://forums.unrealengine.com/u/anonymous_user_70a7fe3a)\
**Post date:** [September 6, 2019, 5:00pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/1 "2019-09-06T17:00:16Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Brandon.Schaefer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brandon.Schaefer](https://forums.unrealengine.com/u/Brandon.Schaefer)\
**Post date:** [September 6, 2019, 5:15pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/2 "2019-09-06T17:15:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_70a7fe3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_70a7fe3a](https://forums.unrealengine.com/u/anonymous_user_70a7fe3a)\
**Post date:** [September 6, 2019, 5:39pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/3 "2019-09-06T17:39:27Z")

</div>

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. ☹

---

<div class="post-metadata">

**Author:** ![Brandon.Schaefer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brandon.Schaefer](https://forums.unrealengine.com/u/Brandon.Schaefer)\
**Post date:** [September 6, 2019, 5:42pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/4 "2019-09-06T17:42:36Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_70a7fe3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_70a7fe3a](https://forums.unrealengine.com/u/anonymous_user_70a7fe3a)\
**Post date:** [September 6, 2019, 6:14pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/5 "2019-09-06T18:14:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Brandon.Schaefer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Brandon.Schaefer](https://forums.unrealengine.com/u/Brandon.Schaefer)\
**Post date:** [September 6, 2019, 6:17pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/6 "2019-09-06T18:17:25Z")

</div>

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 ☹

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_70a7fe3a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_70a7fe3a](https://forums.unrealengine.com/u/anonymous_user_70a7fe3a)\
**Post date:** [September 6, 2019, 6:25pm UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/7 "2019-09-06T18:25:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Collateral\_Studios](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Collateral\_Studios](https://forums.unrealengine.com/u/Collateral_Studios)\
**Post date:** [October 30, 2019, 10:21am UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/8 "2019-10-30T10:21:12Z")

</div>

Please, how?

---

<div class="post-metadata">

**Author:** ![meetakshay99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@meetakshay99](https://forums.unrealengine.com/u/meetakshay99)\
**Post date:** [October 22, 2020, 6:31am UTC](https://forums.unrealengine.com/t/set-opengl-in-targetedrhis/454943/9 "2020-10-22T06:31:10Z")

</div>

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