Fixed the TEXCOORDINDEX code.

This commit is contained in:
Lionel Ulmer 2003-07-30 03:40:39 +00:00 committed by Alexandre Julliard
parent 8297fec7d2
commit 1b2f56e62e

View File

@ -1197,9 +1197,9 @@ inline static void handle_diffuse_and_specular(STATEBLOCK *sb, BYTE *fog_table,
inline static void handle_texture(D3DVALUE *coords) { inline static void handle_texture(D3DVALUE *coords) {
glTexCoord2fv(coords); glTexCoord2fv(coords);
} }
inline static void handle_textures(D3DVALUE *coords, int tex_index) { inline static void handle_textures(D3DVALUE *coords, int tex_stage) {
/* For the moment, draw only the first texture.. */ /* For the moment, draw only the first texture.. */
if (tex_index == 0) glTexCoord2fv(coords); if (tex_stage == 0) glTexCoord2fv(coords);
} }
static void draw_primitive_strided(IDirect3DDeviceImpl *This, static void draw_primitive_strided(IDirect3DDeviceImpl *This,
@ -1335,7 +1335,7 @@ static void draw_primitive_strided(IDirect3DDeviceImpl *This,
} }
for (tex_stage = 0; tex_stage < num_active_stages; tex_stage++) { for (tex_stage = 0; tex_stage < num_active_stages; tex_stage++) {
int tex_index = This->state_block.texture_stage_state[tex_stage][D3DTSS_TEXCOORDINDEX - 1] & 0xFFFF0000; int tex_index = This->state_block.texture_stage_state[tex_stage][D3DTSS_TEXCOORDINDEX - 1] & 0x0000FFFF;
if (tex_index >= num_tex_index) { if (tex_index >= num_tex_index) {
handle_textures((D3DVALUE *) no_index, tex_stage); handle_textures((D3DVALUE *) no_index, tex_stage);
} else { } else {