mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026822: Visualization, OpenGl_Texture - fix compilation issue on Android due to usage of undefined macros GL_DEBUG_TYPE_ERROR
Drop _ARB prefix from GL_DEBUG_ enumeration.
This commit is contained in:
@@ -147,10 +147,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
|| !aDeclImplFile.Exists())
|
||||
{
|
||||
const TCollection_ExtendedString aMsg = "Error! Failed to load OCCT shader declarations file";
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
aMsg);
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -176,10 +176,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
if (!anIter.Value()->IsDone())
|
||||
{
|
||||
const TCollection_ExtendedString aMsg = "Error! Failed to get shader source";
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
aMsg);
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -201,10 +201,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
if (aShader.IsNull())
|
||||
{
|
||||
TCollection_ExtendedString aMsg = "Error! Unsupported shader type";
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
aMsg);
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -242,10 +242,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
if (!aShader->LoadSource (theCtx, aSource))
|
||||
{
|
||||
const TCollection_ExtendedString aMsg = "Error! Failed to set shader source";
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
aMsg);
|
||||
aShader->Release (theCtx.operator->());
|
||||
return Standard_False;
|
||||
@@ -259,10 +259,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
{
|
||||
aLog = "Compilation log is empty.";
|
||||
}
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
TCollection_ExtendedString ("Failed to compile shader object. Compilation log:\n") + aLog);
|
||||
aShader->Release (theCtx.operator->());
|
||||
return Standard_False;
|
||||
@@ -274,10 +274,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
if (!aLog.IsEmpty()
|
||||
&& !aLog.IsEqual ("No errors.\n"))
|
||||
{
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_PORTABILITY_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_PORTABILITY,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_LOW_ARB,
|
||||
GL_DEBUG_SEVERITY_LOW,
|
||||
TCollection_ExtendedString ("Shader compilation log:\n") + aLog);
|
||||
}
|
||||
}
|
||||
@@ -303,10 +303,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
{
|
||||
aLog = "Linker log is empty.";
|
||||
}
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_ERROR_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_ERROR,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_HIGH_ARB,
|
||||
GL_DEBUG_SEVERITY_HIGH,
|
||||
TCollection_ExtendedString ("Failed to link program object! Linker log:\n") + aLog);
|
||||
return Standard_False;
|
||||
}
|
||||
@@ -317,10 +317,10 @@ Standard_Boolean OpenGl_ShaderProgram::Initialize (const Handle(OpenGl_Context)&
|
||||
if (!aLog.IsEmpty()
|
||||
&& !aLog.IsEqual ("No errors.\n"))
|
||||
{
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
|
||||
GL_DEBUG_TYPE_PORTABILITY_ARB,
|
||||
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
|
||||
GL_DEBUG_TYPE_PORTABILITY,
|
||||
0,
|
||||
GL_DEBUG_SEVERITY_LOW_ARB,
|
||||
GL_DEBUG_SEVERITY_LOW,
|
||||
TCollection_ExtendedString ("GLSL linker log:\n") + aLog);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user