Am Donnerstag, 26. April 2012, 11:47:51 schrieb Józef Kucia:
- DWORD pitch_or_linear_size;
Are you aware that lPitch is a (signed) LONG in the original DDSURFACEDESC structure? Honestly I have no idea why, and I have never seen an app that passes a negative pitch, but it might lead to obscure bugs if it is not checked.
On Thu, Apr 26, 2012 at 9:50 PM, Stefan Dösinger stefandoesinger@gmx.at wrote:
Am Donnerstag, 26. April 2012, 11:47:51 schrieb Józef Kucia:
- DWORD pitch_or_linear_size;
Are you aware that lPitch is a (signed) LONG in the original DDSURFACEDESC structure? Honestly I have no idea why, and I have never seen an app that passes a negative pitch, but it might lead to obscure bugs if it is not checked.
MSDN says that dwPitchOrLinearSize is DWORD in the DDS_HEADER. Also, the same definition is used in a D3D sample. On the other hand, we can define it as LONG to be safe.
Am 26.04.2012 22:22 schrieb "Józef Kucia" joseph.kucia@gmail.com:
MSDN says that dwPitchOrLinearSize is DWORD in the DDS_HEADER. Also, the same definition is used in a D3D sample. On the other hand, we can define it as LONG to be safe.
Nah, no need in that case. But I recommend to write tests for invalid pitches