Guest User

Untitled

a guest
Nov 12th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. unsafe
  2. {
  3. // Get a pointer to the back buffer.
  4. // Find the address of the pixel to draw.
  5.  
  6. int color_data;
  7. int pBackBuffer;
  8.  
  9. for (i = 0; i < tocopy_bmp.Height; ++i) //tocopy_bmp.height
  10. {
  11. for (j = 0; j < tocopy_bmp.Width; ++j) //tocopy_bmp.width
  12. {
  13. pBackBuffer = (int)tocopy_bmp.BackBuffer;
  14. pBackBuffer += i * tocopy_bmp.BackBufferStride;
  15. pBackBuffer += j * 4;
  16.  
  17. color_data = *((int*)pBackBuffer); // this line will increase RAM usage by ~380MB
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment