mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
Limit usage of vertex arrays to correct states.
This commit is contained in:
parent
6d4fc7efe6
commit
88b928fd0d
@ -1356,13 +1356,15 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
|
||||
for now to some 'special' cases where we can do a direct mapping between D3D
|
||||
types and GL types.
|
||||
|
||||
Note that in the future all calls will go through vertex arrays but the arrays
|
||||
will be generated by this function. */
|
||||
Note: in the future all calls will go through vertex arrays but the arrays
|
||||
will be generated by this function.
|
||||
|
||||
Note2: colours cannot be mapped directly because they are stored as BGRA in memory
|
||||
(ie not as an array of R, G, B, A as OpenGL does it but as a LWORD 0xAARRGGBB
|
||||
which, as we are little indian, gives a B, G, R, A storage in memory.
|
||||
*/
|
||||
if (((d3dvtVertexType & D3DFVF_POSITION_MASK) == D3DFVF_XYZ) && /* Standard XYZ vertices */
|
||||
(((d3dvtVertexType & (D3DFVF_DIFFUSE|D3DFVF_SPECULAR)) == 0) || /* Either no colours */
|
||||
(((d3dvtVertexType & D3DFVF_DIFFUSE) != 0) && /* Or diffuse only but the Alpha component is not used */
|
||||
(This->state_block.render_state[D3DRENDERSTATE_ALPHATESTENABLE - 1] == FALSE) &&
|
||||
(This->state_block.render_state[D3DRENDERSTATE_ALPHABLENDENABLE - 1] == FALSE)))) {
|
||||
((d3dvtVertexType & (D3DFVF_DIFFUSE|D3DFVF_SPECULAR)) == 0)) {
|
||||
int tex_stage;
|
||||
TRACE(" using GL vertex arrays for performance !\n");
|
||||
/* First, the vertices (we are sure we have some :-) */
|
||||
|
Loading…
Reference in New Issue
Block a user