]> Git trees. - libqmvoc.git/commitdiff
Small optimization: when rendering atoms, use GL_RESCALE_NORMAL instead
authorBenoît Jacob <jacob.benoit.1@gmail.com>
Sat, 22 Jul 2006 10:04:10 +0000 (10:04 +0000)
committerBenoît Jacob <jacob.benoit.1@gmail.com>
Sat, 22 Jul 2006 10:04:10 +0000 (10:04 +0000)
of GL_NORMALIZE.

M    kalzium/src/kalziumglwidget.cpp

svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.cpp; revision=565060

kalzium/kalziumglwidget.cpp

index 0d0f38b8fdeb57c97a760c0711ac63a3ee71a44c..f5ff837e15b5fb2a467d0b68872df14b3dc93848 100644 (file)
@@ -165,10 +165,16 @@ void KalziumGLWidget::renderAtoms()
 {
        if( m_molStyle.m_atomStyle != MolStyle::ATOMS_DISABLED )
        {
+               glDisable( GL_NORMALIZE );
+               glEnable( GL_RESCALE_NORMAL );
+
                FOR_ATOMS_OF_MOL( atom, m_molecule )
                {
                        drawAtom( &*atom );
                }
+
+               glEnable( GL_NORMALIZE );
+               glDisable( GL_RESCALE_NORMAL );
        }
 }