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

    able-action-74275

    05/04/2023, 2:26 PM
    \o/
  • t

    tall-teacher-57409

    05/04/2023, 2:46 PM
    Copy code
    cpp
    unsigned int VAO;
    glGenVertexArrays(1, &VAO);
    how do I write that one, can't find the alt in the docs
  • t

    tall-teacher-57409

    05/04/2023, 2:47 PM
    oh nvm its createVertexArray
  • a

    able-action-74275

    05/04/2023, 2:48 PM
    fun hunting them down lol
  • t

    tall-teacher-57409

    05/04/2023, 2:48 PM
    lol
  • t

    tall-teacher-57409

    05/04/2023, 2:49 PM
    huh weird, it doesn't show up in auto complete
  • a

    able-action-74275

    05/04/2023, 2:50 PM
    language server moment
  • t

    tall-teacher-57409

    05/04/2023, 2:52 PM
    its in the docs though

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

  • a

    able-action-74275

    05/04/2023, 2:57 PM
    yeah it exists
  • t

    tall-teacher-57409

    05/04/2023, 2:58 PM
    wait im using context.webgl
  • p

    powerful-morning-89

    05/04/2023, 2:58 PM
    vertex arrays are a webgl2 thing I think.
  • t

    tall-teacher-57409

    05/04/2023, 3:00 PM
    I don't find it in
    WebGLRenderContext
  • t

    tall-teacher-57409

    05/04/2023, 3:00 PM
    oh wait webgl2
  • t

    tall-teacher-57409

    05/04/2023, 3:00 PM
    mb
  • t

    tall-teacher-57409

    05/04/2023, 3:00 PM
    yh it shows now 👍
  • p

    powerful-morning-89

    05/04/2023, 3:01 PM
    Note that it might not actually work, iirc 47rooks had some issues with it.
  • t

    tall-teacher-57409

    05/04/2023, 3:02 PM
    well, we'll see
  • p

    powerful-morning-89

    05/04/2023, 3:03 PM
    For native targets, it appears
    createVertexArray
    is only supported on Linux and iOS/tvOS.
  • t

    tall-teacher-57409

    05/04/2023, 3:04 PM
    ah
  • h

    hallowed-ocean-84954

    05/04/2023, 3:06 PM
    I thought I used that on Windows
  • t

    tall-teacher-57409

    05/04/2023, 3:08 PM
    how do I write that in haxe

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

  • h

    hallowed-ocean-84954

    05/04/2023, 3:08 PM
    Yep it worked for me
  • t

    tall-teacher-57409

    05/04/2023, 3:08 PM
    3 * gl.FLOAT?
  • h

    hallowed-ocean-84954

    05/04/2023, 3:08 PM
    Yep
  • t

    tall-teacher-57409

    05/04/2023, 3:08 PM
    aight
  • p

    powerful-morning-89

    05/04/2023, 3:11 PM
    No,
    3 * 4
    .
    float
    is a 32 bit floating point number, and thus takes up 4 bytes.
  • t

    tall-teacher-57409

    05/04/2023, 3:11 PM
    ohh, okay
  • h

    hallowed-ocean-84954

    05/04/2023, 3:13 PM
    normally actually I use things like this n * Float32Array.BYTES_PER_ELEMENT
  • b

    bulky-insurance-39338

    05/04/2023, 3:13 PM
    you can also check the gl version by something like
    (context.webgl2 == null)
    or same for context.webgl, context.gles3 and context.gles2
  • t

    tall-teacher-57409

    05/04/2023, 3:13 PM
    Copy code
    Uncaught exception: Null access
    Called from Main.render(Main.hx:21)
    Called from lime.app._Event_lime_graphics_RenderContext_Void.dispatch(lime/_internal/macros/EventMacro.hx:91)
    Called from lime._internal.backend.native.NativeApplication.handleRenderEvent(lime/_internal/backend/native/NativeApplication.hx:371)
    Called from lime._internal.backend.native.NativeApplication.exec(lime/_internal/backend/native/NativeApplication.hx:146)
    Called from lime.app.Application.exec(lime/app/Application.hx:150)
    Called from $ApplicationMain.start(ApplicationMain.hx:126)
    Called from $ApplicationMain.create(ApplicationMain.hx:118)
    Called from $ApplicationMain.main(ApplicationMain.hx:15)
    Called from .init(?:1)
    any idea why's that? 😞
1...99100101...138Latest