gfx/gl/GLTypes.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/gl/GLTypes.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,94 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#if !defined(GLTYPES_H_)
     1.9 +#define GLTYPES_H_
    1.10 +
    1.11 +#include <stddef.h>
    1.12 +#include <stdint.h>
    1.13 +
    1.14 +#ifndef GLAPIENTRY
    1.15 +# ifdef WIN32
    1.16 +#  include <windef.h>
    1.17 +#  define GLAPIENTRY APIENTRY
    1.18 +#  define GLAPI
    1.19 +# else
    1.20 +#  define GLAPIENTRY
    1.21 +#  define GLAPI
    1.22 +# endif
    1.23 +#endif
    1.24 +
    1.25 +typedef int8_t realGLboolean;
    1.26 +
    1.27 +#if !defined(__gltypes_h_) && !defined(__gl_h_)
    1.28 +#define __gltypes_h_
    1.29 +#define __gl_h_
    1.30 +
    1.31 +typedef uint32_t GLenum;
    1.32 +typedef uint32_t GLbitfield;
    1.33 +typedef uint32_t GLuint;
    1.34 +typedef int32_t GLint;
    1.35 +typedef int32_t GLsizei;
    1.36 +typedef int8_t GLbyte;
    1.37 +typedef int16_t GLshort;
    1.38 +typedef uint8_t GLubyte;
    1.39 +typedef uint16_t GLushort;
    1.40 +typedef float GLfloat;
    1.41 +typedef float GLclampf;
    1.42 +#ifndef GLdouble_defined
    1.43 +typedef double GLdouble;
    1.44 +#endif
    1.45 +typedef double GLclampd;
    1.46 +typedef void GLvoid;
    1.47 +
    1.48 +typedef char GLchar;
    1.49 +#ifndef __gl2_h_
    1.50 +typedef intptr_t GLsizeiptr;
    1.51 +typedef intptr_t GLintptr;
    1.52 +#endif
    1.53 +
    1.54 +#endif /* #if !defined(__gltypes_h_) && !defined(__gl_h_) */
    1.55 +
    1.56 +#include <stdint.h>
    1.57 +
    1.58 +// ARB_sync
    1.59 +typedef struct __GLsync* GLsync;
    1.60 +typedef int64_t GLint64;
    1.61 +typedef uint64_t GLuint64;
    1.62 +
    1.63 +// OES_EGL_image (GLES)
    1.64 +typedef void* GLeglImage;
    1.65 +
    1.66 +// KHR_debug
    1.67 +typedef void (GLAPIENTRY *GLDEBUGPROC)(GLenum source,
    1.68 +                                       GLenum type,
    1.69 +                                       GLuint id,
    1.70 +                                       GLenum severity,
    1.71 +                                       GLsizei length,
    1.72 +                                       const GLchar* message,
    1.73 +                                       const GLvoid* userParam);
    1.74 +
    1.75 +// EGL types
    1.76 +typedef void* EGLImage;
    1.77 +typedef int EGLint;
    1.78 +typedef unsigned int EGLBoolean;
    1.79 +typedef unsigned int EGLenum;
    1.80 +typedef void *EGLConfig;
    1.81 +typedef void *EGLContext;
    1.82 +typedef void *EGLDisplay;
    1.83 +typedef void *EGLSurface;
    1.84 +typedef void *EGLClientBuffer;
    1.85 +typedef void *EGLCastToRelevantPtr;
    1.86 +typedef void *EGLImage;
    1.87 +typedef void *EGLSync;
    1.88 +typedef uint64_t EGLTime;
    1.89 +
    1.90 +#define EGL_NO_CONTEXT       ((EGLContext)0)
    1.91 +#define EGL_NO_DISPLAY       ((EGLDisplay)0)
    1.92 +#define EGL_NO_SURFACE       ((EGLSurface)0)
    1.93 +#define EGL_NO_CONFIG        ((EGLConfig)nullptr)
    1.94 +#define EGL_NO_SYNC          ((EGLSync)0)
    1.95 +#define EGL_NO_IMAGE         ((EGLImage)0)
    1.96 +
    1.97 +#endif

mercurial