   Question about gl_color_array
  I have a question about color arraysi am currently rendering a terrain, and it is currently stored as an array of coordinate and color.i.e.color[]  = {c1,c2,c3,c4,c5};vertex[] = {v1,v2,v3,v4,v5};lets say that each color element consist of 3 bytes and vertex element has 3 GLfloats.So when i draw the terrain i use the "glDrawElements" and use the two arrays and pass along an array containing the indexs of the vertex i want to draw.i.e. drawVertex = {0,1,2,3};glDrawElements(GL_QUADS,4,GL_UNSIGNED_INT,drawVertex);I've noticed that there are many redudant colors in the array so i want to minimize it.i.e. c1=c2=c3=c4so i actually need only c1 and c5is there a way i can send in a seperate array containing indexes to color element so i can reduce the color array.i.e.color[]  = {c1,c5};vertex[] = {v1,v2,v3,v4,v5};drawVertex = {0,1,2,3};colorVertex = {0,0,0,1};"MysteryFunction"(GL_COLOR_INDEX,3,GL_BYTE,colorVertex);glDrawElements(GL_QUADS,4,GL_UNSIGNED_INT,drawVertex);   
Hi Xwskx. No, afaik it's not possible. The indices used in glDraw[Range]Elements will point into every array you supply, using the values supplied to glColorPointer (size, stride, type) to calculate the index into the colour buffer. You have to duplicate any shared vertex attributes (eg. colours and normals) for every vertex.kind regards,Nicolai;  I was afraid of that, but i imagine something like this would be useful. Is there any solutions avaialble for reducting the number of redundant color values?   ;  Not that I can think of. Even if you could use a (possibly 1D) texture, it would still require texture coordinate (1 float or 4 bytes) per vertex, so it wouldn't save you anything. Generating the texture coordinate in a shader may or may not be possible depending how predictable you colour your vertices (same for computing the colur value in a shader based on vertex position and/or normal).I can understand it might be annoying with redudancy but it's not a lot data we're talking about (3-4 bytes). With today's fairly high CPU->GPU bandwidth, unless you're pumping out a few hundred million triangles every frame you probably won't even notice if the colour array is enabled or not. I would just go ahead and continue my work and not worry so much about it (there's some truth in: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." (Donald Knuth)   