OpenGL - changing colours of a shape
I am new to game programming, and I hope it's ok if some of you could kindly help me out. I understand there may be other people with problems in other threads so I will make this quick.
I've started using OpenGL for game programming. I am using opengl commands for editing colours of a shape. I have no clue how to change the colours of the shape.
is the following command:
//send the verticles and colours for the triangle
glcolour4f(1.0f , 0.0f , 0.0f , 1.of ) ;
glVertex3f (.0f , 2.5f , -1.0f ) ;
glColor4f (0.0f , 1.0f , 0.0f , 1.0f ) ;
glvertex3f (-3.5f , -2.5f , -1.0f ) ;
glColor4f (0.0f , 0.0f , 1.0f , 1.0f ) ;
glVertex3f (2.0f , -4.0f , -1.0f ) ;
It asks me to make the triangle red....
now how do I go about doing this?
I'm so sorry to have asked, I'm a newbie to opengl and all :(
Would appreciate any help...
I do apologise if this thread is in the wrong section, please feel free to move it.