mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 08:58:02 +02:00
xdemos/glsync: check glXMakeCurrent return value
Since this program is used for testing, catching this case can be helpful.
This commit is contained in:
parent
f860aac0d8
commit
0269dc19b5
1 changed files with 5 additions and 1 deletions
|
|
@ -120,6 +120,7 @@ int main(int argc, char *argv[])
|
|||
int width = 500, height = 500, verbose = 0,
|
||||
countonly = 0, interval = 1;
|
||||
int c, i = 1;
|
||||
int ret;
|
||||
int attribs[] = { GLX_RGBA,
|
||||
GLX_RED_SIZE, 1,
|
||||
GLX_GREEN_SIZE, 1,
|
||||
|
|
@ -234,7 +235,10 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
XMapWindow(disp, winGL);
|
||||
glXMakeCurrent(disp, winGL, context);
|
||||
ret = glXMakeCurrent(disp, winGL, context);
|
||||
if (ret) {
|
||||
fprintf(stderr, "failed to make context current: %d\n", ret);
|
||||
}
|
||||
|
||||
video_sync_get = glXGetProcAddress((unsigned char *)"glXGetVideoSyncSGI");
|
||||
video_sync = glXGetProcAddress((unsigned char *)"glXWaitVideoSyncSGI");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue