Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I was trying to do a pre-calculations of an SSAO effect by rendering normals and depth on a cubemap and doing a second ssao pass on each of these faces. The problem is I'm getting a timeout: "the nvidia opengl driver lost connection with the display driver...", when using high resolutions. Is there a good way to do such calculations without having to tweak registry values? I want this to be able to work for other people too.

In essence I'd love if there was also a way to add something like a loading bar so that people don't think the program crashed or something.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

What you want to do is make sure you present something to the screen during this process, because it's essentially the time between those that Windows is looking at. Rendering a progress bar between each cube map face should be enough to do the trick in your case as you aren't too far over the limit. I believe the default limit is two seconds per frame.

However, make sure you test it on low end hardware as that will take even longer and be more likely to timeout.

Alternatively pre-compute the cube maps on your PC, and save them out. That way you cut down on the loading time for everyone as well as avoiding the TDR.

share|improve this answer
    
Thank you for your answer. Is it sufficient to swap buffers after each face or do I have to draw something? What should one do if the calculation can't be broken up into smaller parts? –  Grieverheart Dec 23 '12 at 18:30
    
I believe with OpenGL either glFlush() or glFinish() will do the trick, so you don't actually need to render anything. Once you've got down to the case where rendering one pixel takes two seconds then your options are to either split the processing up into multiple passes, or adjust the timeout in the registry. –  Adam Dec 30 '12 at 1:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.