Commit ecba4d5c authored by Ivan Gyurdiev's avatar Ivan Gyurdiev Committed by Alexandre Julliard

wined3d: Texture format corrections.

- add missing GL type and make GL cfg entries for A16B16G16R16 - correct L16 type to UNSIGNED_SHORT (..16 = short, not byte) - change internal format for X8R8G8B8 from GL_RGB to GL_RGB8 which seems more correct
parent 74117baa
......@@ -1655,7 +1655,7 @@ GLint D3DFmt2GLIntFmt(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case WINED3DFMT_A8R8G8B8: retVal = GL_RGBA8; break;
case WINED3DFMT_A8B8G8R8: retVal = GL_RGBA8; break;
case WINED3DFMT_A2R10G10B10: retVal = GL_RGBA8; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_RGB; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_RGB8; break;
case WINED3DFMT_A16B16G16R16: retVal = GL_RGBA16_EXT; break;
/* to see */
case WINED3DFMT_A8: retVal = GL_ALPHA8; break;
......@@ -1769,7 +1769,7 @@ GLenum D3DFmt2GLType(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case WINED3DFMT_A8P8: retVal = GL_UNSIGNED_BYTE; break;
/* Luminance */
case WINED3DFMT_L8: retVal = GL_UNSIGNED_BYTE; break;
case WINED3DFMT_L16: retVal = GL_UNSIGNED_BYTE; break;
case WINED3DFMT_L16: retVal = GL_UNSIGNED_SHORT; break;
case WINED3DFMT_A8L8: retVal = GL_UNSIGNED_BYTE; break;
case WINED3DFMT_A4L4: retVal = GL_UNSIGNED_BYTE; break;
/* Bump */
......@@ -1789,6 +1789,7 @@ GLenum D3DFmt2GLType(IWineD3DDeviceImpl* This, D3DFORMAT fmt) {
case WINED3DFMT_A8B8G8R8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
case WINED3DFMT_A2R10G10B10: retVal = GL_UNSIGNED_INT_2_10_10_10_REV; break;
case WINED3DFMT_X8R8G8B8: retVal = GL_UNSIGNED_INT_8_8_8_8_REV; break;
case WINED3DFMT_A16B16G16R16: retVal = GL_UNSIGNED_SHORT; break;
/* to see */
case WINED3DFMT_A8: retVal = GL_ALPHA; break;
/* Depth + Stencil */
......@@ -1942,6 +1943,13 @@ int D3DFmtMakeGlCfg(D3DFORMAT BackBufferFormat, D3DFORMAT StencilBufferFormat, i
PUSH2(GLX_BLUE_SIZE, 10);
break;
case WINED3DFMT_A16B16G16R16:
PUSH2(GLX_ALPHA_SIZE, 16);
PUSH2(GLX_RED_SIZE, 16);
PUSH2(GLX_GREEN_SIZE, 16);
PUSH2(GLX_BLUE_SIZE, 16);
break;
default:
FIXME("Unsupported color format: %s\n", debug_d3dformat(BackBufferFormat));
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment