From patchwork Thu Jul 21 12:36:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandros Frantzis X-Patchwork-Id: 2944 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 2115E23F4D for ; Thu, 21 Jul 2011 12:42:29 +0000 (UTC) Received: from mail-qy0-f173.google.com (mail-qy0-f173.google.com [209.85.216.173]) by fiordland.canonical.com (Postfix) with ESMTP id E1E2BA18287 for ; Thu, 21 Jul 2011 12:42:28 +0000 (UTC) Received: by mail-qy0-f173.google.com with SMTP id 10so3962504qyk.11 for ; Thu, 21 Jul 2011 05:42:28 -0700 (PDT) Received: by 10.229.217.3 with SMTP id hk3mr208587qcb.38.1311252148700; Thu, 21 Jul 2011 05:42:28 -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 hl14cs139498qcb; Thu, 21 Jul 2011 05:42:28 -0700 (PDT) Received: by 10.213.27.198 with SMTP id j6mr210405ebc.88.1311251794570; 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 y42si2384120weq.81.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-0000Cq-JN 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 940E32E8956 for ; Thu, 21 Jul 2011 12:36:30 +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: 10 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 10: Use enumerated values instead of plain numbers for attribute locations. Message-Id: <20110721123630.17019.89764.launchpad@loganberry.canonical.com> Date: Thu, 21 Jul 2011 12:36:30 -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: dfbfe536499e0c7fcf8de0d49534099e2f1d62e6 ------------------------------------------------------------ revno: 10 committer: Alexandros Frantzis timestamp: Thu 2010-07-08 11:27:40 +0300 message: Use enumerated values instead of plain numbers for attribute locations. modified: shader.cpp shader.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 'shader.cpp' --- shader.cpp 2010-07-08 08:16:07 +0000 +++ shader.cpp 2010-07-08 08:27:40 +0000 @@ -64,9 +64,9 @@ mShaderProgram = glCreateProgramObjectARB(); glAttachObjectARB(mShaderProgram, mFragmentShader); glAttachObjectARB(mShaderProgram, mVertexShader); - glBindAttribLocation(mShaderProgram, 0, "position"); - glBindAttribLocation(mShaderProgram, 1, "normal"); - glBindAttribLocation(mShaderProgram, 2, "texture"); + glBindAttribLocation(mShaderProgram, VertexAttribLocation, "position"); + glBindAttribLocation(mShaderProgram, NormalAttribLocation, "normal"); + glBindAttribLocation(mShaderProgram, TexCoordAttribLocation, "texture"); glLinkProgram(mShaderProgram); glGetShaderInfoLog(mShaderProgram, sizeof msg, NULL, msg); === modified file 'shader.h' --- shader.h 2010-07-08 08:16:07 +0000 +++ shader.h 2010-07-08 08:27:40 +0000 @@ -24,6 +24,12 @@ GLint LightSourceDiffuse; GLint MaterialDiffuse; } mLocations; + + enum { + VertexAttribLocation = 0, + NormalAttribLocation = 1, + TexCoordAttribLocation = 2 + }; }; #endif