What's the 'f' stand for?

This is a discussion on What's the 'f' stand for? within the Game Programming forums, part of the General Programming Boards category; ...in glTranslatef(); , glVertex3f(); , GLfloat myGLfloat = 0.0f; , ...and all those other 'f' things?...

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    What's the 'f' stand for?

    ...in glTranslatef(); ,

    glVertex3f(); ,

    GLfloat myGLfloat = 0.0f; ,

    ...and all those other 'f' things?

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    float. or floating point number. or decimal if you want to look at it that way.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    Registered User glUser3f's Avatar
    Join Date
    Aug 2003
    Posts
    345
    OpenGL functions that take more than one parameter type have several names, each name corresponds to a type.
    f : float
    i : int
    ub : unsigned byte
    d : double

  4. #4
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    It stands for "$$$$" in SEARCH THE $$$$ING WEB.

    God Krak. Try reading something before you speak.
    Away.

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,267
    ...in glTranslatef();

    glVertex3f();

    the f in these tells you the arguments are in floating point format,

    GLfloat myGLfloat = 0.0f; ,

    the f in 0.0f, is used as kind of a simple cast to float, to quiet the conversion from float to double warning you would likely get without it, since most compilers treat float point literals as type double
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21