Added support for backbuffer with the formats A1R5G5B5 and X1R5G5B5.

oldstable
Oliver Stieber 2005-09-29 10:31:43 +00:00 committed by Alexandre Julliard
parent 9a86a0b046
commit effc262f9f
1 changed files with 19 additions and 0 deletions

View File

@ -758,6 +758,25 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
vcheckGLcall("glDrawPixels");
}
break;
case WINED3DFMT_X1R5G5B5:
{
int size;
unsigned short *data;
data = (unsigned short *)This->resource.allocatedMemory;
size = (This->lockedRect.bottom - This->lockedRect.top) * (This->lockedRect.right - This->lockedRect.left);
while(size > 0) {
*data |= 0x8000;
data++;
size--;
}
}
case WINED3DFMT_A1R5G5B5:
{
glDrawPixels(This->lockedRect.right - This->lockedRect.left, (This->lockedRect.bottom - This->lockedRect.top)-1,
GL_RGBA, GL_UNSIGNED_SHORT_1_5_5_5_REV, This->resource.allocatedMemory);
vcheckGLcall("glDrawPixels");
}
break;
case WINED3DFMT_R8G8B8:
{
glDrawPixels(This->lockedRect.right - This->lockedRect.left, (This->lockedRect.bottom - This->lockedRect.top)-1,