From patchwork Thu Jul 21 12:36:32 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandros Frantzis X-Patchwork-Id: 2940 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 21EE923F4D for ; Thu, 21 Jul 2011 12:42:09 +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 E4C1AA184F2 for ; Thu, 21 Jul 2011 12:42:08 +0000 (UTC) Received: by mail-qw0-f52.google.com with SMTP id 8so853237qwb.11 for ; Thu, 21 Jul 2011 05:42:08 -0700 (PDT) Received: by 10.229.25.212 with SMTP id a20mr173731qcc.148.1311252128688; Thu, 21 Jul 2011 05:42:08 -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 hl14cs139480qcb; Thu, 21 Jul 2011 05:42:08 -0700 (PDT) Received: by 10.227.11.204 with SMTP id u12mr200915wbu.8.1311251795397; Thu, 21 Jul 2011 05:36:35 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id fs8si2387794wbb.66.2011.07.21.05.36.35; Thu, 21 Jul 2011 05:36:35 -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 1QjsUT-0000D0-Mb for ; Thu, 21 Jul 2011 12:36:33 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 829DF2EA0A7 for ; Thu, 21 Jul 2011 12:36:32 +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: 35 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~glmark2-dev/glmark2/trunk] Rev 35: Create mipmaps using glGenerateMipmaps. This gets rid of glu.h once and for all! Message-Id: <20110721123632.17019.11075.launchpad@loganberry.canonical.com> Date: Thu, 21 Jul 2011 12:36:32 -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: 84119ab613ef5386da4daf208b68691d9fcb6a09 ------------------------------------------------------------ revno: 35 committer: Alexandros Frantzis timestamp: Fri 2010-07-09 17:15:21 +0300 message: Create mipmaps using glGenerateMipmaps. This gets rid of glu.h once and for all! modified: oglsdl.h texture.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 'oglsdl.h' --- oglsdl.h 2010-07-07 12:33:49 +0000 +++ oglsdl.h 2010-07-09 14:15:21 +0000 @@ -6,7 +6,6 @@ #define GL_GLEXT_PROTOTYPES #include #include -#include #endif === modified file 'texture.cpp' --- texture.cpp 2010-07-08 10:39:44 +0000 +++ texture.cpp 2010-07-09 14:15:21 +0000 @@ -48,13 +48,13 @@ glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, surface->w, surface->h, 0, texture_format, GL_UNSIGNED_BYTE, surface->pixels); - // Create MipMapped Texture + // Create trilinear filtered mipmapped texture glBindTexture(GL_TEXTURE_2D, pTexture[2]); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); - - gluBuild2DMipmaps(GL_TEXTURE_2D, 3, surface->w, surface->h, - texture_format, GL_UNSIGNED_BYTE, surface->pixels); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_LINEAR); + glTexImage2D(GL_TEXTURE_2D, 0, nOfColors, surface->w, surface->h, 0, + texture_format, GL_UNSIGNED_BYTE, surface->pixels); + glGenerateMipmap(GL_TEXTURE_2D); } else { fprintf(stderr, "SDL could not load image.bmp: %s\n", SDL_GetError());