I am new to openGL and wanted to set the text color, tried the glColor3f function, but it changes the drawing color, since I only want to change the text color, what should I do?
You can push the current color onto the attribute stack, change the color, draw text, and then place the stack to restore the original color:
glPushAttrib(GL_CURRENT_BIT); glColor3f(...); // Draw your text glPopAttrib(); // This sets the colour back to its original value
glColor3f is the right call, but you should know that a color is a global state, so setting it up will do everything that is painted in that color until you change it again. So do something like this:
glColor3f(your text color) draw text glColor3f(your normal color (white maybe))
Source: https://habr.com/ru/post/1315793/More articles:How to create a notification server that reports on a Delphi application when a database changes? - javaThe main question in C ++ is c ++Creating a Custom STS-IP with WIF and Why - wifUnable to process SWF component using Selenium - perlWhat is the Objective-c equivalent of java timestamp? - timestampConverting Sharepoint 2007 Solutions to 2010 - c #Excel 2010 Plugin - Getting Started - c #Migrating SharePoint 2007 to 2010 - .netHow to click on an array with different values - perlError copying database from SQL Server 2005 to SQL Server 2008 using the import wizard - sql-serverAll Articles