Commit 8859b39c authored by Martin Schultz's avatar Martin Schultz

replace some openGL version checks with the silent variant, to reduce

log noise
parent b2683da2
......@@ -921,7 +921,7 @@ void ShaderProgGenerator::init( const ShaderGenDesc* _desc, ShaderModifier* cons
desc_ = *_desc;
// We need at least version 3.2 or higher to support geometry shaders
if ( !ACG::openGLVersion(3,2) )
if ( !ACG::openGLVersionTest(3,2) )
{
if (!desc_.geometryTemplateFile.isEmpty())
std::cerr << "Warning: removing geometry shader from ShaderDesc" << std::endl;
......@@ -930,7 +930,7 @@ void ShaderProgGenerator::init( const ShaderGenDesc* _desc, ShaderModifier* cons
}
// We need at least version 4.0 or higher to support tessellation
if ( !ACG::openGLVersion(4, 0) )
if ( !ACG::openGLVersionTest(4, 0) )
{
if (!desc_.tessControlTemplateFile.isEmpty() || !desc_.tessEvaluationTemplateFile.isEmpty())
std::cerr << "Warning: removing tessellation shader from ShaderDesc" << std::endl;
......
......@@ -110,9 +110,9 @@ public:
{
for ( unsigned int i = 0 ; i < SG_MAX_SHADER_LIGHTS ; ++i)
lightTypes[i] = SG_LIGHT_DIRECTIONAL;
if(!ACG::openGLVersion(3,2)) // version 140 or less
if(!ACG::openGLVersionTest(3,2)) // version 140 or less
{
if(!ACG::openGLVersion(3,1)) // assume version 130
if(!ACG::openGLVersionTest(3,1)) // assume version 130
{ // less is not supported
version = 130;
if(ACG::checkExtensionSupported("EXT_texture_buffer"))
......
......@@ -468,7 +468,7 @@ void VertexDeclaration::activateShaderPipeline(GLSL::Program* _prog) const
if (supportsInstancedArrays())
{
if( openGLVersion(3,3) )
if( openGLVersionTest(3,3) )
{
glVertexAttribDivisor(loc, pElem->divisor_);
}
......@@ -507,7 +507,7 @@ void VertexDeclaration::deactivateShaderPipeline( GLSL::Program* _prog ) const
if (supportsInstancedArrays() && pElem->divisor_)
{
if( openGLVersion(3,3) )
if( openGLVersionTest(3,3) )
{
glVertexAttribDivisor(loc, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment