Advertisement
Vanhapolle

Non wokring checkerboard

Dec 31st, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. for (pptrx = 0 ; pptrx <= image_w-1; pptrx = pptrx + 1)
  2. for (pptry = 0 ; pptry <= image_h-1; pptry = pptry + 1) 
  3. {
  4. {
  5.  
  6. pptr=pptrx+pptry*image_w*bytesperpixel;
  7.  
  8. pixcol=((pptrx + pptry)% 2)*255;
  9. *(image+pptr)=0;
  10. *(image+pptr+1)=pixcol;
  11. *(image+pptr+2)=pixcol;
  12. *(image+pptr+3)=pixcol;
  13. };
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement