mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 03:15:07 -04:00
Fix function d3d_surface_to_texture.
The 16-bit color source to 24-bit color copy was incorrect. See difference.
This commit is contained in:
parent
ea3279d087
commit
093b07b81c
@ -943,9 +943,10 @@ d3d_surface_to_texture(RECT &source_rect, IDirect3DSurface9 *d3d_surface,
|
|||||||
g = (pixel & greenmask) >> greenshift;
|
g = (pixel & greenmask) >> greenshift;
|
||||||
r = (pixel & redmask) >> redshift;
|
r = (pixel & redmask) >> redshift;
|
||||||
|
|
||||||
*dest_byte += b;
|
*dest_byte++ = b;
|
||||||
*dest_byte += g;
|
*dest_byte++ = g;
|
||||||
*dest_byte += r;
|
*dest_byte++ = r;
|
||||||
|
|
||||||
source_word++;
|
source_word++;
|
||||||
}
|
}
|
||||||
surface_bytes += byte_pitch;
|
surface_bytes += byte_pitch;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user