Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Attributes | List of all members
Burger::DisplayDirectX9::BufferFormatGroup Class Reference

Information for all pixel formats for a specific rendering device. More...

Collaboration diagram for Burger::DisplayDirectX9::BufferFormatGroup:
Collaboration graph
[legend]

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 AdapterInfoGetAdapterInfo (void) const
 Get the parent AdapterInfo pointer.
 
void SetParent (const DeviceInfo *pDeviceInfo)
 Set the parent DeviceInfo pointer.
 
const DeviceInfoGetDeviceInfo (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_tGetMultiSampleQualityList (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_tm_DepthStencilFormatList
 List of D3DFORMATs for supported depth buffers.
 
SimpleArray< uint_tm_PresentIntervalList
 List of D3DPRESENT flags.
 
SimpleArray< MSQuality_tm_MultiSampleQualityList
 List of number of quality levels for each multi-sample type.
 
SimpleArray< DSMSConflict_tm_DSMSConflictList
 List of D3D9EnumDSMSConflict_t for incompatible depth buffers.
 
const AdapterInfom_pAdapterInfo
 Parent adapter information.
 
const DeviceInfom_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
 

Detailed Description

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.

See also
DSMSConflict_t, DeviceInfo or AdapterInfo

Constructor & Destructor Documentation

◆ BufferFormatGroup()

Burger::DisplayDirectX9::BufferFormatGroup::BufferFormatGroup ( uint_t uAdapterOrdinal,
uint_t uDeviceType,
uint_t uAdapterFormat,
uint_t uBackBufferFormat,
uint_t bWindowed )

Create a default BufferFormatGroup.


Parameters
uAdapterOrdinalAdapter ordinal index
uDeviceTypeHardware/software device type
uAdapterFormatPixel format of the adapter
uBackBufferFormatPixel format of the back buffer
bWindowedTRUE if in a window, FALSE if full screen

◆ ~BufferFormatGroup()

Burger::DisplayDirectX9::BufferFormatGroup::~BufferFormatGroup ( )

Dispose of a BufferFormatGroup.


Member Function Documentation

◆ CreateConflictList()

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.

Parameters
pDirect3D9Pointer to the Direct3D9 instance the device is attached to.

◆ CreateDepthStencilFormatList()

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.

Parameters
pDirect3D9Pointer to the Direct3D9 instance the device is attached to.
pPossibleListPointer to the array of possible depth / stencil combinations.

◆ CreateMultiSampleTypeList()

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.


Parameters
pDirect3D9Pointer to the Direct3D9 instance the device is attached to.
pPossibleListPointer to the array of possible multisample settings
uMaxQualityMaximum quality allowed during enumeration

◆ CreatePresentIntervalList()

void BURGER_API Burger::DisplayDirectX9::BufferFormatGroup::CreatePresentIntervalList ( uint_t uIntervalFlags,
const SimpleArray< uint_t > * pPossibleList )

Enumerate DirectX 9 presentation flags for the device.


Parameters
uIntervalFlagsValid presentation flags
pPossibleListPointer to the array of possible presentation values.

◆ GetAdapterFormat()

uint_t Burger::DisplayDirectX9::BufferFormatGroup::GetAdapterFormat ( void ) const
inline

Get the pixel format of the device adapter.


Returns
The D3DFORMAT of the pixel type for the adapter screen

◆ GetAdapterInfo()

const AdapterInfo * Burger::DisplayDirectX9::BufferFormatGroup::GetAdapterInfo ( void ) const
inline

Get the parent AdapterInfo pointer.


Returns
Pointer to the parent AdapterInfo
See also
SetParent(const AdapterInfo *)

◆ GetAdapterOrdinal()

uint_t Burger::DisplayDirectX9::BufferFormatGroup::GetAdapterOrdinal ( void ) const
inline

Get the adapter ordinal value.


Returns
The ordinal value index for the display adapter

◆ GetBackBufferFormat()

uint_t Burger::DisplayDirectX9::BufferFormatGroup::GetBackBufferFormat ( void ) const
inline

Get the pixel format of the back buffer for the driver.


Returns
The D3DFORMAT of the pixel type for the back buffer

◆ GetDeviceInfo()

const DeviceInfo * Burger::DisplayDirectX9::BufferFormatGroup::GetDeviceInfo ( void ) const
inline

Get the parent DeviceInfo pointer.


Returns
Pointer to the parent DeviceInfo
See also
SetParent(const DeviceInfo *)

◆ GetDeviceType()

uint_t Burger::DisplayDirectX9::BufferFormatGroup::GetDeviceType ( void ) const
inline

Get the device driver type.


Returns
The D3DDEVTYPE device type for the buffer group

◆ GetMultiSampleQualityList()

const MSQuality_t * Burger::DisplayDirectX9::BufferFormatGroup::GetMultiSampleQualityList ( void ) const
inline

Get the base pointer to the multisample maximum quality list.


Returns
The base pointer to the quality list and it's possible to be nullptr if the list is empty.
See also
GetMultiSampleQualityListSize(void) const

◆ GetMultiSampleQualityListSize()

uintptr_t Burger::DisplayDirectX9::BufferFormatGroup::GetMultiSampleQualityListSize ( void ) const
inline

Number of entries in the multisample quality list.


Returns
Zero if the list is empty or the number of entries in the list.
See also
GetMultiSampleQualityList(void) const

◆ IsConflicted()

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.

Note
This is only available on Windows
Parameters
uDSFormatDepth/stencil pixel format
uMSTypeMultisample data type
Returns
TRUE if the pair is not supported, FALSE if there is no conflict.

◆ IsWindowed()

uint_t Burger::DisplayDirectX9::BufferFormatGroup::IsWindowed ( void ) const
inline

TRUE if the driver is for a window, FALSE for full screen.


Returns
The boolean value if the buffer is intended for a window or a full screen context.

◆ RankDevice()

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

Parameters
pOptimalDeviceSettingsPointer to the format requested
pAdapterDesktopDisplayModePointer to DirectX 9 display mode to test against
pBestModeIndexPointer to best found mode index
pBestMSAAIndexPointer to best anti-aliasing index
Returns
0.0f for no match, with a higher value for closest match

◆ SetParent() [1/2]

void Burger::DisplayDirectX9::BufferFormatGroup::SetParent ( const AdapterInfo * pAdapterInfo)
inline

Set the parent AdapterInfo pointer.


Parameters
pAdapterInfoPointer to the parent AdapterInfo
See also
GetAdapterInfo(void) const

◆ SetParent() [2/2]

void Burger::DisplayDirectX9::BufferFormatGroup::SetParent ( const DeviceInfo * pDeviceInfo)
inline

Set the parent DeviceInfo pointer.


Parameters
pDeviceInfoPointer to the parent DeviceInfo
See also
GetDeviceInfo(void) const

Member Data Documentation

◆ m_bWindowed

uint_t Burger::DisplayDirectX9::BufferFormatGroup::m_bWindowed
private

TRUE if windowed

◆ m_DepthStencilFormatList

SimpleArray<uint_t> Burger::DisplayDirectX9::BufferFormatGroup::m_DepthStencilFormatList
private

List of D3DFORMATs for supported depth buffers.

◆ m_DSMSConflictList

SimpleArray<DSMSConflict_t> Burger::DisplayDirectX9::BufferFormatGroup::m_DSMSConflictList
private

List of D3D9EnumDSMSConflict_t for incompatible depth buffers.

◆ m_MultiSampleQualityList

SimpleArray<MSQuality_t> Burger::DisplayDirectX9::BufferFormatGroup::m_MultiSampleQualityList
private

List of number of quality levels for each multi-sample type.

◆ m_pAdapterInfo

const AdapterInfo* Burger::DisplayDirectX9::BufferFormatGroup::m_pAdapterInfo
private

Parent adapter information.

◆ m_pDeviceInfo

const DeviceInfo* Burger::DisplayDirectX9::BufferFormatGroup::m_pDeviceInfo
private

Parent device information.

◆ m_PresentIntervalList

SimpleArray<uint_t> Burger::DisplayDirectX9::BufferFormatGroup::m_PresentIntervalList
private

List of D3DPRESENT flags.

◆ m_uAdapterFormat

uint_t Burger::DisplayDirectX9::BufferFormatGroup::m_uAdapterFormat
private

D3DFORMAT Display pixel format.

◆ m_uAdapterOrdinal

uint_t Burger::DisplayDirectX9::BufferFormatGroup::m_uAdapterOrdinal
private

Index into device list.

◆ m_uBackBufferFormat

uint_t Burger::DisplayDirectX9::BufferFormatGroup::m_uBackBufferFormat
private

D3DFORMAT Back buffer pixel format.

◆ m_uDeviceType

uint_t Burger::DisplayDirectX9::BufferFormatGroup::m_uDeviceType
private

D3DDEVTYPE Hardware/software driver.