]> Git trees. - libqmvoc.git/commit
main change: added TextRenderer class (and CharRenderer helper class)
authorBenoît Jacob <jacob.benoit.1@gmail.com>
Sun, 2 Jul 2006 11:35:46 +0000 (11:35 +0000)
committerBenoît Jacob <jacob.benoit.1@gmail.com>
Sun, 2 Jul 2006 11:35:46 +0000 (11:35 +0000)
commitd8d1d89842a4ca7fafa23e97e3ca1b6fe0ff0fd9
tree1f3a07ede007240a7355ea5a2aa99b63153adc5d
parentfb395a81ab0921d284c9e4904ff14503aaa31a5b
main change: added TextRenderer class (and CharRenderer helper class)

TextRenderer comment (sorry if this sounds too verbose, I just though it'd be
useful to explain why I didn't just use QGLWidget::renderText()) :

/** This class renders text inside a QGLWidget. It replaces the functionality
* of QGLWidget::renderText(). The advantages over renderText() include:
*  - supports any font, any character encoding supported by Qt
*    (renderText is 8-bit-only and can only use "OpenGL-compatible" fonts)
*  - does not use any library outside Qt (renderText uses FreeType on X11)
*  - renders characters as textured quads instead of calling glDrawPixels,
*    which does not make much of a difference on MesaGL, but can be a lot
*    faster and safer with other (buggy) OpenGL implementations. It will also
*    allow to add more graphical effects in the future, like rotation,
*    if we ever need that.
*  - the characters are stored as 8bpp Alpha, which takes 4 times less
*    memory than the 32bpp RGBA used by renderText.
*  - the characters are rendered on-the-fly on the first time they appear
*    in a QString being printed. This is achieved using a QHash to test whether
*    a character has already been rendered.

M    src/kalziumglwidget.h
M    src/kalziumglhelperclasses.h
M    src/moleculeview.cpp
M    src/kalziumglwidget.cpp
M    src/kalziumglhelperclasses.cpp

svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.h; revision=557087
kalzium/kalziumglhelperclasses.cpp
kalzium/kalziumglhelperclasses.h
kalzium/kalziumglwidget.cpp
kalzium/kalziumglwidget.h