Commit b72a97d5 authored by Camilla Berglund's avatar Camilla Berglund
Browse files

Renamed global struct and substructs.

Renamed _glfwLibrary to _glfw and made all substructs lower-case, making
global variable names easier to read and type.  Partially inspired by the
internal naming conventions of glwt.
parent 45459d5a
......@@ -74,9 +74,9 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
return NULL;
}
free(_glfwLibrary.NS.clipboardString);
_glfwLibrary.NS.clipboardString = strdup([object UTF8String]);
free(_glfw.ns.clipboardString);
_glfw.ns.clipboardString = strdup([object UTF8String]);
return _glfwLibrary.NS.clipboardString;
return _glfw.ns.clipboardString;
}
......@@ -52,7 +52,7 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
if (_glfw.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
return;
CGGetDisplayTransferByTable(CGMainDisplayID(), GLFW_GAMMA_RAMP_SIZE, red, green, blue,
......@@ -80,7 +80,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
if (_glfw.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
return;
// Convert to float & take the difference of the original gamma and
......
......@@ -79,11 +79,11 @@ static void changeToResourcesDirectory(void)
int _glfwPlatformInit(void)
{
_glfwLibrary.NS.autoreleasePool = [[NSAutoreleasePool alloc] init];
_glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init];
_glfwLibrary.NSGL.framework =
_glfw.nsgl.framework =
CFBundleGetBundleWithIdentifier(CFSTR("com.apple.opengl"));
if (_glfwLibrary.NSGL.framework == NULL)
if (_glfw.nsgl.framework == NULL)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"NSGL: Failed to locate OpenGL framework");
......@@ -93,9 +93,9 @@ int _glfwPlatformInit(void)
changeToResourcesDirectory();
// Save the original gamma ramp
_glfwLibrary.originalRampSize = CGDisplayGammaTableCapacity(CGMainDisplayID());
_glfwPlatformGetGammaRamp(&_glfwLibrary.originalRamp);
_glfwLibrary.currentRamp = _glfwLibrary.originalRamp;
_glfw.originalRampSize = CGDisplayGammaTableCapacity(CGMainDisplayID());
_glfwPlatformGetGammaRamp(&_glfw.originalRamp);
_glfw.currentRamp = _glfw.originalRamp;
_glfwInitTimer();
......@@ -104,12 +104,11 @@ int _glfwPlatformInit(void)
if (!_glfwInitOpenGL())
return GL_FALSE;
_glfwLibrary.NS.eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
if (!_glfwLibrary.NS.eventSource)
_glfw.ns.eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState);
if (!_glfw.ns.eventSource)
return GL_FALSE;
CGEventSourceSetLocalEventsSuppressionInterval(_glfwLibrary.NS.eventSource,
0.0);
CGEventSourceSetLocalEventsSuppressionInterval(_glfw.ns.eventSource, 0.0);
return GL_TRUE;
}
......@@ -123,22 +122,22 @@ void _glfwPlatformTerminate(void)
{
// TODO: Probably other cleanup
if (_glfwLibrary.NS.eventSource)
if (_glfw.ns.eventSource)
{
CFRelease(_glfwLibrary.NS.eventSource);
_glfwLibrary.NS.eventSource = NULL;
CFRelease(_glfw.ns.eventSource);
_glfw.ns.eventSource = NULL;
}
// Restore the original gamma ramp
if (_glfwLibrary.rampChanged)
_glfwPlatformSetGammaRamp(&_glfwLibrary.originalRamp);
if (_glfw.rampChanged)
_glfwPlatformSetGammaRamp(&_glfw.originalRamp);
[NSApp setDelegate:nil];
[_glfwLibrary.NS.delegate release];
_glfwLibrary.NS.delegate = nil;
[_glfw.ns.delegate release];
_glfw.ns.delegate = nil;
[_glfwLibrary.NS.autoreleasePool release];
_glfwLibrary.NS.autoreleasePool = nil;
[_glfw.ns.autoreleasePool release];
_glfw.ns.autoreleasePool = nil;
_glfwTerminateJoysticks();
......
......@@ -190,7 +190,7 @@ GLboolean _glfwSetVideoMode(int* width, int* height, int* bpp)
return GL_FALSE;
}
_glfwLibrary.NS.previousMode = CGDisplayCopyDisplayMode(CGMainDisplayID());
_glfw.ns.previousMode = CGDisplayCopyDisplayMode(CGMainDisplayID());
CGDisplayCapture(CGMainDisplayID());
CGDisplaySetDisplayMode(CGMainDisplayID(), bestMode, NULL);
......@@ -206,10 +206,7 @@ GLboolean _glfwSetVideoMode(int* width, int* height, int* bpp)
void _glfwRestoreVideoMode(void)
{
CGDisplaySetDisplayMode(CGMainDisplayID(),
_glfwLibrary.NS.previousMode,
NULL);
CGDisplaySetDisplayMode(CGMainDisplayID(), _glfw.ns.previousMode, NULL);
CGDisplayRelease(CGMainDisplayID());
}
......@@ -256,7 +253,7 @@ _GLFWmonitor** _glfwPlatformGetMonitors(int* count)
size.width, size.height,
bounds.origin.x, bounds.origin.y);
monitors[found]->NS.displayID = displays[i];
monitors[found]->ns.displayID = displays[i];
found++;
}
......@@ -286,7 +283,7 @@ GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
CFIndex count, i;
GLFWvidmode* result;
modes = CGDisplayCopyAllDisplayModes(monitor->NS.displayID, NULL);
modes = CGDisplayCopyAllDisplayModes(monitor->ns.displayID, NULL);
count = CFArrayGetCount(modes);
result = (GLFWvidmode*) malloc(sizeof(GLFWvidmode) * count);
......@@ -317,7 +314,7 @@ void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode *mode)
{
CGDisplayModeRef displayMode;
displayMode = CGDisplayCopyDisplayMode(monitor->NS.displayID);
displayMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);
*mode = vidmodeFromCGDisplayMode(displayMode);
CGDisplayModeRelease(displayMode);
}
......
......@@ -51,7 +51,7 @@ GLFWAPI id glfwGetCocoaWindow(GLFWwindow handle)
return 0;
}
return window->NS.object;
return window->ns.object;
}
......@@ -69,6 +69,6 @@ GLFWAPI id glfwGetNSGLContext(GLFWwindow handle)
return NULL;
}
return window->NSGL.context;
return window->nsgl.context;
}
......@@ -46,9 +46,9 @@ typedef void* id;
#error "No supported context creation API selected"
#endif
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS NS
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS NS
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS NS
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorNS ns
//========================================================================
......
......@@ -55,8 +55,8 @@ void _glfwInitTimer(void)
mach_timebase_info_data_t info;
mach_timebase_info(&info);
_glfwLibrary.NS.timer.resolution = (double) info.numer / (info.denom * 1.0e9);
_glfwLibrary.NS.timer.base = getRawTime();
_glfw.ns.timer.resolution = (double) info.numer / (info.denom * 1.0e9);
_glfw.ns.timer.base = getRawTime();
}
......@@ -70,8 +70,8 @@ void _glfwInitTimer(void)
double _glfwPlatformGetTime(void)
{
return (double) (getRawTime() - _glfwLibrary.NS.timer.base) *
_glfwLibrary.NS.timer.resolution;
return (double) (getRawTime() - _glfw.ns.timer.base) *
_glfw.ns.timer.resolution;
}
......@@ -81,7 +81,7 @@ double _glfwPlatformGetTime(void)
void _glfwPlatformSetTime(double time)
{
_glfwLibrary.NS.timer.base = getRawTime() -
(uint64_t) (time / _glfwLibrary.NS.timer.resolution);
_glfw.ns.timer.base = getRawTime() -
(uint64_t) (time / _glfw.ns.timer.resolution);
}
......@@ -65,20 +65,20 @@
- (void)windowDidResize:(NSNotification *)notification
{
[window->NSGL.context update];
[window->nsgl.context update];
NSRect contentRect =
[window->NS.object contentRectForFrameRect:[window->NS.object frame]];
[window->ns.object contentRectForFrameRect:[window->ns.object frame]];
_glfwInputWindowSize(window, contentRect.size.width, contentRect.size.height);
}
- (void)windowDidMove:(NSNotification *)notification
{
[window->NSGL.context update];
[window->nsgl.context update];
NSRect contentRect =
[window->NS.object contentRectForFrameRect:[window->NS.object frame]];
[window->ns.object contentRectForFrameRect:[window->ns.object frame]];
CGPoint mainScreenOrigin = CGDisplayBounds(CGMainDisplayID()).origin;
double mainScreenHeight = CGDisplayBounds(CGMainDisplayID()).size.height;
......@@ -125,7 +125,7 @@
{
_GLFWwindow* window;
for (window = _glfwLibrary.windowListHead; window; window = window->next)
for (window = _glfw.windowListHead; window; window = window->next)
_glfwInputWindowCloseRequest(window);
return NSTerminateCancel;
......@@ -135,7 +135,7 @@
{
_GLFWwindow* window;
for (window = _glfwLibrary.windowListHead; window; window = window->next)
for (window = _glfw.windowListHead; window; window = window->next)
_glfwInputWindowVisibility(window, GL_FALSE);
}
......@@ -143,9 +143,9 @@
{
_GLFWwindow* window;
for (window = _glfwLibrary.windowListHead; window; window = window->next)
for (window = _glfw.windowListHead; window; window = window->next)
{
if ([window->NS.object isVisible])
if ([window->ns.object isVisible])
_glfwInputWindowVisibility(window, GL_TRUE);
}
}
......@@ -474,12 +474,12 @@ static int convertMacKeyCode(unsigned int macKeyCode)
unsigned int newModifierFlags =
[event modifierFlags] | NSDeviceIndependentModifierFlagsMask;
if (newModifierFlags > window->NS.modifierFlags)
if (newModifierFlags > window->ns.modifierFlags)
mode = GLFW_PRESS;
else
mode = GLFW_RELEASE;
window->NS.modifierFlags = newModifierFlags;
window->ns.modifierFlags = newModifierFlags;
key = convertMacKeyCode([event keyCode]);
if (key != -1)
......@@ -684,28 +684,28 @@ static GLboolean createWindow(_GLFWwindow* window,
styleMask |= NSResizableWindowMask;
}
window->NS.object = [[NSWindow alloc]
window->ns.object = [[NSWindow alloc]
initWithContentRect:NSMakeRect(wndconfig->positionX, wndconfig->positionY, window->width, window->height)
styleMask:styleMask
backing:NSBackingStoreBuffered
defer:NO];
if (window->NS.object == nil)
if (window->ns.object == nil)
{
_glfwInputError(GLFW_PLATFORM_ERROR, "Cocoa: Failed to create window");
return GL_FALSE;
}
window->NS.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
[window->NS.object setTitle:[NSString stringWithUTF8String:wndconfig->title]];
[window->NS.object setContentView:window->NS.view];
[window->NS.object setDelegate:window->NS.delegate];
[window->NS.object setAcceptsMouseMovedEvents:YES];
[window->NS.object center];
[window->ns.object setTitle:[NSString stringWithUTF8String:wndconfig->title]];
[window->ns.object setContentView:window->ns.view];
[window->ns.object setDelegate:window->ns.delegate];
[window->ns.object setAcceptsMouseMovedEvents:YES];
[window->ns.object center];
if ([window->NS.object respondsToSelector:@selector(setRestorable:)])
[window->NS.object setRestorable:NO];
if ([window->ns.object respondsToSelector:@selector(setRestorable:)])
[window->ns.object setRestorable:NO];
return GL_TRUE;
}
......@@ -729,21 +729,21 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
// There can only be one application delegate, but we allocate it the
// first time a window is created to keep all window code in this file
if (_glfwLibrary.NS.delegate == nil)
if (_glfw.ns.delegate == nil)
{
_glfwLibrary.NS.delegate = [[GLFWApplicationDelegate alloc] init];
if (_glfwLibrary.NS.delegate == nil)
_glfw.ns.delegate = [[GLFWApplicationDelegate alloc] init];
if (_glfw.ns.delegate == nil)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create application delegate");
return GL_FALSE;
}
[NSApp setDelegate:_glfwLibrary.NS.delegate];
[NSApp setDelegate:_glfw.ns.delegate];
}
window->NS.delegate = [[GLFWWindowDelegate alloc] initWithGlfwWindow:window];
if (window->NS.delegate == nil)
window->ns.delegate = [[GLFWWindowDelegate alloc] initWithGlfwWindow:window];
if (window->ns.delegate == nil)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"Cocoa: Failed to create window delegate");
......@@ -766,7 +766,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
if (!_glfwCreateContext(window, wndconfig, fbconfig))
return GL_FALSE;
[window->NSGL.context setView:[window->NS.object contentView]];
[window->nsgl.context setView:[window->ns.object contentView]];
if (wndconfig->monitor)
{
......@@ -776,7 +776,7 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
return GL_FALSE;
_glfwPlatformShowWindow(window);
[[window->NS.object contentView] enterFullScreenMode:[NSScreen mainScreen]
[[window->ns.object contentView] enterFullScreenMode:[NSScreen mainScreen]
withOptions:nil];
}
......@@ -794,26 +794,26 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
{
[window->NS.object orderOut:nil];
[window->ns.object orderOut:nil];
if (window->monitor)
{
[[window->NS.object contentView] exitFullScreenModeWithOptions:nil];
[[window->ns.object contentView] exitFullScreenModeWithOptions:nil];
_glfwRestoreVideoMode();
}
_glfwDestroyContext(window);
[window->NS.object setDelegate:nil];
[window->NS.delegate release];
window->NS.delegate = nil;
[window->ns.object setDelegate:nil];
[window->ns.delegate release];
window->ns.delegate = nil;
[window->NS.view release];
window->NS.view = nil;
[window->ns.view release];
window->ns.view = nil;
[window->NS.object close];
window->NS.object = nil;
[window->ns.object close];
window->ns.object = nil;
// TODO: Probably more cleanup
}
......@@ -825,7 +825,7 @@ void _glfwPlatformDestroyWindow(_GLFWwindow* window)
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
{
[window->NS.object setTitle:[NSString stringWithUTF8String:title]];
[window->ns.object setTitle:[NSString stringWithUTF8String:title]];
}
......@@ -835,7 +835,7 @@ void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char *title)
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
{
[window->NS.object setContentSize:NSMakeSize(width, height)];
[window->ns.object setContentSize:NSMakeSize(width, height)];
}
......@@ -845,7 +845,7 @@ void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
void _glfwPlatformIconifyWindow(_GLFWwindow* window)
{
[window->NS.object miniaturize:nil];
[window->ns.object miniaturize:nil];
}
......@@ -855,7 +855,7 @@ void _glfwPlatformIconifyWindow(_GLFWwindow* window)
void _glfwPlatformRestoreWindow(_GLFWwindow* window)
{
[window->NS.object deminiaturize:nil];
[window->ns.object deminiaturize:nil];
}
......@@ -865,7 +865,7 @@ void _glfwPlatformRestoreWindow(_GLFWwindow* window)
void _glfwPlatformShowWindow(_GLFWwindow* window)
{
[window->NS.object makeKeyAndOrderFront:nil];
[window->ns.object makeKeyAndOrderFront:nil];
_glfwInputWindowVisibility(window, GL_TRUE);
}
......@@ -876,7 +876,7 @@ void _glfwPlatformShowWindow(_GLFWwindow* window)
void _glfwPlatformHideWindow(_GLFWwindow* window)
{
[window->NS.object orderOut:nil];
[window->ns.object orderOut:nil];
_glfwInputWindowVisibility(window, GL_FALSE);
}
......@@ -899,8 +899,8 @@ void _glfwPlatformPollEvents(void)
[NSApp sendEvent:event];
}
[_glfwLibrary.NS.autoreleasePool drain];
_glfwLibrary.NS.autoreleasePool = [[NSAutoreleasePool alloc] init];
[_glfw.ns.autoreleasePool drain];
_glfw.ns.autoreleasePool = [[NSAutoreleasePool alloc] init];
}
......@@ -937,7 +937,7 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, int x, int y)
else
{
NSPoint localPoint = NSMakePoint(x, window->height - y - 1);
NSPoint globalPoint = [window->NS.object convertBaseToScreen:localPoint];
NSPoint globalPoint = [window->ns.object convertBaseToScreen:localPoint];
CGPoint mainScreenOrigin = CGDisplayBounds(CGMainDisplayID()).origin;
double mainScreenHeight = CGDisplayBounds(CGMainDisplayID()).size.height;
CGPoint targetPoint = CGPointMake(globalPoint.x - mainScreenOrigin.x,
......
......@@ -59,7 +59,7 @@ static _GLFW_TLS _GLFWwindow* _glfwCurrentWindow = NULL;
static int getConfigAttrib(EGLConfig config, int attrib)
{
int value;
eglGetConfigAttrib(_glfwLibrary.EGL.display, config, attrib, &value);
eglGetConfigAttrib(_glfw.egl.display, config, attrib, &value);
return value;
}
......@@ -78,7 +78,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
*found = 0;
eglGetConfigs(_glfwLibrary.EGL.display, NULL, 0, &count);
eglGetConfigs(_glfw.egl.display, NULL, 0, &count);
configs = (EGLConfig*) malloc(sizeof(EGLConfig) * count);
if (!configs)
......@@ -87,7 +87,7 @@ static _GLFWfbconfig* getFBConfigs(_GLFWwindow* window,
return NULL;
}
eglGetConfigs(_glfwLibrary.EGL.display, configs, count, &count);
eglGetConfigs(_glfw.egl.display, configs, count, &count);
if (!count)
{
free(configs);
......@@ -190,7 +190,7 @@ static int createContext(_GLFWwindow* window,
EGLContext share = NULL;
if (wndconfig->share)
share = wndconfig->share->EGL.context;
share = wndconfig->share->egl.context;
// Retrieve the previously selected EGLConfig
{
......@@ -199,7 +199,7 @@ static int createContext(_GLFWwindow* window,
setEGLattrib(EGL_CONFIG_ID, fbconfigID);
setEGLattrib(EGL_NONE, EGL_NONE);
eglChooseConfig(_glfwLibrary.EGL.display, attribs, &config, 1, &count);
eglChooseConfig(_glfw.egl.display, attribs, &config, 1, &count);
if (!count)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
......@@ -215,10 +215,10 @@ static int createContext(_GLFWwindow* window,
EGLint redBits, greenBits, blueBits, alphaBits, visualID = 0;
XVisualInfo info;
eglGetConfigAttrib(_glfwLibrary.EGL.display, config,
eglGetConfigAttrib(_glfw.egl.display, config,
EGL_NATIVE_VISUAL_ID, &visualID);
info.screen = _glfwLibrary.X11.screen;
info.screen = _glfw.x11.screen;
mask = VisualScreenMask;
if (visualID)
......@@ -232,23 +232,23 @@ static int createContext(_GLFWwindow* window,
// some EGL drivers don't implement the EGL_NATIVE_VISUAL_ID
// attribute, so attempt to find the closest match.
eglGetConfigAttrib(_glfwLibrary.EGL.display, config,
eglGetConfigAttrib(_glfw.egl.display, config,
EGL_RED_SIZE, &redBits);
eglGetConfigAttrib(_glfwLibrary.EGL.display, config,
eglGetConfigAttrib(_glfw.egl.display, config,
EGL_GREEN_SIZE, &greenBits);
eglGetConfigAttrib(_glfwLibrary.EGL.display, config,
eglGetConfigAttrib(_glfw.egl.display, config,
EGL_BLUE_SIZE, &blueBits);
eglGetConfigAttrib(_glfwLibrary.EGL.display, config,
eglGetConfigAttrib(_glfw.egl.display, config,
EGL_ALPHA_SIZE, &alphaBits);
info.depth = redBits + greenBits + blueBits + alphaBits;
mask |= VisualDepthMask;
}
window->EGL.visual = XGetVisualInfo(_glfwLibrary.X11.display,
window->egl.visual = XGetVisualInfo(_glfw.x11.display,
mask, &info, &count);
if (window->EGL.visual == NULL)
if (window->egl.visual == NULL)
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"EGL: Failed to retrieve visual for EGLConfig");
......@@ -275,7 +275,7 @@ static int createContext(_GLFWwindow* window,
}
}
if (_glfwLibrary.EGL.KHR_create_context)
if (_glfw.egl.KHR_create_context)
{
int index = 0, mask = 0, flags = 0, strategy = 0;
......@@ -330,10 +330,10 @@ static int createContext(_GLFWwindow* window,
setEGLattrib(EGL_NONE, EGL_NONE);
}
window->EGL.context = eglCreateContext(_glfwLibrary.EGL.display,
window->egl.context = eglCreateContext(_glfw.egl.display,
config, share, attribs);
if (window->EGL.context == EGL_NO_CONTEXT)
if (window->egl.context == EGL_NO_CONTEXT)
{
// TODO: Handle all the various error codes here
......@@ -341,7 +341,7 @@ static int createContext(_GLFWwindow* window,
return GL_FALSE;
}
window->EGL.config = config;
window->egl.config = config;
return GL_TRUE;
}
......@@ -372,35 +372,35 @@ int _glfwInitOpenGL(void)
for (i = 0; libEGL_names[i] != NULL; i++)
{
_glfwLibrary.EGL.libEGL = dlopen(libEGL_names[i], RTLD_LAZY | RTLD_GLOBAL);
if (_glfwLibrary.EGL.libEGL)
_glfw.egl.libEGL = dlopen(libEGL_names[i], RTLD_LAZY | RTLD_GLOBAL);
if (_glfw.egl.libEGL)
break;
}
if (!_glfwLibrary.EGL.libEGL)
if (!_glfw.egl.libEGL)
{
_glfwInputError(GLFW_PLATFORM_ERROR, "EGL: Failed to find libEGL");
return GL_FALSE;
}
#endif
_glfwLibrary.EGL.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
if (_glfwLibrary.EGL.display == EGL_NO_DISPLAY)
_glfw.egl.display = eglGetDisplay(_GLFW_EGL_NATIVE_DISPLAY);
if (_glfw.egl.display == EGL_NO_DISPLAY)
{
_glfwInputError(GLFW_API_UNAVAILABLE, "EGL: Failed to get EGL display");
return GL_FALSE;
}
if (!eglInitialize(_glfwLibrary.EGL.display,
&_glfwLibrary.EGL.majorVersion,
&_glfwLibrary.EGL.minorVersion))
if (!eglInitialize(_glfw.egl.display,
&_glfw.egl.versionMajor,
&_glfw.egl.versionMinor))