GLU crash using QT

I’m using QT on my Powerbook compiled using gcc. I’m included both AGL and OpenGL frameworks and my project compiles and builds fine. However whenever I make any call to any glu* function I get a bus error, segmentation fault, and a lot of frustration.

Has anyone any experience of this sort of thing or ideas I might try to overcome this seemingly random crash?

I can’t see any reason GLU should crash where regular GL calls don’t… but make sure your QGLWidget is current before you make any GL (or GLU) calls.

Well I’m not sure what you mean. I have an object which inherits from QObject that initialises the QGLWidget. Before the QGLWIdget is instantiated my object needs to call glu* commands to prepare itself. Is this wrong?

In retrospect it did make sense and I have now mended the problem. I had put some glu commands in a constructor where the qglwidget hadn’t been instantiated. Many many thanks for your help.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.