Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Why is in Qt/Opengl glMapBuffer slower than glBufferData?
Forum Updated to NodeBB v4.3 + New Features

Why is in Qt/Opengl glMapBuffer slower than glBufferData?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 290 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.
  • PowerNowP Offline
    PowerNowP Offline
    PowerNow
    wrote on last edited by PowerNow
    #1

    I tried on Android for a huge terrain model (around 10Mill vertices/indices, 250MB)

    m_vertexBuf.allocate(m_pVertices->size() * sizeof(QVector4D));
    void* buffer_data = m_vertexBuf.map(QOpenGLBuffer::WriteOnly);
    memcpy(buffer_data, m_pVertices->constData(), m_pVertices->size() * sizeof(QVector4D));
    m_vertexBuf.unmap();
    m_vertexBuf.release();
    

    instead of

    m_vertexBuf.allocate(m_pVertices->constData(), m_pVertices->size() * sizeof(QVector4D));
    

    but it's 0.4sec slower(!) during loading.

    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