X-Git-Url: http://git.maemo.org/git/?p=glmemperf;a=blobdiff_plain;f=native.h;fp=native.h;h=6a30c181b3703bd4913dfed006cb69b191aa7245;hp=0000000000000000000000000000000000000000;hb=c72807863fcff447f59b9b52d066ddf32676936d;hpb=8ecaa4c3c620115e4855eda292cc4dbce283ad84 diff --git a/native.h b/native.h new file mode 100644 index 0000000..6a30c18 --- /dev/null +++ b/native.h @@ -0,0 +1,83 @@ +/** + * OpenGL ES 2.0 memory performance estimator + * Copyright (C) 2009 Nokia + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * \author Sami Kyöstilä + * + * Native windowing + */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +/** + * Create a native display + */ +EGLBoolean nativeCreateDisplay(EGLNativeDisplayType *pNativeDisplay); + +/** + * Destroy a native display + */ +void nativeDestroyDisplay(EGLNativeDisplayType nativeDisplay); + +/** + * Create a native window + * + * @param nativeDisplay Native display handle + * @param dpy EGL display handle + * @param config Configuration to be used with the window + * @param title Window title + * @param width Window width in pixels + * @param height Window height in pixels + * @param nativeWindow Output: new window handle + */ +EGLBoolean nativeCreateWindow(EGLNativeDisplayType nativeDisplay, EGLDisplay dpy, + EGLConfig config, const char *title, int width, + int height, EGLNativeWindowType *nativeWindow); + +/** + * Destroy a native window + * + * @param nativeDisplay Native display handle + * @param nativeWindow Window to destroy + */ +void nativeDestroyWindow(EGLNativeDisplayType nativeDisplay, EGLNativeWindowType nativeWindow); + +/** + * Create a native pixmap + * + * @param nativeDisplay Native display handle + * @param dpy EGL display handle + * @param config Configuration to be used with the pixmap + * @param width Pixmap width in pixels + * @param height Pixmap height in pixels + * @param nativPixmap Output: new pixmap handle + */ +EGLBoolean nativeCreatePixmap(EGLNativeDisplayType nativeDisplay, + EGLDisplay dpy, EGLConfig config, + int width, int height, EGLNativePixmapType *nativePixmap); + +/** + * Destroy a native pixmap + */ +void nativeDestroyPixmap(EGLNativeDisplayType nativeDisplay, EGLNativePixmapType nativePixmap); + +#if defined(__cplusplus) +} +#endif