Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Some confusion about Qt Canvas3D

Some confusion about Qt Canvas3D

Scheduled Pinned Locked Moved Solved QML and Qt Quick
1 Posts 1 Posters 511 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BriFuture
    wrote on last edited by
    #1

    I'm using Qt Canvas3D module to draw a 3D scene,

    when I use

    var size = 1024;
    gl.bindBuffer(gl.ARRAY_BUFFER, mybuffer) ;
    gl.bufferData(gl.ARRAY_BUFFER, 4*size, gl.DYNAMIC_DRAW);
    
    gl.bufferSubData(gl.ARRAY_BUFFER, offset, myArrayData);
    

    this segment of code works well.
    but when I set the variable size to 8192 or larger, it will be something wrong and show me a very strange graphics, and then it won't show ever.

    But sometimes, I set size to 8192, it may work as my expectation. I don't know what's wrong with the code.

    Is my offset wrong or the the function bufferData(glEnums target, long size, glEnums usage) I use wrong?

    and if I use a new Float32Array() as the second argument, it will work very normally, but I dont know how to add more vertices into the buffer, can anyone help me?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved