Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Cross Platform

Hybrid View

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    668

    Cross Platform

    Related but not completely opengl I know but, what is the safest way of checking os in the preprocessor for unix/irix/mac/windows etc?
    thanks

    gav

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Cardiff University
    Posts
    668

    Re: Cross Platform

    In answer to my own question! :-0

    May not be the safest but check for
    windows
    unix
    macintosh
    linux
    to be defined, chack for Capitalisation etc. as
    well..
    gav

  3. #3
    Intern Contributor
    Join Date
    Aug 2000
    Location
    USA
    Posts
    99

    Re: Cross Platform

    #ifdef macintosh // mac
    ...
    #elif windows // windows
    ...
    #elif ... you get the idea

    Just check through the system headers for the appropriate definitions to check for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •