summaryrefslogtreecommitdiffstats
path: root/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-10-13 00:22:27 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-10-13 00:22:27 (GMT)
commit08d863c79371725b5f7f4e3097e26cfa1afafa11 (patch)
tree01d9ba87938077115f5e8026c0917bcf1d4540a4 /src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
parent4b5d504d9fd4f983044bbe0da58c5c35240f8cf5 (diff)
downloadQt-08d863c79371725b5f7f4e3097e26cfa1afafa11.zip
Qt-08d863c79371725b5f7f4e3097e26cfa1afafa11.tar.gz
Qt-08d863c79371725b5f7f4e3097e26cfa1afafa11.tar.bz2
Update the OpenGL for Qt/Embedded documentation
Reviewed-by: trustme
Diffstat (limited to 'src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp')
-rw-r--r--src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
index cb453d7..bfcce67 100644
--- a/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
+++ b/src/plugins/gfxdrivers/powervr/pvreglscreen/pvreglscreen.cpp
@@ -50,12 +50,14 @@
#include <fcntl.h>
#include <unistd.h>
+//![0]
PvrEglScreen::PvrEglScreen(int displayId)
: QGLScreen(displayId)
{
setOptions(NativeWindows);
setSupportsBlitInClients(true);
setSurfaceFunctions(new PvrEglScreenSurfaceFunctions(this, displayId));
+//![0]
fd = -1;
ttyfd = -1;
doGraphicsMode = true;
@@ -183,6 +185,7 @@ bool PvrEglScreen::hasOpenGL()
return true;
}
+//![1]
QWSWindowSurface* PvrEglScreen::createSurface(QWidget *widget) const
{
if (qobject_cast<QGLWidget*>(widget))
@@ -198,6 +201,7 @@ QWSWindowSurface* PvrEglScreen::createSurface(const QString &key) const
return QScreen::createSurface(key);
}
+//![1]
void PvrEglScreen::sync()
{
@@ -253,8 +257,10 @@ void PvrEglScreen::closeTty()
ttyfd = -1;
}
+//![2]
bool PvrEglScreenSurfaceFunctions::createNativeWindow(QWidget *widget, EGLNativeWindowType *native)
{
+//![2]
QWSWindowSurface *surface =
static_cast<QWSWindowSurface *>(widget->windowSurface());
if (!surface) {