Drop _ARB prefix from GL_DEBUG_ enumeration.
{
// 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);
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;
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;
}
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;
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
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);
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);
}
// =======================================================================
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);
}
// =======================================================================
+ 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);
}
{
// 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))
{
arbDbg->glDebugMessageCallbackARB (debugCallbackWrap, this);
if (caps->contextSyncDebug)
{
- ::glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
+ ::glEnable (GL_DEBUG_OUTPUT_SYNCHRONOUS);
}
}
}
+ "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;
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;
}
{
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);
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);
}
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);
}
#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
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;
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;
}
{
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);
}
}
|| !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;
}
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;
}
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;
}
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;
{
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;
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);
}
}
{
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;
}
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);
}
}
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);
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);
}
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);
}
{
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->());
"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;
}
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;
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->());
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->());
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->());
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);
}
}
{
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)();
}
{
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)();
}
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)();
}
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);
}
}
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,
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);
{
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->());
{
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);
}
}
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);
&& !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);
}
}
&& !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);
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);
&& 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();