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的版本的设备来开发。

相关文章

    本文实践自 RayWenderlich、Ali Hafizji 的文章《...
Cocos-code-ide使用入门学习地点:杭州滨江邮箱:appdevzw@1...
第一次開始用手游引擎挺激动!!!进入正题。下载资源1:从C...
    Cocos2d-x是一款强大的基于OpenGLES的跨平台游戏开发...
1.  来源 QuickV3sample项目中的2048样例游戏,以及最近《...
   Cocos2d-x3.x已经支持使用CMake来进行构建了,这里尝试...