1 /* Copyright (C) 2011 Nokia Corporation All Rights Reserved.
3 * Permission is hereby granted, free of charge, to any person obtaining a
4 * copy of this software and associated documentation files (the "Software"),
5 * to deal in the Software without restriction, including without limitation
6 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 * and/or sell copies of the Software, and to permit persons to whom the
8 * Software is furnished to do so, subject to the following conditions:
10 * The above copyright notice and this permission notice shall be included
11 * in all copies or substantial portions of the Software.
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
17 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 #include <ApplicationServices/ApplicationServices.h>
27 #include <OpenGL/OpenGL.h>
29 #ifndef GL_TEXTURE_RECTANGLE_EXT
30 #define GL_TEXTURE_RECTANGLE_EXT 0x84F5
33 #define HCOCOA_FUNCS \
38 #define HCOCOA_FUNC(ret, name, attr) ret (*name) attr;
41 void *(*CreateContext)(CGLContextObj ctx);
42 void (*DestroyContext)(void *nsctx);
43 void *(*CreateView)(EGLSurface s, void *nsview, unsigned *w, unsigned *h);
44 void (*DestroyView)(void *cview);
45 void (*SetView)(void *nsctx, void *cview);
46 void (*BindTexImageFromView)(void *nsctx, void *cview);
51 extern int hcocoaLoad(void);