I am very new to OpenGL programming and I seek some help.
What I have done so far is a 3d cylinder object. Next I want to color it so that the top and bottom would be blue and the side would be red. I have no idea how to achieve that.
I know that there are two types (or maybe more) coloring techniques: flat coloring (with gl.glColor4f()) and smooth coloring (with gl.glColorPointer() using the colorBuffer).
I think what I want to use is flat coloring. I have done it so