|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
OpenGL Refresh problem using CsGL with VB.NETI have an application I have written in VB.NET. Part of the application is to display 3D models of buildings and allow the user to zoom and rotate around them. I have implemented this using the CsGL wrapper library with OpenGL. When it works, it works very well. I have a problem though. On some systems, the 3D view (which is available on a sub-dialog from the main form shown modally) does not always refresh. By that I mean that sometimes you can end up with a situation where just whatever is behind the 3D View control is shown solidly, e.g. word document, desktop etc. It remains, sometimes for several seconds, sometimes permanently. I have found that sometimes if you resize the form, or move something in front of it and then go back to it, that forces the refresh and then we are OK again. However, sometimes even that will not work and the only way to resolve is to close down the application and start it again. Like I say though, this is only on some systems. On most of the systems we have tried it on it is absolutely fine. I am concerned though that some of our users might have problems of this nature, which although not devastating, are very annoying. I am double buffering the form and and firing a timer 25 times a second on the form which calls the necessary refresh on the control. I adapted the mechanism I am using from one of the NeHe tutorials. Any ideas would be welcome as to what I might be able to try to improve the situation. Even advice like, "do not use CsGL, use something else" would be useful as I know development was ceased in 2003 for this library. Also, is it possible that just some graphics cards will always be a bit dodgy with 3D rendering and there is not much I can do about it? Thanks in advance, Mark. Mark Thompson wrote:
> Ummm...this is most likely the problem. Why a timer?> I am double buffering the form and and firing a timer 25 times a second > on the form which calls the necessary refresh on the control. I adapted > the mechanism I am using from one of the NeHe tutorials. > Why not just call refresh every time you've drawn the form or when there's no incoming events. Doing this asynchronously can only lead to problems. -- <\___/> / O O \ \_____/ FTB. For email, remove my socks. In science it often happens that scientists say, 'You know that's a really good argument; my position is mistaken,' and then they actually change their minds and you never hear that old view from them again. They really do it. It doesn't happen as often as it should, because scientists are human and change is sometimes painful. But it happens every day. I cannot recall the last time something like that happened in politics or religion. - Carl Sagan, 1987 CSICOP keynote address Fungus,
Thank you for your advice. However, I had already tried a few different ways of doing this, persistent loop on the form load event, firing only when triggered by move events etc. and the problem still occurs on some systems. It does feel though as if there is something fundamentally wrong somewhere as presumably OpenGL can be successfully used with VB.NET to create applications like the one we are producing? Any other ideas? Mark. Mark Thompson wrote:
> What are you passing as "dwStyle" in CreateWindow()?> Any other ideas? > -- <\___/> / O O \ \_____/ FTB. For email, remove my socks. In science it often happens that scientists say, 'You know that's a really good argument; my position is mistaken,' and then they actually change their minds and you never hear that old view from them again. They really do it. It doesn't happen as often as it should, because scientists are human and change is sometimes painful. But it happens every day. I cannot recall the last time something like that happened in politics or religion. - Carl Sagan, 1987 CSICOP keynote address
Database Connectivity
Querying a database using vb insert key state Foreign letters in text file Error "Unable to cast object of type"-- but types are the same! Resolving Type mismatch, HOW Deriving Combobox items indexes bypass security in Outlook How to keep statusStrip at the bottom of the ToolStripContainer GPS and VB .net 2005 |
|||||||||||||||||||||||