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 5 of 5

Thread: Mac/Windows

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

    Mac/Windows

    I have opengl code from windows c++. It uses all the BOOL, RECT, POINT etc. which are all from windows.h. But when compiling on the mac (codewarrior) windows.h goes to macwindows.h and this doesn't support any of these types.

    What should I be doing, or just re-typedef them.?

    thnaks

    gav

  2. #2
    Intern Newbie
    Join Date
    Jun 2000
    Location
    Vermont
    Posts
    31

    Re: Mac/Windows

    The MacOS equivilants to the variable types are as follows:

    BOOL - Boolean
    RECT - Rect
    POINT - Point

    I can't remember exactly how things are stored in POINTs and RECTs under Windows. Hope that helps, you should be able to just do a find & replace unless you are trying to keep it cross platform compatible still, then you should maybe think about define your own data structures for them which will work correctly.

    Morgan
    A

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

    Re: Mac/Windows

    Yeah they are in windef.h, but there are loadsa undefined errors, so I assume there are headers missing.

    macwindows.h doesn't seem to do the same as windows.h like I assumed it should.

    gav

    gav

  4. #4
    Guest

    Re: Mac/Windows

    MacWindows.h has nothing to do with windows.h.

    Bool is a standard C++ type, but use Boolean instead. Point and Rect are probably in MacTypes.h, and you should drag the InterfaceLib stub library into your project.
    If you are using Codewarrior, start with any of the sample mac projects in its folder.

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

    Re: Mac/Windows

    Well interfacelig stub is in the project. And well the mac version of windows.h includes macwindows.h
    so I assumed that that was the mac version of windows.h for windows. They are in mactypes.h but windows uses RECT where as mac uses Rect and so on. I just thought it strabge that there was no header that would do all the re-typedef'ing when going from windows to mac....

    gav

Posting Permissions

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