From 59f746d2811bce81775ed7c7ffbdf69392ecc4e7 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 7 Jul 2011 12:02:05 +0100 Subject: [PATCH] cogl-context: Remove the driver private data Since the GL function pointers have move to the root of CoglContext, the driver specific data for GLES became empty and the GL data had only one varible which apparently nothing was using. It's therefore convenient to remove the private driver data to make it easier to have a build of Cogl which enables both GL and GLES support. If we ever need driver private data later we might want to use cogl_object_set_user_data instead. --- cogl/Makefile.am | 2 -- cogl/cogl-context-private.h | 10 ------ cogl/driver/gl/cogl-context-driver-gl.h | 35 --------------------- cogl/driver/gles/cogl-context-driver-gles.h | 34 -------------------- 4 files changed, 81 deletions(-) delete mode 100644 cogl/driver/gl/cogl-context-driver-gl.h delete mode 100644 cogl/driver/gles/cogl-context-driver-gles.h diff --git a/cogl/Makefile.am b/cogl/Makefile.am index 802fc3057..7e7469c3b 100644 --- a/cogl/Makefile.am +++ b/cogl/Makefile.am @@ -106,7 +106,6 @@ if COGL_DRIVER_GL cogl_driver_sources += \ $(srcdir)/driver/gl/cogl-gl.c \ $(srcdir)/driver/gl/cogl-texture-driver-gl.c \ - $(srcdir)/driver/gl/cogl-context-driver-gl.h \ $(NULL) endif @@ -114,7 +113,6 @@ if COGL_DRIVER_GLES cogl_driver_sources += \ $(srcdir)/driver/gles/cogl-gles.c \ $(srcdir)/driver/gles/cogl-texture-driver-gles.c \ - $(srcdir)/driver/gles/cogl-context-driver-gles.h \ $(NULL) endif # COGL_DRIVER_GLES diff --git a/cogl/cogl-context-private.h b/cogl/cogl-context-private.h index 386407f7e..aeefc7d02 100644 --- a/cogl/cogl-context-private.h +++ b/cogl/cogl-context-private.h @@ -33,14 +33,6 @@ #include "cogl-xlib-private.h" #endif -#if HAVE_COGL_GL -#include "cogl-context-driver-gl.h" -#endif - -#if HAVE_COGL_GLES || HAVE_COGL_GLES2 -#include "cogl-context-driver-gles.h" -#endif - #include "cogl-display-private.h" #include "cogl-primitives.h" #include "cogl-clip-stack.h" @@ -259,8 +251,6 @@ struct _CoglContext CoglXlibTrapState *trap_state; #endif - CoglContextDriver drv; - unsigned int winsys_features [COGL_FLAGS_N_INTS_FOR_SIZE (COGL_WINSYS_FEATURE_N_FEATURES)]; void *winsys; diff --git a/cogl/driver/gl/cogl-context-driver-gl.h b/cogl/driver/gl/cogl-context-driver-gl.h deleted file mode 100644 index 48f9fc3a0..000000000 --- a/cogl/driver/gl/cogl-context-driver-gl.h +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Cogl - * - * An object oriented GL/GLES Abstraction/Utility Layer - * - * Copyright (C) 2007,2008,2009,2011 Intel Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - * - * - */ - -#ifndef __COGL_CONTEXT_DRIVER_H -#define __COGL_CONTEXT_DRIVER_H - -#include "cogl.h" - -typedef struct _CoglContextDriver -{ - GLint gl_max_program_temoraries_arb; -} CoglContextDriver; - -#endif /* __COGL_CONTEXT_DRIVER_H */ - diff --git a/cogl/driver/gles/cogl-context-driver-gles.h b/cogl/driver/gles/cogl-context-driver-gles.h deleted file mode 100644 index 4e3be2b34..000000000 --- a/cogl/driver/gles/cogl-context-driver-gles.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Cogl - * - * An object oriented GL/GLES Abstraction/Utility Layer - * - * Copyright (C) 2007,2008,2009,2011 Intel Corporation. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see . - * - * - */ - -#ifndef __COGL_CONTEXT_DRIVER_H -#define __COGL_CONTEXT_DRIVER_H - -#include "cogl.h" - -typedef struct _CoglContextDriver -{ -} CoglContextDriver; - -#endif /* __COGL_CONTEXT_DRIVER_H */ -