微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

PVRFrameEnableControlWindow函数--cocos

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"Software\\Imagination Technologies\\PVRVFRame\\STARTUP\\",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的版本的设备来开发。

原文地址:https://www.jb51.cc/cocos2dx/339730.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐