mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 08:23:13 +00:00
Replace GL booleans with public macros
This commit is contained in:
+20
-20
@@ -84,9 +84,9 @@ static int getConfigAttrib(EGLConfig config, int attrib)
|
||||
|
||||
// Return a list of available and usable framebuffer configs
|
||||
//
|
||||
static GLboolean chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* desired,
|
||||
EGLConfig* result)
|
||||
static GLFWbool chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* desired,
|
||||
EGLConfig* result)
|
||||
{
|
||||
EGLConfig* nativeConfigs;
|
||||
_GLFWfbconfig* usableConfigs;
|
||||
@@ -97,7 +97,7 @@ static GLboolean chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||
if (!nativeCount)
|
||||
{
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: No EGLConfigs returned");
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
nativeConfigs = calloc(nativeCount, sizeof(EGLConfig));
|
||||
@@ -154,7 +154,7 @@ static GLboolean chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||
u->stencilBits = getConfigAttrib(n, EGL_STENCIL_SIZE);
|
||||
|
||||
u->samples = getConfigAttrib(n, EGL_SAMPLES);
|
||||
u->doublebuffer = GL_TRUE;
|
||||
u->doublebuffer = GLFW_TRUE;
|
||||
|
||||
u->egl = n;
|
||||
usableCount++;
|
||||
@@ -167,7 +167,7 @@ static GLboolean chooseFBConfigs(const _GLFWctxconfig* ctxconfig,
|
||||
free(nativeConfigs);
|
||||
free(usableConfigs);
|
||||
|
||||
return closest ? GL_TRUE : GL_FALSE;
|
||||
return closest ? GLFW_TRUE : GLFW_FALSE;
|
||||
}
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ int _glfwInitContextAPI(void)
|
||||
};
|
||||
|
||||
if (!_glfwCreateContextTLS())
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
|
||||
for (i = 0; sonames[i]; i++)
|
||||
{
|
||||
@@ -206,7 +206,7 @@ int _glfwInitContextAPI(void)
|
||||
if (!_glfw.egl.handle)
|
||||
{
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Failed to load EGL");
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
_glfw.egl.GetConfigAttrib =
|
||||
@@ -249,7 +249,7 @@ int _glfwInitContextAPI(void)
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||
"EGL: Failed to get EGL display: %s",
|
||||
getErrorString(_glfw_eglGetError()));
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
if (!_glfw_eglInitialize(_glfw.egl.display,
|
||||
@@ -259,13 +259,13 @@ int _glfwInitContextAPI(void)
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||
"EGL: Failed to initialize EGL: %s",
|
||||
getErrorString(_glfw_eglGetError()));
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
_glfw.egl.KHR_create_context =
|
||||
_glfwPlatformExtensionSupported("EGL_KHR_create_context");
|
||||
|
||||
return GL_TRUE;
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
// Terminate EGL
|
||||
@@ -308,7 +308,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
{
|
||||
_glfwInputError(GLFW_FORMAT_UNAVAILABLE,
|
||||
"EGL: Failed to find a suitable EGLConfig");
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
#if defined(_GLFW_X11)
|
||||
@@ -355,7 +355,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
{
|
||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||
"EGL: Failed to retrieve visual for EGLConfig");
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
#endif // _GLFW_X11
|
||||
@@ -367,7 +367,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||
"EGL: Failed to bind OpenGL ES: %s",
|
||||
getErrorString(_glfw_eglGetError()));
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -377,7 +377,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||
"EGL: Failed to bind OpenGL: %s",
|
||||
getErrorString(_glfw_eglGetError()));
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,7 +450,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
_glfwInputError(GLFW_VERSION_UNAVAILABLE,
|
||||
"EGL: Failed to create context: %s",
|
||||
getErrorString(_glfw_eglGetError()));
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
window->egl.config = config;
|
||||
@@ -515,11 +515,11 @@ int _glfwCreateContext(_GLFWwindow* window,
|
||||
{
|
||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||
"EGL: Failed to load client library");
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return GL_TRUE;
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
#undef setEGLattrib
|
||||
@@ -632,10 +632,10 @@ int _glfwPlatformExtensionSupported(const char* extension)
|
||||
if (extensions)
|
||||
{
|
||||
if (_glfwStringInExtensionString(extension, extensions))
|
||||
return GL_TRUE;
|
||||
return GLFW_TRUE;
|
||||
}
|
||||
|
||||
return GL_FALSE;
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
GLFWglproc _glfwPlatformGetProcAddress(const char* procname)
|
||||
|
||||
Reference in New Issue
Block a user