mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 02:20:11 +01:00
apple: Store the CGL API version number for future reference
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
02b6e97c75
commit
df1dacf093
2 changed files with 5 additions and 5 deletions
|
|
@ -64,7 +64,6 @@ void
|
||||||
apple_cgl_init(void)
|
apple_cgl_init(void)
|
||||||
{
|
{
|
||||||
void *h;
|
void *h;
|
||||||
GLint major = 0, minor = 0;
|
|
||||||
const char *opengl_framework_path;
|
const char *opengl_framework_path;
|
||||||
|
|
||||||
if (initialized)
|
if (initialized)
|
||||||
|
|
@ -88,11 +87,11 @@ apple_cgl_init(void)
|
||||||
|
|
||||||
apple_cgl.get_version = sym(h, "CGLGetVersion");
|
apple_cgl.get_version = sym(h, "CGLGetVersion");
|
||||||
|
|
||||||
apple_cgl.get_version(&major, &minor);
|
apple_cgl.get_version(&apple_cgl.version_major, &apple_cgl.version_minor);
|
||||||
|
|
||||||
apple_glx_diagnostic("CGL major %d minor %d\n", major, minor);
|
apple_glx_diagnostic("CGL major %d minor %d\n", apple_cgl.version_major, apple_cgl.version_minor);
|
||||||
|
|
||||||
if (1 != major) {
|
if (1 != apple_cgl.version_major) {
|
||||||
fprintf(stderr, "WARNING: the CGL major version has changed!\n"
|
fprintf(stderr, "WARNING: the CGL major version has changed!\n"
|
||||||
"libGL may be incompatible!\n");
|
"libGL may be incompatible!\n");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,8 @@
|
||||||
|
|
||||||
struct apple_cgl_api
|
struct apple_cgl_api
|
||||||
{
|
{
|
||||||
void (*get_version) (GLint * majorvers, GLint * minorvers);
|
GLint version_major, version_minor;
|
||||||
|
void (*get_version) (GLint * version_major, GLint * version_minor);
|
||||||
|
|
||||||
CGLError(*choose_pixel_format) (const CGLPixelFormatAttribute * attribs,
|
CGLError(*choose_pixel_format) (const CGLPixelFormatAttribute * attribs,
|
||||||
CGLPixelFormatObj * pix, GLint * npix);
|
CGLPixelFormatObj * pix, GLint * npix);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue