• 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

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