Anything rendered after you set a color uses the same color and that this spans over frames and will not be reset in-between.
Can someone suggest a way to turn off setting the color after using it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
OpenGL is a state machine. Once you set the color you cannot take it back. One mechanism that you can use is the
glPushAttribandglPopAttrib.glPushAttrib(GL_CURRENT_BIT)saves the color and a few other things andglPopAttrib()restores it.You may need to use another mechanism for what you want to do. Saving and restoring the state all the time is an expensive solution.