I am experimenting with how much I can push the GPU with clever optimizations and correct use of hardware, so I know this may lag my computer a lot, that's not the issue.
Currently my goal is as follows:
Define a variable size structure (i.e an array) that contains floats, every 3 floats define a position vector, every 9 define a triangle.
I need to create an array of these structures (the array of all shadow casting objects currently loaded) and pass the array to the GPU (the glsl shader).
If I follow a couple of conventions when putting my data into this format I can use hashing to get an amortized constant search time for the shadow casting triangles,
The issue is to get the data into the format that I need. If this was C++ the format would be an array of vectors and we're done, but GLSL is not as good at managing memory, does somebody know a way to pass the information in the fashion I described, or am I trying to do something that can't be done?