-
OpenGL question.
How can I use variables in this function?
glVertex3f(-1.0f, 1.0f, 0.0f);
Would it be something like:
Code:
float red = -1.0;
float blue = 1.0;
float green = 0.0;
glVertex3f(red, blue, green);
Its just the 'f' on the end of the number that's confusing me.
-
Yes!
Yes, you can do that. BTW, The `f' is a hex number I think.
-
no its not. The f is a float, you can do exactly as you've shown above.
Try nehe.gamedev.net for some great openGL tutorials. www.gametutorials.com is also very good.