OpenGL Shaders and constants -


I need to use a bunch of values ​​continuously in my GLSL geometry shader. Try it like this:

  const int lookup [HUGE_NUMBER] = int [HUGE_NUMBER] (1,32, ...)   

this job I am getting a warning on the ATI card for some hardware that the size of my geometry size may be poor performance (seems appropriate). Shader on other cards (NV) will not link due to insufficient memory Defining constant arrays seems to be an unsupported hack.

So - what's the way to go? I have read " continuous buffers in the DirectX pipeline" Is something similar? Or do I have to use texture?

"post-text" itemprop = "text">

You can go with at least the following interface:

/ B>

  • Texture Buffer Object
  • Texture Buffer

  • Comments