10 May
2012
10 May
'12
3:32 a.m.
Am Mittwoch, 9. Mai 2012, 23:32:05 schrieb Józef Kucia:
+ *pitch = width * format_desc->bytes_per_pixel; + *size = *pitch * height; Usually surface pitches are either 4 or 8 byte aligned(depending on the API and pool). I recommend to write some tests for this. The most likely problematic formats are D3DFMT_P8, any 16 bit format like R5G6B5 and 24 bit R8G8B8. Maybe you're supposed to honor the pitch_or_linear_size member of the DDSURFACEDESC.