https://linen.dev logo
Join Discord
Powered by
# openfl
  • b

    boundless-australia-56579

    01/01/2023, 1:29 PM
    Pass a bitmap to your custom shader. And then use graphics.drawRect. then endFill.
  • b

    boundless-australia-56579

    01/01/2023, 1:30 PM
    It's easier with BitmapFill because you don't have to draw your own shader.
  • e

    enough-lawyer-1858

    01/01/2023, 3:25 PM
    True, but Im scared that if I draw with bitmapfill, I would have to calculate how the matrix is applied to the rectangle to then apply it and I dont want to tbh lmao
  • e

    enough-lawyer-1858

    01/01/2023, 3:26 PM
    And shaderfill is what flixel uses and seems to work without the bitmap cutting the edges or something like that
  • e

    enough-lawyer-1858

    01/01/2023, 3:28 PM
    Or it wont be necessary to do that?
  • h

    hallowed-ocean-84954

    01/01/2023, 9:23 PM
    Isn't the matrix an optional parameter ?
  • e

    enough-lawyer-1858

    01/01/2023, 11:24 PM
    It is, but I kinda need to use a matrix to skew, scale, etc
  • h

    hallowed-ocean-84954

    01/01/2023, 11:51 PM
    ah .... so you need the matrices anyway ... openfl can produce scale, rotate and translate really easily and the skew is explained in the doc. It's a really simple vertex shader to apply the matrix. You would have the same issue with either beginShaderFill or beginBitmapFill.
  • h

    hallowed-ocean-84954

    01/01/2023, 11:52 PM
    but if bitmapfill already knows how to apply it then it should be simpler to use
  • e

    enough-lawyer-1858

    01/02/2023, 12:56 AM
    Hm...
  • e

    enough-lawyer-1858

    01/02/2023, 12:57 AM
    I think I'll try bitmapfill instead of the other one now that I think of it.
  • e

    enough-lawyer-1858

    01/02/2023, 12:57 AM
    Thanks a/w!
  • e

    enough-lawyer-1858

    01/02/2023, 12:59 AM
    I wanted to ask also, whenever I draw something, if I wanted to clear the thing to draw more stuff, would it release memory?
  • e

    enough-lawyer-1858

    01/02/2023, 1:00 AM
    I mean, I think I know what answer would be but wanted to know before testing later again
  • h

    hallowed-ocean-84954

    01/02/2023, 1:07 AM
    You mean Graphics.clear() ? I don't know but I would certainly hope it would deallocate any memory that it can but I expect the graphic itself will still have some memory.
  • e

    enough-lawyer-1858

    01/02/2023, 1:16 AM
    Oh, ye, ye, absolutely i know that I was asking to understand some small stuff to get me an idea. Thank you very much!
  • o

    orange-van-60470

    01/02/2023, 2:52 AM
    [to clear memory you may need to null the bitmapData inside the bitmap ( at least something like that I rem from flash ) ]
  • s

    shy-motherboard-37327

    01/03/2023, 5:40 AM
    Hi. Is there anyway to make a project dpi aware as explained here? https://nlguillemot.wordpress.com/2016/12/11/high-dpi-rendering/ Currently the windows setting for app scaling interferes with the dimensions i specify when targeting windows (but not on hl)
  • b

    bitter-carpenter-85508

    01/04/2023, 4:06 PM
    how to get openfl.display.FPS current fps and use it in elsewhere pls ?
  • a

    able-action-74275

    01/04/2023, 4:17 PM
    can you just do this?
    Copy code
    hx
    var fps = new FPS(x, y, color);
    var current_fps = fps.currentFPS;
  • b

    bitter-carpenter-85508

    01/04/2023, 4:18 PM
    im that dumb bruh
  • b

    bitter-carpenter-85508

    01/04/2023, 4:18 PM
    but thanks
  • a

    able-action-74275

    01/04/2023, 4:18 PM
    for the record I dont know if it works
  • a

    able-action-74275

    01/04/2023, 4:19 PM
    but the source has a public field https://github.com/openfl/openfl/blob/f996638994ef222ef1963d5e3e89044b89ba121c/src/openfl/display/FPS.hx#L28
  • r

    refined-cat-44047

    01/04/2023, 8:24 PM
    The repo for the
    air4haxe
    haxelib seems to be missing. Anyone know where it went? Or who the maintainer is? I would consider taking it over if it is abandoned https://lib.haxe.org/p/air4haxe/1.0.0/files/
  • r

    rhythmic-wolf-50922

    01/04/2023, 9:38 PM
    I don't know anything about air4haxe, but there are a number of AIR classes in the Flash externs maintained by OpenFL: https://github.com/openfl/openfl/tree/develop/lib/flash-externs/src/flash if any APIs are missing, we'd be happy to accept contributions to fill in the gaps
  • h

    hallowed-forest-58641

    01/04/2023, 9:43 PM
    It loooks like is removed. The best shot is to try to contact the author here : https://github.com/danielbenmergui/air4haxe or here https://bitbucket.org/danielben/
  • r

    refined-cat-44047

    01/05/2023, 5:37 AM
    Oh, interesting. I might just do that
  • r

    refined-cat-44047

    01/05/2023, 5:38 AM
    Thanks! Yeah, I think that is probably the best way to find out more about those particular libraries 🙂
  • o

    orange-van-60470

    01/05/2023, 6:17 PM
    I presume you can still get the haxelib https://lib.haxe.org/p/air4haxe/ but may not be compatible with current Air
1...272829...57Latest