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

    hallowed-ocean-84954

    05/04/2023, 3:13 PM
    that takes care of the sizing - sorry misunderstood your question about
  • h

    hallowed-ocean-84954

    05/04/2023, 3:14 PM
    what's at line 21 ?
  • t

    tall-teacher-57409

    05/04/2023, 3:14 PM
    var vbo = gl.createBuffer();
  • h

    hallowed-ocean-84954

    05/04/2023, 3:15 PM
    so gl ctx is null ?
  • t

    tall-teacher-57409

    05/04/2023, 3:15 PM
    no clue :/
  • h

    hallowed-ocean-84954

    05/04/2023, 3:15 PM
    well that's about all it could be
  • h

    hallowed-ocean-84954

    05/04/2023, 3:15 PM
    how are you getting gl ?
  • t

    tall-teacher-57409

    05/04/2023, 3:15 PM
    Copy code
    var gl = context.webgl2;
  • h

    hallowed-ocean-84954

    05/04/2023, 3:16 PM
    and context ?
  • t

    tall-teacher-57409

    05/04/2023, 3:16 PM

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

  • b

    bulky-insurance-39338

    05/04/2023, 3:17 PM
    for peote-view i do check before whats possible by this:
  • t

    tall-teacher-57409

    05/04/2023, 3:17 PM
    oo
  • b

    bulky-insurance-39338

    05/04/2023, 3:17 PM
    (you also have the gl-extensions to do more if you enable it)
  • h

    hallowed-ocean-84954

    05/04/2023, 3:19 PM
    my guess is that there is no render context yet assigned - you either need to check and do nothing until one is or get it from another cbk. The lime examples show how to boot the app so you get a GL context.
  • t

    tall-teacher-57409

    05/04/2023, 3:19 PM
    oh I see
  • t

    tall-teacher-57409

    05/04/2023, 3:19 PM
    it worked fine though when I had webgl instead of webgl2
  • t

    tall-teacher-57409

    05/04/2023, 3:20 PM
    before doing the vertex arr stuff
  • b

    bulky-insurance-39338

    05/04/2023, 3:20 PM
    yep, VAO should work only for webgl2 or gles3 (same for UBO and instance-drawing)
  • t

    tall-teacher-57409

    05/04/2023, 3:21 PM
    oo gles3 eliminates that error
  • t

    tall-teacher-57409

    05/04/2023, 3:21 PM
    but other errors
  • t

    tall-teacher-57409

    05/04/2023, 3:22 PM
    im using the hl target
  • t

    tall-teacher-57409

    05/04/2023, 3:24 PM
    ok I used html5 with webgl2, and it launches but no triangle 💀
  • t

    tall-teacher-57409

    05/04/2023, 3:24 PM
    too many errors in the devtools console
  • t

    tall-teacher-57409

    05/04/2023, 3:25 PM
    Copy code
    An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. HelloWorld.js:15366:15
    Source/Main.hx:12: Hello World HelloWorld.js:1404:11
    WebGL warning: linkProgram: Must have a compiled vertex shader attached:
    SHADER_INFO_LOG:
    ERROR: 0:2: 'core' : invalid version directive
    ERROR: 0:4: 'layout' : syntax error
    
    WebGL warning: useProgram: Program must be linked successfully. 2
    WebGL warning: drawArraysInstanced: The current program is not linked.
    WebGL warning: linkProgram: Must have a compiled vertex shader attached:
    SHADER_INFO_LOG:
    ERROR: 0:2: 'core' : invalid version directive
    ERROR: 0:4: 'layout' : syntax error
  • b

    bulky-insurance-39338

    05/04/2023, 3:26 PM
    ah, to use
    layout
    inside of shader you have to tell what version
  • t

    tall-teacher-57409

    05/04/2023, 3:27 PM

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

  • b

    bulky-insurance-39338

    05/04/2023, 3:27 PM
    put a
    #version 300 es
    on top of glsl-code
  • t

    tall-teacher-57409

    05/04/2023, 3:27 PM
    its there right?
  • t

    tall-teacher-57409

    05/04/2023, 3:27 PM
    oh ok
  • t

    tall-teacher-57409

    05/04/2023, 3:28 PM
    same errs :/
1...100101102...138Latest