简体   繁体   English

如何在OpenGL或Win32中获取图形卡型号名称?

[英]How to get the Graphics Card Model Name in OpenGL or Win32?

I would like to know the Graphics Card Model Name in OpenGL or in Win32 cuz I have a memory leaks bug on a specific kind of Graphics Card (only Intel HD not all Intel). 我想知道OpenGL或Win32中的图形卡型号名称因为我在特定类型的图形卡上存在内存泄漏错误(只有英特尔高清不是所有的英特尔)。

This is the bug : https://software.intel.com/en-us/forums/developing-games-and-graphics-on-intel/topic/280679 这是错误: https//software.intel.com/en-us/forums/developing-games-and-graphics-on-intel/topic/280679

The Vendor Name in OpenGL is not enough. OpenGL中的供应商名称是不够的。 Does someone know a way to get the name of the graphical card different than using Direct3D ? 有人知道一种方法来获取图形卡的名称与使用Direct3D不同吗? Or do you think that I can use D3D and OpenGL together? 或者您认为我可以一起使用D3D和OpenGL吗? Get the graphics card model? 获取显卡型号?

You can get all the information via the OpenGL Api. 您可以通过OpenGL Api获取所有信息。

https://www.khronos.org/opengl/wiki/Get_Context_Info https://www.khronos.org/opengl/wiki/Get_Context_Info

const GLubyte* vendor = glGetString​(GL_VENDOR); // Returns the vendor
const GLubyte* renderer = glGetString​(GL_RENDERER); // Returns a hint to the model

In my case the renderer returns the following string: "GeForce GT 750M/PCIe/SSE2" 在我的情况下,渲染器返回以下字符串:“GeForce GT 750M / PCIe / SSE2”

I don't know, what it would return for Intel or Amd cards. 我不知道,英特尔或Amd卡的回报是什么。 To my knowledge the format of the string and it's content is up to the implementation. 据我所知,字符串的格式及其内容取决于实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM