From c8e068712b3b935ab7f41397c613fca103960b36 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 27 Aug 2015 21:40:22 +0200 Subject: [PATCH] Fix glfwGetProcAddress documentation --- docs/context.dox | 9 +++------ include/GLFW/glfw3.h | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/docs/context.dox b/docs/context.dox index eaa754b8..30befd8f 100644 --- a/docs/context.dox +++ b/docs/context.dox @@ -307,12 +307,9 @@ void load_extensions(void) { if (glfwExtensionSupported("GL_ARB_debug_output")) { - pfnGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGARBPROC) glfwGetProcAddress("glGetDebugMessageLogARB"); - if (pfnGetDebugMessageLog) - { - // Both the extension name and the function pointer are present - has_ARB_debug_output = 1; - } + pfnGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGARBPROC) + glfwGetProcAddress("glGetDebugMessageLogARB"); + has_ARB_debug_output = 1; } } diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index ac963820..860f1128 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3304,15 +3304,15 @@ GLFWAPI int glfwExtensionSupported(const char* extension); * without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error. * * @param[in] procname The ASCII encoded name of the function. - * @return The address of the function, or `NULL` if the function is - * unavailable or an [error](@ref error_handling) occurred. + * @return The address of the function, or `NULL` if an [error](@ref + * error_handling) occurred. * * @remarks The addresses of a given function is not guaranteed to be the same * between contexts. * * @remarks This function may return a non-`NULL` address despite the * associated version or extension not being available. Always check the - * context version or extension string presence first. + * context version or extension string first. * * @par Pointer Lifetime * The returned function pointer is valid until the context is destroyed or the