From 0e628baf3e9632276be257c85319637879a336ba Mon Sep 17 00:00:00 2001 From: kgv Date: Fri, 17 Jul 2015 11:17:45 +0300 Subject: [PATCH] 0026454: Visualization, TKOpenGl - do not require deprecated function of GL_ARB_vertex_type_2_10_10_10_rev in core profile --- src/OpenGl/OpenGl_Context.cxx | 28 ++++++++++++++++++---------- src/OpenGl/OpenGl_GlCore33.hxx | 30 ------------------------------ 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 7336c22b2c..d09fdd5c55 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -1639,7 +1639,21 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) // load GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core) const bool hasVertType21010101rev = (IsGlGreaterEqual (3, 3) || CheckExtension ("GL_ARB_vertex_type_2_10_10_10_rev")) - && FindProcShort (glVertexP2ui) + && FindProcShort (glVertexAttribP1ui) + && FindProcShort (glVertexAttribP1uiv) + && FindProcShort (glVertexAttribP2ui) + && FindProcShort (glVertexAttribP2uiv) + && FindProcShort (glVertexAttribP3ui) + && FindProcShort (glVertexAttribP3uiv) + && FindProcShort (glVertexAttribP4ui) + && FindProcShort (glVertexAttribP4uiv); + + if ( hasVertType21010101rev + && !isCoreProfile) + { + // load deprecated functions + const bool hasVertType21010101revExt = + FindProcShort (glVertexP2ui) && FindProcShort (glVertexP2uiv) && FindProcShort (glVertexP3ui) && FindProcShort (glVertexP3uiv) @@ -1668,15 +1682,9 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile) && FindProcShort (glColorP4ui) && FindProcShort (glColorP4uiv) && FindProcShort (glSecondaryColorP3ui) - && FindProcShort (glSecondaryColorP3uiv) - && FindProcShort (glVertexAttribP1ui) - && FindProcShort (glVertexAttribP1uiv) - && FindProcShort (glVertexAttribP2ui) - && FindProcShort (glVertexAttribP2uiv) - && FindProcShort (glVertexAttribP3ui) - && FindProcShort (glVertexAttribP3uiv) - && FindProcShort (glVertexAttribP4ui) - && FindProcShort (glVertexAttribP4uiv); + && FindProcShort (glSecondaryColorP3uiv); + (void )hasVertType21010101revExt; + } // load OpenGL 3.3 extra functions has33 = IsGlGreaterEqual (3, 3) diff --git a/src/OpenGl/OpenGl_GlCore33.hxx b/src/OpenGl/OpenGl_GlCore33.hxx index 605f97e745..7e32c50402 100644 --- a/src/OpenGl/OpenGl_GlCore33.hxx +++ b/src/OpenGl/OpenGl_GlCore33.hxx @@ -55,36 +55,6 @@ public: //! @name GL_ARB_timer_query (added to OpenGL 3.3 core) public: //! @name GL_ARB_vertex_type_2_10_10_10_rev (added to OpenGL 3.3 core) - using theBaseClass_t::glVertexP2ui; - using theBaseClass_t::glVertexP2uiv; - using theBaseClass_t::glVertexP3ui; - using theBaseClass_t::glVertexP3uiv; - using theBaseClass_t::glVertexP4ui; - using theBaseClass_t::glVertexP4uiv; - using theBaseClass_t::glTexCoordP1ui; - using theBaseClass_t::glTexCoordP1uiv; - using theBaseClass_t::glTexCoordP2ui; - using theBaseClass_t::glTexCoordP2uiv; - using theBaseClass_t::glTexCoordP3ui; - using theBaseClass_t::glTexCoordP3uiv; - using theBaseClass_t::glTexCoordP4ui; - using theBaseClass_t::glTexCoordP4uiv; - using theBaseClass_t::glMultiTexCoordP1ui; - using theBaseClass_t::glMultiTexCoordP1uiv; - using theBaseClass_t::glMultiTexCoordP2ui; - using theBaseClass_t::glMultiTexCoordP2uiv; - using theBaseClass_t::glMultiTexCoordP3ui; - using theBaseClass_t::glMultiTexCoordP3uiv; - using theBaseClass_t::glMultiTexCoordP4ui; - using theBaseClass_t::glMultiTexCoordP4uiv; - using theBaseClass_t::glNormalP3ui; - using theBaseClass_t::glNormalP3uiv; - using theBaseClass_t::glColorP3ui; - using theBaseClass_t::glColorP3uiv; - using theBaseClass_t::glColorP4ui; - using theBaseClass_t::glColorP4uiv; - using theBaseClass_t::glSecondaryColorP3ui; - using theBaseClass_t::glSecondaryColorP3uiv; using theBaseClass_t::glVertexAttribP1ui; using theBaseClass_t::glVertexAttribP1uiv; using theBaseClass_t::glVertexAttribP2ui;