retro_alt's picture

OpenTK and Mesa3D

Hi,

I was wondering if there was a way to use Mesa3D for software rendering in OpenTK. Does it do this by default?

The issue that I am running into is that I need to support OpenGL 2.0 on all video cards, even if the card doesn't support it. It doesn't matter how slow it is, as long as it works reliably.

Thanks!
Greg


Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Drivers are outside the scope of OpenTK. However, you can force OpenTK to use Mesa3d relatively easily:

  • On Windows, you can simply place the dlls of Mesa3D into the application directory.
  • On Linux, you can set LD_PRELOAD and LD_LIBRARY_PATH to load a custom libGL.so.
  • Recent versions of Mac OS X should support 2.0 without issue.

Two caveats:

  • You need to distribute different native dlls/shared objects for each OS and CPU type (32bit vs 64bit). This can be handled by your installer.
  • This approach will use software rendering unconditionally, i.e. there is no way to choose between Mesa3d and hardware drivers at runtime.

Finally, I'd suggest testing with Mesa3d on different configurations to make sure that it works correctly. In particular, I have experienced issues when using GLControl on top of Mesa3d on Windows (I have posted a patch to the Mesa3d bugtracker, but it's been waiting for review for over one year).