PVRFrameEnableControlWindow函数--cocos

前端之家收集整理的这篇文章主要介绍了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.f2er.com/cocos2dx/339730.html

猜你在找的Cocos2d-x相关文章