Well, the other problem is that we can’t naively make a display list
when mouse is down unless we have the engines somehow say whether they
are going to be modifying the molecule. What we need to do is while the
mouse is down make the display list but if the molecule gets updated at
anytime we need to re-make the display list. (ie. the draw tool).
The other thing that may be more complicated is that while the mouse is
down leave it up to the tools to draw what is new. So you could make a
single display list when the mouse gets pressed (which is an image of
the original molecule) then have the draw tool render the new atoms and
bonds by calling something like GLWidget::render(Primitive *primitive)
but then each engine would need a function like this and it gets sticky.
So my suggestion would be to do something about the global quality while
modifying or something of that nature. Just another slider that says
“Modification quality” or something more intuitive.
Also having it be an “option” to enable / disable display lists during
navigation would be good. Enabled by default. Because I personally
think it’s cool to have dynamic quality as things move closer and
farther.
How much of a speedup do we get from actually making a master display
list? Did anyone mention this already? I may have missed it. I know
there was talk of profiling.
–
Donald
(Tue, Dec 04, 2007 at 05:08:01PM -0500) Geoffrey Hutchison geoff.hutchison@gmail.com:
Carsten,
Marcus tells me that you were asking around about performance and
ribbons.
I think the problem is not necessarily ribbons (although they probably
can use some performance work too). I think the problem is general
interactivity with rotation, etc. and large molecules.
For example, in many proteins, we’re talking about a few thousand
atoms and bonds.
One possible solution used by many molecular visualization tools is
the “quickdraw” option. Basically, when the user is doing a rotation,
translation (i.e., any time the mouse is down), rendering drops in
quality.
So here’s my suggestion:
- Drop the global quality by 1-2 notches
- Add a “quickdraw” flag to the render engines – i.e., the engines
should turn off the dynamic culling, etc.
- Save a display list over all engines (i.e., on mousePressEvent)
- Only use the display list while the mouse is pressed
- After a slight timeout and mouseRelease, re-render with normal
settings.
I think this would help a lot. Right now, we do a lot of work for each
atom and bond, for each engine. So on a big system, that’s a lot of
work for each frame.
Thoughts? Marcus, Donald, and Benoit? You three seem to be the most
involved with the rendering framework.
Cheers,
-Geoff
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
avogadro-devel List Signup and Options