Starting out should I use OpenGL or DirectX or both

I’m a beginner to MonoGames but not a beginner to C# or software development. So I understand code organization can create a common set of code used by both and OpenGL project and a DirectX project. But I wanted to ask and phrase my question about this differently than previous questions.

In your experience with MonoGames, would it be easier to start with DirectX and port to OpenGL or start with OpenGL and port to DirectX? Or should I develop my game incrementally and support both at the same time?

I don’t think that starting with DirectX then porting to OpenGL would be any easier or harder than starting with OpenGL and porting to DirectX. Setting up your project so that both are supported from the start may be easier in the long term if you know you’re going to support both, but it does mean the initial set-up process will be more of a headache.

For my game, I initially only planned to support Windows, so I stuck with just DirectX. After I released the game and decided I wanted to natively support Linux, I had to port it to OpenGL, which I accomplished using Git branches. But now whenever I update my game I have to juggle four different branches of it (Steam-DirectX, Steam-OpenGL, Non-Steam-DirectX, Non-Steam-OpenGL).

Depends. Do you need only extremely basic rendering? Then it doesn’t matter. Do you plan to do anything slightly more advanced? Then OpenGL is borderline worthless as it stand in current MG live release.

Compute fork’s OpenGL is usable (Shaderconductor replacing ancient Mojo). Thing to remember, you will be writing shaders in HLSL (directX) no matter what and that will get transpiled into GLSL (openGL). Especially with Mojo, behavior will always be more reliable when removing transpiler out of the process. In addition to that, Mojo is feature locked to SM 3.0, which fell out of grace checks notes almost 15 years ago.