亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美美女一区二区三区| 99久久夜色精品国产网站| 亚洲免费观看高清完整版在线| 欧美精品一区二区精品网| 欧美第一区第二区| 欧美mv日韩mv国产网站app| 欧美一区二区日韩| 久久久久国产精品麻豆ai换脸| 精品国产凹凸成av人导航| 久久精品一区二区三区不卡牛牛| 久久亚洲二区三区| 国产精品午夜电影| 亚洲欧美色综合| 婷婷亚洲久悠悠色悠在线播放| 亚洲成av人片一区二区| 秋霞电影网一区二区| 久久99精品视频| 丁香激情综合五月| 色先锋资源久久综合| 欧美日本一区二区| 精品999在线播放| 国产精品美日韩| 亚洲妇女屁股眼交7| 国产乱码一区二区三区| av电影在线不卡| 欧美剧情电影在线观看完整版免费励志电影| 欧美日韩国产123区| 精品国产乱码久久久久久闺蜜| 国产精品久久免费看| 丝瓜av网站精品一区二区| 国产河南妇女毛片精品久久久| 91久久线看在观草草青青| 91精品国产免费| 国产精品高清亚洲| 热久久一区二区| 97se亚洲国产综合在线| 日韩欧美不卡一区| 伊人性伊人情综合网| 久久99久久99| 欧美精品亚洲二区| 国产精品久久久久毛片软件| 蜜桃久久av一区| 91社区在线播放| 久久久亚洲综合| 首页综合国产亚洲丝袜| 色妹子一区二区| 久久婷婷色综合| 日本在线观看不卡视频| 色吊一区二区三区| 国产欧美日韩视频在线观看| 日韩av一区二区三区四区| av亚洲产国偷v产偷v自拍| 亚洲精品在线免费观看视频| 亚洲妇女屁股眼交7| 色综合久久久久| 国产精品三级电影| 国产伦理精品不卡| 精品蜜桃在线看| 日本va欧美va瓶| 欧美日韩一区三区| 一区二区三区高清| 92国产精品观看| 一区精品在线播放| 成人午夜碰碰视频| 日本一区二区视频在线| 国产一区 二区| 国产欧美日产一区| 国产999精品久久久久久| 久久久久国产精品免费免费搜索| 久久机这里只有精品| 欧美一区二区三区视频免费播放| 亚洲成人激情综合网| 欧美日韩精品欧美日韩精品| 亚洲综合一区在线| 欧美三级日韩在线| 三级不卡在线观看| 日韩一区二区三区免费看| 蜜臀a∨国产成人精品| 日韩美女天天操| 国模无码大尺度一区二区三区| 欧美精品一区二区三区四区| 国产精品白丝jk黑袜喷水| 中文字幕精品一区| 色综合视频在线观看| 一区二区三区加勒比av| 欧美日本一道本| 久久精品久久久精品美女| 久久免费电影网| 成人avav影音| 亚洲网友自拍偷拍| 91精选在线观看| 国产一区二区电影| 亚洲精品水蜜桃| 制服.丝袜.亚洲.另类.中文| 黑人精品欧美一区二区蜜桃| 欧美国产1区2区| 欧美日韩视频不卡| 国产精一品亚洲二区在线视频| 国产精品美女久久久久久2018| 欧洲av在线精品| 精品系列免费在线观看| 国产精品视频一二| 欧美日本国产视频| 国产成人av资源| 亚洲一区二区av电影| 精品国产乱码久久久久久浪潮| 97se亚洲国产综合自在线不卡| 轻轻草成人在线| 中文字幕中文在线不卡住| 在线不卡欧美精品一区二区三区| 国产精品自拍在线| 亚洲午夜精品在线| 日本一区二区三区高清不卡| 欧美中文字幕一区二区三区亚洲| 国产综合色视频| 亚洲va欧美va天堂v国产综合| 国产免费成人在线视频| 欧美一级艳片视频免费观看| av在线不卡电影| 精品一区二区三区的国产在线播放| 1区2区3区国产精品| 精品区一区二区| 欧美精品自拍偷拍动漫精品| 成人avav影音| 国产成人午夜精品影院观看视频| 亚洲成人激情av| 亚洲欧美日韩系列| 国产清纯美女被跳蛋高潮一区二区久久w| 欧美三级电影在线看| 不卡在线观看av| 高清不卡一二三区| 精品一区二区三区av| 日日夜夜一区二区| 亚洲乱码中文字幕| 国产精品污污网站在线观看| 26uuu另类欧美亚洲曰本| 在线不卡免费欧美| 欧美精品乱码久久久久久| 一本大道av一区二区在线播放 | 91精品国产乱| 欧美日韩日本视频| 欧洲精品中文字幕| 色天天综合久久久久综合片| 99re成人精品视频| 91在线观看污| 99国产欧美另类久久久精品| 成人sese在线| 色婷婷亚洲一区二区三区| 91在线视频在线| 91麻豆免费视频| 日本丰满少妇一区二区三区| 欧美网站大全在线观看| 欧美性做爰猛烈叫床潮| 日本电影欧美片| 欧美久久一二三四区| 欧美一区二区国产| 精品第一国产综合精品aⅴ| 日韩欧美一区二区不卡| 精品国产一区二区在线观看| 久久伊人蜜桃av一区二区| 久久奇米777| 国产精品色在线观看| 综合激情网...| 一区二区三区 在线观看视频| 亚洲综合精品久久| 日韩精品福利网| 国产精品一区二区果冻传媒| 99国产麻豆精品| 欧美日韩一级视频| 欧美一区二区三区思思人| 久久久久久久久久美女| 国产精品家庭影院| 午夜免费久久看| 国产美女娇喘av呻吟久久 | 亚洲电影视频在线| 日韩vs国产vs欧美| 国产在线播精品第三| 97久久超碰精品国产| 制服丝袜成人动漫| 国产女同性恋一区二区| 一个色妞综合视频在线观看| 日韩电影在线免费| 成人免费毛片a| 欧美年轻男男videosbes| 久久一区二区三区四区| 亚洲日本丝袜连裤袜办公室| 久久精品国产一区二区| 99天天综合性| 日韩欧美国产电影| 亚洲日本va午夜在线影院| 九九在线精品视频| 91在线精品一区二区三区| 日韩视频在线一区二区| 亚洲老司机在线| 国产美女娇喘av呻吟久久| 欧美视频自拍偷拍| 国产精品伦一区| 麻豆高清免费国产一区| 欧美亚洲禁片免费| 中文字幕精品一区二区三区精品|