• neelts

    OMG it works now! Thank you a lot @robert

    posted in Kode read more
  • neelts

    @robert tried hard 🙂 but it ends up with:

    * What went wrong:
    Execution failed for task ':app:generateJsonModelDebug'.
    > Illegal char <:> at index 73: D:\Projects\Kha-Android\Test\build\android-native-build\New-Project\app\D:\KodeStudio\resources\app\kodeExtensions\kha\Kha\Backends\Kore\pch.h
    

    Maybe I'm using wrong NDK? Installed it with SDK manager provided by Android Studio (nothing specially selected)
    Used Kode Studio 18.11 from releases (https://github.com/Kode/KodeStudio/releases)
    Used default project with "Init Kha Project"

    Also if I replace Kha Path with master version it throws:

    Using Kha from D:\Programs\Dev\Kha
    Creating Kha project.
    Compiling shader 1 of 8 (painter-colored.frag.glsl).
    internal/child_process.js:323
        throw errnoException(err, 'spawn');
        ^
    
    Error: spawn EPERM
        at _errnoException (util.js:1024:11)
        at ChildProcess.spawn (internal/child_process.js:323:11)
        at Object.exports.spawn (child_process.js:514:9)
        at fs.stat (D:\Programs\Dev\Kha\Tools\khamake\out\ShaderCompiler.js:333:55)
        at D:\Programs\Dev\Kha\Tools\khamake\node_modules\graceful-fs\polyfills.js:287:18
        at FSReqWrap.oncomplete (fs.js:153:5)
    The terminal process terminated with exit code: 1
    
    Terminal will be reused by tasks, press any key to close it.
    

    Also haxe error after Init Kha project:

    Error starting Haxe server: Error: spawnSync D:\Programs\Dev\Kha\Tools\haxe\haxe.exe EPERM
    

    posted in Kode read more
  • neelts

    @robert thanks, I'll try native, Kha version is really master, kodeExtensions/kha/Kha contents were replaced by me)

    posted in Kode read more
  • neelts

    @robert Also noticed that kha.graphics2.Graphics#set_color has strange generated code:

    public int set_color(int color)
    	{
    		//line 104 "d:\\Programs\\KodeStudio\\resources\\app\\kodeExtensions\\kha\\Kha\\Sources\\kha\\graphics2\\Graphics.hx"
    		return ((int) (-16777216) );
    	}
    

    Is that ok?

    posted in Kode read more
  • neelts

    @robert Android Java target, not native

    posted in Kode read more
  • neelts

    • Haxe 3.4.7
    • Kha latest master (also tried previous versions)
    • Two different Android devices: Mi MIX3 & Mi 5S (Android P & O), also will try with emulator

    Drawing with g1 (setPixel) causes:

    E/Adreno-GSL: <sharedmem_gpuobj_alloc:2436>: sharedmem_gpumem_alloc: mmap failed errno 12 Out of memory
    W/Adreno-GSL: <gsl_memory_alloc_pure:2236>: GSL MEM ERROR: kgsl_sharedmem_alloc ioctl failed.
    

    App is not crashing itself, just showing background color passed in g.begin(), any drawing operation is ignored

    What I'm doing wrong?

    Simple example, working on HTML5, but not on android:

    package;
    
    import kha.Color;
    import kha.Framebuffer;
    import kha.System;
    
    class Main {
    
    	public static function main() {
    		System.start({ title: "Project" }, function (_) {
    			System.notifyOnFrames(render);
    		});
    	}
    
    	static function render(framebuffers:Array<Framebuffer>) {
    		var g = framebuffers[0].g2;
    		g.begin();
    		g.color = Color.Red;
    		g.fillRect(100, 100, 200, 200);
    		g.color = Color.Yellow;
    		g.drawLine(100, 400, 300, 400, 5);
    		g.end();
    	}
    }
    

    Thank you)

    posted in Kode read more

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