Added check for GL_ARB_imaging extension to osg;:ColorMatrix
This commit is contained in:
parent
261ab77373
commit
3c1c0f015e
@ -1,4 +1,5 @@
|
|||||||
#include <osg/GL>
|
#include <osg/GL>
|
||||||
|
#include <osg/GLExtensions>
|
||||||
#include <osg/ColorMatrix>
|
#include <osg/ColorMatrix>
|
||||||
|
|
||||||
using namespace osg;
|
using namespace osg;
|
||||||
@ -15,8 +16,11 @@ ColorMatrix::~ColorMatrix()
|
|||||||
void ColorMatrix::apply(State&) const
|
void ColorMatrix::apply(State&) const
|
||||||
{
|
{
|
||||||
// std::cout<<"applying matrix"<<_matrix<<std::endl;
|
// std::cout<<"applying matrix"<<_matrix<<std::endl;
|
||||||
|
static bool s_ARB_imaging = isGLExtensionSupported("GL_ARB_imaging");
|
||||||
glMatrixMode( GL_COLOR );
|
if (s_ARB_imaging)
|
||||||
glLoadMatrixf( _matrix.ptr() );
|
{
|
||||||
glMatrixMode( GL_MODELVIEW );
|
glMatrixMode( GL_COLOR );
|
||||||
|
glLoadMatrixf( _matrix.ptr() );
|
||||||
|
glMatrixMode( GL_MODELVIEW );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user