Answer the question
In order to leave comments, you need to log in
DirectX11. How to convert texture from one pixel format to another (RGBA -> BGRA)?
Good afternoon!
I'm new to DirectX, so I don't know a lot of things.
I have an RGBA (DXGI_FORMAT_R8G8B8A8_UNORM) texture in my graphics card memory. This is a captured game buffer.
Before copying its contents to the computer's memory, I need to convert this texture
to BGRA format (DXGI_FORMAT_B8G8R8A8_UNORM). How to convert a texture from one pixel format to another using a video card?
// DXGI_FORMAT_R8G8B8A8_UNORM
ID3D11Texture2D *pTexture1;
// DXGI_FORMAT_B8G8R8A8_UNORM
ID3D11Texture2D *pTexture2;
//
// Копирование содержимого одной текстуры в другую с преобразованием пиксельного формата.
//
void pixelConvert(ID3D11Texture2D *pTexture1, ID3D11Texture2D *pTexture2)
{
//
// Код реализации. Как сделать?
//
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question