Commit e82eef28 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Take EXT_vertex_array_bgra into account in send_attribute() and loadNumberedArrays().

parent 2ce82aec
...@@ -534,8 +534,18 @@ static inline void send_attribute(IWineD3DDeviceImpl *This, const DWORD type, co ...@@ -534,8 +534,18 @@ static inline void send_attribute(IWineD3DDeviceImpl *This, const DWORD type, co
case WINED3DDECLTYPE_UBYTE4: case WINED3DDECLTYPE_UBYTE4:
GL_EXTCALL(glVertexAttrib4ubvARB(index, ptr)); GL_EXTCALL(glVertexAttrib4ubvARB(index, ptr));
break; break;
case WINED3DDECLTYPE_UBYTE4N:
case WINED3DDECLTYPE_D3DCOLOR: case WINED3DDECLTYPE_D3DCOLOR:
if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
{
const DWORD *src = ptr;
DWORD c = *src & 0xff00ff00;
c |= (*src & 0xff0000) >> 16;
c |= (*src & 0xff) << 16;
GL_EXTCALL(glVertexAttrib4NubvARB(index, (GLubyte *)&c));
break;
}
/* else fallthrough */
case WINED3DDECLTYPE_UBYTE4N:
GL_EXTCALL(glVertexAttrib4NubvARB(index, ptr)); GL_EXTCALL(glVertexAttrib4NubvARB(index, ptr));
break; break;
......
...@@ -3925,8 +3925,18 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, ...@@ -3925,8 +3925,18 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock,
case WINED3DDECLTYPE_UBYTE4: case WINED3DDECLTYPE_UBYTE4:
GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr)); GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr));
break; break;
case WINED3DDECLTYPE_UBYTE4N:
case WINED3DDECLTYPE_D3DCOLOR: case WINED3DDECLTYPE_D3DCOLOR:
if (GL_SUPPORT(EXT_VERTEX_ARRAY_BGRA))
{
const DWORD *src = (const DWORD *)ptr;
DWORD c = *src & 0xff00ff00;
c |= (*src & 0xff0000) >> 16;
c |= (*src & 0xff) << 16;
GL_EXTCALL(glVertexAttrib4NubvARB(i, (GLubyte *)&c));
break;
}
/* else fallthrough */
case WINED3DDECLTYPE_UBYTE4N:
GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr)); GL_EXTCALL(glVertexAttrib4NubvARB(i, ptr));
break; 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