| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
QtGui exporting a symbol called eglCreateImageKHR seems a pretty
silly idea. Much better to have them in the QEgl namespace.
Reviewed-By: Iain
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This mostly replaces lots of QT_OPENGL_ES defines with QT_NO_EGL
instead. It also switches off EGL auto-detection by default. This is
to make sure we default to using GLX on systems with both EGL and
desktop OpenGL. If -opengl es1|es2 or -openvg is specified, then
EGL auto-detection is switched back on (as a requirement. If
configure auto-detects OpenGL ES it also switches on EGL
auto-detection, but failue then just disables both EGL & OpenGL.
As a side effect, this patch also fixes building Qt when both EGL
and glx are avaliable, as they are in Mesa >= 7.8.0.
Reviewed-by: Trond
Task-number: QTBUG-9691
|
|
|
|
| |
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Symbian 10.1, egl.h itself includes eglext.h. This leads to
EGL_KHR_image & EGL_KHR_image_base being defined, but not the actual
function prototypes for eglCreateImageKHR/eglDestroyImageKHR. But,
because the extension defines were set, Qt assumed (wrongly) that
the EGL library would define eglCreateImageKHR. This left these
functions undefined. The work-around is to check the define
EGL_EGLEXT_PROTOTYPES and still define the function pointers if
it isn't set.
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
| |
We assume the presence of EGL_KHR_image or EGL_KHR_image_base means
that the eglCreateImageKHR/eglDestroyImageKHR methods are exported
by the EGL library and thus do not need to be resolved.
Reviewed-By: TrustMe
|
|
|
|
|
|
|
| |
We should only define the EGLImage functions if both EGL_KHR_image
_and_ EGL_KHR_image_base are undefined.
Reviewed-By: TrustMe
|
|
|
|
|
|
| |
This should fix the build on Symbian.
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's lots of EGLImage extensions, split between EGL and client
rendering APIs like OpenGL ES & OpenVG. To implement texture-from-
pixmap using EGLImage, both EGL extensions and OpenGL ES extensions
are needed. This patch resolves the EGL extension function pointers
after the display is initialized in QEgl::display(). These are then
exported from QtGui so they can be used in QtOpenGL. The OpenGL ES
extension function pointers are resolved using the usual
qglextensions.cpp mechanism.
Using EGLImage seems to remove a fixed ~10 millisecond overhead per
pixmap bind when compared to using EGLSurface. Exact results per bind
for 100 QPixmaps are:
8x8 Pixmap: 12 -> 1.71 msecs (EGLSurface -> EGLImage)
64x64 Pixmap: 11.6 -> 1.83 msecs (EGLSurface -> EGLImage)
128x128 Pixmap: 12.8 -> 2.74 msecs (EGLSurface -> EGLImage)
256x256 Pixmap: 16 -> 6.20 msecs (EGLSurface -> EGLImage)
Reviewed-By: Trond
|
|
|
|
|
|
|
|
| |
This also includes changes which allow QGLContext to not own it's
own QEglContext. With X11GL, the QEglContext gets reused by multiple
QGLContexts so it is important QGLContext doesn't delete it.
Reviewed-By: TrustMe
|
|
|
|
|
|
|
| |
Note: This changes QX11PixmapData::gl_surface to a void* to enable
build on 64-bit systems where EGLSurface is a pointer.
Reviewed-By: TrustMe
|
|
|
|
|
|
| |
This should fix build on Symbian & WinCE
Reviewed-By: TrustMe
|
|
|
|
|
|
|
| |
The old qt_chooseEGLConfigForPixmap & qt_createEGLSurfaceForPixmap
code will remain until QX11GLPixmapData can be re-written properly.
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QEgl::createSurface() on X11 will now check to see if the device's
X11 Visual is compatible with the EGLConfig passed in. If it is not
compatible, the function will re-create the QPaintDevice's native
drawable with a different Visual (one which is compatable with the
EGLConfig). This represented the bulk of the QGLWidget::setContext
method which is now much simpler.
As a consequense of this change, QWidgets with graphicssystem opengl
will behave much more like QGLWidget as most of the code is re-used.
So things like WA_TranslucentBackground should now work with opengl
graphicssystem too.
Reviewed-By: TrustMe
|
|
|
|
| |
Reviewed-By: TrustMe
|
|
|
|
| |
Reviewed-By: TrustMe
|
|
|
|
|
|
|
|
|
|
| |
QEgl::createSurface was virtually identical for every platform apart
from the line which returned the native window type. This patch just
adds QEgl::nativePixmap and QEgl::nativeWindow which are platform
specific (though the default widget->winId() works for everything
apart from symbian).
Reviewed-By: Aleksandar Sasha Babic
|
|
|
|
|
|
|
|
| |
We keep the methods in QEglContext, but these are useful helpers
which wrap the QEgl version of the functions, which is where the
bulk of the logic is (for these functions anyway).
Reviewed-By: Aleksandar Sasha Babic
|
|
|
|
| |
Reviewed-By: Aleksandar Sasha Babic
|
|
|
|
|
|
|
|
| |
This puts the QEgl namespace in a single file which can be used by
both qeglcontext and qeglproperties. Files which need QEglContext
should now include qeglcontext_p.h.
Reviewed-By: Aleksandar Sasha Babic
|
|
|
|
| |
Reviewed-By: Trustme
|
|
|
|
|
| |
Explicit EGLNativeDisplayType casts are needed since maemo6 defines
EGL_DEFAULT_DISPLAY as ((void*)0).
|
|
|
|
|
|
|
|
|
| |
This basicaly replaces display(), openDisplay() & defaultDisplay()
methods with a single display() and nativeDisplay(), the latter
being implemented in the platform-specific files and everything
else being cross-platform code.
Reviewed-By: Trond
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
| |
The previous code might have failed if the desired extension name
was a prefix of another name: "EGL_foo" member of "EGL_foo_bar".
This change introduces a more precise check.
Task-number: QTBUG-6454
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
|
|
|
| |
When mixing GL and VG in the same thread, some devices require
that eglBindAPI() be called before eglMakeCurrent() when switching
between context types. The EGL spec indicates that this shouldn't
be required unless the context parameter is EGL_NO_CONTEXT, but it
isn't a big deal to work around slightly non-compliant devices.
Reviewed-by: Tom Cooksey
|
|
|
|
|
|
|
|
| |
Context sharing was enabled on EGL systems, but QGLContext::isSharing()
was still returning false because the flag in QGLContextPrivate
was not updated.
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-By: Rhys Weatherley
|
|
|
|
|
|
|
|
|
|
| |
Allow higher layers in QtOpenGL and QtOpenVG to set the EGLConfig
and EGLContext manually if they have some other way to determine
what the values should be (e.g. constructing a special config for a
specific platform). Also add a QEglProperties argument to
createContext() to allow fine-tuning of the context parameters.
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: Sarah Smith
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtOpenVG was doing a lot of housekeeping to avoid having to
switch EGL contexts if the same surface was used over and over.
This housekeeping really belongs in the QEgl layer so that
QtOpenGL could potentially use it as well.
This change also adds some overrides for makeCurrent(),
swapBuffers(), and destroySurface() that take an EGLSurface
directly. This is the first step in separating EGL surface
management from context management.
Reviewed-by: Sarah Smith
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
| |
This is private API
Reviewed-By: Trustme
|
|
|
|
| |
Reviewed-by: Trust Me
|
|
|
|
|
|
|
|
|
|
|
| |
According to the spec, if we pass a 0 out pointer,
EGL should tell us how many configurations are available.
However, we pass a 0 out pointer, but say that it's 256 elements big,
it confuses some implementations. Fix that by passing a 0 out pointer
and saying that it has space for 0 elements. Now we correctly get the
amount of available configs.
Reviewed-by: Rhys Weatherley <rhys.weatherley@nokia.com>
|
|
|
|
| |
Reviewed-By: Rhys Weatherley
|
|
This change also moves the EGL support classes from QtOpenGL to QtGui
so they can be shared between OpenGL and OpenVG.
|