Graphics card model

Is there a way to find out, via code, the model or type of graphics card being used? Some 3D graphics will not run on old cards. It would be nice to politely tell the user that rather than have the app crash.

Windows ? Mac ? Linux ?

Windows and Mac

windows wmic can tell you
see https://superuser.com/questions/723506/get-the-video-card-model-via-command-line-in-windows

mac you should be able to get it via

  system_profiler -xml SPDisplaysDataType

in a terminal or shell and then poking through the XML for whatever criteria you;re looking for
and I’m sure there are other ways on macOS

In macOS, this command, without the -xml switch you get more human readable info, and perhaps a grep/egrep in the same shell command line is enough for you.