OpenGL 选择使用独立显卡

OpenGL 没有手动选择显卡的 API,在同时具备核心显卡和独立显卡的设备上常常会在核显上运行。

Windows 上可以添加如下代码选择使用独显:

1#ifdef __cplusplus
2extern "C" {
3#endif