From deceeca18d3a3f18caeac980ad63fafd8bad709c Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 7 May 2008 08:47:55 -0600 Subject: mesa: update/add newer GL ES headers --- include/GLES/egltypes.h | 111 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 83 insertions(+), 28 deletions(-) (limited to 'include/GLES/egltypes.h') diff --git a/include/GLES/egltypes.h b/include/GLES/egltypes.h index 65cba8d579..ca1f5a9cb3 100644 --- a/include/GLES/egltypes.h +++ b/include/GLES/egltypes.h @@ -1,45 +1,100 @@ +#ifndef __egl_types_h_ +#define __egl_types_h_ + /* -** egltypes.h for Mesa +** egltypes.h is platform dependent. It defines: +** +** - EGL types and resources +** - Native types +** - EGL and native handle values ** -** ONLY egl.h SHOULD INCLUDE THIS FILE! +** EGL types and resources are to be typedef'ed with appropriate platform +** dependent resource handle types. EGLint must be an integer of at least +** 32-bit. ** -** See comments about egltypes.h in the standard egl.h file. +** NativeDisplayType, NativeWindowType and NativePixmapType are to be +** replaced with corresponding types of the native window system in egl.h. +** +** EGL and native handle values must match their types. */ +#if (defined(WIN32) || defined(_WIN32_WCE)) -#include +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#endif +// Windows Header Files: +#include -/* -** These opaque EGL types are implemented as unsigned 32-bit integers: -*/ -typedef u_int32_t EGLDisplay; -typedef u_int32_t EGLConfig; -typedef u_int32_t EGLSurface; -typedef u_int32_t EGLContext; +typedef HDC NativeDisplayType; +typedef HWND NativeWindowType; +typedef HBITMAP NativePixmapType; + +#define EGL_DEFAULT_DISPLAY GetDC(0) + +#elif defined(__SYMBIAN32__) -/* EGL_MESA_screen_surface */ -typedef u_int32_t EGLModeMESA; -typedef u_int32_t EGLScreenMESA; +#include + +class RWindow; +class CWindowGc; +class CFbsBitmap; + +typedef CWindowGc * NativeDisplayType; +typedef RWindow * NativeWindowType; +typedef CFbsBitmap * NativePixmapType; + +#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) + +#elif defined(__gnu_linux__) + +typedef void * NativeDisplayType; +typedef void * NativeWindowType; +typedef void * NativePixmapType; + +#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) + +#else + +# error "Unsupported Operating System" + +#endif + +#ifdef __cplusplus + +namespace EGL { + class Context; + class Config; + class Surface; +} + +typedef const EGL::Config * EGLConfig; +typedef EGL::Surface * EGLSurface; +typedef EGL::Context * EGLContext; + +#else + +typedef void * EGLConfig; +typedef void * EGLSurface; +typedef void * EGLContext; + +#endif /* -** Other basic EGL types: +** Types and resources */ -typedef u_int8_t EGLBoolean; -typedef int32_t EGLint; - -typedef void * NativeDisplayType; -typedef int NativePixmapType; -typedef int NativeWindowType; +typedef int EGLBoolean; +typedef int EGLint; +typedef void * EGLDisplay; /* -** EGL and native handle null values: +** EGL and native handle values */ -#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) -#define EGL_NO_CONTEXT ((EGLContext) 0) -#define EGL_NO_DISPLAY ((EGLDisplay) 0) -#define EGL_NO_SURFACE ((EGLSurface) 0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) + -/* EGL_MESA_screen_surface */ -#define EGL_NO_MODE_MESA ((EGLModeMESA) 0) +#endif //ndef __egl_types_h_ -- cgit v1.2.3 From c6426c97b9fe2c8a3d00ca4e2fd306cce364832a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 27 May 2008 13:45:01 -0600 Subject: obsolete with EGL 1.4 --- include/GLES/egltypes.h | 100 ------------------------------------------------ 1 file changed, 100 deletions(-) delete mode 100644 include/GLES/egltypes.h (limited to 'include/GLES/egltypes.h') diff --git a/include/GLES/egltypes.h b/include/GLES/egltypes.h deleted file mode 100644 index ca1f5a9cb3..0000000000 --- a/include/GLES/egltypes.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef __egl_types_h_ -#define __egl_types_h_ - -/* -** egltypes.h is platform dependent. It defines: -** -** - EGL types and resources -** - Native types -** - EGL and native handle values -** -** EGL types and resources are to be typedef'ed with appropriate platform -** dependent resource handle types. EGLint must be an integer of at least -** 32-bit. -** -** NativeDisplayType, NativeWindowType and NativePixmapType are to be -** replaced with corresponding types of the native window system in egl.h. -** -** EGL and native handle values must match their types. -*/ - -#if (defined(WIN32) || defined(_WIN32_WCE)) - -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -#endif - -// Windows Header Files: -#include - -typedef HDC NativeDisplayType; -typedef HWND NativeWindowType; -typedef HBITMAP NativePixmapType; - -#define EGL_DEFAULT_DISPLAY GetDC(0) - -#elif defined(__SYMBIAN32__) - -#include - -class RWindow; -class CWindowGc; -class CFbsBitmap; - -typedef CWindowGc * NativeDisplayType; -typedef RWindow * NativeWindowType; -typedef CFbsBitmap * NativePixmapType; - -#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) - -#elif defined(__gnu_linux__) - -typedef void * NativeDisplayType; -typedef void * NativeWindowType; -typedef void * NativePixmapType; - -#define EGL_DEFAULT_DISPLAY ((NativeDisplayType) 0) - -#else - -# error "Unsupported Operating System" - -#endif - -#ifdef __cplusplus - -namespace EGL { - class Context; - class Config; - class Surface; -} - -typedef const EGL::Config * EGLConfig; -typedef EGL::Surface * EGLSurface; -typedef EGL::Context * EGLContext; - -#else - -typedef void * EGLConfig; -typedef void * EGLSurface; -typedef void * EGLContext; - -#endif - - -/* -** Types and resources -*/ -typedef int EGLBoolean; -typedef int EGLint; -typedef void * EGLDisplay; - -/* -** EGL and native handle values -*/ -#define EGL_NO_CONTEXT ((EGLContext)0) -#define EGL_NO_DISPLAY ((EGLDisplay)0) -#define EGL_NO_SURFACE ((EGLSurface)0) - - -#endif //ndef __egl_types_h_ -- cgit v1.2.3