2013-08-13 18:35:03 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
2017-12-20 11:43:11 +03:00
|
|
|
#ifndef GLTYPES_H_
|
2013-08-13 18:35:03 +04:00
|
|
|
#define GLTYPES_H_
|
|
|
|
|
2013-09-04 16:14:52 +04:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2013-10-09 03:20:24 +04:00
|
|
|
#ifndef GLAPIENTRY
|
|
|
|
# ifdef WIN32
|
|
|
|
# include <windef.h>
|
|
|
|
# define GLAPIENTRY APIENTRY
|
|
|
|
# define GLAPI
|
|
|
|
# else
|
|
|
|
# define GLAPIENTRY
|
|
|
|
# define GLAPI
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2018-03-12 23:37:10 +03:00
|
|
|
typedef uint8_t realGLboolean;
|
2013-09-04 16:14:52 +04:00
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
#if !defined(__gltypes_h_) && !defined(__gl_h_)
|
|
|
|
# define __gltypes_h_
|
|
|
|
# define __gl_h_
|
|
|
|
|
2013-09-04 16:14:41 +04:00
|
|
|
typedef uint32_t GLenum;
|
|
|
|
typedef uint32_t GLbitfield;
|
|
|
|
typedef uint32_t GLuint;
|
|
|
|
typedef int32_t GLint;
|
|
|
|
typedef int32_t GLsizei;
|
|
|
|
typedef int8_t GLbyte;
|
|
|
|
typedef int16_t GLshort;
|
|
|
|
typedef uint8_t GLubyte;
|
|
|
|
typedef uint16_t GLushort;
|
2013-08-13 18:35:03 +04:00
|
|
|
typedef float GLfloat;
|
|
|
|
typedef float GLclampf;
|
|
|
|
# ifndef GLdouble_defined
|
|
|
|
typedef double GLdouble;
|
|
|
|
# endif
|
|
|
|
typedef double GLclampd;
|
|
|
|
typedef void GLvoid;
|
|
|
|
|
|
|
|
typedef char GLchar;
|
|
|
|
# ifndef __gl2_h_
|
2018-03-12 23:37:10 +03:00
|
|
|
# ifdef _WIN64
|
|
|
|
typedef signed long long int GLintptr;
|
|
|
|
typedef signed long long int GLsizeiptr;
|
|
|
|
# else
|
|
|
|
typedef signed long int GLintptr;
|
|
|
|
typedef signed long int GLsizeiptr;
|
|
|
|
# endif
|
2013-08-13 18:35:03 +04:00
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif /* #if !defined(__gltypes_h_) && !defined(__gl_h_) */
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
// ARB_sync
|
|
|
|
typedef struct __GLsync* GLsync;
|
|
|
|
typedef int64_t GLint64;
|
|
|
|
typedef uint64_t GLuint64;
|
|
|
|
|
|
|
|
// OES_EGL_image (GLES)
|
|
|
|
typedef void* GLeglImage;
|
|
|
|
|
2013-10-09 03:20:24 +04:00
|
|
|
// KHR_debug
|
|
|
|
typedef void(GLAPIENTRY* GLDEBUGPROC)(GLenum source, GLenum type, GLuint id,
|
|
|
|
GLenum severity, GLsizei length,
|
|
|
|
const GLchar* message,
|
|
|
|
const GLvoid* userParam);
|
|
|
|
|
2013-08-13 18:35:03 +04:00
|
|
|
// EGL types
|
|
|
|
typedef void* EGLImage;
|
|
|
|
typedef int EGLint;
|
|
|
|
typedef unsigned int EGLBoolean;
|
|
|
|
typedef unsigned int EGLenum;
|
2017-05-29 07:15:07 +03:00
|
|
|
typedef intptr_t EGLAttrib;
|
2016-06-11 04:37:07 +03:00
|
|
|
typedef void* EGLConfig;
|
|
|
|
typedef void* EGLContext;
|
|
|
|
typedef void* EGLDisplay;
|
2017-05-29 07:15:07 +03:00
|
|
|
typedef void* EGLDeviceEXT;
|
2016-06-11 04:37:07 +03:00
|
|
|
typedef void* EGLSurface;
|
|
|
|
typedef void* EGLClientBuffer;
|
|
|
|
typedef void* EGLCastToRelevantPtr;
|
|
|
|
typedef void* EGLImage;
|
|
|
|
typedef void* EGLSync;
|
2017-05-29 07:15:07 +03:00
|
|
|
typedef void* EGLStreamKHR;
|
2013-08-13 18:35:03 +04:00
|
|
|
typedef uint64_t EGLTime;
|
|
|
|
|
|
|
|
#define EGL_NO_CONTEXT ((EGLContext)0)
|
|
|
|
#define EGL_NO_DISPLAY ((EGLDisplay)0)
|
|
|
|
#define EGL_NO_SURFACE ((EGLSurface)0)
|
|
|
|
#define EGL_NO_CONFIG ((EGLConfig) nullptr)
|
|
|
|
#define EGL_NO_SYNC ((EGLSync)0)
|
|
|
|
#define EGL_NO_IMAGE ((EGLImage)0)
|
2017-12-20 11:43:11 +03:00
|
|
|
|
|
|
|
#ifdef XP_WIN
|
|
|
|
# ifndef WIN32_LEAN_AND_MEAN
|
|
|
|
# define WIN32_LEAN_AND_MEAN 1
|
|
|
|
# endif
|
|
|
|
|
|
|
|
# include <windef.h>
|
|
|
|
|
|
|
|
typedef HDC EGLNativeDisplayType;
|
|
|
|
typedef HBITMAP EGLNativePixmapType;
|
|
|
|
typedef HWND EGLNativeWindowType;
|
|
|
|
#else
|
|
|
|
typedef void* EGLNativeDisplayType;
|
|
|
|
typedef void* EGLNativePixmapType;
|
|
|
|
typedef void* EGLNativeWindowType;
|
2013-08-13 18:35:03 +04:00
|
|
|
#endif
|
2017-12-20 11:43:11 +03:00
|
|
|
|
|
|
|
#endif // GLTYPES_H_
|