Classes | |
class | AdapterInfo |
Information for a display device. More... | |
class | BufferFormatGroup |
Information for all pixel formats for a specific rendering device. More... | |
class | DeviceInfo |
Information for a GPU device. More... | |
struct | DeviceSettings_t |
Structure to describe the state of a Direct3D9 device. More... | |
struct | DisplayMode_t |
Structure to describe a DirectX 9 display mode. More... | |
class | Enumerator |
DirectX 9 device enumerator. More... | |
Public Member Functions | |
const Burger::StaticRTTI * | get_StaticRTTI (void) const noexcept override |
Get the description to the class. | |
DisplayDirectX9 (GameApp *pGameApp) | |
~DisplayDirectX9 () | |
uint_t | Init (uint_t uWidth, uint_t uHeight, uint_t uDepth=32, uint_t uFlags=DEFAULTFLAGS) override |
void | Shutdown (void) override |
void | BeginScene (void) override |
void | EndScene (void) override |
Texture * | CreateTextureObject (void) override |
VertexBuffer * | CreateVertexBufferObject (void) override |
void | Resize (uint_t uWidth, uint_t uHeight) override |
void | SetViewport (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) override |
void | SetScissorRect (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) override |
void | SetClearColor (float fRed, float fGreen, float fBlue, float fAlpha) override |
void | SetClearDepth (float fDepth) override |
void | Clear (uint_t uMask) override |
void | Bind (Texture *pTexture, uint_t uIndex=0) override |
void | Bind (Effect *pEffect) override |
void | SetBlend (uint_t bEnable) override |
void | SetBlendFunction (eSourceBlendFactor uSourceFactor, eDestinationBlendFactor uDestFactor) override |
void | SetLighting (uint_t bEnable) override |
void | SetZWrite (uint_t bEnable) override |
void | SetDepthTest (eDepthFunction uDepthFunction) override |
void | SetCullMode (eCullMode uCullMode) override |
void | SetScissor (uint_t bEnable) override |
void | DrawPrimitive (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) override |
void | DrawElements (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) override |
IDirect3DVertexShader9 * | CreateVertexShader (const void *pVertexShaderBinary) const |
IDirect3DPixelShader9 * | CreatePixelShader (const void *pPixelShaderBinary) const |
IDirect3D9 * | GetDirect3D9 (void) const |
IDirect3DDevice9 * | GetDirect3DDevice9 (void) const |
ID3DXMatrixStack * | GetD3DXMatrixStack (void) const |
uint_t | OnlyPowerOf2 (void) const |
uint_t | IsVSynced (void) const |
uint_t | FullScreenGammaSupported (void) const |
uint_t | CanCalibrateGamma (void) const |
uint_t | IsRasterSlopeScaleDepthBias (void) const |
uint_t | IsRasterDepthBias (void) const |
uint_t | IsnVidia (void) const |
uint_t | IsATI (void) const |
uint_t | IsIntel (void) const |
uint_t | GetMaxTextureWidth (void) const |
uint_t | GetMaxTextureHeight (void) const |
uint_t | GetMaxTextureStages (void) const |
uint_t | GetMaxPossibleAnisotropy (void) const |
uint_t | GetClearColor (void) const |
float | GetClearDepth (void) const |
const _D3DSURFACE_DESC * | GetBackBufferSurfaceDesc9 (void) const |
Return the pointer to a D3DSURFACE_DESC for the current device. | |
const _D3DCAPS9 * | GetCaps (void) const |
Return the pointer to a D3DCAPS9 for the current device. | |
IDirect3D9 * | LoadDirect3D9 (void) |
Create an IDirect3D9 instance. | |
void | InitState (void) |
Set all of DirectX 9's rendering states to defaults. | |
uint_t | GetAdapterOrdinalFromMonitor (HMONITOR__ *hMonitor, uint_t *pAdapterOrdinal) |
Get the adapter ordinal from HMONITOR. | |
uint_t | GetDesktopResolution (uint_t uAdapterOrdinal, uint_t *pWidth, uint_t *pHeight) |
Get the desktop resolution of a display. | |
void | UpdateEnumeration (uint_t bForce) |
Enumerate devices if not already cached. | |
void | UpdateBackBufferDesc (void) |
Load the back buffer description from the DirectX 9 device. | |
uint_t | ToggleFullScreen (void) |
Toggle full screen and windowed mode. | |
uint_t | ToggleREF (void) |
Toggle hardware and software renderer. | |
void | CheckForWindowSizeChange (void) override |
Resize the back buffer if the window size changed. | |
void | CheckForWindowChangingMonitors (void) override |
Check if the window has changed monitors. | |
Public Member Functions inherited from Burger::Display | |
Display (GameApp *pGameApp) | |
Default constructor. | |
virtual | ~Display () |
Default destructor. | |
uint_t | Init (uint_t uWidth, uint_t uHeight, uint_t uDepth=32, uint_t uFlags=DEFAULTFLAGS) |
Initialize the display. | |
void | Shutdown (void) |
Shut down the current video display context. | |
void | BeginScene (void) |
Prepare the display for rendering. | |
void | EndScene (void) |
Render the scene to the display. | |
Texture * | CreateTextureObject (void) |
VertexBuffer * | CreateVertexBufferObject (void) |
void | Resize (uint_t uWidth, uint_t uHeight) |
void | SetViewport (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) |
void | SetScissorRect (uint_t uX, uint_t uY, uint_t uWidth, uint_t uHeight) |
void | SetClearColor (float fRed, float fGreen, float fBlue, float fAlpha) |
void | SetClearDepth (float fDepth) |
void | Clear (uint_t uMask) |
void | Bind (Texture *pTexture, uint_t uIndex=0) |
void | Bind (Effect *pEffect) |
void | SetBlend (uint_t bEnable) |
void | SetBlendFunction (eSourceBlendFactor uSourceFactor, eDestinationBlendFactor uDestFactor) |
void | SetLighting (uint_t bEnable) |
void | SetZWrite (uint_t bEnable) |
void | SetDepthTest (eDepthFunction uDepthFunction) |
void | SetCullMode (eCullMode uCullMode) |
void | SetScissor (uint_t bEnable) |
void | DrawPrimitive (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) |
void | DrawElements (ePrimitiveType uPrimitiveType, VertexBuffer *pVertexBuffer) |
tagWINDOWPLACEMENT * | GetWindowedPlacement (void) noexcept |
Return the pointer to a WINDOWPLACEMENT. | |
uint_t | HandleMinMax (HWND__ *pWindow, uintptr_t lParam) |
Handler for WM_GETMINMAXINFO events. | |
D3DVertexShader * | CreateVertexShader (const void *pVertexShaderBinary) const |
D3DPixelShader * | CreatePixelShader (const void *pPixelShaderBinary) const |
D3DDevice * | GetD3DDevice (void) const noexcept |
void | InitState (void) |
uint_t | IsWideScreen (void) noexcept |
uint_t | IsHiDef (void) noexcept |
uint_t | IsInterlaced (void) noexcept |
NSView * | GetView (void) const noexcept |
Get the window's NSView. | |
NSWindowController * | GetWindowController (void) const noexcept |
Get the window's NSWindowController. | |
NSOpenGLView * | GetOpenGLView (void) const noexcept |
Get the window's NSOpenGLView. | |
_CGLContextObject * | GetOpenGLContext (void) const noexcept |
Get the window's _CGLContextObject. | |
NSWindow * | GetFullScreenWindow (void) const noexcept |
Get the window pointer. | |
void | SetFullScreenWindow (NSWindow *pFullScreenWindow) noexcept |
Enable a full screen window and disable the primary game window. | |
EAGLContext * | GetGLContext (void) const noexcept |
The currently active OpenGL context. | |
uint_t | GetFrontBuffer (void) const noexcept |
Front buffer index. | |
uint_t | GetColorBuffer (void) const noexcept |
Color buffer index. | |
uint_t | GetDepthBuffer (void) const noexcept |
Depth buffer index. | |
void | Pause (uint_t bPauseRendering) |
Pause or resume rendering. | |
Texture * | GetBoundTexture (uint_t uIndex=0) const noexcept |
Texture * | CreateTexture (Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping and filters preset. | |
Texture * | CreateTexture (uint_t uWidth, uint_t uHeight, Image::ePixelTypes uPixelType, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with buffer and wrapping and filters preset. | |
Texture * | CreateTexturePNG (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTexturePNG (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTexturePNG (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureGIF (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureGIF (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureGIF (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureTGA (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureTGA (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureTGA (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureBMP (const char *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureBMP (Filename *pFilename, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
Texture * | CreateTextureBMP (RezFile *pRezFile, uint_t uRezNum, Texture::eWrapping uWrapping, Texture::eFilter uFilter) |
Create a texture object with wrapping, filters and a texture source. | |
VertexBuffer * | CreateVertexBuffer (const VertexBuffer::VertexAoS_t *pDescription) |
Create a vertex buffer object with from a vertex description. | |
void | SetPalette (uint_t uStart, uint_t uCount, const uint8_t *pPalette) |
Update the color palette. | |
void | SetPalette (uint_t uStart, uint_t uCount, const RGBAWord8_t *pPalette) |
Update the color palette. | |
void | SetBorderColor (uint_t uColor) |
Update the display border color. | |
void | SetWindowTitle (const char *pTitle) |
Set the display window title. | |
void | SetPaletteBlack (void) |
Set the screen palette to all black. | |
void | SetPaletteWhite (void) |
Set the screen palette to all white. | |
void | SetPalette (const uint8_t *pPalette) |
Update the color palette. | |
void | SetPalette (const RGBAWord8_t *pPalette) |
Update the color palette. | |
void | SetPalette (void **pHandle) |
Update the color palette using a memory handle. | |
void | SetPalette (RezFile *pRez, uint_t uResID) |
Update the color palette using a resource. | |
void | SetPalette (uint_t uStart, uint_t uCount, RezFile *pRez, uint_t uResID) |
Update a partial color palette using a resource. | |
void | FadeTo (const uint8_t *pPalette, FadeProc pProc=nullptr, void *pData=nullptr) |
Fade the hardware palette to a palette. | |
void | FadeToBlack (FadeProc pProc=nullptr, void *pData=nullptr) |
Fade the hardware palette to black. | |
void | FadeToWhite (FadeProc pProc=nullptr, void *pData=nullptr) |
Fade the hardware palette to white. | |
void | FadeTo (RezFile *pRez, uint_t uResID, FadeProc pProc=nullptr, void *pData=nullptr) |
Fade the hardware palette to a palette. | |
void | FadeTo (void **pHandle, FadeProc pProc=nullptr, void *pData=nullptr) |
Fade the hardware palette to a palette. | |
GameApp * | GetGameApp (void) const noexcept |
Get the parent application pointer. | |
uint_t | GetWidth (void) const noexcept |
Get the width in pixels of the display buffer. | |
uint_t | GetHeight (void) const noexcept |
Get the height in pixels of the display buffer. | |
uint_t | GetDepth (void) const noexcept |
Get the depth in bits of the display buffer. | |
uint_t | GetFlags (void) const noexcept |
Get the flags associated with this Display class instance. | |
uint_t | GetDisplayWidth (void) const noexcept |
Get the width in pixels of the display hardware. | |
uint_t | GetDisplayHeight (void) const noexcept |
Get the height in pixels of the display hardware. | |
float | GetWidthFloat (void) const noexcept |
Get the width in pixels of the display buffer. | |
float | GetHeightFloat (void) const noexcept |
Get the height in pixels of the display buffer. | |
float | GetAspectRatioX (void) const noexcept |
Get the aspect ratio in the format of width/height. | |
float | GetAspectRatioY (void) const noexcept |
Get the aspect ratio in the format of height/width. | |
eAspectRatio | GetAspectRatio (void) const |
Get the enumeration of the screen aspect ratio. | |
const uint8_t * | GetPalette (void) const noexcept |
Get the current palette. | |
uint_t | GetBorderColor (void) const noexcept |
Get the hardware border color. | |
uint_t | GetFadeSpeed (void) const noexcept |
Return the timer constant in Burger::Tick. | |
void | SetFadeSpeed (uint_t uPaletteFadeSpeed) noexcept |
Set the timer constant in Burger::Tick. | |
uint_t | GetPaletteVSync (void) const noexcept |
Return non-zero if palette updates are synced to vertical blank. | |
void | SetPaletteVSync (uint_t bPaletteVSync) noexcept |
Set the flag to enable palette updates. | |
void | SetResizeCallback (ResizeProc pResize, void *pResizeData) noexcept |
Set window resize callback. | |
ResizeProc | GetResizeCallback (void) const noexcept |
Return the function pointer for the callback when the window's size is changed. | |
void * | GetResizeCallbackData (void) const noexcept |
Return the window resize function. | |
void | SetRenderCallback (RenderProc pRender, void *pRenderData) noexcept |
Set window update function. | |
RenderProc | GetRenderCallback (void) const noexcept |
Set the window updat function. | |
void * | GetRenderCallbackData (void) const noexcept |
Get the redraw callback function. | |
void | SetReleaseCallback (ReleaseProc pRelease, void *pReleaseData) noexcept |
Set the purge callback. | |
ReleaseProc | GetReleaseCallback (void) const noexcept |
Purge resource callback. | |
void * | GetReleaseCallbackData (void) const noexcept |
Return pointer to callback void *. | |
Public Member Functions inherited from Burger::Base | |
const char * | get_class_name (void) const noexcept |
Get the name of the class. | |
virtual | ~Base () noexcept=default |
Destructor. | |
Public Attributes | |
Enumerator | m_Enumerator |
Enumerated devices. | |
IsDeviceOkayProc | m_pDeviceFilter |
Pointer to function to filter devices. | |
void * | m_pDeviceFilterData |
Pointer to data for the filter device function. | |
DeviceSettingsFilterProc | m_pModifyDeviceSettingsFunc |
Pointer to function to filter device settings. | |
void * | m_pModifyDeviceSettingsData |
Pointer to data for filter device setting function. | |
DeviceCreatedProc | m_pDeviceCreatedFunc |
Pointer to function to call when the device was created (D3DPOOL_MANAGED) | |
void * | m_pDeviceCreatedFuncData |
Pointer to data for device was created function. | |
CallbackProc | m_pDeviceDestroyedFunc |
Pointer to function to call when the device was destroyed (D3DPOOL_MANAGED) | |
void * | m_pDeviceDestroyedFuncData |
Pointer to data for device was destroyed function. | |
DeviceCreatedProc | m_pDeviceResetFunc |
Pointer to function to call after the device was reset (D3DPOOL_DEFAULT) | |
void * | m_pDeviceResetFuncData |
Pointer to data for device was reset function. | |
CallbackProc | m_pDeviceLostFunc |
Pointer to function to call when the device was lost (D3DPOOL_DEFAULT) | |
void * | m_pDeviceLostFuncData |
Pointer to data for device was lost function. | |
IDirect3D9 * | m_pDirect3D9 |
Pointer to the Direct3D9 context. | |
IDirect3DDevice9 * | m_pDirect3DDevice9 |
Pointer to the Direct3D9 device. | |
ID3DXMatrixStack * | m_pD3DXMatrixStack |
Pointer to the current D3DMatrix stack. | |
IDirect3DSurface9 * | m_pDefaultRenderTarget |
IDirect3DSurface9 * | m_pCurrentRenderTarget |
HMONITOR__ * | m_AdapterMonitor |
the monitor of the adapter | |
uint_t | m_bIgnoreSizeChange |
if true, don't reset the device upon window size change | |
uint_t | m_uFullScreenBackBufferWidthAtModeChange |
back buffer size of full screen mode right before switching to windowed mode. Used to restore to same resolution when toggling back to fullscreen | |
uint_t | m_uFullScreenBackBufferHeightAtModeChange |
back buffer size of full screen mode right before switching to windowed mode. Used to restore to same resolution when toggling back to fullscreen | |
uint_t | m_uWindowBackBufferWidthAtModeChange |
back buffer size of windowed mode right before switching to full screen mode. Used to restore to same resolution when toggling back to windowed mode | |
uint_t | m_uWindowBackBufferHeightAtModeChange |
back buffer size of windowed mode right before switching to full screen mode. Used to restore to same resolution when toggling back to windowed mode | |
uint_t | m_uWindowedStyleAtModeChange |
window style | |
uint_t | m_bTopmostWhileWindowed |
if TRUE, the windowed HWND is topmost | |
uint_t | m_bDeviceObjectsReset |
if TRUE, then DeviceReset callback has been called successfully | |
uint_t | m_bDeviceObjectsCreated |
if TRUE, then DeviceCreated callback has been called (if non-NULL) | |
uint_t | m_bDeviceLost |
if TRUE, then the device is lost and needs to be reset | |
uint_t | m_bInsideDeviceCallback |
if TRUE, then the framework is inside an app device callback | |
uint_t | m_bDeviceCreated |
uint_t | m_bActive |
uint_t | m_bAutoChangeAdapter |
uint_t | m_bLostDevice |
TRUE if the device was lost (Minimized?) | |
uint_t | m_bPower2Textures |
TRUE if only power of two textures are allowed. | |
uint_t | m_bMultiRenderTargets |
TRUE if multiple render targets are supported. | |
uint_t | m_bSeparateAlphaBlend |
TRUE if separated alpha blending is supported. | |
uint_t | m_bSceneBegun |
TRUE if BeginScene() was called. | |
uint_t | m_bFullScreenGamma |
TRUE if full screen gamma was supported. | |
uint_t | m_bCanCalibrateGamma |
TRUE if gamma can be calibrated. | |
uint_t | m_bRasterSlopeScaleDepthBias |
TRUE if sloped scaling depth bias is supported in rasterizer. | |
uint_t | m_bRasterDepthBias |
TRUE if depth bias is supported in rasterizer. | |
uint_t | m_bIsnVidia |
TRUE if the video card was made by nVidia. | |
uint_t | m_bIsATI |
TRUE if the video card was made by ATI. | |
uint_t | m_bIsIntel |
TRUE if the video card was made by Intel. | |
uint_t | m_bShowCursorWhenFullScreen |
TRUE if the cursor is visible in full screen mode. | |
uint_t | m_bClipCursorWhenFullScreen |
TRUE if the cursor is clipped in full screen mode. | |
uint_t | m_uBackBufferFormat |
Requested back buffer format. | |
uint_t | m_uMaxTextureWidth |
Maximum pixels wide a texture can be. | |
uint_t | m_uMaxTextureHeight |
Maximum pixels tall a texture can be. | |
uint_t | m_uMaxTextureStages |
Maximum number of texture blend stages. | |
uint_t | m_uMaxTextureSamplers |
Maximum number of texture samplers. | |
uint_t | m_uMaxPossibleAnisotropy |
Maximum number of anisotropy filters. | |
uint_t | m_uClearColor |
RGBA of the color to clear the screen with. | |
uint_t | m_uMatrixStackDepth |
Number of matrices in the matrix stack. | |
float | m_fClearDepth |
Z Value to clear the Z buffer with. | |
DeviceSettings_t | m_D3D9Settings |
D3D device settings. | |
uint32_t | m_D3DSurfaceDesc [8] |
D3DSURFACE_DESC record. | |
uint32_t | m_D3DCaps [76] |
D3DCAPS9 record. | |
Static Public Attributes | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::Display | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Static Public Attributes inherited from Burger::Base | |
static const Burger::StaticRTTI | g_StaticRTTI |
The global description of the class. | |
Protected Member Functions | |
uint_t | ChangeDevice (const DeviceSettings_t *pNewSettings, uint_t bForceEnumeration, uint_t bClipWindowToSingleAdapter) |
Change or initialize a DirectX 9 device. | |
uint_t | Create3DEnvironment (void) |
Create the D3D Device. | |
void | Cleanup3DEnvironment (uint_t bClearSettings) |
Release the D3D device. | |
uint_t | Reset3DEnvironment (void) |
Reset the D3D device. | |
void | IssueDeviceLostCallback (void) |
Process the object reset flag. | |
uint_t | IssueDeviceResetCallback (void) |
Call the device was reset callback. | |
void | SetupCursor (void) const |
Enable / Disable hardware cursor. | |
void | ReleaseRenderTargets (void) |
Release render targets. | |
uint_t | SnapDeviceSettingsToEnumDevice (DeviceSettings_t *pDeviceSettings, uint_t bForceEnumeration) |
Find the closest match to a device. | |
Protected Member Functions inherited from Burger::Display | |
void | InitDefaults (GameApp *pGameApp) |
Initialize shared variables. | |
void | SetWidthHeight (uint_t uWidth, uint_t uHeight) |
Set the width and height of the screen. | |
Private Member Functions | |
DisplayDirectX9 (const DisplayDirectX9 &)=delete | |
DisplayDirectX9 & | operator= (const DisplayDirectX9 &)=delete |
DisplayDirectX9 (DisplayDirectX9 &&)=delete | |
DisplayDirectX9 & | operator= (DisplayDirectX9 &&)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from Burger::Display | |
static float | GetRetinaScale (void) noexcept |
Get the scale factor for the retina display. | |
static uint_t | GetVideoModes (ClassArray< VideoCardDescription > *pOutput) |
Get a list of available video modes. | |
static uint_t | GetDefaultWidth (void) noexcept |
Get the width of the default monitor. | |
static uint_t | GetDefaultHeight (void) noexcept |
Get the height of the default monitor. | |
static uint_t | GetDefaultDepth (void) noexcept |
Get the pixel depth of the default monitor. | |
static uint_t | GetDefaultHertz (void) noexcept |
Get the refresh rate of the default monitor. | |
static uint_t | GetDefaultTotalWidth (void) noexcept |
Get the width of the default monitor. | |
static uint_t | GetDefaultTotalHeight (void) noexcept |
Get the height of the default monitor. | |
static uint_t | GetDefaultMonitorCount (void) noexcept |
Get the number of active monitors. | |
static eAspectRatio | get_aspect_ratio (uint32_t uWidth, uint32_t uHeight, uint_t bExactOnly) noexcept |
Calculate the screen aspect ratio. | |
Static Protected Member Functions inherited from Burger::Display | |
static void | InitGlobals (void) |
Initialize video globals. | |
Protected Attributes inherited from Burger::Display | |
GameApp * | m_pGameApp |
Pointer to the game application instance. | |
Renderer * | m_pRenderer |
Pointer to a renderer. | |
uint32_t | m_WindowPlacement [11] |
WINDOWPLACEMENT record. | |
D3DDevice * | m_pD3DDevice |
(Xbox 360 Only) Direct 3D device | |
uint_t | m_uClearColor |
(Xbox 360 Only) 32 bit RGBA color for screen clear | |
float | m_fClearDepth |
(Xbox 360 Only) ZValue to write for screen clear | |
uint_t | m_bWideScreen |
(Xbox 360 Only) TRUE if wide screen display is active | |
NSView * | m_pView |
(MacOSX Only) Pointer to the main view | |
NSWindowController * | m_pWindowController |
(MacOSX Only) Pointer to the window controller | |
NSOpenGLView * | m_pOpenGLView |
(MacOSX Only) Pointer to the OpenGL view | |
_CGLContextObject * | m_pOpenGLContext |
(MacOSX Only) Pointer to the OpenGL context | |
NSWindow * | m_pFullScreenWindow |
(MacOSX Only) Pointer to the main full screen window | |
EAGLContext * | m_pEAGLContext |
(iOS Only) OpenGL Context | |
uint_t | m_uFrontBuffer |
(iOS Only) Main render buffer GL name | |
uint_t | m_uColorRenderBuffer |
(iOS Only) Color render buffer GL name | |
uint_t | m_uDepthRenderBuffer |
(iOS Only) Depth buffer for rendering | |
ResizeProc | m_pResize |
Callback if the screen changed sizes. | |
void * | m_pResizeData |
pThis pointer for m_pResize calls | |
RenderProc | m_pRender |
Callback if the operating system requests a scene draw. | |
void * | m_pRenderData |
pThis pointer for m_pRender calls | |
ReleaseProc | m_pRelease |
Callback if the operating system requests a scene draw. | |
void * | m_pReleaseData |
pThis pointer for m_pRender calls | |
Texture * | m_pBoundTextures [8] |
Bound textures for the current context. | |
uint_t | m_uWidth |
Width in pixels of the display buffer. | |
uint_t | m_uHeight |
Height in pixels of the display buffer. | |
uint_t | m_uDepth |
Depth in bits of the display buffer. | |
uint_t | m_uFlags |
Flags for describing available features. | |
uint_t | m_uDisplayWidth |
Width of the display hardware (Can differ from m_uWidth for pixel stretching) | |
uint_t | m_uDisplayHeight |
Height of the display hardware (Can differ from m_uHeight for pixel stretching) | |
uint_t | m_uDisplayDepth |
Depth of the display hardware (Can differ from m_uDepth for pixel depth change) | |
float | m_fWidth |
Width of the rendering target as a float. | |
float | m_fHeight |
Height of the rendering target as a float. | |
float | m_fAspectRatioX |
Width/Height. | |
float | m_fAspectRatioY |
Height/Width. | |
uint_t | m_uBorderColor |
Hardware border color (MSDOS / Amiga only) | |
uint_t | m_uPaletteFadeSpeed |
Speed in 1/60ths of a second for a palette fade. | |
int | m_iPauseRenderingCount |
Rendering pausing reference count. | |
uint8_t | m_bRenderingPaused |
If TRUE, rendering is paused. | |
uint8_t | m_bPaletteDirty |
TRUE if the palette buffer was changed | |
uint8_t | m_bPaletteVSync |
TRUE if palette updates sync to video | |
uint8_t | m_bNotUsed [1] |
Padding. | |
uint8_t | m_Palette [256 *3] |
Palette of 256 RGB values. | |
Static Protected Attributes inherited from Burger::Display | |
static Globals_t | g_Globals |
Global values initialized when the first Display class is created. | |
void( *) Burger::DisplayDirectX9::CallbackProc(void *pData) |
uint_t( *) Burger::DisplayDirectX9::DeviceCreatedProc(IDirect3DDevice9 *pD3DDevice, const _D3DSURFACE_DESC *pBackBufferSurfaceDesc, void *pData) |
uint_t( *) Burger::DisplayDirectX9::DeviceSettingsFilterProc(DeviceSettings_t *pDeviceSettings, void *pData) |
uint_t( *) Burger::DisplayDirectX9::IsDeviceOkayProc(const _D3DCAPS9 *pCaps, uint_t uAdapterFormat, uint_t uBackBufferFormat, uint_t bWindowed, void *pData) |
anonymous enum |
|
privatedelete |
|
privatedelete |
Burger::DisplayDirectX9::DisplayDirectX9 | ( | GameApp * | pGameApp | ) |
Burger::DisplayDirectX9::~DisplayDirectX9 | ( | ) |
|
override |
|
override |
|
inline |
|
protected |
Change or initialize a DirectX 9 device.
pNewSettings | Pointer to a description of a display device to use |
bForceEnumeration | TRUE if enumerating devices is forced to occur |
bClipWindowToSingleAdapter | TRUE if spanning displays is disabled |
|
overridevirtual |
Check if the window has changed monitors.
Reimplemented from Burger::Display.
|
overridevirtual |
Resize the back buffer if the window size changed.
Reimplemented from Burger::Display.
|
protected |
Release the D3D device.
This will call the device lost and device destroyed callbacks if applicable. Normally, this function will not clear out the requested device settings unless bClearSettings is set to TRUE.
bClearSettings | Clear out the video settings if TRUE. |
|
override |
|
protected |
Create the D3D Device.
IDirect3DPixelShader9 *BURGER_API Burger::DisplayDirectX9::CreatePixelShader | ( | const void * | pPixelShaderBinary | ) | const |
|
override |
|
override |
IDirect3DVertexShader9 *BURGER_API Burger::DisplayDirectX9::CreateVertexShader | ( | const void * | pVertexShaderBinary | ) | const |
|
override |
|
override |
|
override |
|
inline |
|
overridevirtualnoexcept |
Get the description to the class.
This virtual function will pull the pointer to the StaticRTTI instance that has the name of the class. Due to it being virtual, it will be the name of the most derived class.
Reimplemented from Burger::Display.
uint_t BURGER_API Burger::DisplayDirectX9::GetAdapterOrdinalFromMonitor | ( | HMONITOR__ * | hMonitor, |
uint_t * | pAdapterOrdinal ) |
Get the adapter ordinal from HMONITOR.
Given a HMONITOR pointer, return the ordinal index for that display adapter.
hMonitor | The HMONITOR value for the monitor to find |
pAdapterOrdinal | Pointer to a value to receive the new adapter ordinal |
|
inline |
Return the pointer to a D3DSURFACE_DESC for the current device.
|
inline |
Return the pointer to a D3DCAPS9 for the current device.
|
inline |
|
inline |
|
inline |
uint_t BURGER_API Burger::DisplayDirectX9::GetDesktopResolution | ( | uint_t | uAdapterOrdinal, |
uint_t * | pWidth, | ||
uint_t * | pHeight ) |
Get the desktop resolution of a display.
Given an ordinal index, return the resolution of the display as set for the desktop.
uAdapterOrdinal | Ordinal value for which adapter to query |
pWidth | Pointer to where to store the width in pixels, NULL will disable width retrieval. |
pHeight | Pointer to where to store the height in pixels, NULL will disable height retrieval. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
override |
void BURGER_API Burger::DisplayDirectX9::InitState | ( | void | ) |
Set all of DirectX 9's rendering states to defaults.
When DirectX 9 is started up, this function is called to ensure that the rendering state is known.
States set: * Vertex shader set to \ref NULL * FVF set to D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1 * D3DRS_ZENABLE set to FALSE * D3DRS_CULLMODE set to D3DCULL_NONE * D3DRS_LIGHTING set to FALSE * Texture state 0 D3DTSS_COLOROP = D3DTOP_MODULATE * D3DTSS_COLORARG1 = D3DTA_TEXTURE * D3DTSS_COLORARG2 = D3DTA_DIFFUSE * Alpha state 0 D3DTSS_ALPHAOP = D3DTOP_MODULATE * D3DTSS_ALPHAARG1 = D3DTA_TEXTURE * D3DTSS_ALPHAARG2 = D3DTA_DIFFUSE * D3DRS_SEPARATEALPHABLENDENABLE set to TRUE * Texture state 1 D3DTSS_COLOROP = D3DTOP_DISABLE * D3DTSS_ALPHAOP = D3DTOP_DISABLE * Matrix D3DTS_WORLD set to identity * Matrix D3DTS_VIEW set to identity @note This is only available on Windows\n
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
Process the object reset flag.
If the Object Reset flag was set, handle objects that need to be reset internally, and call an application reset function if one was present. After this call is complete, the Object Reset flag will be cleared.
This function is called before a Reset() call is issued on the DirectX 9 device.
|
protected |
Call the device was reset callback.
After a device was reset or successfully created, call the device reset callback
|
inline |
IDirect3D9 *BURGER_API Burger::DisplayDirectX9::LoadDirect3D9 | ( | void | ) |
Create an IDirect3D9 instance.
If an IDirect3D9 instance was already created, return a pointer to the pre-existing instance, otherwise, create one and set it as the default.
|
inline |
|
privatedelete |
|
privatedelete |
|
protected |
Release render targets.
Release the render targets tracked by this class
|
protected |
Reset the D3D device.
This will call the device lost destroyed callbacks if applicable and then issue the Reset() function on the DirectX 9 device
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
override |
|
protected |
Enable / Disable hardware cursor.
For full screen mode, the cursor needs to be copied from the HCURSOR into a DirectX 9 surface and DirectX 9 notified of the update.
|
override |
|
override |
|
override |
|
protected |
Find the closest match to a device.
Find the best combination of:
Given what's available on the system and the match options combined with the device settings input. This combination of settings is encapsulated by the BufferFormatGroup class.
@note This is only available on Windows\n \param pDeviceSettings Pointer to a proposed device settings \param bForceEnumeration \ref TRUE if enumerating devices is forced to occur \return Zero for no error, non-zero on failure
uint_t BURGER_API Burger::DisplayDirectX9::ToggleFullScreen | ( | void | ) |
Toggle full screen and windowed mode.
If the game is running in a window, switch to full screen and vice versa.
uint_t BURGER_API Burger::DisplayDirectX9::ToggleREF | ( | void | ) |
Toggle hardware and software renderer.
If the game is running in with a GPU, switch to software and vice versa
void BURGER_API Burger::DisplayDirectX9::UpdateBackBufferDesc | ( | void | ) |
Load the back buffer description from the DirectX 9 device.
Cache the D3DSURFACE_DESC from the current DirectX 9 device. If a DirectX 9 device was not started, or if an error occurred when the device was queried, this function will clear the internal cache.
void BURGER_API Burger::DisplayDirectX9::UpdateEnumeration | ( | uint_t | bForce | ) |
Enumerate devices if not already cached.
If the devices haven't already been or if the bForce flag is set, enumerate all display devices and adapters
bForce | TRUE to force enumeration. |
|
static |
The global description of the class.
This record contains the name of this class and a reference to the parent (If any)
HMONITOR__* Burger::DisplayDirectX9::m_AdapterMonitor |
the monitor of the adapter
uint_t Burger::DisplayDirectX9::m_bActive |
uint_t Burger::DisplayDirectX9::m_bAutoChangeAdapter |
uint_t Burger::DisplayDirectX9::m_bCanCalibrateGamma |
TRUE if gamma can be calibrated.
uint_t Burger::DisplayDirectX9::m_bClipCursorWhenFullScreen |
TRUE if the cursor is clipped in full screen mode.
uint_t Burger::DisplayDirectX9::m_bDeviceCreated |
uint_t Burger::DisplayDirectX9::m_bDeviceLost |
if TRUE, then the device is lost and needs to be reset
uint_t Burger::DisplayDirectX9::m_bDeviceObjectsCreated |
if TRUE, then DeviceCreated callback has been called (if non-NULL)
uint_t Burger::DisplayDirectX9::m_bDeviceObjectsReset |
if TRUE, then DeviceReset callback has been called successfully
uint_t Burger::DisplayDirectX9::m_bFullScreenGamma |
TRUE if full screen gamma was supported.
uint_t Burger::DisplayDirectX9::m_bIgnoreSizeChange |
if true, don't reset the device upon window size change
uint_t Burger::DisplayDirectX9::m_bInsideDeviceCallback |
if TRUE, then the framework is inside an app device callback
uint_t Burger::DisplayDirectX9::m_bIsATI |
TRUE if the video card was made by ATI.
uint_t Burger::DisplayDirectX9::m_bIsIntel |
TRUE if the video card was made by Intel.
uint_t Burger::DisplayDirectX9::m_bIsnVidia |
TRUE if the video card was made by nVidia.
uint_t Burger::DisplayDirectX9::m_bLostDevice |
TRUE if the device was lost (Minimized?)
uint_t Burger::DisplayDirectX9::m_bMultiRenderTargets |
TRUE if multiple render targets are supported.
uint_t Burger::DisplayDirectX9::m_bPower2Textures |
TRUE if only power of two textures are allowed.
uint_t Burger::DisplayDirectX9::m_bRasterDepthBias |
TRUE if depth bias is supported in rasterizer.
uint_t Burger::DisplayDirectX9::m_bRasterSlopeScaleDepthBias |
TRUE if sloped scaling depth bias is supported in rasterizer.
uint_t Burger::DisplayDirectX9::m_bSceneBegun |
TRUE if BeginScene() was called.
uint_t Burger::DisplayDirectX9::m_bSeparateAlphaBlend |
TRUE if separated alpha blending is supported.
uint_t Burger::DisplayDirectX9::m_bShowCursorWhenFullScreen |
TRUE if the cursor is visible in full screen mode.
uint_t Burger::DisplayDirectX9::m_bTopmostWhileWindowed |
if TRUE, the windowed HWND is topmost
DeviceSettings_t Burger::DisplayDirectX9::m_D3D9Settings |
D3D device settings.
uint32_t Burger::DisplayDirectX9::m_D3DCaps[76] |
D3DCAPS9 record.
uint32_t Burger::DisplayDirectX9::m_D3DSurfaceDesc[8] |
D3DSURFACE_DESC record.
Enumerator Burger::DisplayDirectX9::m_Enumerator |
Enumerated devices.
float Burger::DisplayDirectX9::m_fClearDepth |
Z Value to clear the Z buffer with.
IDirect3DSurface9* Burger::DisplayDirectX9::m_pCurrentRenderTarget |
ID3DXMatrixStack* Burger::DisplayDirectX9::m_pD3DXMatrixStack |
Pointer to the current D3DMatrix stack.
IDirect3DSurface9* Burger::DisplayDirectX9::m_pDefaultRenderTarget |
DeviceCreatedProc Burger::DisplayDirectX9::m_pDeviceCreatedFunc |
Pointer to function to call when the device was created (D3DPOOL_MANAGED)
void* Burger::DisplayDirectX9::m_pDeviceCreatedFuncData |
Pointer to data for device was created function.
CallbackProc Burger::DisplayDirectX9::m_pDeviceDestroyedFunc |
Pointer to function to call when the device was destroyed (D3DPOOL_MANAGED)
void* Burger::DisplayDirectX9::m_pDeviceDestroyedFuncData |
Pointer to data for device was destroyed function.
IsDeviceOkayProc Burger::DisplayDirectX9::m_pDeviceFilter |
Pointer to function to filter devices.
void* Burger::DisplayDirectX9::m_pDeviceFilterData |
Pointer to data for the filter device function.
CallbackProc Burger::DisplayDirectX9::m_pDeviceLostFunc |
Pointer to function to call when the device was lost (D3DPOOL_DEFAULT)
void* Burger::DisplayDirectX9::m_pDeviceLostFuncData |
Pointer to data for device was lost function.
DeviceCreatedProc Burger::DisplayDirectX9::m_pDeviceResetFunc |
Pointer to function to call after the device was reset (D3DPOOL_DEFAULT)
void* Burger::DisplayDirectX9::m_pDeviceResetFuncData |
Pointer to data for device was reset function.
IDirect3D9* Burger::DisplayDirectX9::m_pDirect3D9 |
Pointer to the Direct3D9 context.
IDirect3DDevice9* Burger::DisplayDirectX9::m_pDirect3DDevice9 |
Pointer to the Direct3D9 device.
void* Burger::DisplayDirectX9::m_pModifyDeviceSettingsData |
Pointer to data for filter device setting function.
DeviceSettingsFilterProc Burger::DisplayDirectX9::m_pModifyDeviceSettingsFunc |
Pointer to function to filter device settings.
uint_t Burger::DisplayDirectX9::m_uBackBufferFormat |
Requested back buffer format.
uint_t Burger::DisplayDirectX9::m_uClearColor |
RGBA of the color to clear the screen with.
uint_t Burger::DisplayDirectX9::m_uFullScreenBackBufferHeightAtModeChange |
back buffer size of full screen mode right before switching to windowed mode. Used to restore to same resolution when toggling back to fullscreen
uint_t Burger::DisplayDirectX9::m_uFullScreenBackBufferWidthAtModeChange |
back buffer size of full screen mode right before switching to windowed mode. Used to restore to same resolution when toggling back to fullscreen
uint_t Burger::DisplayDirectX9::m_uMatrixStackDepth |
Number of matrices in the matrix stack.
uint_t Burger::DisplayDirectX9::m_uMaxPossibleAnisotropy |
Maximum number of anisotropy filters.
uint_t Burger::DisplayDirectX9::m_uMaxTextureHeight |
Maximum pixels tall a texture can be.
uint_t Burger::DisplayDirectX9::m_uMaxTextureSamplers |
Maximum number of texture samplers.
uint_t Burger::DisplayDirectX9::m_uMaxTextureStages |
Maximum number of texture blend stages.
uint_t Burger::DisplayDirectX9::m_uMaxTextureWidth |
Maximum pixels wide a texture can be.
uint_t Burger::DisplayDirectX9::m_uWindowBackBufferHeightAtModeChange |
back buffer size of windowed mode right before switching to full screen mode. Used to restore to same resolution when toggling back to windowed mode
uint_t Burger::DisplayDirectX9::m_uWindowBackBufferWidthAtModeChange |
back buffer size of windowed mode right before switching to full screen mode. Used to restore to same resolution when toggling back to windowed mode
uint_t Burger::DisplayDirectX9::m_uWindowedStyleAtModeChange |
window style