mirror of
https://github.com/glfw/glfw.git
synced 2026-08-29 03:04:14 +02:00
Removed glfwCopyContext to map better against EGL.
This commit is contained in:
@@ -147,13 +147,3 @@ GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
|
||||
return symbol;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Copies the specified OpenGL state categories from src to dst
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long mask)
|
||||
{
|
||||
[dst->NSGL.context copyAttributesFromContext:src->NSGL.context withMask:mask];
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,6 @@ void _glfwPlatformSwapInterval(int interval);
|
||||
void _glfwPlatformRefreshWindowParams(_GLFWwindow* window);
|
||||
int _glfwPlatformExtensionSupported(const char* extension);
|
||||
GLFWglproc _glfwPlatformGetProcAddress(const char* procname);
|
||||
void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long mask);
|
||||
|
||||
|
||||
//========================================================================
|
||||
|
||||
29
src/opengl.c
29
src/opengl.c
@@ -682,32 +682,3 @@ GLFWAPI GLFWglproc glfwGetProcAddress(const char* procname)
|
||||
return _glfwPlatformGetProcAddress(procname);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Copies the specified OpenGL state categories from src to dst
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI void glfwCopyContext(GLFWwindow hsrc, GLFWwindow hdst, unsigned long mask)
|
||||
{
|
||||
_GLFWwindow* src;
|
||||
_GLFWwindow* dst;
|
||||
|
||||
if (!_glfwInitialized)
|
||||
{
|
||||
_glfwSetError(GLFW_NOT_INITIALIZED, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
src = (_GLFWwindow*) hsrc;
|
||||
dst = (_GLFWwindow*) hdst;
|
||||
|
||||
if (_glfwPlatformGetCurrentContext() == dst)
|
||||
{
|
||||
_glfwSetError(GLFW_INVALID_VALUE,
|
||||
"glfwCopyContext: Cannot copy OpenGL state to a current context");
|
||||
return;
|
||||
}
|
||||
|
||||
_glfwPlatformCopyContext(src, dst, mask);
|
||||
}
|
||||
|
||||
|
||||
@@ -637,17 +637,3 @@ GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
|
||||
return (GLFWglproc) wglGetProcAddress(procname);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Copies the specified OpenGL state categories from src to dst
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long mask)
|
||||
{
|
||||
if (!wglCopyContext(src->WGL.context, dst->WGL.context, mask))
|
||||
{
|
||||
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||
"WGL: Failed to copy OpenGL context attributes");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -732,16 +732,3 @@ GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
|
||||
return _glfw_glXGetProcAddress((const GLubyte*) procname);
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Copies the specified OpenGL state categories from src to dst
|
||||
//========================================================================
|
||||
|
||||
void _glfwPlatformCopyContext(_GLFWwindow* src, _GLFWwindow* dst, unsigned long mask)
|
||||
{
|
||||
glXCopyContext(_glfwLibrary.X11.display,
|
||||
src->GLX.context,
|
||||
dst->GLX.context,
|
||||
mask);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user