Guest User

Untitled

a guest
Jan 19th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.69 KB | None | 0 0
  1.         public void UpdatePatch()
  2.         {
  3.             //for each point to change go ahead and update the value in the byte array
  4.             foreach (patchPoint p in toUpdate)
  5.             {
  6.                 patchVals[p.y, p.x] = p.val;
  7.             }
  8.             //Update the SubImage
  9.             GL.BindTexture(TextureTarget.Texture2D, patch2D);
  10.             GL.TexSubImage2D(TextureTarget.Texture2D, 0, updateLeft, updateTop, updateRight - updateLeft, updateBottom-updateTop,PixelFormat.Luminance, PixelType.UnsignedByte, patchVals);
  11.  
  12.             //reset everything
  13.             updateLeft = updateTop = Dimx;
  14.             updateRight = updateBottom = 0;
  15.             toUpdate.Clear();
  16.         }
Add Comment
Please, Sign In to add comment