Possible Duplicate:
Visualising 4D objects in OpenGL
I have a set of 4 dimensional data points (lets call the dimensions X,Y,A, and B) that I'd like to plot in 6 different 2d plots (plot XxY, XxA, XxB, YxA, etc...).
In a previous question I asked about the proper way to store and plot this data. The solution was to use a VBO that stored the 4 dimensional vertices. Then using different vertex shaders I could select which dimensions are plotted in each of the 2d plots.
I've spent a few weeks looking around for openGL tutorials on how to do this but I haven't yet found something that makes sense.
My question is this: In c++, how can I define a shader that would allow me to plot only 2 dimensions of a 4 dimensional point in a VBO, and do I need to define a single shader for all 6 2d plots or do I need a shader for each of 6 different plots?
Finally how do I incorporate the shader into the plotting code so it gets used by openGL?