mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0026002: Visualization, TKOpenGl - detect alien Core Profile context
Read GL_CONTEXT_PROFILE_MASK flags. Update of unstable test-case
This commit is contained in:
parent
269e9c3640
commit
d4271fe56f
@ -953,26 +953,19 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
|
|||||||
FindProc ("glGetStringi", myFuncs->glGetStringi);
|
FindProc ("glGetStringi", myFuncs->glGetStringi);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this check would not work well due to buggy NVIDIA drivers!
|
bool isCoreProfile = false;
|
||||||
/*GLint aProfile = 0;
|
|
||||||
if (IsGlGreaterEqual (3, 2))
|
if (IsGlGreaterEqual (3, 2))
|
||||||
{
|
{
|
||||||
::glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &aProfile);
|
isCoreProfile = (theIsCoreProfile == Standard_True);
|
||||||
}
|
|
||||||
const bool isCoreProfile = (aProfile & GL_CONTEXT_CORE_PROFILE_BIT) != 0;*/
|
|
||||||
|
|
||||||
// detect Core profile
|
// detect Core profile
|
||||||
/*for (int anErr = glGetError(), aPrevErr = GL_NO_ERROR;; aPrevErr = anErr, anErr = glGetError())
|
if (isCoreProfile)
|
||||||
{
|
|
||||||
if (anErr == aPrevErr)
|
|
||||||
{
|
{
|
||||||
break;
|
GLint aProfile = 0;
|
||||||
|
::glGetIntegerv (GL_CONTEXT_PROFILE_MASK, &aProfile);
|
||||||
|
isCoreProfile = (aProfile & GL_CONTEXT_CORE_PROFILE_BIT) != 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const char* anExtString = (const char* )::glGetString (GL_EXTENSIONS);
|
|
||||||
const bool isCoreProfile = IsGlGreaterEqual (3, 2) && (glGetError() != GL_NO_ERROR);*/
|
|
||||||
|
|
||||||
const bool isCoreProfile = IsGlGreaterEqual (3, 2) && theIsCoreProfile;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
core11 = NULL;
|
core11 = NULL;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
puts "TODO ?OCC23150 Windows: Error : Number of faults is"
|
puts "TODO ?OCC23150 ALL: Error : Number of faults is"
|
||||||
puts "TODO OCC24592 ALL: Error : Number of free edges is"
|
puts "TODO OCC24592 ALL: Error : Number of free edges is"
|
||||||
|
|
||||||
restore [locate_data_file CNP002_projoiep.rle] a
|
restore [locate_data_file CNP002_projoiep.rle] a
|
||||||
|
Loading…
x
Reference in New Issue
Block a user