[glColor3f isn't working in OpenGL]


I found an example in Qt in which a textured cube is rendered. The application uses shaders ( vertex and fragment shaders).

I wanted to add a coordinate system to that cube ( I also changed the texture) but I didn’t use any shader for that, I only used glBegin(GL_LINES), glVertex3f, glEnd.
Each axis is supposed to have a specific color, for example x:red, y:green and z:blue.

When I ran my application, the coordinate system’s axes seemed to have the same texture as the cube as if glColor3f was ignored by the program.

I tried different solutions such as adding enabling color material, disabling lighting but that didn’t work.

I’m still trying to get familiar with shaders because they’re kinda complicated, some suggested that I should also use shaders to render the colored coordinate system.
Is there any other option ?
Thank you all.