https://linen.dev logo
Join Discord
Powered by
# haxe-ui
  • o

    orange-van-60470

    02/07/2023, 10:48 AM
    need to fix view8 still
  • b

    bright-gpu-74537

    02/07/2023, 10:49 AM
    but is this leveraging the browser? Or is this all "raw" pixel data?
  • o

    orange-van-60470

    02/07/2023, 10:49 AM
    inline function view8():js.lib.Uint8Array { var dataimg: js.lib.Uint32Array = cast this.image; return new js.lib.Uint8Array( dataimg.buffer ); // TODO make more generic }
  • b

    bright-gpu-74537

    02/07/2023, 10:49 AM
    i mean, are you drawing to a js canvas and then getting the bytes out of that?
  • o

    orange-van-60470

    02/07/2023, 10:49 AM
    No I draw on the UIntArray
  • o

    orange-van-60470

    02/07/2023, 10:50 AM
  • b

    bright-gpu-74537

    02/07/2023, 10:50 AM
    right, well, as i said then, best idea is to create a PoC that can do this stuff with a wxImage
  • o

    orange-van-60470

    02/07/2023, 10:50 AM
    do you know the image format???
  • b

    bright-gpu-74537

    02/07/2023, 10:50 AM
    RGB and a seperate channel for A
  • o

    orange-van-60470

    02/07/2023, 10:50 AM
    I may not have time to play properly till my weekend fri/sat
  • b

    bright-gpu-74537

    02/07/2023, 10:51 AM
    https://github.com/haxeui/hxWidgets/blob/master/src/hx/widgets/Image.hx#L154-L162
  • o

    orange-van-60470

    02/07/2023, 10:53 AM
    ok so I would need a for loop to split the bytes
  • b

    bright-gpu-74537

    02/07/2023, 10:55 AM
    i think you just want a PoC at first i think over optimizing would be a mistake at this point...
  • b

    bright-gpu-74537

    02/07/2023, 10:56 AM
    but yeah, i guess you would need to get the bytes into the "right" format
  • o

    orange-van-60470

    02/07/2023, 10:59 AM
    have work soon so not now.. obviously I have tried to keep most of the code to be static target acceptable
  • o

    orange-van-60470

    02/07/2023, 10:59 AM
    but prob will have a few to do..
  • o

    orange-van-60470

    02/07/2023, 11:01 AM
    I might try neko to png test first as it will compile fast and should allow code to be made c++ safe
  • l

    late-engine-8731

    02/07/2023, 11:05 AM
    So your lib is basically a software rasterer, plotting pixels via while loops?
  • l

    late-engine-8731

    02/07/2023, 11:06 AM
    sry, if this is a stupid question, but you should prolly add a basic abstract / summary / intention to your GH projects
  • b

    bright-gpu-74537

    02/07/2023, 11:08 AM
    i was in the same boat (still am somewhat), without a lengthy explanation it wasnt really clear what it was (or how it would fit into haxeui)
  • b

    bright-gpu-74537

    02/07/2023, 11:08 AM
    > A software rasterer, plotting pixels that outputs RGBA bytes would have been a little clearer 😄
  • a

    ambitious-knife-25690

    02/07/2023, 11:09 AM
    I suspect I could use this, but have no idea just yet as well. At the very least I think this should just use haxe.io.Bytes as the default
  • b

    bright-gpu-74537

    02/07/2023, 11:10 AM
    yeah, it does sound like an interesting "3rd party replacement for inbuilt haxeui canvases"
  • b

    bright-gpu-74537

    02/07/2023, 11:11 AM
    but thats assuming a) it would work and b) ive even understood it correctly... Nanj has a habit of just writing pages and pages with (sometimes) little context so i might have gotten the wrong end of the stick - but my understanding is that you can "draw" to a bytes buffer and then display that anyway you want
  • a

    ambitious-knife-25690

    02/07/2023, 11:12 AM
    i think that's what it is as well, which is cool, but if it is that it really should just use Bytes
  • b

    bright-gpu-74537

    02/07/2023, 11:12 AM
    sure
  • a

    ambitious-knife-25690

    02/07/2023, 11:13 AM
    i think almost all haxe image/render things take in haxe.io.bytes in some way shape or form
  • l

    late-engine-8731

    02/07/2023, 11:14 AM
    I think it also falls into the "Quality over Speed"-Category. I dont see it being performant past a certain image-size. But this might be the thing about wrapping other backends or something
  • b

    bright-gpu-74537

    02/07/2023, 11:15 AM
    tbf, for haxeui, i dont really think canvas has to be super high perf... its not a critical part, and its not supposed to be for 60fps games inside haxeui...
  • a

    ambitious-knife-25690

    02/07/2023, 11:15 AM
    yeah lol
1...147514761477...1687Latest