OpenSceneGraph/src/osg/ColorMatrix.cpp

27 lines
481 B
C++
Raw Normal View History

#include <osg/GL>
#include <osg/GLExtensions>
#include <osg/ColorMatrix>
using namespace osg;
ColorMatrix::ColorMatrix()
{
}
ColorMatrix::~ColorMatrix()
{
}
void ColorMatrix::apply(State&) const
{
// std::cout<<"applying matrix"<<_matrix<<std::endl;
static bool s_ARB_imaging = isGLExtensionSupported("GL_ARB_imaging");
2001-12-19 23:20:29 +08:00
if (s_ARB_imaging)
{
glMatrixMode( GL_COLOR );
glLoadMatrixf( _matrix.ptr() );
glMatrixMode( GL_MODELVIEW );
}
}