diff --git a/clutter/cogl/cogl/Makefile.am b/clutter/cogl/cogl/Makefile.am index 618d7be4b..8acdd7f25 100644 --- a/clutter/cogl/cogl/Makefile.am +++ b/clutter/cogl/cogl/Makefile.am @@ -75,6 +75,8 @@ cogl_public_h = \ cogl_sources_c = \ $(srcdir)/winsys/cogl-winsys.h \ + $(srcdir)/winsys/cogl-context-winsys.h \ + $(srcdir)/winsys/cogl-context-winsys.c \ $(srcdir)/cogl-handle.h \ $(srcdir)/cogl-context.h \ $(srcdir)/cogl-context.c \ diff --git a/clutter/cogl/cogl/cogl-context.c b/clutter/cogl/cogl/cogl-context.c index 2933ed7d7..b3cfdb042 100644 --- a/clutter/cogl/cogl/cogl-context.c +++ b/clutter/cogl/cogl/cogl-context.c @@ -43,6 +43,10 @@ extern void _cogl_create_context_driver (CoglContext *context); +extern void +_cogl_create_context_winsys (CoglContext *context); +extern void +_cogl_destroy_context_winsys (CoglContext *context); static CoglContext *_context = NULL; static gboolean gl_is_indirect = FALSE; @@ -72,6 +76,8 @@ cogl_create_context (void) _cogl_create_context_driver (_context); _cogl_features_init (); + _cogl_create_context_winsys (_context); + _cogl_material_init_default_material (); _cogl_material_init_default_layers (); @@ -209,6 +215,8 @@ _cogl_destroy_context (void) if (_context == NULL) return; + _cogl_destroy_context_winsys (_context); + _cogl_destroy_texture_units (); _cogl_free_framebuffer_stack (_context->framebuffer_stack); diff --git a/clutter/cogl/cogl/cogl-context.h b/clutter/cogl/cogl/cogl-context.h index 1ed1499d9..83c8bfd6c 100644 --- a/clutter/cogl/cogl/cogl-context.h +++ b/clutter/cogl/cogl/cogl-context.h @@ -26,6 +26,7 @@ #include "cogl-internal.h" #include "cogl-context-driver.h" +#include "cogl-context-winsys.h" #include "cogl-primitives.h" #include "cogl-clip-stack.h" #include "cogl-matrix-stack.h" @@ -167,6 +168,7 @@ typedef struct GSList *texture_types; CoglContextDriver drv; + CoglContextWinsys winsys; } CoglContext; CoglContext * diff --git a/clutter/cogl/cogl/winsys/cogl-context-winsys.c b/clutter/cogl/cogl/winsys/cogl-context-winsys.c new file mode 100644 index 000000000..91402e7ba --- /dev/null +++ b/clutter/cogl/cogl/winsys/cogl-context-winsys.c @@ -0,0 +1,38 @@ +/* + * Cogl + * + * An object oriented GL/GLES Abstraction/Utility Layer + * + * Copyright (C) 2010 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 . + * + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "cogl-context.h" + +void +_cogl_create_context_winsys (CoglContext *context) +{ +} + +void +_cogl_destroy_context_winsys (CoglContext *context) +{ +} diff --git a/clutter/cogl/cogl/winsys/cogl-context-winsys.h b/clutter/cogl/cogl/winsys/cogl-context-winsys.h new file mode 100644 index 000000000..c67ee3453 --- /dev/null +++ b/clutter/cogl/cogl/winsys/cogl-context-winsys.h @@ -0,0 +1,32 @@ +/* + * Cogl + * + * An object oriented GL/GLES Abstraction/Utility Layer + * + * Copyright (C) 2010 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_WINSYS_H +#define __COGL_CONTEXT_WINSYS_H + +typedef struct +{ + int stub; +} CoglContextWinsys; + +#endif /* __COGL_CONTEXT_WINSYS_H */