How to set Windows to OpenGL instead of DirectX/HLSL?

Our application runs on Windows, Android, and iOS all using UrhoSharp.

Is there a way to tell UrhoSharp at startup to use OpenGL instead of D3D? It’s a shame to be writing all shaders for both GLSL and HLSL - there’s just no point to it, if we can instead get OpenGL to work on Windows.

Graphics API selection is done at compile time, not at run time (at least for vanilla Urho3D). If you can’t rebuild UrhoSharp with the URHO3D_OPENGL flag, then you’re probably out of luck.


Ah shoot. I guess we’re stuck writing two versions of every shader.

For UWP, I think there are extra challenges to get OpenGL support anyways — and UWP is one of our platforms – so I don’t think we even have the option of compiling UrhoSharp for OpenGL on UWP.