473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

OpenGL Refresh problem using CsGL with VB.NET

Hi,

I 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.

Sep 22 '06 #1
3 2540
Mark Thompson wrote:
>
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.
Ummm...this is most likely the problem. Why a timer?
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

Sep 22 '06 #2
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.

Sep 22 '06 #3
Mark Thompson wrote:
>
Any other ideas?
What are you passing as "dwStyle" in CreateWindow()?
--
<\___/>
/ 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

Sep 22 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: manoj | last post by:
Is there any class in C# that allows rendering 3D Graphics like OpenGL. If there are no classes can some tell how to do the same. thanks for any help. manoj
5
by: Binil | last post by:
I know that OpenGL is written for C/C++ programming languages. How about in C#. How would we display 3D graphics in C# ?
2
by: pontifikas | last post by:
I've be struggling for a few days to make Opengl work in VS using C#. However, all wrappers I've stambled on(CsGL, CsGL.Basecode,ColinFahey's wgl etc) do not provide sufficient info on how to do...
2
by: jondotdot | last post by:
I am trying to use openGL to draw to a C++.NET panel... Any suggestions of where I might find some sample code.. thanks
1
by: dela | last post by:
Can anyone point me to sample code using OpenGL with vb.Net? My old VB6 code using vbogl.tlb does not upgrade properly. **********************************************************************...
4
by: Dragon | last post by:
Hello, I wonder if there's a way to use OpenGL directly from VB .NET, without any C++ code, or CsGL library. I've tried to convert NeHe's first tutorial...
6
by: Mark Thompson | last post by:
I have a problem with my Visual Basic .NET 2003 application which I have so far been unable to resolve. I am trying to get an OpenGL control that I have created working properly as a control on...
0
by: Mark Thompson | last post by:
Hi, Having given up on CsGL, I have recently integrated the Tao OpenGL components into a VB.NET application that I am developing. I have a problem though in that it works fine on two of the...
2
by: Jeff | last post by:
Hey I'm wondering if it is possible create OpenGL applications using C#, or is this only possible for vc++?? I quess if this should be possible in C# then C# must have a managned OpenGL SDK...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.