WebGL vendor [显卡]指纹

一、WebGL vendor:(厂商)

Google Inc. (NVIDIA)

c++定义在

third_party\angle\src\libANGLE\Display.cpp

格式化Google Inc.字符在Display::initVendorString()函数里面,可以在此修改值。

cpp 复制代码
void Display::initVendorString()
{
    mVendorString                = "Google Inc.";
    std::string vendorStringImpl = mImplementation->getVendorString();
    if (!vendorStringImpl.empty())
    {
        mVendorString += " (" + vendorStringImpl + ")";
    }
}
cpp 复制代码
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)

cpp 复制代码
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));函数实现在

主要修改指纹点介绍完毕,仅供学习参考。

相关推荐
saltymilk4 小时前
C++ 模板参数推导问题小记(模板类的模板构造函数)
c++·模板元编程
感哥5 小时前
C++ lambda 匿名函数
c++
沐怡旸11 小时前
【底层机制】std::unique_ptr 解决的痛点?是什么?如何实现?怎么正确使用?
c++·面试
感哥11 小时前
C++ 内存管理
c++
博笙困了17 小时前
AcWing学习——双指针算法
c++·算法
感哥18 小时前
C++ 指针和引用
c++
感哥1 天前
C++ 多态
c++
沐怡旸1 天前
【底层机制】std::string 解决的痛点?是什么?怎么实现的?怎么正确用?
c++·面试
River4162 天前
Javer 学 c++(十三):引用篇
c++·后端
感哥2 天前
C++ std::set
c++