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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? dxut.cpp

?? 聲音和圖片的加載功能,不過運行起來有點卡
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
//--------------------------------------------------------------------------------------
// File: DXUT.cpp
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#include "DXUT.h"
#define DXUT_MIN_WINDOW_SIZE_X 200
#define DXUT_MIN_WINDOW_SIZE_Y 200
#define DXUT_COUNTER_STAT_LENGTH 2048
#undef min // use __min instead inside this source file
#undef max // use __max instead inside this source file

#ifndef ARRAYSIZE
extern "C++" // templates cannot be declared to have 'C' linkage
template <typename T, size_t N>
char (*RtlpNumberOf( UNALIGNED T (&)[N] ))[N];

#define RTL_NUMBER_OF_V2(A) (sizeof(*RtlpNumberOf(A)))
#define ARRAYSIZE(A)    RTL_NUMBER_OF_V2(A)
#endif

//--------------------------------------------------------------------------------------
// Thread safety
//--------------------------------------------------------------------------------------
CRITICAL_SECTION g_cs;  
bool g_bThreadSafe = true;


//--------------------------------------------------------------------------------------
// Automatically enters & leaves the CS upon object creation/deletion
//--------------------------------------------------------------------------------------
class DXUTLock
{
public:
    inline DXUTLock()  { if( g_bThreadSafe ) EnterCriticalSection( &g_cs ); }
    inline ~DXUTLock() { if( g_bThreadSafe ) LeaveCriticalSection( &g_cs ); }
};



//--------------------------------------------------------------------------------------
// Helper macros to build member functions that access member variables with thread safety
//--------------------------------------------------------------------------------------
#define SET_ACCESSOR( x, y )       inline void Set##y( x t )   { DXUTLock l; m_state.m_##y = t; };
#define GET_ACCESSOR( x, y )       inline x Get##y()           { DXUTLock l; return m_state.m_##y; };
#define GET_SET_ACCESSOR( x, y )   SET_ACCESSOR( x, y ) GET_ACCESSOR( x, y )

#define SETP_ACCESSOR( x, y )      inline void Set##y( x* t )  { DXUTLock l; m_state.m_##y = *t; };
#define GETP_ACCESSOR( x, y )      inline x* Get##y()          { DXUTLock l; return &m_state.m_##y; };
#define GETP_SETP_ACCESSOR( x, y ) SETP_ACCESSOR( x, y ) GETP_ACCESSOR( x, y )


//--------------------------------------------------------------------------------------
// Stores timer callback info
//--------------------------------------------------------------------------------------
struct DXUT_TIMER
{
    LPDXUTCALLBACKTIMER pCallbackTimer;
    void* pCallbackUserContext;
    float fTimeoutInSecs;
    float fCountdown;
    bool  bEnabled;
    UINT  nID;
};

//--------------------------------------------------------------------------------------
// D3D10 Counters
//--------------------------------------------------------------------------------------
struct D3D10_COUNTERS
{
    float fGPUIdle;
    float fVertexProcessing;
    float fGeometryProcessing;
    float fPixelProcessing;
    float fOtherGPUProcessing;
    float fHostAdapterBandwidthUtilization;
    float fLocalVidmemBandwidthUtilization;
    float fVertexThroughputUtilization;
    float fTriangleSetupThroughputUtilization;
    float fFillrateThroughputUtilization;
    float fVSMemoryLimited;
    float fVSComputationLimited;
    float fGSMemoryLimited;
    float fGSComputationLimited;
    float fPSMemoryLimited;
    float fPSComputationLimited;
    float fPostTransformCacheHitRate;
    float fTextureCacheHitRate;
};

//--------------------------------------------------------------------------------------
// Stores DXUT state and data access is done with thread safety (if g_bThreadSafe==true)
//--------------------------------------------------------------------------------------
class DXUTState
{
protected:
    struct STATE
    {
        // D3D9 specific
        IDirect3D9*             m_D3D9;                    // the main D3D9 object
        IDirect3DDevice9*       m_D3D9Device;              // the D3D9 rendering device
        DXUTDeviceSettings*     m_CurrentDeviceSettings;   // current device settings
        D3DSURFACE_DESC         m_BackBufferSurfaceDesc9;  // D3D9 back buffer surface description
        D3DCAPS9                m_Caps;                    // D3D caps for current device

        // D3D10 specific
        bool                    m_D3D10Available;          // if true, then D3D10 is available 
        IDXGIFactory*           m_DXGIFactory;             // DXGI Factory object
        IDXGIAdapter*           m_D3D10Adapter;            // The DXGI adapter object for the D3D10 device
        IDXGIOutput**           m_D3D10OutputArray;        // The array of output obj for the D3D10 adapter obj
        UINT                    m_D3D10OutputArraySize;    // Number of elements in m_D3D10OutputArray
        ID3D10Device*           m_D3D10Device;             // the D3D10 rendering device
        IDXGISwapChain*         m_D3D10SwapChain;          // the D3D10 swapchain
        ID3D10Texture2D*        m_D3D10DepthStencil;       // the D3D10 depth stencil texture (optional)
        ID3D10DepthStencilView* m_D3D10DepthStencilView;   // the D3D10 depth stencil view (optional)
        ID3D10RenderTargetView* m_D3D10RenderTargetView;   // the D3D10 render target view
        DXGI_SURFACE_DESC       m_BackBufferSurfaceDesc10; // D3D10 back buffer surface description
        bool                    m_RenderingOccluded;       // Rendering is occluded by another window
        bool                    m_DoNotStoreBufferSize;    // Do not store the buffer size on WM_SIZE messages
        ID3D10Counter*			m_Counter_GPUIdle;
        ID3D10Counter*			m_Counter_VertexProcessing;
        ID3D10Counter*			m_Counter_GeometryProcessing;
        ID3D10Counter*			m_Counter_PixelProcessing;
        ID3D10Counter*			m_Counter_OtherGPUProcessing;
        ID3D10Counter*			m_Counter_HostAdapterBandwidthUtilization;
        ID3D10Counter*			m_Counter_LocalVidmemBandwidthUtilization;
        ID3D10Counter*			m_Counter_VertexThroughputUtilization;
        ID3D10Counter*			m_Counter_TriangleSetupThroughputUtilization;
        ID3D10Counter*			m_Counter_FillrateThrougputUtilization;
        ID3D10Counter*			m_Counter_VSMemoryLimited;
        ID3D10Counter*			m_Counter_VSComputationLimited;
        ID3D10Counter*			m_Counter_GSMemoryLimited;
        ID3D10Counter*			m_Counter_GSComputationLimited;
        ID3D10Counter*			m_Counter_PSMemoryLimited;
        ID3D10Counter*			m_Counter_PSComputationLimited;
        ID3D10Counter*			m_Counter_PostTransformCacheHitRate;
        ID3D10Counter*			m_Counter_TextureCacheHitRate;
        D3D10_COUNTERS			m_CounterData;

        // General
        HWND  m_HWNDFocus;                  // the main app focus window
        HWND  m_HWNDDeviceFullScreen;       // the main app device window in fullscreen mode
        HWND  m_HWNDDeviceWindowed;         // the main app device window in windowed mode
        HMONITOR m_AdapterMonitor;          // the monitor of the adapter 
        HMENU m_Menu;                       // handle to menu

        UINT m_FullScreenBackBufferWidthAtModeChange;  // back buffer size of fullscreen mode right before switching to windowed mode.  Used to restore to same resolution when toggling back to fullscreen
        UINT m_FullScreenBackBufferHeightAtModeChange; // back buffer size of fullscreen mode right before switching to windowed mode.  Used to restore to same resolution when toggling back to fullscreen
        UINT m_WindowBackBufferWidthAtModeChange;  // back buffer size of windowed mode right before switching to fullscreen mode.  Used to restore to same resolution when toggling back to windowed mode
        UINT m_WindowBackBufferHeightAtModeChange; // back buffer size of windowed mode right before switching to fullscreen mode.  Used to restore to same resolution when toggling back to windowed mode
        DWORD m_WindowedStyleAtModeChange;  // window style
        WINDOWPLACEMENT m_WindowedPlacement;// record of windowed HWND position/show state/etc
        bool  m_TopmostWhileWindowed;       // if true, the windowed HWND is topmost 
        bool  m_Minimized;                  // if true, the HWND is minimized
        bool  m_Maximized;                  // if true, the HWND is maximized
        bool  m_MinimizedWhileFullscreen;   // if true, the HWND is minimized due to a focus switch away when fullscreen mode
        bool  m_IgnoreSizeChange;           // if true, DXUT won't reset the device upon HWND size change

        double m_Time;                      // current time in seconds
        double m_AbsoluteTime;              // absolute time in seconds
        float m_ElapsedTime;                // time elapsed since last frame

        HINSTANCE m_HInstance;              // handle to the app instance
        double m_LastStatsUpdateTime;       // last time the stats were updated
        DWORD m_LastStatsUpdateFrames;      // frames count since last time the stats were updated
        float m_FPS;                        // frames per second
        int   m_CurrentFrameNumber;         // the current frame number
        HHOOK m_KeyboardHook;               // handle to keyboard hook
        bool  m_AllowShortcutKeysWhenFullscreen; // if true, when fullscreen enable shortcut keys (Windows keys, StickyKeys shortcut, ToggleKeys shortcut, FilterKeys shortcut) 
        bool  m_AllowShortcutKeysWhenWindowed;   // if true, when windowed enable shortcut keys (Windows keys, StickyKeys shortcut, ToggleKeys shortcut, FilterKeys shortcut) 
        bool  m_AllowShortcutKeys;          // if true, then shortcut keys are currently disabled (Windows key, etc)
        bool  m_CallDefWindowProc;          // if true, DXUTStaticWndProc will call DefWindowProc for unhandled messages. Applications rendering to a dialog may need to set this to false.
        STICKYKEYS m_StartupStickyKeys;     // StickyKey settings upon startup so they can be restored later
        TOGGLEKEYS m_StartupToggleKeys;     // ToggleKey settings upon startup so they can be restored later
        FILTERKEYS m_StartupFilterKeys;     // FilterKey settings upon startup so they can be restored later

        bool  m_AppSupportsD3D9Override;    // true if app sets via DXUTSetD3DVersionSupport()
        bool  m_AppSupportsD3D10Override;   // true if app sets via DXUTSetD3DVersionSupport()
        bool  m_UseD3DVersionOverride;      // true if the app ever calls DXUTSetD3DVersionSupport()

        bool  m_HandleEscape;               // if true, then DXUT will handle escape to quit
        bool  m_HandleAltEnter;             // if true, then DXUT will handle alt-enter to toggle fullscreen
        bool  m_HandlePause;                // if true, then DXUT will handle pause to toggle time pausing
        bool  m_ShowMsgBoxOnError;          // if true, then msgboxes are displayed upon errors
        bool  m_NoStats;                    // if true, then DXUTGetFrameStats() and DXUTGetDeviceStats() will return blank strings
        bool  m_ClipCursorWhenFullScreen;   // if true, then DXUT will keep the cursor from going outside the window when full screen
        bool  m_ShowCursorWhenFullScreen;   // if true, then DXUT will show a cursor when full screen
        bool  m_ConstantFrameTime;          // if true, then elapsed frame time will always be 0.05f seconds which is good for debugging or automated capture
        float m_TimePerFrame;               // the constant time per frame in seconds, only valid if m_ConstantFrameTime==true
        bool  m_WireframeMode;              // if true, then D3DRS_FILLMODE==D3DFILL_WIREFRAME else D3DRS_FILLMODE==D3DFILL_SOLID 
        bool  m_AutoChangeAdapter;          // if true, then the adapter will automatically change if the window is different monitor
        bool  m_WindowCreatedWithDefaultPositions; // if true, then CW_USEDEFAULT was used and the window should be moved to the right adapter
        int   m_ExitCode;                   // the exit code to be returned to the command line

        bool  m_DXUTInited;                 // if true, then DXUTInit() has succeeded
        bool  m_WindowCreated;              // if true, then DXUTCreateWindow() or DXUTSetWindow() has succeeded
        bool  m_DeviceCreated;              // if true, then DXUTCreateDevice() or DXUTSetD3D*Device() has succeeded

        bool  m_DXUTInitCalled;             // if true, then DXUTInit() was called
        bool  m_WindowCreateCalled;         // if true, then DXUTCreateWindow() or DXUTSetWindow() was called
        bool  m_DeviceCreateCalled;         // if true, then DXUTCreateDevice() or DXUTSetD3D*Device() was called

        bool  m_DeviceObjectsCreated;       // if true, then DeviceCreated callback has been called (if non-NULL)
        bool  m_DeviceObjectsReset;         // if true, then DeviceReset callback has been called (if non-NULL)
        bool  m_InsideDeviceCallback;       // if true, then the framework is inside an app device callback
        bool  m_InsideMainloop;             // if true, then the framework is inside the main loop
        bool  m_Active;                     // if true, then the app is the active top level window
        bool  m_TimePaused;                 // if true, then time is paused
        bool  m_RenderingPaused;            // if true, then rendering is paused
        int   m_PauseRenderingCount;        // pause rendering ref count
        int   m_PauseTimeCount;             // pause time ref count
        bool  m_DeviceLost;                 // if true, then the device is lost and needs to be reset
        bool  m_NotifyOnMouseMove;          // if true, include WM_MOUSEMOVE in mousecallback
        bool  m_Automation;                 // if true, automation is enabled
        bool  m_InSizeMove;                 // if true, app is inside a WM_ENTERSIZEMOVE
        UINT  m_TimerLastID;               // last ID of the DXUT timer
        
        int   m_OverrideForceAPI;           // if != -1, then override to use this Direct3D API version
        int   m_OverrideAdapterOrdinal;     // if != -1, then override to use this adapter ordinal
        bool  m_OverrideWindowed;           // if true, then force to start windowed
        int   m_OverrideOutput;             // if != -1, then override to use the particular output on the adapter
        bool  m_OverrideFullScreen;         // if true, then force to start full screen
        int   m_OverrideStartX;             // if != -1, then override to this X position of the window
        int   m_OverrideStartY;             // if != -1, then override to this Y position of the window
        int   m_OverrideWidth;              // if != 0, then override to this width
        int   m_OverrideHeight;             // if != 0, then override to this height
        bool  m_OverrideForceHAL;           // if true, then force to HAL device (failing if one doesn't exist)
        bool  m_OverrideForceREF;           // if true, then force to REF device (failing if one doesn't exist)
        bool  m_OverrideForcePureHWVP;      // if true, then force to use pure HWVP (failing if device doesn't support it)
        bool  m_OverrideForceHWVP;          // if true, then force to use HWVP (failing if device doesn't support it)
        bool  m_OverrideForceSWVP;          // if true, then force to use SWVP 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产中文字幕| 国产美女视频91| 美女任你摸久久| 成人av在线播放网站| 欧美日韩黄色一区二区| 精品99久久久久久| 亚洲最快最全在线视频| 国产成a人亚洲精品| 欧美欧美欧美欧美首页| **欧美大码日韩| 国产一区二区精品久久99 | 一区二区欧美精品| 精品一二三四区| 欧美日韩精品欧美日韩精品 | 丰满放荡岳乱妇91ww| 6080亚洲精品一区二区| 亚洲精品写真福利| 国产一区二区三区电影在线观看 | 免费欧美在线视频| 欧美专区日韩专区| 国产精品高潮呻吟| 国产精品自拍网站| 国产精品高清亚洲| 久草在线在线精品观看| 欧美一区二区三区免费大片| 亚洲精品免费播放| 91亚洲男人天堂| 国产精品国产精品国产专区不蜜| 久久av中文字幕片| 欧美一区二区在线不卡| 日日夜夜免费精品视频| 欧美在线观看一区| 亚洲精品国久久99热| 99久久99久久综合| 中文一区二区在线观看| 国产二区国产一区在线观看 | 91麻豆精品国产91久久久久久 | 欧美日精品一区视频| 中文字幕欧美一| av电影在线观看不卡| 国产精品素人视频| 成人免费黄色大片| 中文字幕一区三区| 91在线无精精品入口| 亚洲图片另类小说| 色av一区二区| 亚洲一区在线电影| 777奇米四色成人影色区| 午夜欧美视频在线观看| 欧美精选午夜久久久乱码6080| 亚洲日本一区二区三区| 欧洲国内综合视频| 蜜臀av性久久久久蜜臀aⅴ| 日韩精品一区二区三区三区免费| 精品一区二区三区香蕉蜜桃| 欧美国产精品一区| 色老汉av一区二区三区| 香蕉久久一区二区不卡无毒影院 | 国内一区二区视频| 国产无遮挡一区二区三区毛片日本| 粉嫩aⅴ一区二区三区四区五区| 亚洲日本在线a| 欧美一区二区精品| 丁香啪啪综合成人亚洲小说 | 国产一区二区影院| 国产精品久久网站| 欧美少妇一区二区| 激情偷乱视频一区二区三区| 国产精品素人视频| 91精品国产欧美日韩| 成人精品免费看| 亚洲va欧美va人人爽午夜| 久久尤物电影视频在线观看| 99re热视频这里只精品| 蜜桃av一区二区| 中文字幕永久在线不卡| 日韩精品一区二区三区老鸭窝| 成人免费视频一区| 日本成人中文字幕| 国产精品久久久久影院亚瑟| 在线播放日韩导航| 成人精品一区二区三区四区 | 99久久国产综合精品色伊| 亚洲二区在线观看| 国产精品免费人成网站| 欧美一级欧美三级在线观看| 暴力调教一区二区三区| 精品一区二区三区av| 午夜视黄欧洲亚洲| 国产精品蜜臀在线观看| 精品国产髙清在线看国产毛片| 欧美亚洲综合另类| 国产成人亚洲精品狼色在线| 日产国产高清一区二区三区| 亚洲摸摸操操av| 中文字幕av免费专区久久| 欧美tickling挠脚心丨vk| 欧美日韩一区中文字幕| 国产一区二区免费看| 日精品一区二区三区| 亚洲日本在线a| 国产精品免费aⅴ片在线观看| 久久影院电视剧免费观看| 欧美一级免费大片| 欧美日韩一区二区三区在线看| 成人动漫精品一区二区| 国产成人在线影院| 欧美96一区二区免费视频| 亚洲一区二区三区四区的| 中文字幕五月欧美| 国产女主播视频一区二区| 26uuu另类欧美亚洲曰本| 日韩欧美卡一卡二| 在线成人小视频| 欧美日韩在线三级| 在线观看亚洲一区| 91免费在线视频观看| 欧美日韩高清一区| 欧美人xxxx| 欧美一区二区三区视频| 7777精品伊人久久久大香线蕉 | 久久精品国产99久久6| 人人爽香蕉精品| 麻豆精品视频在线观看| 久久66热re国产| 国产高清在线观看免费不卡| 国产91丝袜在线播放0| 不卡av在线免费观看| 97精品久久久午夜一区二区三区| 色综合婷婷久久| 麻豆视频观看网址久久| 麻豆久久久久久久| 国产综合色视频| 国产成人免费9x9x人网站视频| 风间由美一区二区av101| 成人av小说网| 在线观看不卡一区| 在线播放欧美女士性生活| 精品国免费一区二区三区| 国产日产欧美一区二区视频| 国产精品久99| 亚洲国产欧美在线| 免费在线看一区| 国产v综合v亚洲欧| 91久久精品一区二区三| 91精品国产综合久久小美女| 久久亚区不卡日本| 中文字幕在线观看不卡视频| 日韩高清欧美激情| 国产69精品久久久久777| 色激情天天射综合网| 欧美电视剧免费全集观看| 中文字幕不卡在线观看| 亚洲成人免费在线| 粉嫩aⅴ一区二区三区四区| 欧美性受极品xxxx喷水| 久久影院视频免费| 亚洲成人免费av| 粉嫩13p一区二区三区| 欧美老肥妇做.爰bbww视频| 国产视频一区不卡| 亚洲大型综合色站| 国产福利91精品一区| 337p亚洲精品色噜噜| 国产精品视频免费看| 日本中文一区二区三区| 国产高清精品网站| 在线成人av网站| 亚洲精品成a人| 顶级嫩模精品视频在线看| 91精品国产乱码| 亚洲一区二区三区视频在线| 国产精品18久久久久| 91精品国产美女浴室洗澡无遮挡| 中文字幕中文乱码欧美一区二区| 久久爱另类一区二区小说| 欧美视频在线观看一区二区| 国产精品网站一区| 国产精一品亚洲二区在线视频| 日韩一区二区三区在线| 亚洲一区二区三区四区五区黄 | 国产精品影视网| 91精品国产高清一区二区三区| 亚洲美女偷拍久久| 国产不卡高清在线观看视频| 精品久久久久久最新网址| 天天影视色香欲综合网老头| 欧美亚洲综合另类| 亚洲人成网站色在线观看| 成人午夜私人影院| 国产网红主播福利一区二区| 国产一区二区精品久久| 欧美不卡视频一区| 久久精品久久久精品美女| 91麻豆精品国产| 午夜在线电影亚洲一区| 欧美日韩中文另类| 一区二区视频在线| 欧美综合久久久| 亚洲国产中文字幕在线视频综合 |