From patchwork Thu Jul 21 12:36:34 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: 3014 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 981D723F4D for ; Thu, 21 Jul 2011 12:44:52 +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 66E2FA184BF for ; Thu, 21 Jul 2011 12:44:52 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so853237qwb.11 for ; Thu, 21 Jul 2011 05:44:52 -0700 (PDT) Received: by 10.229.25.212 with SMTP id a20mr175963qcc.148.1311252292151; Thu, 21 Jul 2011 05:44:52 -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 hl14cs139613qcb; Thu, 21 Jul 2011 05:44:51 -0700 (PDT) Received: by 10.216.134.33 with SMTP id r33mr203203wei.1.1311251796849; Thu, 21 Jul 2011 05:36:36 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id 21si2378727wel.101.2011.07.21.05.36.36; Thu, 21 Jul 2011 05:36:36 -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 1QjsUU-0000D3-VU for ; Thu, 21 Jul 2011 12:36:35 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 691F42EA025 for ; Thu, 21 Jul 2011 12:36:34 +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: 62 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 62: Whitespace fixes. Message-Id: <20110721123634.17019.94454.launchpad@loganberry.canonical.com> Date: Thu, 21 Jul 2011 12:36:34 -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: 52e984a82aa7c5f7300d559dc74baa06acb081ea ------------------------------------------------------------ revno: 62 committer: Alexandros Frantzis timestamp: Fri 2010-11-19 14:03:25 +0200 message: Whitespace fixes. modified: src/matrix.cpp src/mesh.cpp src/mesh.h src/model.cpp src/scene.cpp src/scenebuild.cpp src/sceneshading.cpp src/screen-sdl-glesv2.cpp --- 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 'src/matrix.cpp' --- src/matrix.cpp 2010-07-13 10:22:05 +0000 +++ src/matrix.cpp 2010-11-19 12:03:25 +0000 @@ -20,9 +20,9 @@ */ #include "matrix.h" -/** +/** * Multiply arrays representing 4x4 matrices in column-major order. - * + * * The result is stored in the first matrix. * * @param m the first matrix @@ -46,11 +46,11 @@ memcpy(m, &tmp, sizeof tmp); } -/** +/** * Multiply this matrix with another. * * @param pM the matrix to multiply with. - * + * * @return reference to this matrix (multiplied) */ Matrix4f &Matrix4f::operator*=(const Matrix4f &pM) @@ -60,14 +60,14 @@ return *this; } -/** +/** * Rotates a matrix. - * + * * @param angle the angle to rotate * @param x the x component of the rotation axis * @param y the y component of the rotation axis * @param z the z component of the rotation axis - * + * * @return reference to the matrix */ Matrix4f &Matrix4f::rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) @@ -78,7 +78,7 @@ GLfloat r[16] = { x * x * (1 - c) + c, y * x * (1 - c) + z * s, x * z * (1 - c) - y * s, 0, - x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, + x * y * (1 - c) - z * s, y * y * (1 - c) + c, y * z * (1 - c) + x * s, 0, x * z * (1 - c) + y * s, y * z * (1 - c) - x * s, z * z * (1 - c) + c, 0, 0, 0, 0, 1 }; @@ -88,13 +88,13 @@ return *this; } -/** +/** * Translates a matrix. - * + * * @param x the x component of the translation * @param y the y component of the translation * @param z the z component of the translation - * + * * @return reference to the matrix */ Matrix4f &Matrix4f::translate(GLfloat x, GLfloat y, GLfloat z) @@ -106,9 +106,9 @@ return *this; } -/** +/** * Transposes a matrix. - * + * * @return reference to the matrix */ Matrix4f &Matrix4f::transpose() @@ -209,7 +209,7 @@ return *this; } -/** +/** * Creates an empty matrix. * * All matrix components are 0.0 expect the lower right @@ -221,9 +221,9 @@ m[15] = 1.0; } -/** +/** * Copy constructor. - * + * * @param mat the matrix to copy the contents of. */ Matrix4f::Matrix4f(Matrix4f &mat) @@ -231,9 +231,9 @@ memcpy(m, mat.m, sizeof(m)); } -/** +/** * Creates a matrix with specified values in the diagonal. - * + * * The lower right value is initialized to 1.0. * * @param x the x component of the diagonal @@ -249,7 +249,7 @@ m[15] = 1.0; } -/** +/** * Displays a matrix. * * @param str string to display before matrix === modified file 'src/mesh.cpp' --- src/mesh.cpp 2010-07-13 10:22:05 +0000 +++ src/mesh.cpp 2010-11-19 12:03:25 +0000 @@ -32,7 +32,7 @@ { u = pU; v = pV; } - + Mesh::Mesh() { mPolygonQty = 0; @@ -60,13 +60,13 @@ float minor_radius = 0.4; unsigned i, j; unsigned k = 0; - + Vector3f a, b, c, d, n; mMode = GL_TRIANGLES; mVertexQty = wraps_qty * per_wrap_qty * 6; mVertex = new Vertex[mVertexQty]; - + for(i = 0; i < wraps_qty; i++) for(j = 0; j < per_wrap_qty; j++) { @@ -77,7 +77,7 @@ a.x = (float)sin(theta) * r; a.y = minor_radius * (float)sin(phi); a.z = (float)cos(theta) * r; - + theta = 2 * M_PI * (i + wrap_frac + 1) / (float)wraps_qty; b.x = (float)sin(theta) * r; b.y = minor_radius * (float)sin(phi); @@ -103,8 +103,8 @@ n = normal(a, b, c); mVertex[k].n = n; mVertex[k].v = b; k++; mVertex[k].n = n; mVertex[k].v = c; k++; - mVertex[k].n = n; mVertex[k].v = d; k++; - } + mVertex[k].n = n; mVertex[k].v = d; k++; + } } void Mesh::render_array() === modified file 'src/mesh.h' --- src/mesh.h 2010-07-13 10:22:05 +0000 +++ src/mesh.h 2010-11-19 12:03:25 +0000 @@ -33,7 +33,7 @@ { public: GLfloat u, v; - + Texel(); Texel(GLfloat pU, GLfloat pV); }; @@ -59,10 +59,10 @@ GLuint mVBOVertices; // Vertex VBO name GLuint mVBONormals; // Texture coordinate VBO name GLuint mVBOTexCoords; // Texture coordinate VBO name - + Mesh(); // Default Constructor, should set pointers to null ~Mesh(); - + void make_cube(); void make_torus(); void render_array(); === modified file 'src/model.cpp' --- src/model.cpp 2010-07-13 10:22:05 +0000 +++ src/model.cpp 2010-11-19 12:03:25 +0000 @@ -166,7 +166,7 @@ break; //----------------- EDIT3DS ----------------- - // Description: 3D Editor chunk, objects layout info + // Description: 3D Editor chunk, objects layout info // Chunk ID: 3d3d (hex) // Chunk Lenght: 0 + sub chunks //------------------------------------------- @@ -235,7 +235,7 @@ //------------- TRI_MAPPINGCOORS ------------ // Description: Vertices list // Chunk ID: 4140 (hex) - // Chunk Lenght: 1 x unsigned short (number of mapping points) + // Chunk Lenght: 1 x unsigned short (number of mapping points) // + 2 x float (mapping coordinates) x (number of mapping points) // + sub chunks //------------------------------------------- === modified file 'src/scene.cpp' --- src/scene.cpp 2010-07-13 10:22:05 +0000 +++ src/scene.cpp 2010-11-19 12:03:25 +0000 @@ -34,7 +34,7 @@ mDt = 0; mCurrentFrame = 0; mRunning = false; - + mAverageFPS = 0; mScoreScale = 0; === modified file 'src/scenebuild.cpp' --- src/scenebuild.cpp 2010-07-15 08:59:36 +0000 +++ src/scenebuild.cpp 2010-11-19 12:03:25 +0000 @@ -29,23 +29,23 @@ int SceneBuild::load() { Model model; - + if(!model.load_3ds(GLMARK_DATA_PATH"/models/horse.3ds")) return 0; - + model.calculate_normals(); model.convert_to_mesh(&mMesh); - + mMesh.build_vbo(); - + mShader.load(GLMARK_DATA_PATH"/shaders/light-basic.vert", GLMARK_DATA_PATH"/shaders/light-basic.frag"); mRotationSpeed = 36.0f; mRotation = 0.0; - + mRunning = false; - + mPartsQty = 2; mPartDuration = new double[mPartsQty]; mAverageFPS = new unsigned[mPartsQty]; @@ -58,9 +58,9 @@ mPartDuration[1] = 10.0; memset(mAverageFPS, 0, mPartsQty * sizeof(*mAverageFPS)); - + mCurrentPart = 0; - + return 1; } @@ -98,13 +98,13 @@ mCurrentTime = SDL_GetTicks() / 1000.0; mDt = mCurrentTime - mLastTime; mLastTime = mCurrentTime; - + mElapsedTime = mCurrentTime - mStartTime; - + if(mElapsedTime >= mPartDuration[mCurrentPart]) { mAverageFPS[mCurrentPart] = mCurrentFrame / mElapsedTime; - + switch(mCurrentPart) { case 0: @@ -121,9 +121,9 @@ else start(); } - + mRotation += mRotationSpeed * mDt; - + mCurrentFrame++; } @@ -154,5 +154,5 @@ case 1: mMesh.render_vbo(); break; - } + } } === modified file 'src/sceneshading.cpp' --- src/sceneshading.cpp 2010-07-15 09:12:42 +0000 +++ src/sceneshading.cpp 2010-11-19 12:03:25 +0000 @@ -30,15 +30,15 @@ int SceneShading::load() { Model model; - + if(!model.load_3ds(GLMARK_DATA_PATH"/models/cat.3ds")) return 0; - + model.calculate_normals(); model.convert_to_mesh(&mMesh); - + mMesh.build_vbo(); - + mShader[0].load(GLMARK_DATA_PATH"/shaders/light-basic.vert", GLMARK_DATA_PATH"/shaders/light-basic.frag"); mShader[1].load(GLMARK_DATA_PATH"/shaders/light-advanced.vert", @@ -46,9 +46,9 @@ mRotationSpeed = 36.0f; mRotation = 0.0f; - + mRunning = false; - + mPartsQty = 2; mPartDuration = new double[mPartsQty]; mAverageFPS = new unsigned[mPartsQty]; @@ -56,14 +56,14 @@ mScoreScale[0] = 1.0f / mPartsQty; mScoreScale[1] = 1.0f / mPartsQty; - + mPartDuration[0] = 10.0; mPartDuration[1] = 10.0; memset(mAverageFPS, 0, mPartsQty * sizeof(*mAverageFPS)); - + mCurrentPart = 0; - + return 1; } @@ -120,13 +120,13 @@ mCurrentTime = SDL_GetTicks() / 1000.0; mDt = mCurrentTime - mLastTime; mLastTime = mCurrentTime; - + mElapsedTime = mCurrentTime - mStartTime; - + if(mElapsedTime >= mPartDuration[mCurrentPart]) { mAverageFPS[mCurrentPart] = mCurrentFrame / mElapsedTime; - + switch(mCurrentPart) { case 0: printf("Shading\n"); @@ -144,9 +144,9 @@ else start(); } - + mRotation += mRotationSpeed * mDt; - + mCurrentFrame++; } === modified file 'src/screen-sdl-glesv2.cpp' --- src/screen-sdl-glesv2.cpp 2010-11-19 11:54:36 +0000 +++ src/screen-sdl-glesv2.cpp 2010-11-19 12:03:25 +0000 @@ -29,19 +29,19 @@ mInitSuccess = 0; if (SDL_GLES_Init(SDL_GLES_VERSION_2_0) < 0) { - fprintf(stderr, "[ Fail ] - GLES initialization failed: %s\n", SDL_GetError()); + fprintf(stderr, "[ Fail ] - GLES initialization failed: %s\n", SDL_GetError()); } SDL_GLES_Context *context; context = SDL_GLES_CreateContext(); if (context == NULL) { - fprintf(stderr, "[ Fail ] - GLES create context: %s\n", SDL_GetError()); - return; + fprintf(stderr, "[ Fail ] - GLES create context: %s\n", SDL_GetError()); + return; } if (SDL_GLES_MakeCurrent(context) != 0) { - fprintf(stderr, "[ Fail ] - GLES make context current: %s\n", SDL_GetError()); - return; + fprintf(stderr, "[ Fail ] - GLES make context current: %s\n", SDL_GetError()); + return; } #ifdef _DEBUG @@ -89,7 +89,7 @@ void ScreenSDLGLESv2::update() { - SDL_GLES_SwapBuffers(); + SDL_GLES_SwapBuffers(); } void ScreenSDLGLESv2::print_info()