Author Topic: How to use the int[] version of FrameBuffer.blit()  (Read 2073 times)

Offline hytparadisee

  • int
  • **
  • Posts: 86
    • View Profile
    • http://peterhi.com
How to use the int[] version of FrameBuffer.blit()
« on: June 20, 2007, 08:56:48 am »
I need a short example, because all my attempts end up with either an array out of bounds exception or a "Blitting region out of bounds" Error
« Last Edit: June 20, 2007, 09:00:08 am by hytparadisee »
Today I finally found a problem to my soluuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuution

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: How to use the int[] version of FrameBuffer.blit()
« Reply #1 on: June 20, 2007, 06:07:08 pm »
The array has to be x*y in size to store a bitmap with x columns and y rows. That's basically the whole trick. It's difficult to give an example of this, because it's really pretty straight forward. You can take (for example) an int[] returned by a PixelGrabber from an image.
Keep in mind that using this method in hardware requires a texture upload every time => slowness!