1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +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:
kgv 2015-10-28 18:19:59 +03:00 committed by bugmaster
parent 959a265a68
commit 3b523c4cb2
13 changed files with 152 additions and 152 deletions

View File

@ -242,7 +242,7 @@ OpenGl_Context::~OpenGl_Context()
{
// reset callback
void* aPtr = NULL;
glGetPointerv (GL_DEBUG_CALLBACK_USER_PARAM_ARB, &aPtr);
glGetPointerv (GL_DEBUG_CALLBACK_USER_PARAM, &aPtr);
if (aPtr == this)
{
arbDbg->glDebugMessageCallbackARB (NULL, NULL);
@ -421,7 +421,7 @@ Standard_Boolean OpenGl_Context::MakeCurrent()
if (eglMakeCurrent ((EGLDisplay )myDisplay, (EGLSurface )myWindow, (EGLSurface )myWindow, (EGLContext )myGContext) != EGL_TRUE)
{
// if there is no current context it might be impossible to use glGetError() correctly
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB,
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
"eglMakeCurrent() has failed!");
myIsInitialized = Standard_False;
return Standard_False;
@ -453,7 +453,7 @@ Standard_Boolean OpenGl_Context::MakeCurrent()
aMsg += (Standard_ExtString )aMsgBuff;
LocalFree (aMsgBuff);
}
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB, GL_DEBUG_TYPE_ERROR_ARB, (unsigned int )anErrorCode, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM, GL_DEBUG_TYPE_ERROR, (unsigned int )anErrorCode, GL_DEBUG_SEVERITY_HIGH, aMsg);
myIsInitialized = Standard_False;
return Standard_False;
}
@ -467,7 +467,7 @@ Standard_Boolean OpenGl_Context::MakeCurrent()
if (!glXMakeCurrent ((Display* )myDisplay, (GLXDrawable )myWindow, (GLXContext )myGContext))
{
// if there is no current context it might be impossible to use glGetError() correctly
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB,
PushMessage (GL_DEBUG_SOURCE_WINDOW_SYSTEM, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH,
"glXMakeCurrent() has failed!");
myIsInitialized = Standard_False;
return Standard_False;
@ -879,27 +879,27 @@ void OpenGl_Context::ReadGlVersion (Standard_Integer& theGlVerMajor,
static Standard_CString THE_DBGMSG_UNKNOWN = "UNKNOWN";
static Standard_CString THE_DBGMSG_SOURCES[] =
{
".OpenGL", // GL_DEBUG_SOURCE_API_ARB
".WinSystem", // GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB
".GLSL", // GL_DEBUG_SOURCE_SHADER_COMPILER_ARB
".3rdParty", // GL_DEBUG_SOURCE_THIRD_PARTY_ARB
"", // GL_DEBUG_SOURCE_APPLICATION_ARB
".Other" // GL_DEBUG_SOURCE_OTHER_ARB
".OpenGL", // GL_DEBUG_SOURCE_API
".WinSystem", // GL_DEBUG_SOURCE_WINDOW_SYSTEM
".GLSL", // GL_DEBUG_SOURCE_SHADER_COMPILER
".3rdParty", // GL_DEBUG_SOURCE_THIRD_PARTY
"", // GL_DEBUG_SOURCE_APPLICATION
".Other" // GL_DEBUG_SOURCE_OTHER
};
static Standard_CString THE_DBGMSG_TYPES[] =
{
"Error", // GL_DEBUG_TYPE_ERROR_ARB
"Deprecated", // GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB
"Undef. behavior", // GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB
"Portability", // GL_DEBUG_TYPE_PORTABILITY_ARB
"Performance", // GL_DEBUG_TYPE_PERFORMANCE_ARB
"Other" // GL_DEBUG_TYPE_OTHER_ARB
"Error", // GL_DEBUG_TYPE_ERROR
"Deprecated", // GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
"Undef. behavior", // GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
"Portability", // GL_DEBUG_TYPE_PORTABILITY
"Performance", // GL_DEBUG_TYPE_PERFORMANCE
"Other" // GL_DEBUG_TYPE_OTHER
};
static Standard_CString THE_DBGMSG_SEV_HIGH = "High"; // GL_DEBUG_SEVERITY_HIGH_ARB
static Standard_CString THE_DBGMSG_SEV_MEDIUM = "Medium"; // GL_DEBUG_SEVERITY_MEDIUM_ARB
static Standard_CString THE_DBGMSG_SEV_LOW = "Low"; // GL_DEBUG_SEVERITY_LOW_ARB
static Standard_CString THE_DBGMSG_SEV_HIGH = "High"; // GL_DEBUG_SEVERITY_HIGH
static Standard_CString THE_DBGMSG_SEV_MEDIUM = "Medium"; // GL_DEBUG_SEVERITY_MEDIUM
static Standard_CString THE_DBGMSG_SEV_LOW = "Low"; // GL_DEBUG_SEVERITY_LOW
#if !defined(GL_ES_VERSION_2_0)
//! Callback for GL_ARB_debug_output extension
@ -927,29 +927,29 @@ void OpenGl_Context::PushMessage (const unsigned int theSource,
const TCollection_ExtendedString& theMessage)
{
if (caps->suppressExtraMsg
&& theSource >= GL_DEBUG_SOURCE_API_ARB
&& theSource <= GL_DEBUG_SOURCE_OTHER_ARB
&& myFilters[theSource - GL_DEBUG_SOURCE_API_ARB].Contains (theId))
&& theSource >= GL_DEBUG_SOURCE_API
&& theSource <= GL_DEBUG_SOURCE_OTHER
&& myFilters[theSource - GL_DEBUG_SOURCE_API].Contains (theId))
{
return;
}
Standard_CString& aSrc = (theSource >= GL_DEBUG_SOURCE_API_ARB
&& theSource <= GL_DEBUG_SOURCE_OTHER_ARB)
? THE_DBGMSG_SOURCES[theSource - GL_DEBUG_SOURCE_API_ARB]
Standard_CString& aSrc = (theSource >= GL_DEBUG_SOURCE_API
&& theSource <= GL_DEBUG_SOURCE_OTHER)
? THE_DBGMSG_SOURCES[theSource - GL_DEBUG_SOURCE_API]
: THE_DBGMSG_UNKNOWN;
Standard_CString& aType = (theType >= GL_DEBUG_TYPE_ERROR_ARB
&& theType <= GL_DEBUG_TYPE_OTHER_ARB)
? THE_DBGMSG_TYPES[theType - GL_DEBUG_TYPE_ERROR_ARB]
Standard_CString& aType = (theType >= GL_DEBUG_TYPE_ERROR
&& theType <= GL_DEBUG_TYPE_OTHER)
? THE_DBGMSG_TYPES[theType - GL_DEBUG_TYPE_ERROR]
: THE_DBGMSG_UNKNOWN;
Standard_CString& aSev = theSeverity == GL_DEBUG_SEVERITY_HIGH_ARB
Standard_CString& aSev = theSeverity == GL_DEBUG_SEVERITY_HIGH
? THE_DBGMSG_SEV_HIGH
: (theSeverity == GL_DEBUG_SEVERITY_MEDIUM_ARB
: (theSeverity == GL_DEBUG_SEVERITY_MEDIUM
? THE_DBGMSG_SEV_MEDIUM
: THE_DBGMSG_SEV_LOW);
Message_Gravity aGrav = theSeverity == GL_DEBUG_SEVERITY_HIGH_ARB
Message_Gravity aGrav = theSeverity == GL_DEBUG_SEVERITY_HIGH
? Message_Alarm
: (theSeverity == GL_DEBUG_SEVERITY_MEDIUM_ARB
: (theSeverity == GL_DEBUG_SEVERITY_MEDIUM
? Message_Warning
: Message_Info);
@ -970,9 +970,9 @@ void OpenGl_Context::PushMessage (const unsigned int theSource,
Standard_Boolean OpenGl_Context::ExcludeMessage (const unsigned int theSource,
const unsigned int theId)
{
return theSource >= GL_DEBUG_SOURCE_API_ARB
&& theSource <= GL_DEBUG_SOURCE_OTHER_ARB
&& myFilters[theSource - GL_DEBUG_SOURCE_API_ARB].Add (theId);
return theSource >= GL_DEBUG_SOURCE_API
&& theSource <= GL_DEBUG_SOURCE_OTHER
&& myFilters[theSource - GL_DEBUG_SOURCE_API].Add (theId);
}
// =======================================================================
@ -982,9 +982,9 @@ Standard_Boolean OpenGl_Context::ExcludeMessage (const unsigned int theSource,
Standard_Boolean OpenGl_Context::IncludeMessage (const unsigned int theSource,
const unsigned int theId)
{
return theSource >= GL_DEBUG_SOURCE_API_ARB
&& theSource <= GL_DEBUG_SOURCE_OTHER_ARB
&& myFilters[theSource - GL_DEBUG_SOURCE_API_ARB].Remove (theId);
return theSource >= GL_DEBUG_SOURCE_API
&& theSource <= GL_DEBUG_SOURCE_OTHER
&& myFilters[theSource - GL_DEBUG_SOURCE_API].Remove (theId);
}
// =======================================================================
@ -1004,10 +1004,10 @@ void OpenGl_Context::checkWrongVersion (const Standard_Integer theGlVerMajor,
+ myGlVerMajor + "." + myGlVerMinor
+ " but does not export required functions for "
+ theGlVerMajor + "." + theGlVerMinor;
PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
}
@ -1033,7 +1033,7 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
{
// Buffer detailed info: Buffer object 1 (bound to GL_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW)
// will use VIDEO memory as the source for buffer object operations.
ExcludeMessage (GL_DEBUG_SOURCE_API_ARB, 131185);
ExcludeMessage (GL_DEBUG_SOURCE_API, 131185);
}
if (IsGlGreaterEqual (3, 0))
{
@ -1250,7 +1250,7 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
arbDbg->glDebugMessageCallbackARB (debugCallbackWrap, this);
if (caps->contextSyncDebug)
{
::glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
::glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
}
}
@ -2096,10 +2096,10 @@ void OpenGl_Context::init (const Standard_Boolean theIsCoreProfile)
+ "Error! OpenGL context reports version "
+ myGlVerMajor + "." + myGlVerMinor
+ " but reports wrong GLSL version";
PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
myGlVerMajor = 1;
myGlVerMinor = 5;

View File

@ -139,7 +139,7 @@ bool OpenGl_Font::createTexture (const Handle(OpenGl_Context)& theCtx)
aMsg += "x";
aMsg += aTextureSizeY;
aMsg += " for textured font has failed.";
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg);
return false;
}

View File

@ -167,10 +167,10 @@ Standard_Boolean OpenGl_FrameBuffer::Init (const Handle(OpenGl_Context)& theGlCo
{
TCollection_ExtendedString aMsg = TCollection_ExtendedString()
+ "Warning! Depth textures are not supported by hardware!";
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_PORTABILITY_ARB,
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_PORTABILITY,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
theGlContext->arbFBO->glGenRenderbuffers (1, &myGlDepthRBufferId);
@ -355,10 +355,10 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)&
else if (aColorType != GL_NONE)
{
TCollection_ExtendedString aMsg = "OpenGl_FrameBuffer::InitWrapper(), color attachment of unsupported type has been skipped!";
theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
}
@ -370,10 +370,10 @@ Standard_Boolean OpenGl_FrameBuffer::InitWrapper (const Handle(OpenGl_Context)&
else if (aDepthType != GL_NONE)
{
TCollection_ExtendedString aMsg = "OpenGl_FrameBuffer::InitWrapper(), depth attachment of unsupported type has been skipped!";
theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
theGlCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
}

View File

@ -121,28 +121,28 @@
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
// debug ARB extension
#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
#define GL_DEBUG_SOURCE_API_ARB 0x8246
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
#define GL_DEBUG_SOURCE_API 0x8246
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
#define GL_DEBUG_SOURCE_APPLICATION 0x824A
#define GL_DEBUG_SOURCE_OTHER 0x824B
#define GL_DEBUG_TYPE_ERROR 0x824C
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
#define GL_DEBUG_TYPE_PORTABILITY 0x824F
#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
#define GL_DEBUG_TYPE_OTHER 0x8251
#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
#define GL_DEBUG_LOGGED_MESSAGES 0x9145
#define GL_DEBUG_SEVERITY_HIGH 0x9146
#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
#define GL_DEBUG_SEVERITY_LOW 0x9148
// GL_EXT_texture_buffer for OpenGL ES 3.1+
#define GL_TEXTURE_BUFFER_ARB 0x8C2A

View File

@ -226,7 +226,7 @@ Standard_Boolean OpenGl_PrimitiveArray::initNormalVbo (const Handle(OpenGl_Conte
aMsg += "VBO creation for Primitive Array has failed for ";
aMsg += myAttribs->NbElements;
aMsg += " vertices. Out of memory?";
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PERFORMANCE_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PERFORMANCE, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
clearMemoryGL (theCtx);
return Standard_False;
@ -262,7 +262,7 @@ Standard_Boolean OpenGl_PrimitiveArray::initNormalVbo (const Handle(OpenGl_Conte
aMsg += "VBO creation for Primitive Array has failed for ";
aMsg += myIndices->NbElements;
aMsg += " indices. Out of memory?";
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PERFORMANCE_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PERFORMANCE, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
clearMemoryGL (theCtx);
return Standard_False;
}

View File

@ -1303,8 +1303,8 @@ Standard_Boolean OpenGl_ShaderManager::prepareStdProgramFlat (Handle(OpenGl_Shad
{
const TCollection_ExtendedString aWarnMessage =
"Warning: stipple lines in GLSL will be ignored.";
myContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aWarnMessage);
myContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, aWarnMessage);
}
}

View File

@ -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);
}
}

View File

@ -659,7 +659,7 @@ Handle(OpenGl_Font) OpenGl_Text::FindFont (const Handle(OpenGl_Context)& theCtx,
aMsg += "Font '";
aMsg += theAspect.FontName();
aMsg += "' - initialization of GL resources has failed!";
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg);
aFontFt.Nullify();
aFont->Release (theCtx.operator->());
aFont = new OpenGl_Font (aFontFt, theKey);
@ -672,7 +672,7 @@ Handle(OpenGl_Font) OpenGl_Text::FindFont (const Handle(OpenGl_Context)& theCtx,
aMsg += theAspect.FontName();
aMsg += "' is broken or has incompatible format! File path: ";
aMsg += aRequestedFont->FontPath()->ToCString();
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg);
aFontFt.Nullify();
aFont = new OpenGl_Font (aFontFt, theKey);
}
@ -683,7 +683,7 @@ Handle(OpenGl_Font) OpenGl_Text::FindFont (const Handle(OpenGl_Context)& theCtx,
aMsg += "Font '";
aMsg += theAspect.FontName();
aMsg += "' is not found in the system!";
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMsg);
aFont = new OpenGl_Font (aFontFt, theKey);
}

View File

@ -612,7 +612,7 @@ bool OpenGl_Texture::Init (const Handle(OpenGl_Context)& theCtx,
{
const TCollection_ExtendedString aWarnMessage ("Warning: generating mipmaps requires GL_ARB_framebuffer_object extension which is missing.");
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aWarnMessage);
theCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, aWarnMessage);
Unbind (theCtx);
Release (theCtx.operator->());

View File

@ -379,8 +379,8 @@ OpenGl_RaytraceMaterial OpenGl_View::convertMaterial (const OpenGl_AspectFace*
"Warning: texturing in Ray-Trace requires GL_ARB_bindless_texture extension which is missing. "
"Please try to update graphics card driver. At the moment textures will be ignored.";
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aWarnMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_HIGH, aWarnMessage);
myIsRaytraceWarnTextures = Standard_True;
}
@ -1085,8 +1085,8 @@ TCollection_AsciiString OpenGl_View::generateShaderPrefix (const Handle(OpenGl_C
Standard_Boolean OpenGl_View::safeFailBack (const TCollection_ExtendedString& theMessage,
const Handle(OpenGl_Context)& theGlContext)
{
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, theMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, theMessage);
myRaytraceInitStatus = OpenGl_RT_FAIL;
@ -1110,8 +1110,8 @@ Handle(OpenGl_ShaderObject) OpenGl_View::initShader (const GLenum
const TCollection_ExtendedString aMessage = TCollection_ExtendedString ("Error: Failed to create ") +
(theType == GL_VERTEX_SHADER ? "vertex" : "fragment") + " shader object";
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMessage);
aShader->Release (theGlContext.operator->());
@ -1123,8 +1123,8 @@ Handle(OpenGl_ShaderObject) OpenGl_View::initShader (const GLenum
const TCollection_ExtendedString aMessage = TCollection_ExtendedString ("Error: Failed to set ") +
(theType == GL_VERTEX_SHADER ? "vertex" : "fragment") + " shader source";
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMessage);
aShader->Release (theGlContext.operator->());
@ -1140,8 +1140,8 @@ Handle(OpenGl_ShaderObject) OpenGl_View::initShader (const GLenum
const TCollection_ExtendedString aMessage = TCollection_ExtendedString ("Error: Failed to compile ") +
(theType == GL_VERTEX_SHADER ? "vertex" : "fragment") + " shader object:\n" + aBuildLog;
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMessage);
aShader->Release (theGlContext.operator->());
@ -1156,8 +1156,8 @@ Handle(OpenGl_ShaderObject) OpenGl_View::initShader (const GLenum
const TCollection_ExtendedString aMessage = TCollection_ExtendedString (theType == GL_VERTEX_SHADER ?
"Vertex" : "Fragment") + " shader was compiled with following warnings:\n" + aBuildLog;
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_LOW, aMessage);
}
}
@ -1178,8 +1178,8 @@ Handle(OpenGl_ShaderProgram) OpenGl_View::initProgram (const Handle(OpenGl_Conte
{
theVertShader->Release (theGlContext.operator->());
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, "Failed to create shader program");
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "Failed to create shader program");
return Handle(OpenGl_ShaderProgram)();
}
@ -1189,8 +1189,8 @@ Handle(OpenGl_ShaderProgram) OpenGl_View::initProgram (const Handle(OpenGl_Conte
{
theVertShader->Release (theGlContext.operator->());
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, "Failed to attach shader objects");
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, "Failed to attach shader objects");
return Handle(OpenGl_ShaderProgram)();
}
@ -1206,8 +1206,8 @@ Handle(OpenGl_ShaderProgram) OpenGl_View::initProgram (const Handle(OpenGl_Conte
const TCollection_ExtendedString aMessage = TCollection_ExtendedString (
"Failed to link shader program:\n") + aLinkLog;
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB, 0, GL_DEBUG_SEVERITY_HIGH_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR, 0, GL_DEBUG_SEVERITY_HIGH, aMessage);
return Handle(OpenGl_ShaderProgram)();
}
@ -1219,8 +1219,8 @@ Handle(OpenGl_ShaderProgram) OpenGl_View::initProgram (const Handle(OpenGl_Conte
const TCollection_ExtendedString aMessage = TCollection_ExtendedString (
"Shader program was linked with following warnings:\n") + aLinkLog;
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMessage);
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_LOW, aMessage);
}
}
@ -2569,8 +2569,8 @@ Standard_Boolean OpenGl_View::raytrace (const Standard_Integer theSizeX,
if (!myRaytraceGeometry.AcquireTextures (theGlContext))
{
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB,
0, GL_DEBUG_SEVERITY_MEDIUM_ARB, "Error: Failed to acquire OpenGL image textures");
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR,
0, GL_DEBUG_SEVERITY_MEDIUM, "Error: Failed to acquire OpenGL image textures");
}
Standard_Boolean aResult = runRaytraceShaders (theSizeX,
@ -2584,14 +2584,14 @@ Standard_Boolean OpenGl_View::raytrace (const Standard_Integer theSizeX,
if (!aResult)
{
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB,
0, GL_DEBUG_SEVERITY_MEDIUM_ARB, "Error: Failed to execute ray-tracing shaders");
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR,
0, GL_DEBUG_SEVERITY_MEDIUM, "Error: Failed to execute ray-tracing shaders");
}
if (!myRaytraceGeometry.ReleaseTextures (theGlContext))
{
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_ERROR_ARB,
0, GL_DEBUG_SEVERITY_MEDIUM_ARB, "Error: Failed to release OpenGL image textures");
theGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_ERROR,
0, GL_DEBUG_SEVERITY_MEDIUM, "Error: Failed to release OpenGL image textures");
}
myRaytraceScreenQuad.UnbindVertexAttrib (theGlContext, Graphic3d_TOA_POS);

View File

@ -1553,10 +1553,10 @@ bool OpenGl_View::blitBuffers (OpenGl_FrameBuffer* theReadFbo,
{
TCollection_ExtendedString aMsg = TCollection_ExtendedString()
+ "Error! FBO blitting has failed";
aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
myHasFboBlit = Standard_False;
theReadFbo->Release (aCtx.operator->());
@ -1741,10 +1741,10 @@ void OpenGl_View::drawStereoPair (OpenGl_FrameBuffer* theDrawFbo)
{
TCollection_ExtendedString aMsg = TCollection_ExtendedString()
+ "Error! Anaglyph has failed";
aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_ERROR_ARB,
aCtx->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_ERROR,
0,
GL_DEBUG_SEVERITY_HIGH_ARB,
GL_DEBUG_SEVERITY_HIGH,
aMsg);
}
}

View File

@ -244,9 +244,9 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
TCollection_ExtendedString aMsg ("OpenGl_Window::CreateWindow: "
"ChoosePixelFormat is unable to find stereo supported pixel format. "
"Choosing similar non stereo format.");
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_OTHER_ARB,
0, GL_DEBUG_SEVERITY_HIGH_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_OTHER,
0, GL_DEBUG_SEVERITY_HIGH, aMsg);
aPixelFrmt.dwFlags &= ~PFD_STEREO;
aPixelFrmtId = ChoosePixelFormat (aWindowDC, &aPixelFrmt);
@ -411,7 +411,7 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
&& !theCaps->contextCompatible)
{
TCollection_ExtendedString aMsg("OpenGl_Window::CreateWindow: core profile creation failed.");
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
}
}
@ -546,7 +546,7 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
&& !theCaps->contextCompatible)
{
TCollection_ExtendedString aMsg("OpenGl_Window::CreateWindow: core profile creation failed.");
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
}
}
XSetErrorHandler(anOldHandler);
@ -587,9 +587,9 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
if (!aList.IsEmpty())
{
TCollection_ExtendedString aMsg = TCollection_ExtendedString ("OpenGl_Window::CreateWindow: window Visual is incomplete: ") + aList;
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB,
GL_DEBUG_TYPE_OTHER_ARB,
0, GL_DEBUG_SEVERITY_MEDIUM_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION,
GL_DEBUG_TYPE_OTHER,
0, GL_DEBUG_SEVERITY_MEDIUM, aMsg);
}
myGlContext->Init ((Aspect_Drawable )aWindow, (Aspect_Display )aDisp, (Aspect_RenderingContext )aGContext, isCoreProfile);

View File

@ -192,13 +192,13 @@ OpenGl_Window::OpenGl_Window (const Handle(OpenGl_GraphicDriver)& theDriver,
&& theCaps->contextStereo)
{
TCollection_ExtendedString aMsg("OpenGl_Window::CreateWindow: QuadBuffer is unavailable!");
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_OTHER_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_OTHER, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
}
if (aTryCore == 0
&& !theCaps->contextCompatible)
{
TCollection_ExtendedString aMsg("OpenGl_Window::CreateWindow: core profile creation failed.");
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION_ARB, GL_DEBUG_TYPE_PORTABILITY_ARB, 0, GL_DEBUG_SEVERITY_LOW_ARB, aMsg);
myGlContext->PushMessage (GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_TYPE_PORTABILITY, 0, GL_DEBUG_SEVERITY_LOW, aMsg);
}
NSView* aView = (NSView* )myPlatformWindow->NativeHandle();