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

Namespace containing functions relating to the Windows Imaging Component (WIC). More...

Functions

BLAM IWICImagingFactory * GetWICFactory ()
 Retrieves the WIC Imaging Factory. More...
 
BLAM HRESULT CreateD2DBitmapFromResource (int res_id, const char *res_type, ID2D1Bitmap **bitmap_pointer)
 Creates a Direct2D bitmap from an application resource. More...
 
BLAM HRESULT CreateD2DBitmapFromFile (std::wstring path, ID2D1Bitmap **bitmap_pointer)
 Creates a Direct2D bitmap from a file. More...
 
BLAM HRESULT CreateWICBitmapFromFile (std::wstring path, IWICBitmap **bitmap_pointer)
 Creates a WIC bitmap from a file. More...
 
BLAM HRESULT CreateWICBitmapFromMemory (void *data, int size, IWICBitmap **bitmap_pointer)
 Creates a WIC bitmap from a block of memory. More...
 
BLAM HRESULT ConvertWICBitmapToD2D (IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap)
 Converts a WIC bitmap to a D2D bitmap. More...
 
BLAM HRESULT ConvertWICBitmapToD2D (IWICBitmap *wic_bitmap, ID2D1Bitmap **d2d_bitmap, ID2D1RenderTarget *render_target)
 Converts a WIC bitmap to a D2D bitmap, with a specific render target. More...
 
BLAM HRESULT ConvertWICBitmapTo32bppPBGRA (IWICBitmap *source, IWICBitmap **destination)
 Converts a WIC bitmap to a WIC bitmap, with the 32 bits-per-pixe, PBGRA format. More...
 
BLAM HRESULT Initialize ()
 Initializes the Windows Imaging Component (WIC). More...
 
BLAM void Shutdown ()
 Shuts down the Windows Imaging Component (WIC). More...
 

Detailed Description

Namespace containing functions relating to the Windows Imaging Component (WIC).

Function Documentation

◆ ConvertWICBitmapTo32bppPBGRA()

HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapTo32bppPBGRA ( IWICBitmap *  source,
IWICBitmap **  destination 
)

Converts a WIC bitmap to a WIC bitmap, with the 32 bits-per-pixe, PBGRA format.

Parameters
source- The original bitmap.
destination- Pointer to the WIC bitmap to load the converted bitmap into.
Returns
S_OK if the bitmap was converted successfully, otherwise will return an error code.

◆ ConvertWICBitmapToD2D() [1/2]

HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapToD2D ( IWICBitmap *  wic_bitmap,
ID2D1Bitmap **  d2d_bitmap 
)

Converts a WIC bitmap to a D2D bitmap.

Parameters
wic_bitmap- The WIC bitmap to convert.
d2d_pointer- Pointer to the D2D bitmap to load the converted bitmap into.
Returns
S_OK if the bitmap was converted successfully, otherwise will return an error code.

◆ ConvertWICBitmapToD2D() [2/2]

HRESULT BlamRendering::DirectX::WIC::ConvertWICBitmapToD2D ( IWICBitmap *  wic_bitmap,
ID2D1Bitmap **  d2d_bitmap,
ID2D1RenderTarget *  render_target 
)

Converts a WIC bitmap to a D2D bitmap, with a specific render target.

Parameters
wic_bitmap- The WIC bitmap to convert.
d2d_pointer- Pointer to the D2D bitmap to load the converted bitmap into.
render_target- The render target that this bitmap will be displayed with.
Returns
S_OK if the bitmap was converted successfully, otherwise will return an error code.

◆ CreateD2DBitmapFromFile()

HRESULT BlamRendering::DirectX::WIC::CreateD2DBitmapFromFile ( std::wstring  path,
ID2D1Bitmap **  bitmap_pointer 
)

Creates a Direct2D bitmap from a file.

Parameters
path- The path to the file to read.
bitmap_pointer- Pointer to the bitmap to load the file into.
Returns
S_OK if the bitmap was created successfully, otherwise will return an error code.

◆ CreateD2DBitmapFromResource()

HRESULT BlamRendering::DirectX::WIC::CreateD2DBitmapFromResource ( int  res_id,
const char *  res_type,
ID2D1Bitmap **  bitmap_pointer 
)

Creates a Direct2D bitmap from an application resource.

Parameters
res_id- The ID of the resource.
res_type- The type of the resource.
bitmap_pointer- Pointer to the bitmap to load the resource into.
Returns
S_OK if the bitmap was created successfully, otherwise will return an error code.

◆ CreateWICBitmapFromFile()

HRESULT BlamRendering::DirectX::WIC::CreateWICBitmapFromFile ( std::wstring  path,
IWICBitmap **  bitmap_pointer 
)

Creates a WIC bitmap from a file.

Parameters
path- The path to the file to read.
bitmap_pointer- Pointer to the bitmap to load the file into.
Returns
S_OK if the bitmap was created successfully, otherwise will return an error code.

◆ CreateWICBitmapFromMemory()

HRESULT BlamRendering::DirectX::WIC::CreateWICBitmapFromMemory ( void *  data,
int  size,
IWICBitmap **  bitmap_pointer 
)

Creates a WIC bitmap from a block of memory.

Parameters
data- The address pointing to the start of the data.
size- The length of the data.
bitmap_pointer- Pointer to the bitmap to load the data into.
Returns
S_OK if the bitmap was created successfully, otherwise will return an error code.

◆ GetWICFactory()

IWICImagingFactory * BlamRendering::DirectX::WIC::GetWICFactory ( )

Retrieves the WIC Imaging Factory.

Returns
A pointer to the WIC Imaging Factory.

◆ Initialize()

HRESULT BlamRendering::DirectX::WIC::Initialize ( )

Initializes the Windows Imaging Component (WIC).

This function does not need to be called during startup, as it is automatically called from BlamRendering::DirectX::Initialize.

Returns
S_OK if WIC initialized successfully, otherwise will return an error code.

◆ Shutdown()

void BlamRendering::DirectX::WIC::Shutdown ( )

Shuts down the Windows Imaging Component (WIC).

This function does not need to be called during shutdown, as it is automatically called from BlamRendering::DirectX::Cleanup.