Non-GL painting

Large part of Avogadro API is binded to GLWidget. However, modular architecture is declared, so there should be a possibility to replace GL renderer with non-GL one.
Why it may be needed?

  1. Minimalistic molecule depiction will improve performance on old/ heavy loaded (e.g., by calculations) computers with preserving all plugins capabilities
  2. Production of images for papers (low color and b/w)

I know that it’s possible to add external painter (like POV-Ray) for export, but replacing GLWidget in Avogadro could be also useful.
Just a proposal for time to break ABI

Regards,
Konstantin

Large part of Avogadro API is binded to GLWidget. However, modular architecture is declared, so there should be a possibility to replace GL renderer with non-GL one.

I think we all agree with you that GLWidget should be more like RenderWidget. :slight_smile: I also know that we’re only scratching the surface of OpenGL performance, particularly with support for GL 1.5 or 2.0 features.

Before we can really refactor GLWidget into a more general form:

  1. We need to gather all OpenGL calls from engines and classes like camera.cpp into the Painter class. Obviously, this may require some additional Painter functionality.
  2. We need to add a “picker” class for handing click->selection.
  3. We need to switch the main rendering widget to use Graphics view with an optional QGLWidget as the viewport.

Some of this ground-work we can do without needing to break API or ABI with 1.0. Step #3, for example, could probably happen now (i.e., it’s mostly in Avogadro, not libavogadro) and would enable some cool new interface features (e.g., widgets embedded in the render scene).

This should probably go in the main To Do document (i.e., not specifically targeted at any specific version).
-Geoff