Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: Subroutines buffers

Threaded View

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2012

    Subroutines buffers

    I don't know if it is implemented or not, but let's start with the problem.
    Like indirect drawing and indirect dispatch I think there should be an extension for passing subroutine uniforms from a buffer instead of from the CPU memory. The API could be like this:
    Code :
    GLuint nSubroutineBuffer;
    glGenBuffers(1, &nSubroutineBuffer);
    // Handle nSubroutineBuffer like any other buffer.
    // In draw routine:
    glBindBuffer(GL_SUBROUTINE_BUFFER, nSubroutineBuffer);
    glUniformSubroutinesuiv​(<shader type>​, <count>​, (const GLuint *)(<offset>));
    glBindBuffer(GL_SUBROUTINE_BUFFER, 0);
    glUniformSubroutinesuiv(<shader type>, <count>, <indices>);
    Last edited by rodrigoloc; 06-15-2014 at 11:00 AM.

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