PDA

View Full Version : gsub_lite minimisation problem


JooJoo
March 16th, 2005, 03:34 PM
I'm having a problem with gsub_lite. I based my code on the simpleLite example, and it's all going well... Except that whenever I minimise the camera window, i'm unable to maximise it again. It just crashes the program. I noticed this happens with my program and the simpleLite example. All the other examples that aren't using gsub_lite are working fine though, i'm able to minimise those and maximise them again without any problems.

Any ideas as to why this is?

philip_lamb
March 17th, 2005, 02:38 AM
I haven't seen this before.. I'll look into it.

philip_lamb
March 17th, 2005, 04:53 AM
I can't reproduce this, but I'm guessing that its a dodgy camera driver. When the window is minimised, Visibility() in simpleLite is called, and the code inside calls glutIdleFunc(NULL) and then glutIdleFunc(Idle) when the window is restored. It's possible that the camera driver doesn't tolerate frames not being collected while the window is minimised.

One workaround is to change the NULL to Idle.

JooJoo
March 18th, 2005, 09:40 PM
Hmm... Thanks for the help, but I tried changing it to Idle and it still crashed.

I put a printf statement in the Visibility function to see when it gets called. And I noticed that that it only ever gets called once when the program starts up. If I minimise the window it doesn't print anything to the console, it just crashes.

I'm using freeglut instead of glut, could that have anything to do with it? Also i'm running it in windows XP and compiling with MSVC++ version 6. But it's still strange that it only happens with the gsub_lite library, all the other examples work just fine. I can minimise and maximise the windows with no problems...

EDIT: I just realised that it can't be a freeglut problem, because I compiled the other examples using the freeglut libs as well, and they work.

philip_lamb
March 19th, 2005, 03:35 AM
Actually it could still be down to freeglut, i.e. an interaction between gsub_lite and freeglut. I will test with freeglut on Monday and see what I can see.

The other thing I would want to know is what version of the OpenGL drivers and graphics card drivers you are using. It could be some incompatibility with the drivers. Use the glView tool at http://www.realtech-vr.com/glview/ to get the info.

P.

JooJoo
March 19th, 2005, 07:04 AM
I think you're right... I recompiled everything using GLUT instead, and it all works fine. I can now minimise and maximise simpleLite (and everything else) without it crashing.

It may actually be a bug in freeglut. Because I used both glutVisibilityFunc( visibility ) and glutWindowStatusFunc( visibility ) in freeglut, neither of them ever got called after the program started.