• FuzzyWuzzie

    ok, thanks!

    What's involved with "wiring it up in Kha"? I've just tried to compile empty applications build with:

    node kha/make -g vulkan
    node kha/make -g metal
    node kha/make -g direct3d12
    

    And all failed to compile (metal on XCode, vulkan and direct3d12 on visual studio 2017).

    For direct3d12 (on windows target), I get:

    Cannot open include file: 'd3dx12.h': No such file or directory
    ...
    Cannot open include file: 'WinError.h`: No such file or directory
    

    For vulkan, I get a runtime exception on line 361 of PipelineState5Impl.cpp:

    Exception thrown at 0x000000005337A203 (nvoglv64.dll) in g5.exe: 0xC0000005: Access violation reading location 0x000001D0DA6C48C0.
    

    For metal, I get:

    'Kore/ConstantBuffer5impl.h' file not found
    

    It seems like the vulkan and metal errors fall into the "Metal and Vulkan need some updates", but do the direct3d12 errors fall under the "wiring it up in kha"?

    Is there any way I can help sort it out?

    Thanks!

    posted in Kode read more
  • FuzzyWuzzie

    What's the state of the graphics5 api today? Is it fully functional across all platforms?

    I can't seem to find any information about it, including any code showing the steps required to get something on screen. If there aren't any tutorials available, I'd love to start working on one but I don't even know where to begin myself 😛

    posted in Kode read more
  • FuzzyWuzzie

    Hey, I just finished a game I made with kha for the xoxo game jam (you can check it out here: https://blazingmammothgames.itch.io/bun-snap).
    There were a few pain points but overall I think using Kha in an actual project went quite well!

    posted in Kode read more
  • FuzzyWuzzie

    I'm trying to get some g4 stuff working on iOS, however all the textures are black. When I loaded png textures in a g2 context in a previous demo, the textures loaded fine; but now in g4 they're all black. I've tested with my sample (https://github.com/FuzzyWuzzie/gltf-sample-kha) as well as Lubos Lenco's examples.

    Any idea what's wrong?

    Thanks!

    posted in Kode read more
  • FuzzyWuzzie

    @FuzzyWuzzie turns out I just had a massive brain fart earlier. I should have been using the Less compare function, and clearing the depth buffer to 1 (I was using GreaterEqual and clearing to 0). Sorry to bother you!

    posted in Kode read more
  • FuzzyWuzzie

    I'm trying to test my glTF library (https://github.com/FuzzyWuzzie/haxe-gltf) for loading glTF models. Basically, right now, I just want to load the mesh data and display it. And what I have right now kind-of works: https://fuzzywuzzie.github.io/gltf-sample-kha/ (source code is at: https://github.com/FuzzyWuzzie/gltf-sample-kha).

    If you can't run the demo, here's a screenshot:

    ducky with depth issues?

    As far as I can tell, the glTF data is being loaded correctly (I've manually checked things on smaller triangle and quad models), but it clearly isn't rendering correctly; and it seems like a depth issue (the colours are coming from the mesh normal).

    I think I'm doing something wrong in Kha, but I can't seem to figure out what exactly, other than that it seems like a depth issue. The pipeline looks like it should be writing to the depth buffer and comparing against it:

    pipeline = new PipelineState();
    pipeline.inputLayout = [structure];
    pipeline.fragmentShader = Shaders.simple_frag;
    pipeline.vertexShader = Shaders.simple_vert;
    pipeline.cullMode = CullMode.Clockwise;
    pipeline.depthMode = CompareMode.GreaterEqual;
    pipeline.depthWrite = true;
    pipeline.compile();
    

    And my render function clears the depth buffer:

    var g = frame.g4;
    g.begin();
    g.clear(Color.fromFloats(0.33, 0.33, 0.33), 0);
    
    g.setVertexBuffer(vertexBuffer);
    g.setIndexBuffer(indexBuffer);
    g.setPipeline(pipeline);
    g.setMatrix(mvpID, mvp);
    g.setMatrix(mID, model);
    g.drawIndexedVertices();
    
    g.end();
    

    But it seems like perhaps the depth buffer isn't being used? Or is there something else wrong with the model data? I could really use another pair of eyes on this if you're available.

    Thanks so much!

    posted in Kode read more
  • FuzzyWuzzie

    @Robert Not that I'm aware of; I didn't stick around with KodeStudio long enough to find anything when I realized I couldn't use extensions.

    posted in Kode read more
  • FuzzyWuzzie

    I prefer to do all my development in Visual Studio Code these days. I know KodeStudio is a fork of Code, but it disables a bunch of things I'd rather it not. Thankfully, I just discovered how to easily debug my projects within Visual Studio Code (I used to just debug in the browser), and figured I'd share in case anyone here is in the same boat.

    Here's how I got things working:

    1. Install the Debugger for Chrome extension
    2. In your project root, create (or edit) the two files: .vscode/launch.json and .vscode/tasks.json according to this gist: https://gist.github.com/FuzzyWuzzie/89a620b4adda01452cba0314e4c02c98
    3. Make sure to enable debug (sourcemaps) in your khafile.js: project.addParameter('-debug');
    4. Click the debug tab, select the 'Kha/HTML5' configuration, and launch!

    You can set breakpoints, inspect variables, etc.

    Hope that helps!

    posted in Kode read more
  • FuzzyWuzzie

    Damn, you're a champ!

    Thanks so much!

    posted in Kode read more
  • FuzzyWuzzie

    I'm trying to do exactly this right now, but am running into issues. Since I want to include things (as resources) from the library, I need to add compiler defines which point to the resource location. In order to get where the library is installed, I want to parse the results of haxelib list, basically doing:

    var results = require('child_process').execSync('haxelib list').toString();
    

    The problem is that no matter what I do, I can't get it to execute like normal nodejs—it doesn't have the require function:

    Creating Kha project.
    undefined:3
    var results = require('child_process').execSync('haxelib list').toString();
                  ^
    
    ReferenceError: require is not defined
        at eval (eval at <anonymous> (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\ProjectFile.js:10:16), <anonymous>:3:15)
        at module.exports (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\ProjectFile.js:10:47)
        at exportKhaProject (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\main.js:494:13)
        at exportProject (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\main.js:618:10)
        at Object.exports.run.callback [as run] (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\main.js:731:9)
        at Object.<anonymous> (C:\HaxeToolkit\haxe\lib\kha\git\Tools\khamake\khamake.js:285:23)
        at Module._compile (module.js:435:26)
        at Object.Module._extensions..js (module.js:442:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:311:12)
    

    Since I can't require any modules, I can't really do much as the entire node standard library relies on requiring things.

    Is there any way to resolve this?

    Thanks!

    posted in Kode read more

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