mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Renamed extension version struct members.
This commit is contained in:
parent
530fc5a431
commit
287e30239c
|
@ -190,9 +190,7 @@ int _glfwInitContextAPI(void)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!eglInitialize(_glfw.egl.display,
|
if (!eglInitialize(_glfw.egl.display, &_glfw.egl.major, &_glfw.egl.minor))
|
||||||
&_glfw.egl.versionMajor,
|
|
||||||
&_glfw.egl.versionMinor))
|
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||||
"EGL: Failed to initialize EGL: %s",
|
"EGL: Failed to initialize EGL: %s",
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef struct _GLFWcontextEGL
|
||||||
typedef struct _GLFWlibraryEGL
|
typedef struct _GLFWlibraryEGL
|
||||||
{
|
{
|
||||||
EGLDisplay display;
|
EGLDisplay display;
|
||||||
EGLint versionMajor, versionMinor;
|
EGLint major, minor;
|
||||||
|
|
||||||
GLboolean KHR_create_context;
|
GLboolean KHR_create_context;
|
||||||
|
|
||||||
|
|
|
@ -179,16 +179,14 @@ int _glfwInitContextAPI(void)
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!glXQueryVersion(_glfw.x11.display,
|
if (!glXQueryVersion(_glfw.x11.display, &_glfw.glx.major, &_glfw.glx.minor))
|
||||||
&_glfw.glx.versionMajor,
|
|
||||||
&_glfw.glx.versionMinor))
|
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_API_UNAVAILABLE,
|
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||||
"GLX: Failed to query GLX version");
|
"GLX: Failed to query GLX version");
|
||||||
return GL_FALSE;
|
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,
|
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||||
"GLX: GLX version 1.3 is required");
|
"GLX: GLX version 1.3 is required");
|
||||||
|
|
|
@ -62,7 +62,7 @@ typedef struct _GLFWcontextGLX
|
||||||
//
|
//
|
||||||
typedef struct _GLFWlibraryGLX
|
typedef struct _GLFWlibraryGLX
|
||||||
{
|
{
|
||||||
int versionMajor, versionMinor;
|
int major, minor;
|
||||||
int eventBase;
|
int eventBase;
|
||||||
int errorBase;
|
int errorBase;
|
||||||
|
|
||||||
|
|
|
@ -498,8 +498,8 @@ static GLboolean initExtensions(void)
|
||||||
XRRScreenResources* sr;
|
XRRScreenResources* sr;
|
||||||
|
|
||||||
if (!XRRQueryVersion(_glfw.x11.display,
|
if (!XRRQueryVersion(_glfw.x11.display,
|
||||||
&_glfw.x11.randr.versionMajor,
|
&_glfw.x11.randr.major,
|
||||||
&_glfw.x11.randr.versionMinor))
|
&_glfw.x11.randr.minor))
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
"X11: Failed to query RandR version");
|
"X11: Failed to query RandR version");
|
||||||
|
@ -507,11 +507,8 @@ static GLboolean initExtensions(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
// The GLFW RandR path requires at least version 1.3
|
// The GLFW RandR path requires at least version 1.3
|
||||||
if (_glfw.x11.randr.versionMajor == 1 &&
|
if (_glfw.x11.randr.major == 1 && _glfw.x11.randr.minor < 3)
|
||||||
_glfw.x11.randr.versionMinor < 3)
|
|
||||||
{
|
|
||||||
_glfw.x11.randr.available = GL_FALSE;
|
_glfw.x11.randr.available = GL_FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root);
|
sr = XRRGetScreenResources(_glfw.x11.display, _glfw.x11.root);
|
||||||
|
|
||||||
|
@ -530,8 +527,8 @@ static GLboolean initExtensions(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XineramaQueryExtension(_glfw.x11.display,
|
if (XineramaQueryExtension(_glfw.x11.display,
|
||||||
&_glfw.x11.xinerama.versionMajor,
|
&_glfw.x11.xinerama.major,
|
||||||
&_glfw.x11.xinerama.versionMinor))
|
&_glfw.x11.xinerama.minor))
|
||||||
{
|
{
|
||||||
if (XineramaIsActive(_glfw.x11.display))
|
if (XineramaIsActive(_glfw.x11.display))
|
||||||
_glfw.x11.xinerama.available = GL_TRUE;
|
_glfw.x11.xinerama.available = GL_TRUE;
|
||||||
|
@ -544,12 +541,12 @@ static GLboolean initExtensions(void)
|
||||||
&_glfw.x11.xi.eventBase,
|
&_glfw.x11.xi.eventBase,
|
||||||
&_glfw.x11.xi.errorBase))
|
&_glfw.x11.xi.errorBase))
|
||||||
{
|
{
|
||||||
_glfw.x11.xi.versionMajor = 2;
|
_glfw.x11.xi.major = 2;
|
||||||
_glfw.x11.xi.versionMinor = 0;
|
_glfw.x11.xi.minor = 0;
|
||||||
|
|
||||||
if (XIQueryVersion(_glfw.x11.display,
|
if (XIQueryVersion(_glfw.x11.display,
|
||||||
&_glfw.x11.xi.versionMajor,
|
&_glfw.x11.xi.major,
|
||||||
&_glfw.x11.xi.versionMinor) != BadRequest)
|
&_glfw.x11.xi.minor) != BadRequest)
|
||||||
{
|
{
|
||||||
_glfw.x11.xi.available = GL_TRUE;
|
_glfw.x11.xi.available = GL_TRUE;
|
||||||
}
|
}
|
||||||
|
@ -557,15 +554,15 @@ static GLboolean initExtensions(void)
|
||||||
#endif /*_GLFW_HAS_XINPUT*/
|
#endif /*_GLFW_HAS_XINPUT*/
|
||||||
|
|
||||||
// Check if Xkb is supported on this display
|
// Check if Xkb is supported on this display
|
||||||
_glfw.x11.xkb.versionMajor = 1;
|
_glfw.x11.xkb.major = 1;
|
||||||
_glfw.x11.xkb.versionMinor = 0;
|
_glfw.x11.xkb.minor = 0;
|
||||||
_glfw.x11.xkb.available =
|
_glfw.x11.xkb.available =
|
||||||
XkbQueryExtension(_glfw.x11.display,
|
XkbQueryExtension(_glfw.x11.display,
|
||||||
&_glfw.x11.xkb.majorOpcode,
|
&_glfw.x11.xkb.majorOpcode,
|
||||||
&_glfw.x11.xkb.eventBase,
|
&_glfw.x11.xkb.eventBase,
|
||||||
&_glfw.x11.xkb.errorBase,
|
&_glfw.x11.xkb.errorBase,
|
||||||
&_glfw.x11.xkb.versionMajor,
|
&_glfw.x11.xkb.major,
|
||||||
&_glfw.x11.xkb.versionMinor);
|
&_glfw.x11.xkb.minor);
|
||||||
|
|
||||||
if (_glfw.x11.xkb.available)
|
if (_glfw.x11.xkb.available)
|
||||||
{
|
{
|
||||||
|
|
|
@ -170,8 +170,8 @@ typedef struct _GLFWlibraryX11
|
||||||
GLboolean available;
|
GLboolean available;
|
||||||
int eventBase;
|
int eventBase;
|
||||||
int errorBase;
|
int errorBase;
|
||||||
int versionMajor;
|
int major;
|
||||||
int versionMinor;
|
int minor;
|
||||||
GLboolean gammaBroken;
|
GLboolean gammaBroken;
|
||||||
GLboolean monitorBroken;
|
GLboolean monitorBroken;
|
||||||
} randr;
|
} randr;
|
||||||
|
@ -182,8 +182,8 @@ typedef struct _GLFWlibraryX11
|
||||||
int majorOpcode;
|
int majorOpcode;
|
||||||
int eventBase;
|
int eventBase;
|
||||||
int errorBase;
|
int errorBase;
|
||||||
int versionMajor;
|
int major;
|
||||||
int versionMinor;
|
int minor;
|
||||||
} xkb;
|
} xkb;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
|
@ -200,8 +200,8 @@ typedef struct _GLFWlibraryX11
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
GLboolean available;
|
GLboolean available;
|
||||||
int versionMajor;
|
int major;
|
||||||
int versionMinor;
|
int minor;
|
||||||
} xinerama;
|
} xinerama;
|
||||||
|
|
||||||
#if defined(_GLFW_HAS_XINPUT)
|
#if defined(_GLFW_HAS_XINPUT)
|
||||||
|
@ -210,8 +210,8 @@ typedef struct _GLFWlibraryX11
|
||||||
int majorOpcode;
|
int majorOpcode;
|
||||||
int eventBase;
|
int eventBase;
|
||||||
int errorBase;
|
int errorBase;
|
||||||
int versionMajor;
|
int major;
|
||||||
int versionMinor;
|
int minor;
|
||||||
} xi;
|
} xi;
|
||||||
#endif /*_GLFW_HAS_XINPUT*/
|
#endif /*_GLFW_HAS_XINPUT*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user