Problems with GLU!

Hi there !

I’m currently making a cross-platform application,
using Qt/C++/OpenGL, and I develop on a Linux system.

Now, I’m porting my app to Macintosh, and it works (almost) fine.
In fact, it seems that GLU objects (like gluNurbsCurve, or gluDisk), aren’t being rendered :-/
Everything else is rendered fine.

The problem is I have no idea where the problem comes from !
Qt ? GLU ? MacOS ?

I can’t tell, but I hope someone could :smiley:

Thanks for your answers,

  • Guilugi -

I believe the source code to GLU on the Mac is the same as is used on most other platforms, so I doubt that GLU is at fault.

Qt is pretty bad, but I also doubt that it could cause this, since it doesn’t interfere with OpenGL’s drawing.

GLU just calls through to standard OpenGL calls, so I doubt it can be an OpenGL bug.

I suspect, therefore, that it’s your code…

A bit off topic… I am evaluating QT vs. wxWidgets… what do you have against Qt?

Oh… since I asked an off-topic question I guess I could contribute something to the conversation…

I seriously doubt anybody else is to blame for GLU’s misbehavior. I can think of two plausable reasons. One, you have a memory/stack bug that you are getting away with on one platform that is causing the GLUquadricObj pointer to become corrupted. The other is that you might have backface culling on/off causing the geometry to “disappear”. If you are not explicitly setting the front face to GL_CW or GL_CCW you might find the defaults are not set correctly (I have seen some sillyness with default values changing from driver to driver in the past).

I hope these suggestions help!

Hi there !

First, thanks for your answers…
These days, I was working on my GUI, and I didn’t care about my GLU problem.

You say it may be my code…
I use very simple OpenGL commands in my app, so I’m not really convinced of it.

Well, I have this problem on a Macintosh PowerBook, ATI Radeon powered…
Maybe it’s a bug from ATI drivers ?

That’s too bad, because everything else works sooooo perfectly ! :mad:

Well, I’ll check this out !

See ya

I had similar problems at one point, and discovered it had something to do with the GLUQuadricObj being specific to the rendering context. That is, if I switched contexts (e.g. to render into a memory buffer rather than to the screen), the quadrics disappeared or were rendered incorrectly. The problem went away as long as I generated a new GLUQuadricObj after every context switch.

Maybe this’ll help…

BTW, I’ve used wxWidgets and OpenGL together for years, for the app I’m developing (Cn3D). It’s been great for porting across unix, OSX, and Windows. I’d definitely recommend it; in fact, I contributed/enhanced a small portion of the code behind the wxGLCanvas.

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