• K
    Kzone

    Hey Robert I was reading the wiki on github and found this:
    "project.targetOptions.html5.webgl = false"

    Isn't this exactly what i was looking for? About the whole canvas vs webgl excludes.

    Also, I'm guessing that the way the renderer works is, if I export to platform X it will detect whats the latest gfx available and use it right? So if my phone runs webgl 1 it will run that or if webgl 2 it will run that. Same for ogl/dx/vulkan on windows, etc.
    I believe shaders are also cross compiled correct? (I remember you talking about that in a video somewhere) So I can just write in glsl and have kha do it's job, I hope. 😃

    posted in Kode read more
  • K
    Kzone

    I have one last question about the batching.
    When I pile draw commands between the framebuffer's begin and end calls, I'm guessing that calls that have the same img source will the batched and drawn, and calls that have other img sources will be treated individually.

    So my question is, is there any recommended scenarios on when i might want to split the draw commands into different buffer calls(begin(), end())?
    I'm guessing only if I want to use different shaders, which would make sense.

    Hopefully my question is meaningful.

    Thanks again for the quick response. If I get acquainted enough with the core library, I'll look into submitting a patch. Thanks for the openness.

    posted in Kode read more
  • K
    Kzone

    Thanks, I'll checkout the sample. About the fallback, it would be nice if there was something like a compiler option to force webgl or force canvas(for web export only), this is because in some cases canvas might be required, and in others any file size gain is good.

    For instance, that I'm aware of some clients demand that playable ads be made with the canvas api exclusively. Hence why createjs is still very much a canvas lib.

    I think kha is really cool and could be a good option for small html solutions like instant games and co.

    That's my suggestion. Thanks for the quick reply!

    posted in Kode read more
  • K
    Kzone

    Hi there, I have a questions about using Kha as a 2d renderer.
    I was looking into how to use Graphics2 and it seems to bundle all of the draw calls into buffer packages. Overall the api is very reminiscent of canvas2d on html, which is nice.

    My questions are, does graphics2 auto batch images with the same source? And also how would you work with shaders if you are using graphics2 as your main api?

    Another thing is, i read on reddit somewhere that graphics2 on html can use canvas or webgl in which case it essentially uses graphics4. Is there any way to force it to use g4, so the canvas2d code is removed on export, reducing the export size?(not sure if this is even necessary, but I hope you got the idea)

    Thanks!

    posted in Kode read more

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