c++ - catch "NVIDIA OpenGL driver lost connection" error -
i developing application in c++ (mvs2008) , have problem described in thread:
nvidia opengl driver lost connection
what want ask not solution, or why happenning (like in posted thread), want ask if can "catch" error , before application crushes, output log relevant information of application state.
the error occurs every , while running application without clear causes, therefore such thing.
modern windows versions put number of hard constraints on responsiveness of applications. if process spends time in graphics operation driver call or takes long fetch events windows watchdog triggers , windows assumes process got stuck in infinite loop or violates responsivenes demands , may "do" it.
try happens if break down single gldraw…
call number of smaller batches. in general want minimize number of gldraw…
calls, if single gldraw…
call takes more 10ms or complete, you're far beyond opengl overhead territory anyway.
note due asynchronous nature of opengl watchdog may bark in opengl finishing call glfinish
or swapbuffers
. in case may help add glflush
commands between draw batches. if doesn't try glfinish
(which have performance impact). if doesn't help, too. create auxiliary opengl context in separate thread renders texture using fbo , have main thread display contents of intermediary texture. , if doesn't help, create auxiliary context on pbuffer instead on same window main context.
Comments
Post a Comment