Add CreateFromGameScreen

This commit is contained in:
Soreepeong 2024-03-03 20:08:52 +09:00
parent c0938bd3a9
commit c04ce36b9c
19 changed files with 1403 additions and 581 deletions

View file

@ -638,8 +638,8 @@ internal sealed partial class FontAtlasFactory
new(
width,
height,
width * bpp,
(int)(use4 ? Format.B4G4R4A4_UNorm : Format.B8G8R8A8_UNorm)),
(int)(use4 ? Format.B4G4R4A4_UNorm : Format.B8G8R8A8_UNorm),
width * bpp),
buf);
this.data.AddExistingTexture(wrap);
texture.TexID = wrap.ImGuiHandle;

View file

@ -360,10 +360,10 @@ internal sealed partial class FontAtlasFactory
new(
texFile.Header.Width,
texFile.Header.Height,
texFile.Header.Width * bpp,
(int)(targetIsB4G4R4A4
? DXGI_FORMAT.DXGI_FORMAT_B4G4R4A4_UNORM
: DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM)),
: DXGI_FORMAT.DXGI_FORMAT_B8G8R8A8_UNORM),
texFile.Header.Width * bpp),
buffer));
}
finally