diff --git a/include/ACGL/OpenGL/Objects/Query.hh b/include/ACGL/OpenGL/Objects/Query.hh index de5444ef818612f8a6adc3786d7e3e23bfde660d..c878998b5c2fdc7fb0fedf54985ec927d49f714a 100644 --- a/include/ACGL/OpenGL/Objects/Query.hh +++ b/include/ACGL/OpenGL/Objects/Query.hh @@ -135,8 +135,9 @@ public: //! _queryType has to be GL_SAMPLES_PASSED or GL_ANY_SAMPLES_PASSED void setType( GLenum _queryType ) { -#if (ACGL_OPENGL_VERSION < 33) - if (_queryType == GL_ANY_SAMPLES_PASSED) _queryType = GL_SAMPLES_PASSED; // GL_ANY_SAMPLES_PASSED is OpenGL 3.3 or later! But GL_SAMPLES_PASSED is a good substitute +#if (ACGL_OPENGL_VERSION <= 32) + #define ACGL_ANY_SAMPLES_PASSED 0x8C2F + if (_queryType == ACGL_ANY_SAMPLES_PASSED) _queryType = GL_SAMPLES_PASSED; // GL_ANY_SAMPLES_PASSED is OpenGL 3.3 or later! But GL_SAMPLES_PASSED is a good substitute #endif if (_queryType != GL_SAMPLES_PASSED) { Utils::error() << "OcclusionQuery type " << _queryType << " not supported" << std::endl;