From patchwork Tue Jun 21 12:49:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 2122 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 4C50123F4E for ; Tue, 21 Jun 2011 12:49:20 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 0C058A187ED for ; Tue, 21 Jun 2011 12:49:19 +0000 (UTC) Received: by vxd7 with SMTP id 7so3482571vxd.11 for ; Tue, 21 Jun 2011 05:49:19 -0700 (PDT) Received: by 10.52.95.194 with SMTP id dm2mr7426062vdb.47.1308660559518; Tue, 21 Jun 2011 05:49:19 -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.52.183.130 with SMTP id em2cs63918vdc; Tue, 21 Jun 2011 05:49:19 -0700 (PDT) Received: by 10.227.202.205 with SMTP id ff13mr6415899wbb.102.1308660557644; Tue, 21 Jun 2011 05:49:17 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id n11si11658454wbh.101.2011.06.21.05.49.17; Tue, 21 Jun 2011 05:49:17 -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 1QZ0OK-0008Iq-VF for ; Tue, 21 Jun 2011 12:49:16 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E6ACE2E814B for ; Tue, 21 Jun 2011 12:49:16 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: glmark2 X-Launchpad-Branch: ~afrantzis/glmark2/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 85 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~afrantzis/glmark2/trunk] Rev 85: Ensure all Mesh instance variables are properly initialized and reset. Message-Id: <20110621124916.14638.74225.launchpad@loganberry.canonical.com> Date: Tue, 21 Jun 2011 12:49:16 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13242"; Instance="initZopeless config overlay" X-Launchpad-Hash: b74f1611109b64100251de9bf64922deabd5f89a ------------------------------------------------------------ revno: 85 committer: Alexandros Frantzis branch nick: trunk timestamp: Tue 2011-06-21 15:24:15 +0300 message: Ensure all Mesh instance variables are properly initialized and reset. modified: src/mesh.cpp --- lp:glmark2 https://code.launchpad.net/~afrantzis/glmark2/trunk You are subscribed to branch lp:glmark2. To unsubscribe from this branch go to https://code.launchpad.net/~afrantzis/glmark2/trunk/+edit-subscription === modified file 'src/mesh.cpp' --- src/mesh.cpp 2011-06-17 13:16:16 +0000 +++ src/mesh.cpp 2011-06-21 12:24:15 +0000 @@ -24,12 +24,11 @@ #include "mesh.h" -Mesh::Mesh() +Mesh::Mesh() : + mVertexQty(0), mPolygonQty(0), + mMode(GL_TRIANGLES), mVertex(0), + mVBOVertices(0), mVBONormals(0), mVBOTexCoords(0) { - mPolygonQty = 0; - mVertexQty = 0; - mMode = GL_TRIANGLES; - mVertex = 0; } Mesh::~Mesh() @@ -199,6 +198,10 @@ glDeleteBuffers(1, &mVBOVertices); glDeleteBuffers(1, &mVBONormals); glDeleteBuffers(1, &mVBOTexCoords); + + mVBOVertices = 0; + mVBONormals = 0; + mVBOTexCoords = 0; } void Mesh::render_vbo(int vertex_loc, int normal_loc, int texcoord_loc)