Changeset View
Changeset View
Standalone View
Standalone View
Modules/opengl/opengl.cpp
Show First 20 Lines • Show All 723 Lines • ▼ Show 20 Line(s) | 708 | if (glXMakeCurrent(dpy, win, ctx)) { | |||
---|---|---|---|---|---|
724 | IsDirect = glXIsDirect(dpy, ctx); | 724 | IsDirect = glXIsDirect(dpy, ctx); | ||
725 | 725 | | |||
726 | result = print_screen_info(l1, after, IsDirect ? i18n("Direct Rendering (GLX)") : i18n("Indirect Rendering (GLX)")); | 726 | result = print_screen_info(l1, after, IsDirect ? i18n("Direct Rendering (GLX)") : i18n("Indirect Rendering (GLX)")); | ||
727 | } | 727 | } | ||
728 | else { | 728 | else { | ||
729 | qDebug() << "Error: glXMakeCurrent failed\n"; | 729 | qDebug() << "Error: glXMakeCurrent failed\n"; | ||
730 | } | 730 | } | ||
731 | 731 | | |||
732 | glXMakeCurrent(dpy, GL_NONE, nullptr); | ||||
732 | glXDestroyContext(dpy, ctx); | 733 | glXDestroyContext(dpy, ctx); | ||
733 | XDestroyWindow(dpy, win); | 734 | XDestroyWindow(dpy, win); | ||
734 | XFree(visinfo); | 735 | XFree(visinfo); | ||
735 | 736 | | |||
736 | return result; | 737 | return result; | ||
737 | } | 738 | } | ||
738 | #endif | 739 | #endif | ||
739 | 740 | | |||
▲ Show 20 Lines • Show All 100 Lines • ▼ Show 20 Line(s) | 834 | if (eglMakeCurrent(egl_dpy, surf, surf, ctx)) { | |||
840 | gli.glExtensions = (const char *) glGetString(GL_EXTENSIONS); | 841 | gli.glExtensions = (const char *) glGetString(GL_EXTENSIONS); | ||
841 | gli.displayName = nullptr; | 842 | gli.displayName = nullptr; | ||
842 | result = print_screen_info(l1, after, i18n("Direct Rendering (EGL)")); | 843 | result = print_screen_info(l1, after, i18n("Direct Rendering (EGL)")); | ||
843 | } | 844 | } | ||
844 | else { | 845 | else { | ||
845 | qDebug() <<"Error: eglMakeCurrent() failed\n"; | 846 | qDebug() <<"Error: eglMakeCurrent() failed\n"; | ||
846 | } | 847 | } | ||
847 | 848 | | |||
849 | eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); | ||||
848 | eglDestroyContext(egl_dpy, ctx); | 850 | eglDestroyContext(egl_dpy, ctx); | ||
849 | eglDestroySurface(egl_dpy, surf); | 851 | eglDestroySurface(egl_dpy, surf); | ||
850 | XDestroyWindow(dpy, win); | 852 | XDestroyWindow(dpy, win); | ||
851 | XFree(visinfo); | 853 | XFree(visinfo); | ||
852 | return result; | 854 | return result; | ||
853 | 855 | | |||
854 | } | 856 | } | ||
855 | 857 | | |||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |