Updated native API and merged into related files.

This commit is contained in:
Camilla Berglund
2013-01-15 22:38:14 +01:00
parent 8d60214fac
commit cc45a9e53d
13 changed files with 251 additions and 279 deletions
+55
View File
@@ -434,3 +434,58 @@ GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
return eglGetProcAddress(procname);
}
//////////////////////////////////////////////////////////////////////////
////// GLFW native API //////
//////////////////////////////////////////////////////////////////////////
//========================================================================
// Return the EGL display
//========================================================================
GLFWAPI EGLDisplay glfwGetEGLDisplay(void)
{
if (!_glfwInitialized)
{
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return NULL;
}
return _glfw.egl.display;
}
//========================================================================
// Return the WGL context of the specified window
//========================================================================
GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
if (!_glfwInitialized)
{
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return 0;
}
return window->egl.context;
}
//========================================================================
// Return the EGL surface of the specified window
//========================================================================
GLFWAPI EGLSurface glfwGetEGLSurface(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
if (!_glfwInitialized)
{
_glfwInputError(GLFW_NOT_INITIALIZED, NULL);
return 0;
}
return window->egl.surface;
}