Blamite Game Engine - Blam (Core)
BlamRendering::DirectX::D2D Namespace Reference

Namespace containing functions relating to Direct2D. More...

Namespaces

 MF
 Namespace containing things relating to the MF font loader.
 

Functions

BLAM ID2D1DeviceContext * GetD2DRenderTarget ()
 Retrieves the Direct2D render target. More...
 
BLAM ID2D1Factory * GetD2DFactory ()
 Retrieves the Direct2D factory. More...
 
BLAM IDWriteFactory * GetDWriteFactory ()
 Retrieves the DirectWrite factory. More...
 
BLAM HRESULT LoadFontFromFile (std::string id, std::string file_path)
 Loads a TrueType font from the specified file into the list of loaded font collections. More...
 

Detailed Description

Namespace containing functions relating to Direct2D.

Function Documentation

◆ GetD2DFactory()

ID2D1Factory * BlamRendering::DirectX::D2D::GetD2DFactory ( )

Retrieves the Direct2D factory.

Returns
A pointer to the Direct2D factory.

◆ GetD2DRenderTarget()

ID2D1DeviceContext * BlamRendering::DirectX::D2D::GetD2DRenderTarget ( )

Retrieves the Direct2D render target.

Returns
A pointer to the Direct2D device context. Can be used as a render target.

◆ GetDWriteFactory()

IDWriteFactory * BlamRendering::DirectX::D2D::GetDWriteFactory ( )

Retrieves the DirectWrite factory.

Returns
A pointer to the DirectWrite factory.

◆ LoadFontFromFile()

HRESULT BlamRendering::DirectX::D2D::LoadFontFromFile ( std::string  id,
std::string  file_path 
)

Loads a TrueType font from the specified file into the list of loaded font collections.

Parameters
id- The ID of the new font collection.
file_path- The path to the TrueType file.
Returns
S_OK if the font was loaded successfully, otherwise will return an error code.