PDA

View Full Version : What is the best way to make a constant for glColor3f?



p.gonzales
11-25-2014, 02:05 PM
What is the best way to make a constant for glColor3f

For example I want to make a global so I can change the value of the 3 floats when I press a button. But I don't want to make 3 constants if I can avoid it. Can the method use Vector or array?

Agent D
11-25-2014, 02:24 PM
Sounds like you should get familiar with the programming language you are using first (or software development in general) before starting to work with (legacy) OpenGL(R).


Anyhow, there is a glColor3fv that takes an array of three floats.

p.gonzales
11-25-2014, 03:20 PM
Sounds like you should get familiar with the programming language you are using first (or software development in general) before starting to work with (legacy) OpenGL(R).


Anyhow, there is a glColor3fv that takes an array of three floats.

You got me good with that zinger xD