Advertisement

help me... again yes i'm serious

Started by July 11, 2000 09:13 PM
5 comments, last by Theses 24 years, 6 months ago
glColor3f(1.0f, 1.0f, 1.0f); now i know the f at the end is unnecessary so when exactly would one use f or perhaps the question should be where, if any, would using f change the resulting executable generated
I believe it stands for float. ya you can change it how ever you want. what will change the program more is is you changed it to something like glColor4f(1.0f,1.0f,1.0f,1.0f); this would add alpha channel.

JoeMont001@aol.com | www.polarisoft.n3.net
My HomepageSome shoot to kill, others shoot to mame. I say clear the chamber and let the lord decide. - Reno 911
Advertisement
The f''s specify that the number is a float. an unadorned 1.0 is considered by the compiler to be a double.
Seriously, glColo3f typecasts the args to floats, so you gain nothing by saying 1.0f instead of 1.0 except you don''t have to look at warnings.


_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
it just makes your code more readable ya know. but noone will die if you dont put f at the end, neither the computer will rip itself off to understand what u''re saying. it''s just for the beauty of the float

----------------
- Pouya / FOO!!!
***CENSORED***
It''s just easier for the compiler, doesn''t have to worry about casting it back from double to float, but that wouldn''t take much effort anyway.

quote: ----------------
- Pouya / FOO!!!
***CENSORED***

lol






"If you have any further questions please direct
them to that brick wall over there." - South Park
Advertisement
IOFission:
my sig was really censored. kevin (khawk) took the last sentence in my signature off, so i edited it again and said it it was censored.
if you look at the threads in the lounge for 3 or 4 days ago u'll probably find it

----------------
- Pouya / FOO!!!
***CENSORED***

Edited by - pouya on July 12, 2000 1:58:53 AM

This topic is closed to new replies.

Advertisement