亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? dxutil.cpp

?? 3d 游戲 入門教程之例子源碼-圖像渲染
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
            QueryPerformanceCounter( &qwTime );

        // Return the elapsed time
        if( command == TIMER_GETELAPSEDTIME )
        {
            fElapsedTime = (double) ( qwTime.QuadPart - m_llLastElapsedTime ) / (double) m_llQPFTicksPerSec;
            m_llLastElapsedTime = qwTime.QuadPart;
            return (FLOAT) fElapsedTime;
        }
    
        // Return the current time
        if( command == TIMER_GETAPPTIME )
        {
            double fAppTime = (double) ( qwTime.QuadPart - m_llBaseTime ) / (double) m_llQPFTicksPerSec;
            return (FLOAT) fAppTime;
        }
    
        // Reset the timer
        if( command == TIMER_RESET )
        {
            m_llBaseTime        = qwTime.QuadPart;
            m_llLastElapsedTime = qwTime.QuadPart;
            m_llStopTime        = 0;
            m_bTimerStopped     = FALSE;
            return 0.0f;
        }
    
        // Start the timer
        if( command == TIMER_START )
        {
            if( m_bTimerStopped )
                m_llBaseTime += qwTime.QuadPart - m_llStopTime;
            m_llStopTime = 0;
            m_llLastElapsedTime = qwTime.QuadPart;
            m_bTimerStopped = FALSE;
            return 0.0f;
        }
    
        // Stop the timer
        if( command == TIMER_STOP )
        {
            if( !m_bTimerStopped )
            {
                m_llStopTime = qwTime.QuadPart;
                m_llLastElapsedTime = qwTime.QuadPart;
                m_bTimerStopped = TRUE;
            }
            return 0.0f;
        }
    
        // Advance the timer by 1/10th second
        if( command == TIMER_ADVANCE )
        {
            m_llStopTime += m_llQPFTicksPerSec/10;
            return 0.0f;
        }

        if( command == TIMER_GETABSOLUTETIME )
        {
            fTime = qwTime.QuadPart / (double) m_llQPFTicksPerSec;
            return (FLOAT) fTime;
        }

        return -1.0f; // Invalid command specified
    }
    else
    {
        // Get the time using timeGetTime()
        static double m_fLastElapsedTime  = 0.0;
        static double m_fBaseTime         = 0.0;
        static double m_fStopTime         = 0.0;
        double fTime;
        double fElapsedTime;
        
        // Get either the current time or the stop time, depending
        // on whether we're stopped and what command was sent
        if( m_fStopTime != 0.0 && command != TIMER_START && command != TIMER_GETABSOLUTETIME)
            fTime = m_fStopTime;
        else
            fTime = GETTIMESTAMP() * 0.001;
    
        // Return the elapsed time
        if( command == TIMER_GETELAPSEDTIME )
        {   
            fElapsedTime = (double) (fTime - m_fLastElapsedTime);
            m_fLastElapsedTime = fTime;
            return (FLOAT) fElapsedTime;
        }
    
        // Return the current time
        if( command == TIMER_GETAPPTIME )
        {
            return (FLOAT) (fTime - m_fBaseTime);
        }
    
        // Reset the timer
        if( command == TIMER_RESET )
        {
            m_fBaseTime         = fTime;
            m_fLastElapsedTime  = fTime;
            m_fStopTime         = 0;
            m_bTimerStopped     = FALSE;
            return 0.0f;
        }
    
        // Start the timer
        if( command == TIMER_START )
        {
            if( m_bTimerStopped )
                m_fBaseTime += fTime - m_fStopTime;
            m_fStopTime = 0.0f;
            m_fLastElapsedTime  = fTime;
            m_bTimerStopped = FALSE;
            return 0.0f;
        }
    
        // Stop the timer
        if( command == TIMER_STOP )
        {
            if( !m_bTimerStopped )
            {
                m_fStopTime = fTime;
                m_fLastElapsedTime  = fTime;
                m_bTimerStopped = TRUE;
            }
            return 0.0f;
        }
    
        // Advance the timer by 1/10th second
        if( command == TIMER_ADVANCE )
        {
            m_fStopTime += 0.1f;
            return 0.0f;
        }

        if( command == TIMER_GETABSOLUTETIME )
        {
            return (FLOAT) fTime;
        }

        return -1.0f; // Invalid command specified
    }
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToWideCch()
// Desc: This is a UNICODE conversion utility to convert a CHAR string into a
//       WCHAR string. 
//       cchDestChar is the size in TCHARs of wstrDestination.  Be careful not to 
//       pass in sizeof(strDest) 
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertAnsiStringToWideCch( WCHAR* wstrDestination, const CHAR* strSource, 
                                     int cchDestChar )
{
    if( wstrDestination==NULL || strSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;

    int nResult = MultiByteToWideChar( CP_ACP, 0, strSource, -1, 
                                       wstrDestination, cchDestChar );
    wstrDestination[cchDestChar-1] = 0;
    
    if( nResult == 0 )
        return E_FAIL;
    return S_OK;
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertWideStringToAnsi()
// Desc: This is a UNICODE conversion utility to convert a WCHAR string into a
//       CHAR string. 
//       cchDestChar is the size in TCHARs of strDestination
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertWideStringToAnsiCch( CHAR* strDestination, const WCHAR* wstrSource, 
                                     int cchDestChar )
{
    if( strDestination==NULL || wstrSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;

    int nResult = WideCharToMultiByte( CP_ACP, 0, wstrSource, -1, strDestination, 
                                       cchDestChar*sizeof(CHAR), NULL, NULL );
    strDestination[cchDestChar-1] = 0;
    
    if( nResult == 0 )
        return E_FAIL;
    return S_OK;
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertGenericStringToAnsi()
// Desc: This is a UNICODE conversion utility to convert a TCHAR string into a
//       CHAR string. 
//       cchDestChar is the size in TCHARs of strDestination
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertGenericStringToAnsiCch( CHAR* strDestination, const TCHAR* tstrSource, 
                                           int cchDestChar )
{
    if( strDestination==NULL || tstrSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;

#ifdef _UNICODE
    return DXUtil_ConvertWideStringToAnsiCch( strDestination, tstrSource, cchDestChar );
#else
    strncpy( strDestination, tstrSource, cchDestChar );
    strDestination[cchDestChar-1] = '\0';
    return S_OK;
#endif   
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertGenericStringToWide()
// Desc: This is a UNICODE conversion utility to convert a TCHAR string into a
//       WCHAR string. 
//       cchDestChar is the size in TCHARs of wstrDestination.  Be careful not to 
//       pass in sizeof(strDest) 
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertGenericStringToWideCch( WCHAR* wstrDestination, const TCHAR* tstrSource, 
                                           int cchDestChar )
{
    if( wstrDestination==NULL || tstrSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;

#ifdef _UNICODE
    wcsncpy( wstrDestination, tstrSource, cchDestChar );
    wstrDestination[cchDestChar-1] = L'\0';
    return S_OK;
#else
    return DXUtil_ConvertAnsiStringToWideCch( wstrDestination, tstrSource, cchDestChar );
#endif    
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToGeneric()
// Desc: This is a UNICODE conversion utility to convert a CHAR string into a
//       TCHAR string. 
//       cchDestChar is the size in TCHARs of tstrDestination.  Be careful not to 
//       pass in sizeof(strDest) on UNICODE builds
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertAnsiStringToGenericCch( TCHAR* tstrDestination, const CHAR* strSource, 
                                           int cchDestChar )
{
    if( tstrDestination==NULL || strSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;
        
#ifdef _UNICODE
    return DXUtil_ConvertAnsiStringToWideCch( tstrDestination, strSource, cchDestChar );
#else
    strncpy( tstrDestination, strSource, cchDestChar );
    tstrDestination[cchDestChar-1] = '\0';
    return S_OK;
#endif    
}




//-----------------------------------------------------------------------------
// Name: DXUtil_ConvertAnsiStringToGeneric()
// Desc: This is a UNICODE conversion utility to convert a WCHAR string into a
//       TCHAR string. 
//       cchDestChar is the size in TCHARs of tstrDestination.  Be careful not to 
//       pass in sizeof(strDest) on UNICODE builds
//-----------------------------------------------------------------------------
HRESULT DXUtil_ConvertWideStringToGenericCch( TCHAR* tstrDestination, const WCHAR* wstrSource, 
                                           int cchDestChar )
{
    if( tstrDestination==NULL || wstrSource==NULL || cchDestChar < 1 )
        return E_INVALIDARG;

#ifdef _UNICODE
    wcsncpy( tstrDestination, wstrSource, cchDestChar );
    tstrDestination[cchDestChar-1] = L'\0';    
    return S_OK;
#else
    return DXUtil_ConvertWideStringToAnsiCch( tstrDestination, wstrSource, cchDestChar );
#endif
}





//-----------------------------------------------------------------------------
// Name: DXUtil_LaunchReadme()
// Desc: Finds and opens the readme.txt for this sample
//-----------------------------------------------------------------------------
VOID DXUtil_LaunchReadme( HWND hWnd, TCHAR* strLoc )
{

#ifdef UNDER_CE
    // This is not available on PocketPC
    MessageBox( hWnd, TEXT("For operating instructions, please open the ")
                      TEXT("readme.txt file included with the project."),
                TEXT("DirectX SDK Sample"), MB_ICONWARNING | MB_OK );

    return;
#else 

    bool bSuccess = false;
    bool bFound = false;
    TCHAR strReadmePath[1024];
    TCHAR strExeName[MAX_PATH];
    TCHAR strExePath[MAX_PATH];
    TCHAR strSamplePath[MAX_PATH];
    TCHAR* strLastSlash = NULL;

    lstrcpy( strReadmePath, TEXT("") );
    lstrcpy( strExePath, TEXT("") );
    lstrcpy( strExeName, TEXT("") );
    lstrcpy( strSamplePath, TEXT("") );

    // If the user provided a location for the readme, check there first.
    if( strLoc )
    {
        HKEY  hKey;
        LONG lResult = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
                                    _T("Software\\Microsoft\\DirectX SDK"),
                                    0, KEY_READ, &hKey );
        if( ERROR_SUCCESS == lResult )
        {
            DWORD dwType;
            DWORD dwSize = MAX_PATH * sizeof(TCHAR);
            lResult = RegQueryValueEx( hKey, _T("DX9SDK Samples Path"), NULL,
                                      &dwType, (BYTE*)strSamplePath, &dwSize );
            strSamplePath[MAX_PATH-1] = 0; // RegQueryValueEx doesn't NULL term if buffer too small
            
            if( ERROR_SUCCESS == lResult )
            {
                _sntprintf( strReadmePath, 1023, TEXT("%s\\C++\\%s\\readme.txt"), 
                            strSamplePath, strLoc );
                strReadmePath[1023] = 0;

                if( GetFileAttributes( strReadmePath ) != 0xFFFFFFFF )
                    bFound = TRUE;
            }
        }

        RegCloseKey( hKey );
    }

    // Get the exe name, and exe path
    GetModuleFileName( NULL, strExePath, MAX_PATH );
    strExePath[MAX_PATH-1]=0;

    strLastSlash = _tcsrchr( strExePath, TEXT('\\') );
    if( strLastSlash )
    {
        _tcsncpy( strExeName, &strLastSlash[1], MAX_PATH );
        strExeName[MAX_PATH-1]=0;

        // Chop the exe name from the exe path
        *strLastSlash = 0;

        // Chop the .exe from the exe name

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
6080午夜不卡| 美女www一区二区| ㊣最新国产の精品bt伙计久久| 精品国产自在久精品国产| 日韩一区二区高清| 日韩精品在线看片z| 日韩欧美一区二区不卡| 欧美成人国产一区二区| 精品日韩一区二区三区| 精品久久一区二区三区| 精品电影一区二区| 国产三级欧美三级日产三级99| 久久―日本道色综合久久| 国产偷国产偷精品高清尤物| 国产日韩精品一区二区三区| 中文字幕制服丝袜一区二区三区| 欧美国产禁国产网站cc| 亚洲欧洲中文日韩久久av乱码| 亚洲精品ww久久久久久p站| 亚洲成人av福利| 日本视频一区二区| 国产在线国偷精品产拍免费yy| 国产精品1024| 国产欧美一区二区精品性色超碰 | 在线免费观看一区| 欧美无砖砖区免费| 日韩一区二区三区免费看| 久久综合丝袜日本网| 国产精品久久三区| 亚洲一区二区在线免费观看视频 | 91小视频在线观看| 欧美日韩亚洲丝袜制服| 国产精品白丝在线| 一区二区在线观看视频| 一区二区三区.www| 天天色天天爱天天射综合| 久久精品久久精品| 成人免费视频一区| 欧美日韩激情一区| 精品国产亚洲在线| 一区二区三区日韩欧美| 天堂一区二区在线免费观看| 精品裸体舞一区二区三区| 亚洲视频1区2区| 久久国产欧美日韩精品| 国产综合色在线视频区| 91精品国产色综合久久不卡蜜臀| 日本二三区不卡| 日韩免费高清电影| 国产精品天干天干在观线| 中文字幕中文乱码欧美一区二区| 一区二区视频在线看| 精品无码三级在线观看视频| 成人一级黄色片| 欧美日韩精品二区第二页| 国产亚洲欧美在线| 首页国产丝袜综合| 99re热视频这里只精品| 欧美va亚洲va在线观看蝴蝶网| 18成人在线观看| 狠狠狠色丁香婷婷综合久久五月| 色呦呦国产精品| 国产亚洲一区二区三区在线观看| 亚洲高清不卡在线| 99视频精品免费视频| 精品乱人伦一区二区三区| 亚洲成人免费视频| av影院午夜一区| 久久青草国产手机看片福利盒子| 亚洲成av人在线观看| 99久久婷婷国产综合精品电影| 精品国产一二三区| 奇米影视在线99精品| 在线影视一区二区三区| 国产精品久久久久久妇女6080| 久久成人精品无人区| 欧美调教femdomvk| 亚洲精品久久久蜜桃| 99国产精品一区| 国产女同互慰高潮91漫画| 韩国精品久久久| 日韩午夜激情免费电影| 石原莉奈在线亚洲二区| 欧美视频中文一区二区三区在线观看| 久久国产精品区| 欧美一区在线视频| 视频一区二区三区入口| 欧美日韩精品系列| 亚洲精品国产高清久久伦理二区| av一区二区三区四区| 欧美国产禁国产网站cc| 国产高清无密码一区二区三区| 欧美一区二区三区精品| 天天综合网天天综合色| 欧美日本高清视频在线观看| 亚洲在线视频网站| 在线观看成人免费视频| 一区二区三区日韩欧美精品| 色综合久久综合网97色综合| 亚洲视频在线观看三级| 91色视频在线| 亚洲一区二区三区自拍| 91高清视频在线| 亚洲sss视频在线视频| 欧洲一区二区三区免费视频| 亚洲国产综合91精品麻豆| 欧美三级电影网| 日韩有码一区二区三区| 日韩午夜激情av| 国产伦精品一区二区三区视频青涩 | 日韩你懂的电影在线观看| 日本不卡高清视频| 欧美大度的电影原声| 国模套图日韩精品一区二区 | 日日摸夜夜添夜夜添国产精品 | 成人欧美一区二区三区| 99re8在线精品视频免费播放| 亚洲日本在线天堂| 欧美三级电影精品| 日韩精品午夜视频| 久久亚洲二区三区| 成人精品免费视频| 亚洲尤物在线视频观看| 欧美一区二区三区视频免费播放 | 欧美一级精品在线| 韩国av一区二区三区四区| 国产欧美一区二区精品秋霞影院 | 中文字幕在线不卡| 91久久一区二区| 丝袜国产日韩另类美女| 精品1区2区在线观看| 国产成+人+日韩+欧美+亚洲| 亚洲欧美国产高清| 3d动漫精品啪啪| 国产成+人+日韩+欧美+亚洲| 一区二区在线看| 日韩欧美亚洲一区二区| 成人激情午夜影院| 亚洲h动漫在线| 国产亚洲一区二区在线观看| 色综合久久久久久久久久久| 日韩国产精品91| 亚洲国产高清不卡| 精品视频资源站| 国产成人h网站| 亚洲成人一区在线| 国产亚洲一区二区三区四区 | 亚洲私人黄色宅男| 91精品久久久久久蜜臀| 国产.精品.日韩.另类.中文.在线.播放| 日韩理论片一区二区| 91精品国产91久久久久久最新毛片 | 久久九九久精品国产免费直播| 成人激情开心网| 免费av网站大全久久| 亚洲青青青在线视频| 精品日韩欧美一区二区| 91久久精品一区二区三区| 老司机精品视频导航| 一区二区三区av电影| 国产三级精品视频| 欧美日韩成人综合| 91小视频免费看| 国产乱人伦精品一区二区在线观看| 亚洲免费观看在线视频| 久久久久久久久伊人| 在线视频欧美精品| 国产成人免费视频网站| 日韩激情一二三区| 亚洲精品一二三| 欧美激情一区二区在线| 日韩欧美一区二区三区在线| 欧美亚洲尤物久久| 91在线观看下载| 国产精品一区二区无线| 麻豆久久久久久久| 亚洲成av人片www| 亚洲黄色免费网站| 中文字幕亚洲一区二区va在线| 日韩欧美成人激情| 91精品国产日韩91久久久久久| 一本色道亚洲精品aⅴ| 成人性生交大合| 国产精品亚洲综合一区在线观看| 成人免费在线播放视频| 欧美精品在线一区二区| 99re视频这里只有精品| 国产经典欧美精品| 精品一区二区久久久| 日本aⅴ免费视频一区二区三区 | 高清不卡一区二区在线| 麻豆91在线观看| 欧美aaa在线| 免费在线一区观看| 日韩精品亚洲专区| 日产精品久久久久久久性色| 同产精品九九九| 亚洲国产成人高清精品| 一区二区三区成人| 一区二区三区在线免费|