I'm trying to do some GLSL particle stuff with precomputed velocity vector fields. These vector fields are stored as ~13 1024x170 float textures, each corresponding to a different "slice" in the z-plane. Ideally, I'd like to load these as a 3D texture with dimensions 1024x170x13, to allow automatic interpolation in my shader, but my local implementation gives a GL_MAX_3D_TEXTURE_SIZE of 256, which means (if I understand correctly) that my maximum size in each dimension is 256, so that won't work.
So, my next step was to try to use a GL_TEXTURE_2D_ARRAY, and do the interpolation between planes in the shader. Unfortunately, pyglet doesn't appear to expose this functionality (??):
Traceback (most recent call last):
File "particle_trace.py", line 67, in <module>
load_vectortex3d(f, tex)
File "particle_trace.py", line 56, in load_vectortex3d
glBindTexture(GL_TEXTURE_2D_ARRAY, tex)
NameError: global name 'GL_TEXTURE_2D_ARRAY' is not defined
My next step is to bind all of the textures separately, pass them all independently to the shader, and do my computations there. But... am I barking up the wrong tree here? Surely there must be a better way to do this.