Removed glfwCopyContext to map better against EGL.

This commit is contained in:
Camilla Berglund
2012-11-22 20:16:48 +01:00
parent 06e7a96c61
commit 2a166c5086
8 changed files with 5 additions and 77 deletions

View File

@@ -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];
}

View File

@@ -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);
//========================================================================

View File

@@ -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);
}

View File

@@ -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");
}
}

View File

@@ -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);
}