⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xd3dsettings.h

📁 MFC+D3D编程:在MFC单文档界面下使用D3D9.0进行编程
💻 H
字号:
//-----------------------------------------------------------------------------
// XD3DSettings.h: Current D3D settings, including adapter, device, mode, etc.
//-----------------------------------------------------------------------------

#ifndef _XD3DSETTINGS_H_
#define _XD3DSETTINGS_H_

#include "XD3DUtil.h"
#include "XD3DEnum.h"

typedef CTArray<AdapterInfo*> AdapterInfoPtrArray;

//-----------------------------------------------------------------------------
// CXD3DSettings: Current D3D settings: adapter, device, mode, formats, etc.
//-----------------------------------------------------------------------------
class CXD3DSettings
{
public:
	AdapterInfoPtrArray	AdapterInfos;	// fullscreen [0] and windowed [1]

    UINT Windowed;						// index to the previous

	UINT ndm[2];	// indices to the best display mode within each AdapterInfo
	UINT ndi[2];	// indices to the best DeviceInfo within each AdapterInfo
    UINT ndc[2];	// indices to the best DeviceCombo within each DeviceInfo

	// indices into DeviceCombo properties that can be changed
	UINT nDSFormat;

	// constructor
	CXD3DSettings();

	// 'Get' wrappers
	AdapterInfo*		GetAdapterInfo();
    DeviceInfo*			GetDeviceInfo();
    D3DDISPLAYMODE		GetDisplayMode();
    
	VPTYPE				GetVPType();
    D3DFORMAT			GetBackBufferFormat();
    D3DFORMAT			GetDSFormat();
    D3DMULTISAMPLE_TYPE GetMSType();
    DWORD				GetMSQuality();
    DWORD				GetPresentInterval();

    // 'Set' wrappers
	void SetDSFormat(UINT nFmt);
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -