Benoît Jacob [Mon, 26 Jun 2006 22:01:09 +0000 (22:01 +0000)]
Big reorganization in kalziumglhelperclasses
By the way, maybe we shoud rename these files kalziumglhelpers, because
there's not only classes there, but also functions (all within a
namespace I called KalziumGLHelpers).
Another change is, I removed support for caching with GL display lists.
The reason is, it was getting more and more complicated, and it would
really have been a pain to handle atoms with different radii. (The main
problem is that in principle, GL display lists are incompatible with
glVertexPointer).
Carsten, I tried to do as you asked, display "Please load a molecule" at
KalziumGLWidget startup, but I hit the weirdness of
QGLWidget::renderText(), and I had to give up. Googling for that showed
me that many people had the same problems, but I couldn't find a
solution. I'll ask kde-devel, I think.
Benoit
M kalzium/src/kalziumglwidget.h
M kalzium/src/kalziumglhelperclasses.h
M kalzium/src/kalziumglwidget.cpp
M kalzium/src/kalziumglhelperclasses.cpp
Carsten Niehaus [Mon, 26 Jun 2006 13:47:58 +0000 (13:47 +0000)]
Benoit, kalziumglwidget.h/cpp grew just to big, that is why I
moved the code into kalziumglhelperclasses.h/cpp, onle the GLWidget
itself stays in src/kalziumglwidget.cpp.
But for some cpp-magic-reasons I needed to remove two inline-calls,
don't ask me why. Furhtermore,
template<class T> void GLVector3<T>::construct_ortho_basis_given_first_vector
is not longer found when linking, not the slightest idea why... The
other methods of GLVector are found when linking...
Benoît Jacob [Mon, 26 Jun 2006 10:18:33 +0000 (10:18 +0000)]
Changes in kalziumglwidget:
- added FPS (frames per second) counter. Enable it by #defining
USE_FPS_COUNTER. (Currently enabled).
- added option to cache the rendering of the molecule using a GL display
list. This improves speed, especially for rendering complex
molecules; I have measured a speed increase above +35% in some cases
(depends also on the style and the widget size). Enable it by
#defining USE_DISPLAY_LIST. (Currently enabled).
Change in latticedialog:
- I allowed myself to comment out ui.glWidget->update(); in
LatticeDialog::slotUpdateView() because normally this is being
taken care of by slotSetMolecule; also I think that for a GL widget,
one should call updateGL() instead of update(); not 100% sure here.
Carsten, I didn't see the "blank widget" bug in the lattice viewer;
have you already solved it?
M kalzium/src/kalziumglwidget.h
M kalzium/src/kalziumglwidget.cpp
M kalzium/src/latticedialog.cpp
Benoît Jacob [Sun, 25 Jun 2006 13:08:39 +0000 (13:08 +0000)]
Add intelligent (so to speak) level-of-detail handling in Kalzium's
OpenGL engine. For instance smaller spheres will be drawn with smaller
detail level.
Carsten Niehaus [Sat, 24 Jun 2006 21:04:21 +0000 (21:04 +0000)]
Many OpenGL-fixes from Benoit.
Benoit, feel free to commit yourself from now on!
Benoit, is it possible that you forgot to center the molecule? They are rotating here like they did in the very first version of your code... But the reason might be that I am now using OpenBabel 2.1...
Carsten Niehaus [Sat, 24 Jun 2006 14:16:55 +0000 (14:16 +0000)]
Benoit, please copy test.cml to /home/kde4/ and then test the latticeviewer. Somehow I will need a new view-type for crystals. I want it to look a bit like this
Carsten Niehaus [Sat, 17 Jun 2006 21:06:47 +0000 (21:06 +0000)]
Changes by Benoit:
- implemented highlighting of selected atom (paints it in a blue color that is
influenced by the original color)
- now uses GLColor struct to handle color stuff
- in big-spheres style, use smaller spheres (tell me what you think of this)
- some slotChooseStylePreset reorganization
Carsten Niehaus [Fri, 16 Jun 2006 09:23:32 +0000 (09:23 +0000)]
* Using M_PI and not a selfdefined pi.
* Update the view after the molecule has been changed
* Wouldn't it make sense to really only set m_molecule in the slotSetMolecule()
and have a second slot/method in which we'd recalculate things?
Carsten Niehaus [Wed, 14 Jun 2006 16:59:18 +0000 (16:59 +0000)]
* Add Benoit in the credit-section
* Adding apidox and some compile warning-fixes
* Make use of the ui, well, the plugin still does not link and I have not the faintest idea why
Carsten Niehaus [Mon, 12 Jun 2006 15:05:06 +0000 (15:05 +0000)]
* Ok, make the dialog more sane, adding some slots so that Benoit can continue
* Benoit: You'll notice some changes in the GL-classes. I added 2 members and 2 slots.
In the moleculewidget I removed everything but the constructor. I hope that works
fine for you :)