• CoruNethron

    Oh. I got confused, cause there is Coor.Black used in forum post. But now I see the actal issue in Kodegarden.

    posted in Kode read more
  • CoruNethron

    Topic is quite old, but probably the reason is drawing order.
    Instead of

    graphics.color = Color.Blue;
    graphics.fillRect(0,0,800,600);
    graphics.drawImage(image,0,0);
    

    it might be:

    graphics.drawImage(image,0,0);
    graphics.color = Color.Blue;
    graphics.fillRect(0,0,800,600);
    

    then we get bue area, instead of black.

    posted in Kode read more
  • CoruNethron

    I think, that there may be few different reasons for such blur.

    In some cases it may be controlled by OS, but most probably it's not our case.
    It may be somehow corellated with textue sampler interpolation technique, that samples pixels at the center of pixel (at 0.5x, 0.5y coord, for example), so that UV coords passed to sampler must take it into account.

    Most probably, as far as i see, it's result of how fonts managed in Kha. When you load new font, tool, named Kravur creates font texture. And then during render process function getBakedQuad() takes small quad for each rendered character. It's part of optimization for render process. Therefore we have multiple points, where font can be resized and resampled.

    Please, note, that i'm not very familiar with Kha, so my statements may be completely wrong. 🙂

    One possible solution, that I see, to achieve pixel-perfect fonts - is to bake your font into texture, for example with this online tool: http://kvazars.com/littera/
    And then adopt graphics2 internals to use your texture, instead of loading from *.ttf

    posted in Kode read more
  • CoruNethron

    I got little issue, while trying to use linc_imgui installed with haxelib instead of adding it to Libraries directory.

    During comilation it says: "linc_imgui.h: No such file or directory"

    May be korefile.js not get parsed, when library placed in haxe/lib directory?


    I decided to use haxelib instead of Libraries dir, cause i want to add this demo into linc_imgui tests directory.

    In that case we end up with this directories structure:

    • linc_imgui
      • tests
        • Kha
          • Libraries
            • linc_imgui

    I'm not sure if it's OK to create such circular dependencies within git.

    However, please, clarify - is it possible to use library, installed with haxelib, like:
    haxelib git linc_imgui https://github.com/CoruNethron/linc_imgui

    If that library contains korefile.js and some native code?

    posted in Kode read more
  • CoruNethron

    Got it to work just now. Started with this bindings: https://github.com/Aidan63/linc_imgui
    Actually there was no modifications needed, not to Kha nor to linc_imgui, but setup takes some time.

    0_1522387824445_Screenshot_2.png

    I'll try to create pull request, to add Kha test target to linc_imgui.

    posted in Kode read more

Looks like your connection to Kode Forum was lost, please wait while we try to reconnect.