texture::get_row_pitch Method

texture::get_row_pitch Method

 

Returns the number of bytes between each row in a 2-dimensional staging texture, or between each row of a depth slice in 3-dimensional staging texture.

unsigned int get_row_pitch() const restrict(cpu);

The number of bytes between each row in a 2-dimensional staging texture, or between each row of a depth slice in 3-dimensional staging texture.

Given the address of any element in the first row of the 2D texture or depth slice, you can add row_pitch to calculate the address of the same element in the second row of the same texture or depth slice, and similarly for subsequent rows. The value of row_pitch compensates for the size of the texture elements as well as any additional padding that might exist between rows within the texture or depth slice. The value of row_pitch does not compensate for any additional padding between depth slices in a 3-dimensional texture, and can’t be used to move between depth slices; to move between depth slices, use the texture::get_depth_pitch Method instead.

Requirements

Header: amp_graphics.h

Namespace: concurrency::graphics

Show:
© 2016 Microsoft