Nui Engine
A game engine framework
Loading...
Searching...
No Matches
Nui::Graphics::D3DManager Class Reference

Class managing DirectX 11 device resources including device, context, swap chain, and render target. More...

#include <D3DManager.h>

Public Member Functions

 D3DManager ()
 Default constructor.
 
 ~D3DManager ()
 Destructor.
 
bool IsInitialized () const noexcept
 Checks if the device resources have been initialized.
 
bool Init (HWND outputWindow)
 Initializes the device resources.
 
void Reset ()
 Resets the device resources.
 
void Present () const
 Presents the rendered image to the screen.
 
ID3D11Device1 * GetDevice () const noexcept
 Retrieves the Direct3D device.
 
ID3D11DeviceContext1 * GetImmediateContext () const noexcept
 Retrieves the immediate context for the device.
 
IDXGISwapChain1 * GetSwapChain () const noexcept
 Retrieves the swap chain associated with the device.
 
ID3D11RenderTargetView * GetBackBuffer () const noexcept
 Retrieves the render target view for the back buffer.
 
ID3D11Texture2D * GetBackBufferTexture () const noexcept
 Retrieves the back buffer texture.
 
DXGI_FORMAT GetBackBufferFormat () const noexcept
 Retrieves the format of the back buffer.
 
U32 GetBackBufferWidth () const noexcept
 Retrieves the width of the back buffer.
 
U32 GetBackBufferHeight () const noexcept
 Retrieves the height of the back buffer.
 
U32 GetBBMultiSampleCount () const noexcept
 Retrieves the multi-sample count of the back buffer.
 
U32 GetBBMultiSampleQuality () const noexcept
 Retrieves the multi-sample quality of the back buffer.
 
bool IsVSyncEnabled () const noexcept
 Checks if vertical synchronization is enabled.
 
U32 GetNumVSyncInterval () const noexcept
 Retrieves the number of vertical synchronization intervals.
 
void Resize (U32 width, U32 height) noexcept
 Resizes the back buffer.
 
void SetVSYNC (bool enableVSYNC)
 

Detailed Description

Class managing DirectX 11 device resources including device, context, swap chain, and render target.

Member Function Documentation

◆ GetBackBuffer()

ID3D11RenderTargetView * Nui::Graphics::D3DManager::GetBackBuffer ( ) const
inlinenodiscardnoexcept

Retrieves the render target view for the back buffer.

Returns
Pointer to the render target view.

◆ GetBackBufferFormat()

DXGI_FORMAT Nui::Graphics::D3DManager::GetBackBufferFormat ( ) const
inlinenodiscardnoexcept

Retrieves the format of the back buffer.

Returns
Format of the back buffer.

◆ GetBackBufferHeight()

U32 Nui::Graphics::D3DManager::GetBackBufferHeight ( ) const
inlinenodiscardnoexcept

Retrieves the height of the back buffer.

Returns
Height of the back buffer.

◆ GetBackBufferTexture()

ID3D11Texture2D * Nui::Graphics::D3DManager::GetBackBufferTexture ( ) const
inlinenodiscardnoexcept

Retrieves the back buffer texture.

Returns
Pointer to the back buffer texture.

◆ GetBackBufferWidth()

U32 Nui::Graphics::D3DManager::GetBackBufferWidth ( ) const
inlinenodiscardnoexcept

Retrieves the width of the back buffer.

Returns
Width of the back buffer.

◆ GetBBMultiSampleCount()

U32 Nui::Graphics::D3DManager::GetBBMultiSampleCount ( ) const
inlinenodiscardnoexcept

Retrieves the multi-sample count of the back buffer.

Returns
Multi-sample count of the back buffer.

◆ GetBBMultiSampleQuality()

U32 Nui::Graphics::D3DManager::GetBBMultiSampleQuality ( ) const
inlinenodiscardnoexcept

Retrieves the multi-sample quality of the back buffer.

Returns
Multi-sample quality of the back buffer.

◆ GetDevice()

ID3D11Device1 * Nui::Graphics::D3DManager::GetDevice ( ) const
inlinenodiscardnoexcept

Retrieves the Direct3D device.

Returns
Pointer to the Direct3D device.

◆ GetImmediateContext()

ID3D11DeviceContext1 * Nui::Graphics::D3DManager::GetImmediateContext ( ) const
inlinenodiscardnoexcept

Retrieves the immediate context for the device.

Returns
Pointer to the immediate context.

◆ GetNumVSyncInterval()

U32 Nui::Graphics::D3DManager::GetNumVSyncInterval ( ) const
inlinenodiscardnoexcept

Retrieves the number of vertical synchronization intervals.

Returns
Number of VSync intervals.

◆ GetSwapChain()

IDXGISwapChain1 * Nui::Graphics::D3DManager::GetSwapChain ( ) const
inlinenodiscardnoexcept

Retrieves the swap chain associated with the device.

Returns
Pointer to the swap chain.

◆ Init()

bool Nui::Graphics::D3DManager::Init ( HWND outputWindow)

Initializes the device resources.

Parameters
outputWindowOutput window handle.

◆ IsVSyncEnabled()

bool Nui::Graphics::D3DManager::IsVSyncEnabled ( ) const
inlinenodiscardnoexcept

Checks if vertical synchronization is enabled.

Returns
True if VSync is enabled, false otherwise.

◆ Resize()

void Nui::Graphics::D3DManager::Resize ( U32 width,
U32 height )
inlinenoexcept

Resizes the back buffer.

Parameters
widthNew width of the back buffer.
heightNew height of the back buffer.

The documentation for this class was generated from the following files: