Results 1 to 3 of 3

Thread: Fog class

  1. #1
    Guest

    Fog class

    Hey guys,
    I almost finished with a fog class for a game me and my friends are making. currently it only has "EnableFog", and StopFog. i want to be able to have a bool value in the class, thats like:
    MakeFog(float startfog, float endfog, float density, bool onoff);

    I've made the other things before "onoff". how can I make the onoff thing? i mean if i add it, the compiler says function overloading. help

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    926

    Re: Fog class

    huh? I dont understand the question much. Do you want to make 2 fog functions, one with the bool and one without?

    Or do you want a default value for the bool, so it's only an optional parameter?

    Please elaborate for further discussion.

    cheers,
    Nutty

  3. #3
    Guest

    Re: Fog class

    Its ok guys, i figured it out

Similar Threads

  1. Camera Class
    By David Doria in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 10-29-2008, 11:25 AM
  2. Unregister class???
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-04-2004, 05:03 PM
  3. Should i use a c++ Vector class?
    By Junkstyle in forum OpenGL: Basic Coding
    Replies: 37
    Last Post: 07-15-2002, 10:43 PM
  4. Car class..
    By McZ in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 05-14-2002, 10:42 AM
  5. Fog class.. forgot something!
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-12-2001, 08:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean