From e68642fe1003467f1483dd8ddb2528cd3136042e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 6 Dec 2011 12:54:16 +0100 Subject: Added multi-screen support to hellowindow example. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I025de342952bffeffa0705eb4cfcf869f32241cc Reviewed-by: Jørgen Lind --- examples/opengl/hellowindow/hellowindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/opengl/hellowindow/hellowindow.cpp') diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index 2903ddd743..742de251f4 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -46,11 +46,13 @@ #include -Renderer::Renderer(const QSurfaceFormat &format, Renderer *share) +Renderer::Renderer(const QSurfaceFormat &format, Renderer *share, QScreen *screen) : m_initialized(false) , m_format(format) { m_context = new QOpenGLContext(this); + if (screen) + m_context->setScreen(screen); m_context->setFormat(format); if (share) m_context->setShareContext(share->m_context); -- cgit v1.2.3