if i use monogame 3.0 beta on windows desktop, does it use the directx renderer (sharpdx) or the opengl renderer by default?

if it uses directx is there away to make sharpdx call directly? thanks!


in the meantime i found out that it does use OpenGL for windows desktop and DirectX for windows 8 metro.

  • \$\begingroup\$ It's worth as an edit to post or as a comment \$\endgroup\$ – Sri Harsha Chilakapati Dec 28 '12 at 13:11
  • \$\begingroup\$ @SriHarshaChilakapati then why is there the "Answer your own question" feature? \$\endgroup\$ – clamp Dec 28 '12 at 14:40
  • \$\begingroup\$ If you had solved it before others did, you can use it. \$\endgroup\$ – Sri Harsha Chilakapati Dec 29 '12 at 9:13
  • \$\begingroup\$ @SriHarshaChilakapati isnt that exactly what i did? \$\endgroup\$ – clamp Dec 29 '12 at 10:04
  • 2
    \$\begingroup\$ No. It's not a solution. It's your current finding but it's not the actual solution. If it's the actual solution, you'd mark it Accepted. \$\endgroup\$ – Sri Harsha Chilakapati Dec 29 '12 at 10:45

MonoGame currently only supports OpenGL. It has basic support for OpenGL ES for Android/iOS, and its DirectX support is still in development and incomplete. Hence, to answer both your questions (please don't post more than one question at a time):

It uses OpenGL by default.

There is no way to make it use DirectX at runtime, other than to recompile MonoGame in DirectX mode (which is not likely going to be usable for real projects yet).

Relevant code for MonoGame's graphics layers is at https://github.com/mono/MonoGame/tree/develop3d/MonoGame.Framework/Graphics

You will notice that DirectX support is wrapped behind conditional compilation in the code, that OpenGL assemblies are always pulled in even when compiled in DirectX mode, and that there is not even a project configuration in the .csproj that sets the necessary directives.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.