mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0028095: Draw Harness, ViewerTest - use RGBA format instead of BGRA within vreadpixel
OpenGl_Workspace::BufferDump() now implicitly converts RGBA dump into requested BGR, BGRA and RGB image. DRAW command dversion is improved to report OpenGL variant used (desktop or ES); reporting of version of MSVC is corrected for VC14 and above; reporting of HAVE_OPENCL option is removed. Usage of command vdump is corrected in some tests to specify extension .png for an image file. Compiler warning is eliminated in OpenGl_Text.cxx (OpenGL ES mode only).
This commit is contained in:
@@ -812,17 +812,18 @@ Standard_Boolean OpenGl_Context::Init (const Aspect_Drawable theWindow,
|
||||
// function : ResetErrors
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
void OpenGl_Context::ResetErrors (const bool theToPrintErrors)
|
||||
bool OpenGl_Context::ResetErrors (const bool theToPrintErrors)
|
||||
{
|
||||
int aPrevErr = 0;
|
||||
int anErr = ::glGetError();
|
||||
const bool hasError = anErr != GL_NO_ERROR;
|
||||
if (!theToPrintErrors)
|
||||
{
|
||||
for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = ::glGetError())
|
||||
{
|
||||
//
|
||||
}
|
||||
return;
|
||||
return hasError;
|
||||
}
|
||||
|
||||
for (; anErr != GL_NO_ERROR && aPrevErr != anErr; aPrevErr = anErr, anErr = ::glGetError())
|
||||
@@ -849,6 +850,7 @@ void OpenGl_Context::ResetErrors (const bool theToPrintErrors)
|
||||
const TCollection_ExtendedString aMsg = TCollection_ExtendedString ("Unhandled GL error: ") + anErrId;
|
||||
PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_OTHER, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
|
||||
}
|
||||
return hasError;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
Reference in New Issue
Block a user