mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Call context GetProcAddress directly
This commit is contained in:
parent
fb418b26d7
commit
ac09592355
@ -372,9 +372,9 @@ GLFWbool _glfwRefreshContextAttribs(const _GLFWctxconfig* ctxconfig)
|
|||||||
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
|
_GLFWwindow* window = _glfwPlatformGetCurrentContext();
|
||||||
|
|
||||||
window->context.GetIntegerv = (PFNGLGETINTEGERVPROC)
|
window->context.GetIntegerv = (PFNGLGETINTEGERVPROC)
|
||||||
glfwGetProcAddress("glGetIntegerv");
|
window->context.getProcAddress("glGetIntegerv");
|
||||||
window->context.GetString = (PFNGLGETSTRINGPROC)
|
window->context.GetString = (PFNGLGETSTRINGPROC)
|
||||||
glfwGetProcAddress("glGetString");
|
window->context.getProcAddress("glGetString");
|
||||||
if (!window->context.GetIntegerv || !window->context.GetString)
|
if (!window->context.GetIntegerv || !window->context.GetString)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR, "Entry point retrieval is broken");
|
_glfwInputError(GLFW_PLATFORM_ERROR, "Entry point retrieval is broken");
|
||||||
@ -416,7 +416,7 @@ GLFWbool _glfwRefreshContextAttribs(const _GLFWctxconfig* ctxconfig)
|
|||||||
// users as early as possible that their build may be broken
|
// users as early as possible that their build may be broken
|
||||||
|
|
||||||
window->context.GetStringi = (PFNGLGETSTRINGIPROC)
|
window->context.GetStringi = (PFNGLGETSTRINGIPROC)
|
||||||
glfwGetProcAddress("glGetStringi");
|
window->context.getProcAddress("glGetStringi");
|
||||||
if (!window->context.GetStringi)
|
if (!window->context.GetStringi)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
@ -521,7 +521,8 @@ GLFWbool _glfwRefreshContextAttribs(const _GLFWctxconfig* ctxconfig)
|
|||||||
// Clearing the front buffer to black to avoid garbage pixels left over from
|
// Clearing the front buffer to black to avoid garbage pixels left over from
|
||||||
// previous uses of our bit of VRAM
|
// previous uses of our bit of VRAM
|
||||||
{
|
{
|
||||||
PFNGLCLEARPROC glClear = (PFNGLCLEARPROC) glfwGetProcAddress("glClear");
|
PFNGLCLEARPROC glClear = (PFNGLCLEARPROC)
|
||||||
|
window->context.getProcAddress("glClear");
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
window->context.swapBuffers(window);
|
window->context.swapBuffers(window);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user