quickRender

Hi all,

I am writing a extension plugin that manipulates atoms and the camera. It
works with one atom. But when I load a large molecule (~5000 atoms), it
lags. It’s like the quick rendering was not activated. While manipulating
with the mouse is suitable.
I am inspired by existing code of Avogadro (navigate.cpp/.h), and I saw
nothing that “activate/manipulate” the quick rendering.
So, when is it activated ? (Just when use tool plugin?)

Regards.
Mickaël Gadroy

28.04.10, 18:34, “Mickaël Gadroy” mickael.gadroy@gmail.com:

Hi all,

I am writing a extension plugin that manipulates atoms and the camera. It works with one atom. But when I load a large molecule (~5000 atoms), it lags. It’s like the quick rendering was not activated. While manipulating with the mouse is suitable.
I am inspired by existing code of Avogadro (navigate.cpp/.h), and I saw nothing that “activate/manipulate” the quick rendering.
So, when is it activated ? (Just when use tool plugin?)

Use GLWidget::setQuickRender(bool enabled)

Regards.
Mickaël Gadroy


Regards,
Konstantin

On Wednesday 28 April 2010 12:34:13 Mickaël Gadroy wrote:

Hi all,

I am writing a extension plugin that manipulates atoms and the camera. It
works with one atom. But when I load a large molecule (~5000 atoms), it
lags. It’s like the quick rendering was not activated. While manipulating
with the mouse is suitable.
I am inspired by existing code of Avogadro (navigate.cpp/.h), and I saw
nothing that “activate/manipulate” the quick rendering.
So, when is it activated ? (Just when use tool plugin?)

It is activated by GLWidget in the mouse event functions when quick render is
set to on. So, from an extension quick rendering would not be active. I am not
sure that the current code accounts for that situation, and the auto-rotate
tool suffers from the same limitation (quick rendering is not used).

The setQuickRender method actually sets whether quick rendering can be used,
but more logic is present to decide when to use it. It is effectively only
turned on when the mouse is down, see the logic in GLWidget::mouseMoveEvent.
It could probably be extended for more cases without too much trouble, but I
was trying to solve the issue of interactivity when I worked on this code.

Hope that helps,

Marcus

Thank you for the clarification. This is exactly what I wanted to know. I
will try to redirect my signals plus a few changes.

Mickaël Gadroy