Ive looked at all the definitions, the examples, etc on the web, and the red book… but still very very confused…
I have to draw objects onto the screen made of primitives. Some of these primitives I want to be different colors.
I have defined a global vertex array, and a global color array to store all the vertex and color values used in my opengl program.
My confusion is… can you use two arrays in the same function? e.g. drawitem() then use color and vertex arrays in the same function? I tried doing this, but the color function wouldnt work after the first call e.g. I enabled it, called the 0 array element, then disabled it, then enabled the vertex array, called the vertices then disabled it, tried to call another color element, but it was still the previous color???
Or am I going about this totaly wrong and should the color be in the DISPLAY function, and the vertex array calling be in the object function? and then I put the different colored objects into different functions?
I hope this makes some sense! but I am literally tearing my hair out here!!