New answers tagged


You should use the pitch parameter of the surface, otherwise you're guessing. This is because the pitch can be padded on different systems or video cards (for extra data or optimization purposes -- any reason the vendor needs). The only way to know for sure is to query the pitch value, otherwise you leave your program vulnerable to break on an unknown number ...

Top 50 recent answers are included