From patchwork Mon Jul 25 14:05:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: alexandros.frantzis@linaro.org X-Patchwork-Id: 3100 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 1DA8E23E54 for ; Mon, 25 Jul 2011 14:05:27 +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 CEB37A1850E for ; Mon, 25 Jul 2011 14:05:26 +0000 (UTC) Received: by mail-qy0-f173.google.com with SMTP id 10so1062982qyk.11 for ; Mon, 25 Jul 2011 07:05:26 -0700 (PDT) Received: by 10.229.1.217 with SMTP id 25mr1010532qcg.38.1311602726523; Mon, 25 Jul 2011 07:05:26 -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 hl14cs78173qcb; Mon, 25 Jul 2011 07:05:26 -0700 (PDT) Received: by 10.223.155.130 with SMTP id s2mr1874493faw.2.1311602725609; Mon, 25 Jul 2011 07:05:25 -0700 (PDT) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by mx.google.com with ESMTPS id o15si7048838fal.135.2011.07.25.07.05.25 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 07:05:25 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.161.44 is neither permitted nor denied by best guess record for domain of alexandros.frantzis@linaro.org) client-ip=209.85.161.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.161.44 is neither permitted nor denied by best guess record for domain of alexandros.frantzis@linaro.org) smtp.mail=alexandros.frantzis@linaro.org Received: by mail-fx0-f44.google.com with SMTP id 6so6811099fxe.17 for ; Mon, 25 Jul 2011 07:05:25 -0700 (PDT) Received: by 10.223.7.19 with SMTP id b19mr375590fab.144.1311602725129; Mon, 25 Jul 2011 07:05:25 -0700 (PDT) Received: from localhost (77.49.93.204.dsl.dyn.forthnet.gr [77.49.93.204]) by mx.google.com with ESMTPS id p17sm3808151fak.25.2011.07.25.07.05.23 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 25 Jul 2011 07:05:24 -0700 (PDT) From: alexandros.frantzis@linaro.org To: patches@linaro.org Subject: =?UTF-8?q?=5BPATCH=204/9=5D=20gl=3A=20Add=20definitions=20for=20the=20core=20variant=20names=20of=20used=20GL=20constants?= Date: Mon, 25 Jul 2011 17:05:08 +0300 Message-Id: <1311602713-6182-4-git-send-email-alexandros.frantzis@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1311602713-6182-1-git-send-email-alexandros.frantzis@linaro.org> References: <1311602713-6182-1-git-send-email-alexandros.frantzis@linaro.org> MIME-Version: 1.0 From: Alexandros Frantzis This allows us to use the core variant of the needed GL constants regardless of the GL header version that is being used for compilation. --- src/Makefile.sources | 1 + src/cairo-gl-ext-def-private.h | 99 ++++++++++++++++++++++++++++++++++++++++ src/cairo-gl-private.h | 1 + 3 files changed, 101 insertions(+), 0 deletions(-) create mode 100644 src/cairo-gl-ext-def-private.h diff --git a/src/Makefile.sources b/src/Makefile.sources index 168429f..caea47e 100644 --- a/src/Makefile.sources +++ b/src/Makefile.sources @@ -314,6 +314,7 @@ cairo_beos_cxx_sources = cairo-beos-surface.cpp cairo_gl_headers = cairo-gl.h cairo_gl_private = cairo-gl-private.h \ cairo-gl-dispatch-private.h \ + cairo-gl-ext-def-private.h \ cairo-gl-gradient-private.h \ glew/GL/glew.h \ glew/GL/glxew.h diff --git a/src/cairo-gl-ext-def-private.h b/src/cairo-gl-ext-def-private.h new file mode 100644 index 0000000..1653791 --- /dev/null +++ b/src/cairo-gl-ext-def-private.h @@ -0,0 +1,99 @@ +/* cairo - a vector graphics library with display and print output + * + * Copyright © 2010 Linaro Limited + * + * This library is free software; you can redistribute it and/or + * modify it either under the terms of the GNU Lesser General Public + * License version 2.1 as published by the Free Software Foundation + * (the "LGPL") or, at your option, under the terms of the Mozilla + * Public License Version 1.1 (the "MPL"). If you do not alter this + * notice, a recipient may use your version of this file under either + * the MPL or the LGPL. + * + * You should have received a copy of the LGPL along with this library + * in the file COPYING-LGPL-2.1; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA + * You should have received a copy of the MPL along with this library + * in the file COPYING-MPL-1.1 + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY + * OF ANY KIND, either express or implied. See the LGPL or the MPL for + * the specific language governing rights and limitations. + * + * Contributor(s): + * Alexandros Frantzis + */ + +#ifndef CAIRO_GL_EXT_DEF_PRIVATE_H +#define CAIRO_GL_EXT_DEF_PRIVATE_H + +#ifndef GL_TEXTURE_RECTANGLE +#define GL_TEXTURE_RECTANGLE 0x84F5 +#endif + +#ifndef GL_ARRAY_BUFFER +#define GL_ARRAY_BUFFER 0x8892 +#endif + +#ifndef GL_STREAM_DRAW +#define GL_STREAM_DRAW 0x88E0 +#endif + +#ifndef GL_WRITE_ONLY +#define GL_WRITE_ONLY 0x88B9 +#endif + +#ifndef GL_PIXEL_UNPACK_BUFFER +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#endif + +#ifndef GL_FRAMEBUFFER +#define GL_FRAMEBUFFER 0x8D40 +#endif + +#ifndef GL_COLOR_ATTACHMENT0 +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#endif + +#ifndef GL_FRAMEBUFFER_COMPLETE +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_FORMATS +#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS 0x8CDA +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER +#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB +#endif + +#ifndef GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER +#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC +#endif + +#ifndef GL_FRAMEBUFFER_UNSUPPORTED +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD +#endif + +#ifndef GL_PACK_INVERT_MESA +#define GL_PACK_INVERT_MESA 0x8758 +#endif + +#endif /* CAIRO_GL_EXT_DEF_PRIVATE_H */ diff --git a/src/cairo-gl-private.h b/src/cairo-gl-private.h index be16ede..c0a2d2d 100644 --- a/src/cairo-gl-private.h +++ b/src/cairo-gl-private.h @@ -59,6 +59,7 @@ #include #define GL_GLEXT_PROTOTYPES #include +#include "cairo-gl-ext-def-private.h" #define DEBUG_GL 0