xd3dsettings.h

来自「MFC+D3D编程:在MFC单文档界面下使用D3D9.0进行编程」· C头文件 代码 · 共 50 行

H
50
字号
//-----------------------------------------------------------------------------
// 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 + =
减小字号Ctrl + -
显示快捷键?