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

    bulky-insurance-39338

    05/04/2023, 3:29 PM
    into my shader-template i am try to avoid
    layout
    ....
  • b

    bulky-insurance-39338

    05/04/2023, 3:31 PM
    ... mhm, is that (location=0) the buffer-index .. i am only roughtly remember.
  • t

    tall-teacher-57409

    05/04/2023, 3:32 PM
    yeah
  • t

    tall-teacher-57409

    05/04/2023, 3:32 PM
    I accidentally did ctrl z instead of ctrl c 🥶
  • b

    bulky-insurance-39338

    05/04/2023, 3:33 PM
    i would try only
    in vec3 aPos;
  • b

    bulky-insurance-39338

    05/04/2023, 3:33 PM
    (and for es2/webgl1 without
    in
    prefix!)
  • t

    tall-teacher-57409

    05/04/2023, 3:36 PM
    god how do I get rid of this

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

  • t

    tall-teacher-57409

    05/04/2023, 3:37 PM
    👍
  • t

    tall-teacher-57409

    05/04/2023, 3:41 PM
    okay I killed the existing process
  • t

    tall-teacher-57409

    05/04/2023, 3:45 PM
    how do I write
    Copy code
    cpp
    sizeof(vertices)
    ?
  • b

    bulky-insurance-39338

    05/04/2023, 3:50 PM
    you have to calculate by yourself ... do you need it for
    gl.drawArrays()
    ?
  • b

    bulky-insurance-39338

    05/04/2023, 3:51 PM
    or by
    drawElement
    ?
  • t

    tall-teacher-57409

    05/04/2023, 3:51 PM
    gl.bufferData
  • b

    bulky-insurance-39338

    05/04/2023, 3:51 PM
    ah ok ...
  • t

    tall-teacher-57409

    05/04/2023, 3:51 PM
    so how?
  • b

    bulky-insurance-39338

    05/04/2023, 3:52 PM
    show your vertex-data-array ... if all is Float there then
    * 4
  • t

    tall-teacher-57409

    05/04/2023, 3:52 PM
    Copy code
    var vertices:Array<Float> = [-0.5, -0.5, 0.0, 0.5, -0.5, 0.0, 0.0, 0.5, 0.0];
  • t

    tall-teacher-57409

    05/04/2023, 3:52 PM
    ah alr
  • b

    bulky-insurance-39338

    05/04/2023, 3:52 PM
    ok, so only 3 verticises
  • t

    tall-teacher-57409

    05/04/2023, 3:53 PM
    3 * 4?
  • t

    tall-teacher-57409

    05/04/2023, 3:54 PM
    damn it
  • t

    tall-teacher-57409

    05/04/2023, 3:54 PM
    Source/Main.hx:11: Hello World Uncaught exception: Null access Called from Main.render(Main.hx:20)
  • t

    tall-teacher-57409

    05/04/2023, 3:54 PM
    why 😭
  • b

    bulky-insurance-39338

    05/04/2023, 3:55 PM
    mhm ... for gl.bufferData() as i am remember it can be
    vertices.length
  • b

    bulky-insurance-39338

    05/04/2023, 3:56 PM
    (but my implementation is different .. i am using
    gl.ARRAY_BUFFER
    there)
  • t

    tall-teacher-57409

    05/04/2023, 3:58 PM
    ight ill try this
  • b

    bulky-insurance-39338

    05/04/2023, 3:58 PM
    and i am also using Bytes to store the vertexdata
  • b

    bulky-insurance-39338

    05/04/2023, 3:59 PM
    (so maybe you have to do vertices.length*4 then if all is Float [i am also using mixed types for the attributes])
  • b

    bulky-insurance-39338

    05/04/2023, 4:01 PM
    but if you
    draw
    the bufferdata by array-drawing there you need to give the amount of vertices ( so 3 for your triangle )
  • t

    tall-teacher-57409

    05/04/2023, 4:01 PM
    aight
1...101102103...138Latest