Does UE4 use directx or opengl?

Hi, does UE4 use directx or opengl? If UE4 use only one of them, is it possible to use another from the box or require hard work?

Do you mean the Editor? If not, modern game engines use all off them GL, GLES, GLES2, DirectX9, DirectX11…etc. Also editor probably configurable.

i mean packaged game in UE4, will run with DirectX or OpenGL?

Depends on your settings. Unless you override it, on Windows it will use DX11.

How do you override it to use OpenGL? I’ve tried but have not figured out how to do it

You can launch the project from the command line forcing OpenGL if you add the argument -opengl3. Don’t forget to select OpenGL3 in Project Settings > Windows.