Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void UpdatePatch()
- {
- //for each point to change go ahead and update the value in the byte array
- foreach (patchPoint p in toUpdate)
- {
- patchVals[p.y, p.x] = p.val;
- }
- //Update the SubImage
- GL.BindTexture(TextureTarget.Texture2D, patch2D);
- GL.TexSubImage2D(TextureTarget.Texture2D, 0, updateLeft, updateTop, updateRight - updateLeft, updateBottom-updateTop,PixelFormat.Luminance, PixelType.UnsignedByte, patchVals);
- //reset everything
- updateLeft = updateTop = Dimx;
- updateRight = updateBottom = 0;
- toUpdate.Clear();
- }
Add Comment
Please, Sign In to add comment