Add suffixes to platform specific helper functions

Also merge win32_tls.h into win32_platform.h.
This commit is contained in:
Camilla Berglund
2015-12-03 18:16:46 +01:00
parent 0a3b5952e0
commit 12b6c56903
42 changed files with 375 additions and 358 deletions
+10 -15
View File
@@ -176,7 +176,7 @@ static GLFWbool chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
// Initialize EGL
//
int _glfwInitContextAPI(void)
int _glfwInitEGL(void)
{
int i;
const char* sonames[] =
@@ -192,9 +192,6 @@ int _glfwInitContextAPI(void)
NULL
};
if (!_glfwCreateContextTLS())
return GLFW_FALSE;
for (i = 0; sonames[i]; i++)
{
_glfw.egl.handle = _glfw_dlopen(sonames[i]);
@@ -268,7 +265,7 @@ int _glfwInitContextAPI(void)
// Terminate EGL
//
void _glfwTerminateContextAPI(void)
void _glfwTerminateEGL(void)
{
if (_glfw.egl.handle)
{
@@ -276,8 +273,6 @@ void _glfwTerminateContextAPI(void)
_glfw_dlclose(_glfw.egl.handle);
_glfw.egl.handle = NULL;
}
_glfwDestroyContextTLS();
}
#define setEGLattrib(attribName, attribValue) \
@@ -289,9 +284,9 @@ void _glfwTerminateContextAPI(void)
// Create the OpenGL or OpenGL ES context
//
int _glfwCreateContext(_GLFWwindow* window,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig)
int _glfwCreateContextEGL(_GLFWwindow* window,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig)
{
int attribs[40];
EGLConfig config;
@@ -492,7 +487,7 @@ int _glfwCreateContext(_GLFWwindow* window,
// Destroy the OpenGL context
//
void _glfwDestroyContext(_GLFWwindow* window)
void _glfwDestroyContextEGL(_GLFWwindow* window)
{
#if defined(_GLFW_X11)
// NOTE: Do not unload libGL.so.1 while the X11 display is still open,
@@ -523,9 +518,9 @@ void _glfwDestroyContext(_GLFWwindow* window)
// Returns the Visual and depth of the chosen EGLConfig
//
#if defined(_GLFW_X11)
GLFWbool _glfwChooseVisual(const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig,
Visual** visual, int* depth)
GLFWbool _glfwChooseVisualEGL(const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig,
Visual** visual, int* depth)
{
XVisualInfo* result;
XVisualInfo desired;
@@ -584,7 +579,7 @@ void _glfwPlatformMakeContextCurrent(_GLFWwindow* window)
EGL_NO_CONTEXT);
}
_glfwSetContextTLS(window);
_glfwPlatformSetCurrentContext(window);
}
void _glfwPlatformSwapBuffers(_GLFWwindow* window)