Go to the documentation of this file.
64 "Invalid context creation API 0x%08X",
74 "Invalid client API 0x%08X",
81 if ((ctxconfig->
major < 1 || ctxconfig->
minor < 0) ||
82 (ctxconfig->
major == 1 && ctxconfig->
minor > 5) ||
83 (ctxconfig->
major == 2 && ctxconfig->
minor > 1) ||
84 (ctxconfig->
major == 3 && ctxconfig->
minor > 3))
93 "Invalid OpenGL version %i.%i",
104 "Invalid OpenGL profile 0x%08X",
109 if (ctxconfig->
major <= 2 ||
110 (ctxconfig->
major == 3 && ctxconfig->
minor < 2))
116 "Context profiles are only defined for OpenGL version 3.2 and above");
125 "Forward-compatibility is only defined for OpenGL version 3.0 and above");
131 if (ctxconfig->
major < 1 || ctxconfig->
minor < 0 ||
132 (ctxconfig->
major == 1 && ctxconfig->
minor > 1) ||
133 (ctxconfig->
major == 2 && ctxconfig->
minor > 0))
141 "Invalid OpenGL ES version %i.%i",
153 "Invalid context robustness mode 0x%08X",
165 "Invalid context release behavior 0x%08X",
181 unsigned int missing, leastMissing = UINT_MAX;
182 unsigned int colorDiff, leastColorDiff = UINT_MAX;
183 unsigned int extraDiff, leastExtraDiff = UINT_MAX;
189 current = alternatives +
i;
312 if (desired->
sRGB && !current->
sRGB)
320 if (missing < leastMissing)
322 else if (missing == leastMissing)
324 if ((colorDiff < leastColorDiff) ||
325 (colorDiff == leastColorDiff && extraDiff < leastExtraDiff))
331 if (current == closest)
333 leastMissing = missing;
334 leastColorDiff = colorDiff;
335 leastExtraDiff = extraDiff;
350 const char* prefixes[] =
365 window->context.getProcAddress(
"glGetIntegerv");
367 window->context.getProcAddress(
"glGetString");
368 if (!
window->context.GetIntegerv || !
window->context.GetString)
381 "OpenGL version string retrieval is broken");
386 "OpenGL ES version string retrieval is broken");
393 for (
i = 0; prefixes[
i];
i++)
395 const size_t length = strlen(prefixes[
i]);
405 if (!sscanf(
version,
"%d.%d.%d",
408 &
window->context.revision))
413 "No version found in OpenGL version string");
418 "No version found in OpenGL ES version string");
439 "Requested OpenGL version %i.%i, got version %i.%i",
446 "Requested OpenGL ES version %i.%i, got version %i.%i",
455 if (
window->context.major >= 3)
462 window->context.getProcAddress(
"glGetStringi");
463 if (!
window->context.GetStringi)
466 "Entry point retrieval is broken");
475 if (
window->context.major >= 3)
499 if (
window->context.major >= 4 ||
500 (
window->context.major == 3 &&
window->context.minor >= 2))
569 window->context.getProcAddress(
"glClear");
582 const char*
start = extensions;
587 const char* terminator;
589 where = strstr(
start,
string);
593 terminator = where + strlen(
string);
594 if (where ==
start || *(where - 1) ==
' ')
596 if (*terminator ==
' ' || *terminator ==
'\0')
621 "Cannot make current with a window that has no OpenGL or OpenGL ES context");
651 "Cannot swap buffers of a window that has no OpenGL or OpenGL ES context");
668 "Cannot set swap interval without a current OpenGL or OpenGL ES context");
672 window->context.swapInterval(interval);
686 "Cannot query extension without a current OpenGL or OpenGL ES context");
690 if (*extension ==
'\0')
696 if (
window->context.major >= 3)
707 const char* en = (
const char*)
712 "Extension string retrieval is broken");
716 if (strcmp(en, extension) == 0)
724 const char* extensions = (
const char*)
729 "Extension string retrieval is broken");
738 return window->context.extensionSupported(extension);
752 "Cannot query entry point without a current OpenGL or OpenGL ES context");
756 return window->context.getProcAddress(procname);
GLenum GLuint GLenum GLsizei length
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
#define GL_COLOR_BUFFER_BIT
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *handle)
Makes the context of the specified window current for the calling thread.
_GLFWmakecontextcurrentfun makeCurrent
#define GLFW_RELEASE_BEHAVIOR_NONE
#define GL_RESET_NOTIFICATION_STRATEGY_ARB
#define GLFW_INVALID_VALUE
One of the arguments to the function was an invalid value.
static GLFWwindow * window
#define GL_CONTEXT_FLAG_DEBUG_BIT
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT
void(APIENTRY * PFNGLCLEARPROC)(GLbitfield)
void _glfwInputError(int code, const char *format,...)
#define GLFW_VERSION_UNAVAILABLE
The requested OpenGL or OpenGL ES version is not available.
#define GLFW_LOSE_CONTEXT_ON_RESET
#define GLFW_NO_WINDOW_CONTEXT
The specified window does not have an OpenGL or OpenGL ES context.
GLFWbool _glfwIsValidContextConfig(const _GLFWctxconfig *ctxconfig)
void(APIENTRY * PFNGLGETINTEGERVPROC)(GLenum, GLint *)
GLFWAPI void glfwSwapBuffers(GLFWwindow *handle)
Swaps the front and back buffers of the specified window.
GLFWAPI int glfwExtensionSupported(const char *extension)
Returns whether the specified extension is available.
GLFWbool _glfwRefreshContextAttribs(_GLFWwindow *window, const _GLFWctxconfig *ctxconfig)
#define GLFW_OPENGL_COMPAT_PROFILE
#define GLFW_EGL_CONTEXT_API
const typedef GLubyte *APIENTRYP PFNGLGETSTRINGIPROC(GLenum name, GLuint index)
#define GLFW_NO_RESET_NOTIFICATION
#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR
void * _glfwPlatformGetTls(_GLFWtls *tls)
GLFWAPI GLFWwindow * glfwGetCurrentContext(void)
Returns the window whose context is current on the calling thread.
struct GLFWwindow GLFWwindow
#define _GLFW_REQUIRE_INIT_OR_RETURN(x)
const _GLFWfbconfig * _glfwChooseFBConfig(const _GLFWfbconfig *desired, const _GLFWfbconfig *alternatives, unsigned int count)
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
#define GLFW_OPENGL_ES_API
#define _GLFW_REQUIRE_INIT()
GLFWbool _glfwStringInExtensionString(const char *string, const char *extensions)
#define GL_LOSE_CONTEXT_ON_RESET_ARB
const typedef GLubyte *APIENTRYP PFNGLGETSTRINGPROC(GLenum name)
#define GL_NO_RESET_NOTIFICATION_ARB
#define assert(condition)
#define GLFW_PLATFORM_ERROR
A platform-specific error occurred that does not match any of the more specific categories.
#define GLFW_NATIVE_CONTEXT_API
#define GL_CONTEXT_RELEASE_BEHAVIOR
#define GL_CONTEXT_CORE_PROFILE_BIT
#define GLFW_INVALID_ENUM
One of the arguments to the function was an invalid enum value.
#define GLFW_OSMESA_CONTEXT_API
#define GL_NUM_EXTENSIONS
#define GL_CONTEXT_PROFILE_MASK
#define GLFW_NO_CURRENT_CONTEXT
No context is current for this thread.
#define GLFW_RELEASE_BEHAVIOR_FLUSH
#define GLFW_OPENGL_CORE_PROFILE
librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01