mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
New compact texture type for OGL/D3D: RGB565
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2225 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
57c4620902
commit
e557e090dd
5 changed files with 31 additions and 11 deletions
|
@ -58,6 +58,17 @@ LPDIRECT3DTEXTURE9 CreateTexture2D(const u8* buffer, const int width, const int
|
|||
}
|
||||
}
|
||||
break;
|
||||
case D3DFMT_R5G6B5:
|
||||
{
|
||||
const u16 *pIn = (u16*)buffer;
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
u16* pBits = (u16*)((u8*)Lock.pBits + (y * Lock.Pitch));
|
||||
memcpy(pBits, pIn, width * 2);
|
||||
pIn += pitch;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case D3DFMT_A8L8:
|
||||
{
|
||||
const u8 *pIn = buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue