summaryrefslogtreecommitdiffstats
path: root/README
blob: b40fb37ca2d93904d6fad9a6a1a933952b075ef4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
This directory contains an (unsupported) reference EGL-based screen driver
implementation that supports a single full-screen QGLWidget with OpenGL/ES.

This driver uses standard EGL features. The EGL standard does not specify a
cross-platform method to create native non-fullscreen windows, or to share
window surfaces cross-process.  Therefore, we cannot support anything other
than a single window in a single process with this approach.

To create the full-screen window, the driver needs to know the native
window id to pass to eglCreateWindowSurface() to create a window surface
for the whole screen.

The current implementation assumes that the native window id is zero, which
is used by a number of EGL implementations (all tested devices), but not
all. If the EGL implementation uses a different identifier, then it will be
necessary to modify the defaultRootWindowHandle() function to provide a
different value.

Run an application with this screen driver on a 16-bit display as follows:

    app -display simplegl:rgb16 -qws

The tags "argb32" and "rgb16" can be used to select the display's bit
depth.

When using QGraphicsView, be sure to set a QGLWidget viewport and show
full-screen.  The following code demonstrates the recommended options:

    QGraphicsView view(&scene);
    view.setViewport(new QGLWidget());
    view.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    view.setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
    view.setFrameStyle(0);
    view.showFullScreen();

This will result in all paint operations utilized to display the contents
of the graphics view resolving through to Arthur's OpenGL ES 2 backend.
(Arthur is documented here: http://doc.qt.nokia.com/4.6/qt4-arthur.html)

This driver has been verified on the following hardware platforms:

TI Beagleboard (c3)
BCM911107VP
Freescale i.MX51

and several sensitive targets we cannot disclose

using Qt 4.6/4.7

None of these targets has required reimplementing eglCreateWindowSurface()

Caveats

1) We query the geometry of the fullscreen surface directly from EGL. This
is broken in some EGL implementations (eg i.MX51) and defining
DONT_QUERY_EGL_DIMENSIONS allows us to explicitly override these values