Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: glBufferStorage without GL_MAP_COHERENT_BIT

Threaded View

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012
    Posts
    28

    glBufferStorage syncronization

    Hello,
    I would like to know how to use glBufferStorage without GL_MAP_COHERENT_BIT flag. If I remember correctly with that flag I don't have to glMemoryBarrier the buffer before reading or writing it. The problem is that I don't know how use glMemoryBarrier with glBufferStorage.
    For example (C code):
    Code :
    GLuint nUniformBuffer;
    glGenBuffers(1, &nUniformBuffer);
    glBindBuffer(GL_UNIFORM_BUFFER, nUniformBuffer);
    glBufferStorage(GL_UNIFORM_BUFFER, <buffer size>, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_CLIENT_STORAGE_BIT);
    GLvoid *pPointer = glMapBufferRange(GL_UNIFORM_BUFFER, 0, <buffer size>, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT);
    glBindBuffer(GL_UNIFORM_BUFFER, 0);
     
    // Do I have to glMemoryBarrier now?
    DoSomethingWith(pPointer);
     
    glDeleteBuffers(1, &nUniformBuffer);


    How do I syncronize ARB_buffer_storage?
    Last edited by rodrigoloc; 06-02-2014 at 05:59 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •