DirectX 9 device enumerator. More...
Public Member Functions | |
Enumerator () | |
Set up the DirectX 9 device enumerator to defaults. | |
~Enumerator () | |
Release all allocated resources. | |
void | SetRequirePostPixelShaderBlending (uint_t bRequire) |
Set the flag making shaders a requirement. | |
void | SetResolutionMinMax (uint_t uMinWidth, uint_t uMinHeight, uint_t uMaxWidth, uint_t uMaxHeight) |
Set the minimum and maximum acceptable resolutions. | |
void | SetRefreshMinMax (uint_t uMin, uint_t uMax) |
Set the minimum and maximum acceptable refresh rates. | |
void | SetMultisampleQualityMax (uint_t uMax) |
Set the maximum acceptable anti-aliasing quality. | |
void | SetSoftwareVertexProcessingFlag (uint_t bSoftwareVP) |
Allow software vertex processed devices. | |
void | SetHardwareVertexProcessingFlag (uint_t bHardwareVP) |
Allow hardware vertex processed devices. | |
void | SetPureHarewareVertexProcessingFlag (uint_t bPureHarewareVP) |
Allow GPU vertex processed devices. | |
void | SetMixedVertexProcessingFlag (uint_t bMixedVP) |
Allow mixed hardware / software vertex processed devices. | |
uint_t | GetSoftwareVertexProcessingFlag (void) const |
uint_t | GetHardwareVertexProcessingFlag (void) const |
uint_t | GetPureHarewareVertexProcessingFlag (void) const |
uint_t | GetMixedVertexProcessingFlag (void) const |
Was mixed hardware / software vertex processed devices allowed? | |
const SimpleArray< uint_t > * | GetPossibleDepthStencilFormatList (void) const |
Return the list of depth/stencil buffer formats supported. | |
const SimpleArray< uint_t > * | GetPossibleMultisampleTypeList (void) const |
Return the list of multi-sample buffer types available. | |
const SimpleArray< uint_t > * | GetPossiblePresentIntervalList (void) const |
Return the list of presentation flags available. | |
void | ResetPossibleDepthStencilFormats (void) |
Reset the depth stencil list. | |
void | ResetPossibleMultisampleTypeList (void) |
Reset the multi-sample type list. | |
void | ResetPossiblePresentIntervalList (void) |
Reset the page flipping interval list. | |
uint_t | HasEnumerated (void) const |
TRUE if video devices were scanned | |
const SimpleArray< AdapterInfo * > * | GetAdapterInfoList (void) const |
Return the pointer to the list of adapters. | |
const AdapterInfo * | GetAdapterInfo (uint_t uAdapterOrdinal) const |
Return the pointer to a specific video adapter. | |
const DeviceInfo * | GetDeviceInfo (uint_t uAdapterOrdinal, uint_t uDeviceType) const |
Return the pointer to a specific video adapter. | |
const BufferFormatGroup * | GetBufferFormatGroup (uint_t uAdapterOrdinal, uint_t uDeviceType, uint_t uAdapterFormat, uint_t uBackBufferFormat, uint_t bWindowed) |
Return the pointer to a specific video buffer format group. | |
const BufferFormatGroup * | GetBufferFormatGroup (const DeviceSettings_t *pDeviceSettings) |
Return the pointer to a specific video buffer format group. | |
uint_t | Enumerate (IDirect3D9 *pD3D9, IsDeviceOkayProc pIsDeviceOkayFunc=0, void *pData=0) |
Scan all devices. | |
Private Member Functions | |
Enumerator (const Enumerator &)=delete | |
Enumerator & | operator= (const Enumerator &)=delete |
Enumerator (Enumerator &&)=delete | |
Enumerator & | operator= (Enumerator &&)=delete |
void | ClearAdapterInfoList (void) |
Release all AdapterInfo objects. | |
uint_t | EnumerateDevices (AdapterInfo *pAdapterInfo, const SimpleArray< uint_t > *pAdapterFormatList) |
Enumerate DirectX 9 devices for a specific adapter. | |
uint_t | EnumerateBufferFormats (const _D3DCAPS9 *pCaps, const AdapterInfo *pAdapterInfo, DeviceInfo *pDeviceInfo, const SimpleArray< uint_t > *pAdapterFormatList) |
Enumerate DirectX 9 buffer formats for a specific adapter. | |
Private Attributes | |
IDirect3D9 * | m_pD3D |
DirectX 9 device used for enumeration. | |
IsDeviceOkayProc | m_pIsDeviceAcceptableFunc |
Callback for pruning requested devices. | |
void * | m_pIsDeviceAcceptableFuncData |
Callback private data pointer. | |
SimpleArray< uint_t > | m_DepthStencilPossibleList |
Array of D3DFORMAT Depth stencil formats found on the devices. | |
SimpleArray< uint_t > | m_MultiSampleTypeList |
Array of D3DMULTISAMPLE_TYPE Anti-aliasing types fount. | |
SimpleArray< uint_t > | m_PresentIntervalList |
Array of D3DPRESENT_INTERVAL_* flags for page flipping types. | |
SimpleArray< AdapterInfo * > | m_AdapterInfoList |
Array of video adapters found. | |
uint_t | m_uMinWidth |
Minimum acceptable display width. | |
uint_t | m_uMaxWidth |
Maximum acceptable display width. | |
uint_t | m_uMinHeight |
Minimum acceptable display height. | |
uint_t | m_uMaxHeight |
Maximum acceptable display height. | |
uint_t | m_uRefreshMin |
Minimum acceptable display refresh rate. | |
uint_t | m_uRefreshMax |
Maximum acceptable display refresh rate. | |
uint_t | m_uMultisampleQualityMax |
Maximum anti-aliasing quality. | |
uint8_t | m_bHasEnumerated |
TRUE if enumeration was performed | |
uint8_t | m_bRequirePostPixelShaderBlending |
Set to TRUE if shader support is required. | |
uint8_t | m_bSoftwareVP |
TRUE if software vertex processing is acceptable | |
uint8_t | m_bHardwareVP |
TRUE if hardware vertex processing is acceptable | |
uint8_t | m_bPureHarewareVP |
TRUE if vertex processing done exclusively by GPU is acceptable | |
uint8_t | m_bMixedVP |
TRUE if mixed software and hardware vertex processing is acceptable | |
DirectX 9 device enumerator.
This class will cycle through every DirectX 9 compatible device and query its capabilities to allow the DisplayDirectX9 class select the best match for the video resolution requested to initialize with. This class is only for DirectX 9, use Burger::DisplayDirectX11 to support Windows 8 or higher instead.
|
privatedelete |
|
privatedelete |
Burger::DisplayDirectX9::Enumerator::Enumerator | ( | ) |
Set up the DirectX 9 device enumerator to defaults.
Burger::DisplayDirectX9::Enumerator::~Enumerator | ( | ) |
Release all allocated resources.
|
private |
Release all AdapterInfo objects.
uint_t BURGER_API Burger::DisplayDirectX9::Enumerator::Enumerate | ( | IDirect3D9 * | pD3D9, |
IsDeviceOkayProc | pIsDeviceOkayFunc = 0, | ||
void * | pData = 0 ) |
Scan all devices.
Given a DirectX 9 device, scan every device mode and enumerate them
pD3D9 | Pointer to a DirectX 9 device |
pIsDeviceOkayFunc | Pointer to a filter function, nullptr disables callback filtering |
pData | Pointer to a data pointer for the filter function |
|
private |
Enumerate DirectX 9 buffer formats for a specific adapter.
pCaps | Pointer to the D3DCAPS9 for the display device |
pAdapterInfo | Pointer to the adapter to enumerate |
pDeviceInfo | Pointer to the device attached to the adapter |
pAdapterFormatList | Pixel formats to enumerate |
|
private |
Enumerate DirectX 9 devices for a specific adapter.
pAdapterInfo | Pointer to the adapter to enumerate |
pAdapterFormatList | Pixel formats to enumerate |
const Burger::DisplayDirectX9::AdapterInfo *BURGER_API Burger::DisplayDirectX9::Enumerator::GetAdapterInfo | ( | uint_t | uAdapterOrdinal | ) | const |
Return the pointer to a specific video adapter.
uAdapterOrdinal | Ordinal value for a specific display device. |
|
inline |
|
inline |
Return the pointer to a specific video buffer format group.
Given a requested buffer format and window/full screen flag, locate if this buffer format is available, and return nullptr if not found or a valid pointer if located.
pDeviceSettings | Pointer to a DeviceSettings_t buffer that describes a requested video mode. |
const Burger::DisplayDirectX9::BufferFormatGroup *BURGER_API Burger::DisplayDirectX9::Enumerator::GetBufferFormatGroup | ( | uint_t | uAdapterOrdinal, |
uint_t | uDeviceType, | ||
uint_t | uAdapterFormat, | ||
uint_t | uBackBufferFormat, | ||
uint_t | bWindowed ) |
Return the pointer to a specific video buffer format group.
Given a requested buffer format and window/full screen flag, locate if this buffer format is available, and return NULL if not found or a valid pointer if located.
uAdapterOrdinal | Ordinal value for a specific display device. |
uDeviceType | D3DDEVTYPE value for the specific device type |
uAdapterFormat | D3DFORMAT value for the pixel format of the main buffer |
uBackBufferFormat | D3DFORMAT value for the pixel format of the back buffer |
bWindowed | TRUE if the format is available for a window. |
const Burger::DisplayDirectX9::DeviceInfo *BURGER_API Burger::DisplayDirectX9::Enumerator::GetDeviceInfo | ( | uint_t | uAdapterOrdinal, |
uint_t | uDeviceType ) const |
Return the pointer to a specific video adapter.
uAdapterOrdinal | Ordinal value for a specific display device. |
uDeviceType | D3DDEVTYPE value for the specific device type |
|
inline |
|
inline |
Was mixed hardware / software vertex processed devices allowed?
|
inline |
Return the list of depth/stencil buffer formats supported.
After Enumerate(IDirect3D9 *,IsDeviceOkayProc,void *) is called, a list of supported depth / stencil buffer formats is generated. It is not guaranteed that a specific depth / stencil is available for specific back buffer formats. If the format is not in this list, the device cannot render in that format. The values contained are DirectX 9 D3DFORMAT entries.
|
inline |
Return the list of multi-sample buffer types available.
After Enumerate(IDirect3D9 *,IsDeviceOkayProc,void *) is called, a list of multi-sample buffer types is generated. It is not guaranteed that a specific multi-sample buffer type is available for specific back buffer formats. If the buffer type is not in this list, the device cannot be set to that type. The values contained are DirectX 9 D3DMULTISAMPLE_TYPE entries.
|
inline |
Return the list of presentation flags available.
After Enumerate(IDirect3D9 *,IsDeviceOkayProc,void *) is called, a list of presentation flags is generated. If the presentation flag is not in this list, the device cannot be set to that type. The values contained are DirectX 9 D3DPRESENT_INTERVAL_* flags.
|
inline |
|
inline |
|
inline |
TRUE if video devices were scanned
After Enumerate(IDirect3D9 *,IsDeviceOkayProc,void *) is called, this flag is set.
|
privatedelete |
|
privatedelete |
void BURGER_API Burger::DisplayDirectX9::Enumerator::ResetPossibleDepthStencilFormats | ( | void | ) |
Reset the depth stencil list.
Clear out the depth stencil list, and insert the minimum list that is permitted with DirectX 9
void BURGER_API Burger::DisplayDirectX9::Enumerator::ResetPossibleMultisampleTypeList | ( | void | ) |
Reset the multi-sample type list.
Clear out the multi-sample type list, and insert the minimum list that is permitted with DirectX 9
From D3DMULTISAMPLE_NONE to D3DMULTISAMPLE_16_SAMPLES levels.
void BURGER_API Burger::DisplayDirectX9::Enumerator::ResetPossiblePresentIntervalList | ( | void | ) |
Reset the page flipping interval list.
Clear out the page flipping interval list, and insert the minimum list that is permitted with DirectX 9
From D3DMULTISAMPLE_NONE to D3DPRESENT_INTERVAL_FOUR
|
inline |
|
inline |
Allow mixed hardware / software vertex processed devices.
If this function is called with TRUE, enable the use of mixed hardware / software vertex processed video device drivers. FALSE to disable them.
\param bMixedVP \ref TRUE to enable mixed hardware / software vertex processing devices, \ref FALSE to disable. \sa Enumerate(IDirect3D9 *,IsDeviceOkayProc,void *), SetSoftwareVertexProcessingFlag(uint_t), SetHardwareVertexProcessingFlag(uint_t), or SetPureHarewareVertexProcessingFlag(uint_t)
|
inline |
Set the maximum acceptable anti-aliasing quality.
For performance, the maximum anti-aliasing quality can be clamped to a maximum, 0 disables the use of anti-aliasing.
uMax | Minimum acceptable anti-aliasing quality |
|
inline |
Set the minimum and maximum acceptable refresh rates.
If only certain display refresh rates are acceptable, call this function with the minimum and maximum settings.
uMin | Minimum acceptable refresh rate |
uMax | Minimum acceptable refresh rate |
|
inline |
Set the flag making shaders a requirement.
If support for post pixel blending is required, call this function with TRUE before calling Enumerate(). If no post pixel blending is required (Usually for applications that are pure software rendering), call this function with FALSE
|
inline |
Set the minimum and maximum acceptable resolutions.
If only certain display resolutions are acceptable, call this function with the minimum and maximum settings.
uMinWidth | Minimum acceptable width |
uMinHeight | Minimum acceptable height |
uMaxWidth | Maximum acceptable width |
uMaxHeight | Maximum acceptable height |
|
inline |
|
private |
Array of video adapters found.
|
private |
TRUE if hardware vertex processing is acceptable
|
private |
TRUE if enumeration was performed
|
private |
TRUE if mixed software and hardware vertex processing is acceptable
|
private |
TRUE if vertex processing done exclusively by GPU is acceptable
|
private |
Set to TRUE if shader support is required.
|
private |
TRUE if software vertex processing is acceptable
|
private |
Array of D3DFORMAT Depth stencil formats found on the devices.
|
private |
Array of D3DMULTISAMPLE_TYPE Anti-aliasing types fount.
|
private |
DirectX 9 device used for enumeration.
|
private |
Callback for pruning requested devices.
|
private |
Callback private data pointer.
|
private |
Array of D3DPRESENT_INTERVAL_* flags for page flipping types.
|
private |
Maximum acceptable display height.
|
private |
Maximum acceptable display width.
|
private |
Minimum acceptable display height.
|
private |
Minimum acceptable display width.
|
private |
Maximum anti-aliasing quality.
|
private |
Maximum acceptable display refresh rate.
|
private |
Minimum acceptable display refresh rate.