Menu

#221 freeglut_std.h incorrectly assumes __APPLE__ implies CGL

open
nobody
None
5
2015-03-31
2015-03-27
No

freeglut-3.0.0's include/GL/freeglut_std.h includes the wrong header files for darwin/GLX builds:

#ifdef FREEGLUT_GLES
#   include <EGL/egl.h>
#   include <GLES/gl.h>
#   include <GLES2/gl2.h>
#elif __APPLE__
#   include <OpenGL/gl.h>
#   include <OpenGL/glu.h>
#else
#   include <GL/gl.h>
#   include <GL/glu.h>
#endif

Note that __APPLE__ implies using OpenGL.framework's headers instead of Mesa's headers. This should be configurable. You should only use OpenGL.framework if using CGL and use GL/* when using GLX.

Related

Bugs: #221

Discussion

  • Jeremy Huddleston Sequoia

    This is compounded by the fact that it looks like (other than that header), you actually don't support CGL builds. CMakeLists.txt seems to support Win32, Blackberry/Android, and GLX. Why do you have that OpenGL.framework include there if you're not even supporting CGL? That doesn't really make sense.

     
  • John Tsiombikas

    John Tsiombikas - 2015-03-31

    Are these header files incompatible? Do they break something? Please post any relevant error messages of whatever fails.

     
  • Jeremy Huddleston Sequoia

    Yes, they are incorrect and possibly incompatible. You should use the headers for the libraries you're linking against.

    This would be like using lesstif headers and linking against openmotif or using ffmpeg headers and linking against libav or using glut headers and linking against freeglut for that matter.

     
  • Jeremy Huddleston Sequoia

    Since you don't even support AGL, just remove the block. I don't know why it's there in the first place. That's what we did in MacPorts, and everything seems fine.

     
    • Diederick C. Niehorster

      Dear Jeremy,

      Please note that a discussion thread is now opened on the mailing
      list. Your further discussion is much welcomed there. As John said, if
      there is an actual issue you ran accross due to the include, please do
      let us know (here or mailing list).

      All the best,
      Dee

      On Tue, Mar 31, 2015 at 8:45 PM, Jeremy Huddleston Sequoia
      jeremyhu@users.sf.net wrote:

      Since you don't even support AGL, just remove the block. I don't know why it's there in the first place. That's what we did in MacPorts, and everything seems fine.


      ** [bugs:#221] freeglut_std.h incorrectly assumes APPLE implies CGL**

      Status: open
      Group:
      Created: Fri Mar 27, 2015 06:51 PM UTC by Jeremy Huddleston Sequoia
      Last Updated: Tue Mar 31, 2015 06:44 PM UTC
      Owner: nobody

      freeglut-3.0.0's include/GL/freeglut_std.h includes the wrong header files for darwin/GLX builds:

      #ifdef FREEGLUT_GLES
      #   include <EGL/egl.h>
      #   include <GLES/gl.h>
      #   include <GLES2/gl2.h>
      #elif __APPLE__
      #   include <OpenGL/gl.h>
      #   include <OpenGL/glu.h>
      #else
      #   include <GL/gl.h>
      #   include <GL/glu.h>
      #endif
      

      Note that __APPLE__ implies using OpenGL.framework's headers instead of Mesa's headers. This should be configurable. You should only use OpenGL.framework if using CGL and use GL/* when using GLX.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/freeglut/bugs/221/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #221

  • John Tsiombikas

    John Tsiombikas - 2015-03-31

    Thanks for the advice, which in general is sound. This is not a discussion board however, it's a bug report, so again, please post the details of the exact problem you are facing as a result of freeglut including the OpenGL framework headers as opposed to the Mesa OpenGL headers.

    Please refrain from answering with any more general programming advice, or about how confusing you find the fact that we include the OpenGL framework headers, and stick to the bug and its symptoms.

     

Log in to post a comment.

MongoDB Logo MongoDB