加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

PVRFrameEnableControlWindow函数--cocos

发布时间:2020-12-14 17:03:10 所属栏目:百科 来源:网络整理
导读:static void PVRFrameEnableControlWindow(bool bEnable){ HKEY hKey = 0; // Open PVRFrame control key,if not exist create it. if(ERROR_SUCCESS != RegCreateKeyExW(HKEY_CURRENT_USER,L"SoftwareImagination TechnologiesPVRVFRameSTARTUP",RE

static void PVRFrameEnableControlWindow(bool bEnable)
{
    HKEY hKey = 0;

    // Open PVRFrame control key,if not exist create it.
    if(ERROR_SUCCESS != RegCreateKeyExW(HKEY_CURRENT_USER,L"SoftwareImagination TechnologiesPVRVFRameSTARTUP",REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,&hKey,nullptr))
    {
        return;
    }

    const WCHAR* wszValue = L"hide_gui";
    const WCHAR* wszNewData = (bEnable) ? L"NO" : L"YES";
    WCHAR wszOldData[256] = {0};
    DWORD   dwSize = sizeof(wszOldData);
    LSTATUS status = RegQueryValueExW(hKey,wszValue,nullptr,(LPBYTE)wszOldData,&dwSize);
    if (ERROR_FILE_NOT_FOUND == status              // the key not exist
        || (ERROR_SUCCESS == status                 // or the hide_gui value is exist
        && 0 != wcscmp(wszNewData,wszOldData)))    // but new data and old data not equal
    {
        dwSize = sizeof(WCHAR) * (wcslen(wszNewData) + 1);
        RegSetValueEx(hKey,REG_SZ,(const BYTE *)wszNewData,dwSize);
    }

    RegCloseKey(hKey);
}

PVRVFrame is a collection of emulation libraries that allow OpenGL ES applications to run on desktop development machines that do not natively support the OpenGL ES APIs. It enables developers to target all of the Khronos OpenGL ES APIs in their IDE of choice for rapid development and gives users the freedom to develop without requiring access to a device that can support the version of OpenGL ES that is being targeted.


PVRVFrame是仿真库,允许OpenGL ES的应用程序可以在本身不支持OpenGL ES的API的桌面开发机器上运行的集合。它使开发人员能够针对所有在他们选择的IDE中的Khronos OpenGL ES的API来快速发展,给用户自由,而无需访问,可支持正在针对OpenGL ES的版本的设备来开发。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读