• O
    OlegAntipov

    @olegantipov Oh, I solved the problem. Just deleted the module and made an update "git submodule update --init --recursive".

    Now everything is fine, thanks!

    posted in Kode read more
  • O
    OlegAntipov

    @robert Thanks for the quick response! But I honestly did not quite understand what I now need to do to get back the khacpp submodule to the right point)

    I used this command to update:
    "git submodule foreach --recursive git pull origin master && git pull origin master"

    Can you tell me what to do now?

    posted in Kode read more
  • O
    OlegAntipov

    @robert Today I updated Kha from Git, tried to compile to android-native and got this error in Android Studio 😒

    In file included from C:/Development/KhaAPI/Kha/Backends/Kore/khacpp/include\hx/Thread.h:17:
    
    C:/Development/KhaAPI/Kha/Kore/Sources\Kore/Threads/Atomic.h:3:10: fatal error: 'Kore/AtomicImpl.h' file not found
    

    B.t.w. what is the difference between compilation modes "Build for Android (native)" and "Build for Android (native, full build)"? If I try to compile a "full build", then in VSCode I get the following error:

    korefile found.
    Creating Android project files.
    Compiling...
    events.js:165
          throw er; // Unhandled 'error' event
          ^
    
    Error: spawn gradlew.bat ENOENT
        at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
        at onErrorNT (internal/child_process.js:379:16)
        at process._tickCallback (internal/process/next_tick.js:178:19)
    Emitted 'error' event at:
        at Process.ChildProcess._handle.onexit (internal/child_process.js:207:12)
        at onErrorNT (internal/child_process.js:379:16)
        at process._tickCallback (internal/process/next_tick.js:178:19)
    The terminal process terminated with exit code: 1
    
    Terminal will be reused by tasks, press any key to close it.
    

    posted in Kode read more
  • 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

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