Renamed extension version struct members.

This commit is contained in:
Camilla Berglund 2015-05-27 14:35:31 +02:00
parent 530fc5a431
commit 287e30239c
6 changed files with 26 additions and 33 deletions

View File

@ -190,9 +190,7 @@ int _glfwInitContextAPI(void)
return GL_FALSE;
}
if (!eglInitialize(_glfw.egl.display,
&_glfw.egl.versionMajor,
&_glfw.egl.versionMinor))
if (!eglInitialize(_glfw.egl.display, &_glfw.egl.major, &_glfw.egl.minor))
{
_glfwInputError(GLFW_API_UNAVAILABLE,
"EGL: Failed to initialize EGL: %s",

View File

@ -60,7 +60,7 @@ typedef struct _GLFWcontextEGL
typedef struct _GLFWlibraryEGL
{
EGLDisplay display;
EGLint versionMajor, versionMinor;
EGLint major, minor;
GLboolean KHR_create_context;

View File

@ -179,16 +179,14 @@ int _glfwInitContextAPI(void)
return GL_FALSE;
}
if (!glXQueryVersion(_glfw.x11.display,
&_glfw.glx.versionMajor,
&_glfw.glx.versionMinor))
if (!glXQueryVersion(_glfw.x11.display, &_glfw.glx.major, &_glfw.glx.minor))
{
_glfwInputError(GLFW_API_UNAVAILABLE,
"GLX: Failed to query GLX version");
return GL_FALSE;
}
if (_glfw.glx.versionMajor == 1 && _glfw.glx.versionMinor < 3)
if (_glfw.glx.major == 1 && _glfw.glx.minor < 3)
{
_glfwInputError(GLFW_API_UNAVAILABLE,
"GLX: GLX version 1.3 is required");

View File

@ -62,7 +62,7 @@ typedef struct _GLFWcontextGLX
//
typedef struct _GLFWlibraryGLX
{
int versionMajor, versionMinor;
int major, minor;
int eventBase;
int errorBase;

View File

@ -498,8 +498,8 @@ static GLboolean initExtensions(void)
XRRScreenResources* sr;
if (!XRRQueryVersion(_glfw.x11.display,
&_glfw.x11.randr.versionMajor,
&_glfw.x11.randr.versionMinor))
&_glfw.x11.randr.major,
&_glfw.x11.randr.minor))
{
_glfwInputError(GLFW_PLATFORM_ERROR,
"X11: Failed to query RandR version");
@ -507,11 +507,8 @@ static GLboolean initExtensions(void)
}
// The GLFW RandR path requires at least version 1.3
if (_glfw.x11.randr.versionMajor == 1 &&
_glfw.x11.randr.versionMinor < 3)
{
if (_glfw.x11.randr.major == 1 && _glfw.x11.randr.minor < 3)
_glfw.x11.randr.available = GL_FALSE;
}
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root);
@ -530,8 +527,8 @@ static GLboolean initExtensions(void)
}
if (XineramaQueryExtension(_glfw.x11.display,
&_glfw.x11.xinerama.versionMajor,
&_glfw.x11.xinerama.versionMinor))
&_glfw.x11.xinerama.major,
&_glfw.x11.xinerama.minor))
{
if (XineramaIsActive(_glfw.x11.display))
_glfw.x11.xinerama.available = GL_TRUE;
@ -544,12 +541,12 @@ static GLboolean initExtensions(void)
&_glfw.x11.xi.eventBase,
&_glfw.x11.xi.errorBase))
{
_glfw.x11.xi.versionMajor = 2;
_glfw.x11.xi.versionMinor = 0;
_glfw.x11.xi.major = 2;
_glfw.x11.xi.minor = 0;
if (XIQueryVersion(_glfw.x11.display,
&_glfw.x11.xi.versionMajor,
&_glfw.x11.xi.versionMinor) != BadRequest)
&_glfw.x11.xi.major,
&_glfw.x11.xi.minor) != BadRequest)
{
_glfw.x11.xi.available = GL_TRUE;
}
@ -557,15 +554,15 @@ static GLboolean initExtensions(void)
#endif /*_GLFW_HAS_XINPUT*/
// Check if Xkb is supported on this display
_glfw.x11.xkb.versionMajor = 1;
_glfw.x11.xkb.versionMinor = 0;
_glfw.x11.xkb.major = 1;
_glfw.x11.xkb.minor = 0;
_glfw.x11.xkb.available =
XkbQueryExtension(_glfw.x11.display,
&_glfw.x11.xkb.majorOpcode,
&_glfw.x11.xkb.eventBase,
&_glfw.x11.xkb.errorBase,
&_glfw.x11.xkb.versionMajor,
&_glfw.x11.xkb.versionMinor);
&_glfw.x11.xkb.major,
&_glfw.x11.xkb.minor);
if (_glfw.x11.xkb.available)
{

View File

@ -170,8 +170,8 @@ typedef struct _GLFWlibraryX11
GLboolean available;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
int major;
int minor;
GLboolean gammaBroken;
GLboolean monitorBroken;
} randr;
@ -182,8 +182,8 @@ typedef struct _GLFWlibraryX11
int majorOpcode;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
int major;
int minor;
} xkb;
struct {
@ -200,8 +200,8 @@ typedef struct _GLFWlibraryX11
struct {
GLboolean available;
int versionMajor;
int versionMinor;
int major;
int minor;
} xinerama;
#if defined(_GLFW_HAS_XINPUT)
@ -210,8 +210,8 @@ typedef struct _GLFWlibraryX11
int majorOpcode;
int eventBase;
int errorBase;
int versionMajor;
int versionMinor;
int major;
int minor;
} xi;
#endif /*_GLFW_HAS_XINPUT*/