https://linen.dev logo
Join Discord
Powered by
# lime
  • r

    rhythmic-wolf-50922

    05/01/2023, 9:33 PM
    try running
    lime display windows -debug
    in your project. it will show which Haxe compiler arguments are generated. it will include the path to Lime that is being used. I assume it won't be your fork's path.
  • l

    little-oxygen-79174

    05/01/2023, 9:35 PM
    The path there looks fine

    https://cdn.discordapp.com/attachments/769686258049351722/1102709993192554546/image.png▾

  • r

    rhythmic-wolf-50922

    05/01/2023, 9:41 PM
    i've never worked with a custom .haxelib directory that is outside of the global one, so I'm not sure how to suggest debugging that
  • l

    little-oxygen-79174

    05/01/2023, 9:42 PM
    i got rid of the custom
    .haxelib
    directory to see if that was the problem and it persists
  • l

    little-oxygen-79174

    05/01/2023, 9:42 PM

    https://cdn.discordapp.com/attachments/769686258049351722/1102711638005649549/image.png▾

  • l

    little-oxygen-79174

    05/01/2023, 9:43 PM

    https://cdn.discordapp.com/attachments/769686258049351722/1102711874769928323/image.png▾

  • l

    little-oxygen-79174

    05/01/2023, 9:43 PM
    That fork of lime is on my repo if you want to try to reproduce it https://github.com/EliteMasterEric/lime
  • r

    rhythmic-wolf-50922

    05/01/2023, 9:44 PM
    I'm used to using
    git clone
    with
    haxelib dev
    instead of
    haxelib git
    , so there's another difference from how I do it
  • l

    little-oxygen-79174

    05/01/2023, 9:46 PM
    I just created a completely new Lime project (
    haxelib run lime create Lime-HelloWorld
    )
  • l

    little-oxygen-79174

    05/01/2023, 9:46 PM
    and get the same error when building that too
  • l

    little-oxygen-79174

    05/01/2023, 9:47 PM
    wait
  • l

    little-oxygen-79174

    05/01/2023, 9:47 PM
    if i build the lime project twice it works, but not a flixel project
  • t

    tall-teacher-57409

    05/04/2023, 1:26 PM
    what's the equivalent of
    glGenBuffers
    in lime?
  • a

    able-action-74275

    05/04/2023, 1:37 PM
    in the cpp bindings I see this
    Copy code
    c
    int lime_gl_create_buffer () {
    
        GLuint id = 0;
        glGenBuffers (1, &id);
        return id;
    
    }
    so it looks like you can create individual buffers with
    gl.createBuffer ();
  • t

    tall-teacher-57409

    05/04/2023, 1:37 PM
    ohh
  • t

    tall-teacher-57409

    05/04/2023, 1:41 PM
    so
    Copy code
    cpp
    unsigned int VBO;
    glGenBuffers(1, &VBO);
    how would that look like?
  • a

    able-action-74275

    05/04/2023, 1:42 PM
    can be a bit fun porting stuff from c to the lime bindings, I like to have lime source open for searching for the c calls
  • a

    able-action-74275

    05/04/2023, 1:43 PM
    Copy code
    hx
    var vbo = gl.createBuffer();
  • t

    tall-teacher-57409

    05/04/2023, 1:43 PM
    aight
  • t

    tall-teacher-57409

    05/04/2023, 1:54 PM
    ok how do I now write glsl?
  • a

    able-action-74275

    05/04/2023, 1:55 PM
    the shader code?
  • a

    able-action-74275

    05/04/2023, 1:55 PM
    I'm not good with terminology
  • a

    able-action-74275

    05/04/2023, 1:55 PM
    but guess you mean this
  • t

    tall-teacher-57409

    05/04/2023, 1:55 PM
    yep
  • t

    tall-teacher-57409

    05/04/2023, 1:55 PM
    ah yeah I see
  • t

    tall-teacher-57409

    05/04/2023, 1:56 PM
    so just put it in a string
  • a

    able-action-74275

    05/04/2023, 1:56 PM
    that's it
  • t

    tall-teacher-57409

    05/04/2023, 2:19 PM
    Copy code
    hx
    var gl = context.webgl;
                    var vbo = gl.createBuffer();
                    gl.bindBuffer(gl.ARRAY_BUFFER, vbo);
                    gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.STATIC_DRAW);
    
                    var shader_src = "
                        #version 330 core\n
                                layout (location = 0) in vec3 aPos;\n
    
                                void main()\n
                                {\n
                                    gl_Position = vec4(aPos.x, aPos.y, aPos.z, 1.0);\n
                                }\n
                    ";
    
                    var shader = gl.createShader(gl.VERTEX_SHADER);
                    gl.shaderSource(shader, shader_src);
                    gl.compileShader(shader);
    Copy code
    Source/Main.hx:21: characters 36-44 : Array<Float> should be lime.utils.ArrayBufferView
    Source/Main.hx:21: characters 36-44 : ... For function argument 'srcData'
    do I need to change my Array to ArrayBufferView (srcData is annotated as Dynamic though)
  • a

    able-action-74275

    05/04/2023, 2:21 PM
    looks like you can do this for the ArrayBufferView
    Copy code
    new Float32Array (vertices)
  • t

    tall-teacher-57409

    05/04/2023, 2:22 PM
    works ty 👍
1...9899100...138Latest