cannot find primary colors

Caution: Linux, Qt, and OpenGL novice
I found a simple OpenGL app in a book and was able to make it run under Qt3. Now have moved it to Qt4 and cannot find the primary colors. (green, yellow, blue, etc)

from directory /usr/include/GL ran this command

grep -rnw ./ -e green

green was listed in many places but no defines or declarations. Tried this

grep -rnw ./ -e green | grep DEFINE
grep -rnw ./ -e green | grep enum

no luck.

Found green used in glcorearb.h so looked inside of there. They are not defined there so looked at all the #include statements. The only one that was above the first instance of “green” was windows.h. My work machine is Centos Linux so that does not cut it.

Where are the basic colors declared?

Well… given that the Colors are defines as Red, Green and Blue… RGB.

Green should be (0.0f, 1.0f, 0.0f, 1.0f). RGBA = (0,0,1,1). RED = 0, Green= 1, Blue= 0, Alpha= 1).

Does that help?

Regards,
Jeff
P.S. Also, check out my youtube channel on lots of topics: https://www.youtube.com/channel/UCzx8alrxVELz5h1dfCdkdfg/videos?view_as=subscriber

Yes, that helps, and I can go with that concept. I’ll need to change the code that was written for a single value. That is no big deal and is a learning experience.

The larger concept is that I cannot find something that was present in the earlier version. I hunted something down to the include file glu.h. It is in my path but the Makefile did not get it, requiring another hand edit. There are some Qt functions that the make cannot find such as QMouseEvent.

I will work each problem as discovered but am quite concerned that the mind-meld of Qt and OpenGl will be more than this novice can manage. It did/does work for a simple book example program but a full working application of the quality needed for a customer is quite the different story.

This forum requires a Captcha for all posts. The government firewall blocks it. I can read posts at my desk but replies are a problem. I must type up my post, see that it is correct, print it, walk to another building, sign a log to use an isolated and less protected computer, and type in everything again. And then while typing in the Captcha expires. This time I had to do two of them. That seems a bit over the top. Hopefully it will work again.

Now that I am here, I remember another GL function call that does not work but I don’t have the details. It is a function that tells the user how many buffers (types of buffers?) are available. I searched and found that it does not change the reply variable unless the call succeeds. So the initial value to set to a specif value and never changed. There is no error return value so am not sure how to determine the problem. The larger question again is: Does this indicate a major problem or is it a minor one that can be ignored?

Thanks for taking the time to read and post a reply.