BufferSwapNotify and object color

I have placed OpenGL codes in the BufferSwapNotify event handler to draw graphics on the SW screen ,

but the color of the object created can not changed by using "glcolor" ,

Is there any way to alter the color ?

SolidworksApi macros