[D3D类型] D3DDISPLAYMODE

Visual Basic Express:

Type D3DDISPLAYMODE

    Width As Long

    Height As Long

    RefreshRate As Long

    Format As CONST_D3DFORMAT

End Type

 

C/C++ Express:

typedef struct D3DDISPLAYMODE

{    long Width;

     long Height;

     long RefreshRate;

     CONST_D3DFORMAT Format;

}

 

说明:

Height,Width分别是显示器的宽高的像素值

RefreshRate 是刷新率,CONST_D3DFORMAT是一个枚举类型:

 

Enum CONST_D3DFORMAT

    D3DFMT_UNKNOWN = 0

    D3DFMT_R8G8B8 = 20 '(&H14)

    D3DFMT_A8R8G8B8 = 21 '(&H15)

    D3DFMT_X8R8G8B8 = 22 '(&H16)

    D3DFMT_R5G6B5 = 23 '(&H17)

    D3DFMT_X1R5G5B5 = 24 '(&H18)
    D3DFMT_A1R5G5B5 = 25 '(&H19)

    D3DFMT_A4R4G4B4 = 26 '(&H1A)

    D3DFMT_R3G3B2 = 27 '(&H1B)

    D3DFMT_A8 = 28 '(&H1C)

    D3DFMT_A8R3G3B2 = 29 '(&H1D)

    D3DFMT_X4R4G4B4 = 30 '(&H1E)

    D3DFMT_A8P8 = 40 '(&H28)

    D3DFMT_P8 = 41 '(&H29)

    D3DFMT_L8 = 50 '(&H32)

    D3DFMT_A8L8 = 51 '(&H33)

    D3DFMT_A4L4 = 52 '(&H34)

    D3DFMT_V8U8 = 60 '(&H3C)

    D3DFMT_L6V5U5 = 61 '(&H3D)

    D3DFMT_X8L8V8U8 = 62 '(&H3E)

    D3DFMT_Q8W8V8U8 = 63 '(&H3F) 

    D3DFMT_V16U16 = 64 '(&H40)

    D3DFMT_W11V11U10 = 65 '(&H41)

    D3DFMT_D16_LOCKABLE = 70 '(&H46)

    D3DFMT_D32 = 71 '(&H47)

    D3DFMT_D15S1 = 73 '(&H49)

    D3DFMT_D24S8 = 75 '(&H4B)

    D3DFMT_D24X8 = 77 '(&H4D)

    D3DFMT_D24X4S4 = 79 '(&H4F)

    D3DFMT_D16 = 80 '(&H50)

    D3DFMT_VERTEXDATA = 100 '(&H64)

    D3DFMT_INDEX16 = 101 '(&H65)

    D3DFMT_INDEX32 = 102 '(&H66)

    D3DFMT_DXT1 = 827611204 '(&H31545844)

    D3DFMT_DXT2 = 844388420 '(&H32545844)

    D3DFMT_DXT3 = 861165636 '(&H33545844)

    D3DFMT_DXT4 = 877942852 '(&H34545844)

    D3DFMT_DXT5 = 894720068 '(&H35545844)

    D3DFMT_YUY2 = 844715353 '(&H32595559)

    D3DFMT_UYVY = 1498831189 '(&H59565955)

End Enum

 

可用GetAdapterDisplayMode 获取某个显卡的显示模式,例子

Dim lpMode As D3DDISPLAYMODE
lpd3d.GetAdapterDisplayMode D3DADAPTER_DEFAULT, lpMode

 

假定lpd3d是Direct3D对象,以上代码为获取默认显卡的当前显示模式

你可能感兴趣的:(c,struct,basic,express,h3c,Direct3D)