Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
render_utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <d2d1.h>
4 #include <Windows.h>
5 #include <wincodec.h>
6 
7 #ifndef BLAM
8 #define BLAM
9 #endif
10 
14 struct Pixel
15 {
16  BYTE* r;
17  BYTE* g;
18  BYTE* b;
19  BYTE* a;
20 };
21 
26 {
44  BLAM HRESULT IntegerBitmapScale(IWICBitmap* source, int scale_factor, ID2D1Bitmap** destination, ID2D1RenderTarget* target);
45 
57  BLAM Pixel GetPixelData(BYTE* origin, int x, int y, int width, int height);
58 
71  BLAM HRESULT GetWICBitmapPixelData(IWICBitmap** bitmap, UINT* width, UINT* height, IWICBitmapLock** bitmap_lock, UINT* buffer_size, BYTE** start_address);
72 }
Pixel::r
BYTE * r
The Red value of the pixel.
Definition: render_utils.h:16
BlamRendering::DirectX::Utils::GetPixelData
BLAM Pixel GetPixelData(BYTE *origin, int x, int y, int width, int height)
Retrieves a pixel from the specified memory address.
Definition: bitmap_utils.cpp:152
width
int width
Definition: bgfx.cpp:18
Pixel::b
BYTE * b
The Blue value of the pixel.
Definition: render_utils.h:18
BLAM
#define BLAM
Definition: render_utils.h:8
height
int height
Definition: bgfx.cpp:19
BlamRendering::DirectX::Utils::GetWICBitmapPixelData
BLAM HRESULT GetWICBitmapPixelData(IWICBitmap **bitmap, UINT *width, UINT *height, IWICBitmapLock **bitmap_lock, UINT *buffer_size, BYTE **start_address)
Retrieves the pixel data from a WIC bitmap.
Definition: bitmap_utils.cpp:182
Pixel::a
BYTE * a
The Alpha value of the pixel.
Definition: render_utils.h:19
BlamRendering::DirectX::Utils::IntegerBitmapScale
BLAM HRESULT IntegerBitmapScale(IWICBitmap *source, int scale_factor, ID2D1Bitmap **destination, ID2D1RenderTarget *target)
Scales a bitmap using integer scaling.
Definition: bitmap_utils.cpp:10
Pixel::g
BYTE * g
The Green value of the pixel.
Definition: render_utils.h:17
BlamRendering::DirectX::Utils
Namespace containing various utilities related to rendering.
Definition: render_utils.h:25
Pixel
Structure representing a single pixel.
Definition: render_utils.h:14