From patchwork Thu Jul 21 12:36:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandros Frantzis X-Patchwork-Id: 3008 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CA2EF23F4D for ; Thu, 21 Jul 2011 12:44:35 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 99450A184BF for ; Thu, 21 Jul 2011 12:44:35 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so854415qwb.11 for ; Thu, 21 Jul 2011 05:44:35 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr192473qci.114.1311252275405; Thu, 21 Jul 2011 05:44:35 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs139601qcb; Thu, 21 Jul 2011 05:44:35 -0700 (PDT) Received: by 10.216.175.202 with SMTP id z52mr772068wel.17.1311251794881; Thu, 21 Jul 2011 05:36:34 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id w54si2389546wec.67.2011.07.21.05.36.34; Thu, 21 Jul 2011 05:36:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QjsUS-0000Co-UT for ; Thu, 21 Jul 2011 12:36:32 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 4AF072E8961 for ; Thu, 21 Jul 2011 12:36:31 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~glmark2-dev/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 19 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 19: Associate each Scene with the Screen it is going to draw on. Message-Id: <20110721123631.17019.43221.launchpad@loganberry.canonical.com> Date: Thu, 21 Jul 2011 12:36:31 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13475"; Instance="initZopeless config overlay" X-Launchpad-Hash: 8c5aed2be92e2419c2f100fe6d2c8ad27bd8164f ------------------------------------------------------------ revno: 19 committer: Alexandros Frantzis timestamp: Thu 2010-07-08 16:04:49 +0300 message: Associate each Scene with the Screen it is going to draw on. modified: main.cpp scene.cpp scene.h --- lp:glmark2 https://code.launchpad.net/~glmark2-dev/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription === modified file 'main.cpp' --- main.cpp 2010-07-07 12:30:48 +0000 +++ main.cpp 2010-07-08 13:04:49 +0000 @@ -10,19 +10,17 @@ unsigned current_scene = 0; Screen screen; - SceneBuild scenebuild; - SceneTexture scenetexture; - SceneShading sceneshading; - printf("===================================================\n"); printf(" GLMark 08\n"); printf("===================================================\n"); - - printf("===================================================\n"); if(!screen.init()) return 0; printf("===================================================\n"); + SceneBuild scenebuild(screen); + SceneTexture scenetexture(screen); + SceneShading sceneshading(screen); + if(!scenebuild.load() || !scenetexture.load() || !sceneshading.load()) return 0; @@ -49,7 +47,6 @@ case 0: current_scene++; scenebuild.start(); -// scenebuild.mRunning = false; break; case 1: scenebuild.update(); @@ -58,7 +55,6 @@ { current_scene++; scenetexture.start(); -// scenetexture.mRunning = false; } break; case 2: @@ -68,7 +64,6 @@ { current_scene++; sceneshading.start(); -// sceneshading.mRunning = false; } break; case 3: === modified file 'scene.cpp' --- scene.cpp 2010-07-07 10:32:18 +0000 +++ scene.cpp 2010-07-08 13:04:49 +0000 @@ -1,6 +1,7 @@ #include "scene.h" -Scene::Scene() +Scene::Scene(Screen &pScreen) : + mScreen(pScreen) { } === modified file 'scene.h' --- scene.h 2010-07-07 10:32:18 +0000 +++ scene.h 2010-07-08 13:04:49 +0000 @@ -13,7 +13,7 @@ class Scene { public: - Scene(); + Scene(Screen &pScreen); ~Scene(); unsigned mPartsQty; // How many parts for the scene @@ -33,11 +33,14 @@ protected: double mStartTime; double mElapsedTime; + + Screen &mScreen; }; class SceneBuild : public Scene { public: + SceneBuild(Screen &pScreen) : Scene(pScreen) {} int load(); void start(); void update(); @@ -51,6 +54,7 @@ class SceneTexture : public Scene { public: + SceneTexture(Screen &pScreen) : Scene(pScreen) {} int load(); void start(); void update(); @@ -67,6 +71,7 @@ class SceneShading : public Scene { public: + SceneShading(Screen &pScreen) : Scene(pScreen) {} int load(); void start(); void update();