mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 21:56:36 +00:00
Merge c6ec66ed9e
into d2d57c70e2
This commit is contained in:
commit
cd62cb5f61
@ -30,7 +30,8 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
// Return a description of the specified EGL error
|
// Return a description of the specified EGL error
|
||||||
//
|
//
|
||||||
@ -564,21 +565,34 @@ GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig,
|
|||||||
|
|
||||||
void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
|
void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
int tid = syscall(SYS_gettid);
|
||||||
|
EGLBoolean ok = 1;
|
||||||
|
|
||||||
if (window)
|
if (window)
|
||||||
{
|
{
|
||||||
eglMakeCurrent(_glfw.egl.display,
|
printf("----> [glfw]_glfwPlatformMakeContextCurrent With window called (TID: %d).\n", tid);
|
||||||
|
ok = eglMakeCurrent(_glfw.egl.display,
|
||||||
window->context.egl.surface,
|
window->context.egl.surface,
|
||||||
window->context.egl.surface,
|
window->context.egl.surface,
|
||||||
window->context.egl.handle);
|
window->context.egl.handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
eglMakeCurrent(_glfw.egl.display,
|
printf("----> [glfw]_glfwPlatformMakeContextCurrent empty (TID: %d).\n", tid);
|
||||||
|
ok = eglMakeCurrent(_glfw.egl.display,
|
||||||
EGL_NO_SURFACE,
|
EGL_NO_SURFACE,
|
||||||
EGL_NO_SURFACE,
|
EGL_NO_SURFACE,
|
||||||
EGL_NO_CONTEXT);
|
EGL_NO_CONTEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(ok == 0) {
|
||||||
|
printf("----> [glfw] _glfwPlatformMakeContextCurrent failed.\n");
|
||||||
|
int errCode = eglGetError();
|
||||||
|
printf("----> [glfw] Error Code: %0x\n", errCode);
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
_glfwPlatformSetCurrentContext(window);
|
_glfwPlatformSetCurrentContext(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user