Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This sounds like a nice use case for <a href="http://www.opengl.org/wiki/Buffer_Texture" rel="nofollow">texture buffer objects</a>. These don't have much to do with regular textures and basically allow you to access a buffer object's memory in a shader as a simple linear array. They are similar to 1D textures, but are not filtered and only accessed by an integer index, which sounds like what you need to do when you call it a list of values. And they also support much larger sizes than 1D textures. For updating it you can then use the standard buffer object methods (<code>glBufferData</code>, <code>glMapBuffer</code>, ...).</p> <p>But on the other hand they require GL3/DX10 hardware to use and have even been made core in OpenGL 3.1, I think. If your hardware/driver doesn't support it, then your 2nd solution would be the method of choice, but rather use a 1D texture than a width x 1 2D texture). In this case you can also use a non-flat 2D texture and some index magic to support lists larger than the maximum texture size.</p> <p>But texture buffers are the perfect match for your problem, I think. For more exact insight you might also look into the corresponding <a href="http://www.opengl.org/registry/specs/EXT/texture_buffer_object.txt" rel="nofollow">extension specification</a>.</p> <p><strong>EDIT:</strong> In response to Nicol's comment about <a href="http://www.opengl.org/wiki/Uniform_Buffer_Object" rel="nofollow">uniform buffer objects</a>, you can also look <a href="http://rastergrid.com/blog/2010/01/uniform-buffers-vs-texture-buffers/" rel="nofollow">here</a> for a little comparison of the two. I still tend to TBOs, but cannot really reason why, only because I see it a better fit conceptually. But maybe Nicol can provide an anwer with some more insight into the matter.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload