ReadPixels implementation in Jitter?


    Jul 22 2007 | 12:01 pm
    So I've given up plans of sussing the most predominant colours in a stream of texture, due to lack of overhead here. In an attempt to keep my patch as light on cpu as possible I was wondering if we can do "ReadPixels(100, 100, sizei 1, sizei 1"... etc etc. - basically what I am looking to do is to sample colours from the framebuffer.
    Alternatively: What is the cheapest way of sampling colours from a texture?
    I have very little experience in doing direct GL calls, and I'd really appreciate any pointers you may have.
    Andreas

    • Jul 22 2007 | 3:36 pm
      Maybe jit.gl.sketch's:
      glreadpixels
      On Jul 22, 2007, at 2:01 PM, Andreas Wetterberg wrote:
      > looking to do is to sample colours from the framebuffer.
    • Jul 22 2007 | 5:19 pm
      doh!
      thanks, nesa. I've always found jit.gl.sketch's possibilities a bit confusing, since the manual is one big blur of "Please see the Red Book", and so on.
      Have you used "glreadpixels"?
      Cheers, A.
    • Jul 28 2007 | 10:54 am
      yes, very long time ago(in jitter time scale) it was the only (sane) way to get gpu gl rendering back to jit.matrix.
      I was using it with just the matrix name: glreadpixel readbackmatrix, where readbackmatrix was the 4 char matrix with the same size as render context.
      On Jul 22, 2007, at 7:19 PM, Andreas Wetterberg wrote:
      > > doh! > > thanks, nesa. I've always found jit.gl.sketch's possibilities a > bit confusing, since the manual is one big blur of "Please see the > Red Book", and so on. > > Have you used "glreadpixels"? > > Cheers, > A.