Information for all pixel formats for a specific rendering device. More...
Classes | |
struct | DSMSConflict_t |
Structure to describe incompatible D3DFORMAT / D3DMULTISAMPLE_TYPE pairs. More... | |
struct | MSQuality_t |
Structure to describe the maximum quality for a multisample type. More... | |
Public Member Functions | |
BufferFormatGroup (uint_t uAdapterOrdinal, uint_t uDeviceType, uint_t uAdapterFormat, uint_t uBackBufferFormat, uint_t bWindowed) | |
Create a default BufferFormatGroup. | |
~BufferFormatGroup () | |
Dispose of a BufferFormatGroup. | |
void | SetParent (const AdapterInfo *pAdapterInfo) |
Set the parent AdapterInfo pointer. | |
const AdapterInfo * | GetAdapterInfo (void) const |
Get the parent AdapterInfo pointer. | |
void | SetParent (const DeviceInfo *pDeviceInfo) |
Set the parent DeviceInfo pointer. | |
const DeviceInfo * | GetDeviceInfo (void) const |
Get the parent DeviceInfo pointer. | |
uint_t | GetAdapterOrdinal (void) const |
Get the adapter ordinal value. | |
uint_t | GetDeviceType (void) const |
Get the device driver type. | |
uint_t | GetAdapterFormat (void) const |
Get the pixel format of the device adapter. | |
uint_t | GetBackBufferFormat (void) const |
Get the pixel format of the back buffer for the driver. | |
uint_t | IsWindowed (void) const |
TRUE if the driver is for a window, FALSE for full screen. | |
uintptr_t | GetMultiSampleQualityListSize (void) const |
Number of entries in the multisample quality list. | |
const MSQuality_t * | GetMultiSampleQualityList (void) const |
Get the base pointer to the multisample maximum quality list. | |
void | CreateConflictList (IDirect3D9 *pDirect3D9) |
Scan depth/stencil formats vs multi-sample types for conflicts. | |
void | CreateDepthStencilFormatList (IDirect3D9 *pDirect3D9, const SimpleArray< uint_t > *pPossibleList) |
Create the depth/stencil format list. | |
void | CreatePresentIntervalList (uint_t uIntervalFlags, const SimpleArray< uint_t > *pPossibleList) |
Enumerate DirectX 9 presentation flags for the device. | |
void | CreateMultiSampleTypeList (IDirect3D9 *pDirect3D9, const SimpleArray< uint_t > *pPossibleList, uint_t uMaxQuality) |
Enumerate DirectX 9 multi-sample types for the device. | |
uint_t | IsConflicted (uint_t uDSFormat, uint_t uMSType) const |
Test if a depth/stencil and multisample type are in conflict. | |
float | RankDevice (const DeviceSettings_t *pOptimalDeviceSettings, const _D3DDISPLAYMODE *pAdapterDesktopDisplayMode, uintptr_t *pBestModeIndex, uintptr_t *pBestMSAAIndex) const |
Generating a ranking based on closest match. | |
Private Attributes | |
SimpleArray< uint_t > | m_DepthStencilFormatList |
List of D3DFORMATs for supported depth buffers. | |
SimpleArray< uint_t > | m_PresentIntervalList |
List of D3DPRESENT flags. | |
SimpleArray< MSQuality_t > | m_MultiSampleQualityList |
List of number of quality levels for each multi-sample type. | |
SimpleArray< DSMSConflict_t > | m_DSMSConflictList |
List of D3D9EnumDSMSConflict_t for incompatible depth buffers. | |
const AdapterInfo * | m_pAdapterInfo |
Parent adapter information. | |
const DeviceInfo * | m_pDeviceInfo |
Parent device information. | |
uint_t | m_uAdapterOrdinal |
Index into device list. | |
uint_t | m_uDeviceType |
D3DDEVTYPE Hardware/software driver. | |
uint_t | m_uAdapterFormat |
D3DFORMAT Display pixel format. | |
uint_t | m_uBackBufferFormat |
D3DFORMAT Back buffer pixel format. | |
uint_t | m_bWindowed |
TRUE if windowed | |
Information for all pixel formats for a specific rendering device.
For each rendering device, this class contains a list of every supported pixel formats for the back buffers, including anti-aliasing, depth/stencil, and presentation intervals.
Burger::DisplayDirectX9::BufferFormatGroup::BufferFormatGroup | ( | uint_t | uAdapterOrdinal, |
uint_t | uDeviceType, | ||
uint_t | uAdapterFormat, | ||
uint_t | uBackBufferFormat, | ||
uint_t | bWindowed ) |
Create a default BufferFormatGroup.
Burger::DisplayDirectX9::BufferFormatGroup::~BufferFormatGroup | ( | ) |
Dispose of a BufferFormatGroup.
void BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::CreateConflictList | ( | IDirect3D9 * | pDirect3D9 | ) |
Scan depth/stencil formats vs multi-sample types for conflicts.
Not all depth/stencil buffer formats are compatible with multi-sampling. This function tests all combinations and creates a list of incompatible pairs.
pDirect3D9 | Pointer to the Direct3D9 instance the device is attached to. |
void BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::CreateDepthStencilFormatList | ( | IDirect3D9 * | pDirect3D9, |
const SimpleArray< uint_t > * | pPossibleList ) |
Create the depth/stencil format list.
Given a list of possible depth / stencil combinations, test the device if they are valid and for those that are valid, add them to the internal depth/stencil format list.
pDirect3D9 | Pointer to the Direct3D9 instance the device is attached to. |
pPossibleList | Pointer to the array of possible depth / stencil combinations. |
void BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::CreateMultiSampleTypeList | ( | IDirect3D9 * | pDirect3D9, |
const SimpleArray< uint_t > * | pPossibleList, | ||
uint_t | uMaxQuality ) |
Enumerate DirectX 9 multi-sample types for the device.
pDirect3D9 | Pointer to the Direct3D9 instance the device is attached to. |
pPossibleList | Pointer to the array of possible multisample settings |
uMaxQuality | Maximum quality allowed during enumeration |
void BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::CreatePresentIntervalList | ( | uint_t | uIntervalFlags, |
const SimpleArray< uint_t > * | pPossibleList ) |
Enumerate DirectX 9 presentation flags for the device.
uIntervalFlags | Valid presentation flags |
pPossibleList | Pointer to the array of possible presentation values. |
|
inline |
Get the pixel format of the device adapter.
|
inline |
Get the parent AdapterInfo pointer.
|
inline |
Get the adapter ordinal value.
|
inline |
Get the pixel format of the back buffer for the driver.
|
inline |
Get the parent DeviceInfo pointer.
|
inline |
Get the device driver type.
|
inline |
Get the base pointer to the multisample maximum quality list.
|
inline |
Number of entries in the multisample quality list.
uint_t BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::IsConflicted | ( | uint_t | uDSFormat, |
uint_t | uMSType ) const |
Test if a depth/stencil and multisample type are in conflict.
Iterate over the conflict array and if the pair is found in the table this function will return TRUE. If FALSE is returned, the pair is valid for creating a DirectX 9 device.
uDSFormat | Depth/stencil pixel format |
uMSType | Multisample data type |
|
inline |
float BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::RankDevice | ( | const DeviceSettings_t * | pOptimalDeviceSettings, |
const _D3DDISPLAYMODE * | pAdapterDesktopDisplayMode, | ||
uintptr_t * | pBestModeIndex, | ||
uintptr_t * | pBestMSAAIndex ) const |
Generating a ranking based on closest match.
Returns a ranking number that describes how closely this device combo matches the optimal combo based on the match options and the optimal device settings
pOptimalDeviceSettings | Pointer to the format requested |
pAdapterDesktopDisplayMode | Pointer to DirectX 9 display mode to test against |
pBestModeIndex | Pointer to best found mode index |
pBestMSAAIndex | Pointer to best anti-aliasing index |
|
inline |
Set the parent AdapterInfo pointer.
pAdapterInfo | Pointer to the parent AdapterInfo |
|
inline |
Set the parent DeviceInfo pointer.
pDeviceInfo | Pointer to the parent DeviceInfo |
|
private |
List of D3DFORMATs for supported depth buffers.
|
private |
List of D3D9EnumDSMSConflict_t for incompatible depth buffers.
|
private |
List of number of quality levels for each multi-sample type.
|
private |
Parent adapter information.
|
private |
Parent device information.
|
private |
List of D3DPRESENT flags.
|
private |
D3DFORMAT Display pixel format.
|
private |
Index into device list.
|
private |
D3DFORMAT Back buffer pixel format.
|
private |
D3DDEVTYPE Hardware/software driver.