Added check for GL_ARB_imaging extension to osg;:ColorMatrix

This commit is contained in:
Robert Osfield 2001-12-19 08:49:10 +00:00
parent 261ab77373
commit 3c1c0f015e

View File

@ -1,4 +1,5 @@
#include <osg/GL>
#include <osg/GLExtensions>
#include <osg/ColorMatrix>
using namespace osg;
@ -15,8 +16,11 @@ ColorMatrix::~ColorMatrix()
void ColorMatrix::apply(State&) const
{
// std::cout<<"applying matrix"<<_matrix<<std::endl;
glMatrixMode( GL_COLOR );
glLoadMatrixf( _matrix.ptr() );
glMatrixMode( GL_MODELVIEW );
static bool s_ARB_imaging = isGLExtensionSupported("GL_ARB_imaging");
if (s_ARB_imaging)
{
glMatrixMode( GL_COLOR );
glLoadMatrixf( _matrix.ptr() );
glMatrixMode( GL_MODELVIEW );
}
}