On Fri, Mar 1, 2013 at 1:31 PM, Marc-André Dubois <ma.dub...@me.com> wrote:
> Hi everyone,
>                   I would like to draw a sphere in the molecule render area
> of avogadro. I simply tried to test this command:
>
>  gl->painter()->drawSphere(center,13.0);
>
> where gl is my GLWidget, but I received: GLPainter not active. Is there
> something I don't understand? Thanks guys,
>
You must make these calls when the GL context is valid. The easiest
way is to write an Engine and do it in one of the virtual render calls
in the method. See the Van der Waals plugin for example. This ensures
the render call happens at the appropriate moment when the GL context
is current.

Marcus

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Avogadro-devel mailing list
Avogadro-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

Reply via email to