• O
    OlegAntipov

    @robert Today I tried to disable HX_SMART_STRINGS and Utf8 API started working normally for non-English letters, as it was before.

    As far as I remember, str.charAt did not work unified on android-native before, so I switched to Utf8 API for working with Utf8 text.

    posted in Kode read more
  • O
    OlegAntipov

    @robert strangely, I thought Utf8 API should work the same for all platforms. And it even worked before the update:

    "Since not all platforms guarantee that String always uses UTF-8 encoding, you can use this cross-platform API to perform operations on such strings."
    https://api.haxe.org/haxe/Utf8.html

    Could you hint me what I need to use in hxcpp target to get the same character code as in html target? str.charAt(i) on android-native target also return a bad character...

    posted in Kode read more
  • O
    OlegAntipov

    @robert I think there is another problem with the Utf8 encoding. After the update, for some reason, the wrong characters for non-English:

    	var str:String="Русский Язык";
    	trace(str);
    	for(i in 0...str.length)
    		trace("->"+str.charAt(i)+":"+Utf8.charCodeAt(str,i)+":"+String.charCodeAt(i));
    

    HTML5 console: https://drive.google.com/file/d/1XOYAF_MIQD2mZywWAE-3KF90wOV7qs9Y

    Android Studio (Java-native): https://drive.google.com/file/d/1xSVTPvX4jHxCiqGQTtff-JK6fMvdsV1e

    for some reason, charAt and charCodeAt return invalid characters.... Perhaps this is due to the last bugfix with a "error: unknown type name 'char16_t'"

    posted in Kode read more
  • O
    OlegAntipov

    @robert ok thanks for the explanation!

    posted in Kode read more
  • O
    OlegAntipov

    @robert Ok!

    btw, as I understand it, I can mix g2 and g4 calls between begin and end? And what will change if I call instead of g2.begin - g4.begin?

    posted in Kode read more
  • O
    OlegAntipov

    @robert yes, everything seems to work now, except for setting the shader variable. When I call g4.setFloat to pass the value to my shader I got this error (for all targets):
    "WebGL: INVALID_OPERATION: uniform1f: location not for current program"

    but I am sure that I gave the correct location and I did not receive such error earlier before the update. So I wrote a minimal example causing an error: https://drive.google.com/file/d/1fISYMHDRkUmGjCvoI56jLZ6EqvDcdNXB/view

    Maybe API for shaders somehow changed?

    posted in Kode read more
  • O
    OlegAntipov

    Hi,
    After updating Kha today I can't compile my project in android-native target.
    I got this errors:
    "C:/Development/KhaAPI/Kha/Backends/Kore/khacpp/include/hxString.h:307:13: error: unknown type name 'char16_t'"

    "C:/Development/KhaAPI/Kha/Backends/Kore/khacpp/include/hxString.h:27:33: error: member initializer '__s' does not name a non-static data member or base class"

    "C:/Development/KhaAPI/Kha/Backends/Kore/khacpp/include/hxString.h:112:53: error: use of undeclared identifier '__s'; did you mean '__sF'?"

    may be something missing in last update? I use latest Android Studio 3.3

    posted in Kode read more
  • O
    OlegAntipov

    How can I disable the use of metal api on IOS? Because I have this problem with it https://github.com/Kode/Kha/issues/918.
    Also, as I understand it, it cannot work in the simulator.

    I would like to try compiling for OpenGL API...

    posted in Kode read more
  • O
    OlegAntipov

    @robert Yes, when I build in the macOS KodeStudio everything opens normally in xcode, thanks!

    posted in Kode read more
  • O
    OlegAntipov

    I'm trying to open the xcode project and get the following error "Xcode quit unexpectedly"

    I tried in two versions (OSX 10.9.5 Xcode 6.0.1 and OSX 10.13.5 Xcode 9.4.1) and everywhere the same thing.

    Maybe I'm missing something?

    p.s. I also specify bundle, organizationName, developmentTeam in khafile

    p.p.s. Also I build IOS project on windows OS, should I use macOS KodeStudio version for ios build initially?

    posted in Kode read more
  • O
    OlegAntipov

    @robert Hmm ... I tried to attach this wav to an empty project, and everything seems to work as it should on the android. Maybe the problem was not in this file... I'll try to investigate more and try to localize the problem in a empty project and then raise an issue on github.

    posted in Kode read more
  • O
    OlegAntipov

    @robert thanks for the tip, Robert! It works.

    btw, it is probably worthwhile to output a warning to the logs if the wav format does not match the required one (sample rate: 44100Hz 16 bit). Accidentally I had one wav that was not of this format, and I was getting just a black screen on the android (html5 target works fine even in this case).

    posted in Kode read more
  • O
    OlegAntipov

    I would like to clarify a couple of questions about sound formats:

    1. Is it possible to use the ogg format of sounds directly, not wav? Because if I add ogg sounds to assets folder they are added into Assets.blobs, not in Assets.sounds.

    2. When I export to HTML5, all the wav sounds are converted to ogg, but when I use the android native target non-converted wav sounds are added to apk file, which causes the file size is increased dramatically. Is it possible to use ogg in android native target?

    posted in Kode read more
  • O
    OlegAntipov

    @robert oh, I did not have these lines in khamake.js, only "require ('./ out / khamake.js');" although I updated the repository yesterday... I completely deleted the repository, and cloned again, and these lines appeared 😕

    It seems that I updated only kha yesterday with command "git pull origin master", not its submodules (

    To update everything, I need to use the command "git submodule foreach --recursive git pull origin master" not "git pull origin master", right?

    After I updated everything, that message was not displayed during the build. Thank you very much for the help! 🙂

    posted in Kode read more
  • O
    OlegAntipov

    If I try to use latest github version of kha (set kha.khaPath in latest Kode Studio 17.9.1) I get this message in output window:
    Requires Node.js version 8.9 or higher.

    Help->About told that Kode Studio 17.9.1 use node 7.4.0

    But I already installed node v9.11.1 in my OS! As I undestood I need to update node.dll (it have 7.4.0 version) in Kode Studio files. How can I do this?

    posted in Kode read more
  • O
    OlegAntipov

    oh, sorry, I found a way to display the desired letters. If someone has the same problem this is the solution:

    	var glyphs:String="<all necessary glyphs>";
    	_backbuffer.g2.fontGlyphs=StringExtensions.toCharArray(glyphs);

    posted in Kode read more
  • O
    OlegAntipov

    I use font with multi language support, but I can draw via drawString method only english characters. This method can output only English text or am I doing something wrong?

    posted in Kode read more

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