From: BenoƮt Jacob Date: Sat, 22 Jul 2006 10:04:10 +0000 (+0000) Subject: Small optimization: when rendering atoms, use GL_RESCALE_NORMAL instead X-Git-Tag: v3.80.3~103^2~23 X-Git-Url: https://git.rmz.fi/?a=commitdiff_plain;h=ff6961ef1c76e0770051aa47cb1338252b9896a5;p=libqmvoc.git Small optimization: when rendering atoms, use GL_RESCALE_NORMAL instead of GL_NORMALIZE. M kalzium/src/kalziumglwidget.cpp svn path=/trunk/KDE/kdeedu/kalzium/src/kalziumglwidget.cpp; revision=565060 --- diff --git a/kalzium/kalziumglwidget.cpp b/kalzium/kalziumglwidget.cpp index 0d0f38b..f5ff837 100644 --- a/kalzium/kalziumglwidget.cpp +++ b/kalzium/kalziumglwidget.cpp @@ -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 ); } }