WebGL vendor [显卡]指纹
一、WebGL vendor:(厂商)
Google Inc. (NVIDIA)
c++定义在
third_party\angle\src\libANGLE\Display.cpp
格式化Google Inc.字符在Display::initVendorString()函数里面,可以在此修改值。
void Display::initVendorString()
{
mVendorString = "Google Inc.";
std::string vendorStringImpl = mImplementation->getVendorString();
if (!vendorStringImpl.empty())
{
mVendorString += " (" + vendorStringImpl + ")";
}
}
const std::string &Display::getVendorString() const
{
return mVendorString;
}
二、WebGL renderer:(渲染)
ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002504) Direct3D11 vs_5_0 ps_5_0, D3D11)
src\ui\gl\gl_implementation.cc里面
const char* renderer_str =
reinterpret_cast<const char*>(api->glGetStringFn(GL_RENDERER));定义了获取
ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002504) Direct3D11 vs_5_0 ps_5_0, D3D11)
bool WillUseGLGetStringForExtensions(GLApi* api) {
const char* version_str =
reinterpret_cast<const char*>(api->glGetStringFn(GL_VERSION));
const char* renderer_str =
reinterpret_cast<const char*>(api->glGetStringFn(GL_RENDERER));
gfx::ExtensionSet extensions;
GLVersionInfo version_info(version_str, renderer_str, extensions);
return version_info.is_es || version_info.major_version < 3;
}
可以在此处修改。
const char* renderer_str =
reinterpret_cast<const char*>(api->glGetStringFn(GL_RENDERER));函数实现在
主要修改指纹点介绍完毕,仅供学习参考。