Results 1 to 5 of 5

Thread: OpenGL works on Vista, but not Mac 10.5

  1. #1
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default OpenGL works on Vista, but not Mac 10.5

    Hello,

    Subject line says it all--in particular, I get

    1) sigsev when executing 'glGetBooleanv(GL_STEREO, &b);',
    2) Null pointer returned from gluNewQuadric(), and
    3) Incredibly slow texture processing, and incorrect mapping (the texture is rendered 10x the actual size).

    My program works with only a few tiny glitches (the occasional 'makeCurrent() failed'--I'm rendering from a worker thread) under Vista, with an nVidia GTS 250. I developed this under Vista, and it compiles fine on my Mac Pro (OSX 10.5, ATI Radeon X1900) aside from some debugging symbol warnings in the Qt modules. All of the Qt opengl demos work great on the Mac. My includes are

    Qt Code:
    1. #include <QGLWidget>
    2. #include <qgl.h> //"No such file or directory" for #include <QGL>
    3. #include <QtOpenGL>
    4. #ifdef Q_WS_WIN
    5. #include "GL/glext.h"
    6. #endif
    7. #ifdef Q_WS_MAC
    8. #include <Glut/glut.h>
    9. #endif
    To copy to clipboard, switch view to plain text mode 

    I looked at some of the opengl example code and I didn't see anything I was missing. Anybody know what might be going on here? Thank you!

    Matt

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: OpenGL works on Vista, but not Mac 10.5

    If you do anything regarding OpenGL outside of paintGL, intializeGL or resizeGL, make sure to call QWidget::makeCurrent() before.
    It's nice to be important but it's more important to be nice.

  3. #3
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OpenGL works on Vista, but not Mac 10.5

    Hi Axel,

    I do. If I don't, then the program won't run in Vista either. As it is it *does* work in Vista, aside from getting a few 'makeCurrent() failed' error messages generating within paintGL(). These occur when I first open the gl context, but not thereafter--whereas the errors I described in at least 1) and 3) have are not related to the creation of the gl context.

    Take 1) for example--the debugger indicates that that line causes a segmentation fault within glGetBooleanv (it's top line of the debugger output). This happens when I start the program, before I have created any qgl obects. I take it this means something isn't loarded or linked properly?

    Matt

  4. #4
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: OpenGL works on Vista, but not Mac 10.5

    Do opengl-examples of Qt work on your machine? If yes, what happens when you add that glGetBooleanv there?
    It's nice to be important but it's more important to be nice.

  5. #5
    Join Date
    Aug 2009
    Posts
    140
    Thanks
    22
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: OpenGL works on Vista, but not Mac 10.5

    Hi,

    Yes, all opengl examples work. When I put the glGetBooleanv call into HelloGL, it *works* (i.e. no segmentation fault). (Good suggestion.) But everything included in HelloGL is also included in my program. My code is far too big to even think about posting so I guess I have a stretch of debugging ahead of me... but I would love to know if you have any idea as to how something like this could come about. Something working on Vista but not on Mac is *not* the normal way of things.

    Matt

Similar Threads

  1. OpenVG EGL supprt in 4.6.0-tp1 + OpenGL questions
    By aamer4yu in forum Installation and Deployment
    Replies: 0
    Last Post: 11th September 2009, 18:17
  2. OpenGL and Qt Question
    By ToddAtWSU in forum Qt Programming
    Replies: 2
    Last Post: 18th April 2009, 18:04
  3. QT + OpenGL + Thread => aaaahhhhh !
    By anthibug in forum Qt Programming
    Replies: 7
    Last Post: 26th July 2008, 13:36
  4. Qtopia Core & OpenGL ES?
    By zelko in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 28th May 2007, 07:21

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.