gfx/gl/GLTypes.h
author Mozilla Releng Treescript <release+treescript@mozilla.org>
Tue, 16 Aug 2022 19:03:11 +0000
changeset 627318 a51ffdf576ee6dde088f4a39c8e0d7d37844a830
parent 454520 5f4630838d46dd81dadb13220a4af0da9e23a619
permissions -rw-r--r--
no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD cy -> fe475b7bab2af983d4cee8e65e4972bfbcf66cec en-CA -> a3ef65c7edaf9177bc6d86a575da123b8724a329 en-GB -> a5a0d021121c2b7a8df335e57bfb0b432f7c7ca4 fr -> 4970122e206d2d09f9c62e143b6c762f0cbe1a9a fy-NL -> 291db3aaa83f252be9f5da671b265bb6fb45a28c gn -> 788acda2302098b31a0812bac3041737be91f8e3 it -> 12c20d432cac1df7c787e5c3d3aa112079c2378d nn-NO -> 2b14fbbce8aab53ad5eebbe7c2f13022a0fddd0f si -> 579629b003e5dd54eefdef80b4fd0c41bc167ee7 tr -> 1ace5ae3f35fafb4c08e4f2c6b43f87716f2bd7e

/* 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/. */

#ifndef GLTYPES_H_
#define GLTYPES_H_

#include <stddef.h>
#include <stdint.h>

#ifndef GLAPIENTRY
#  ifdef WIN32
#    include <windef.h>
#    define GLAPIENTRY APIENTRY
#    define GLAPI
#  else
#    define GLAPIENTRY
#    define GLAPI
#  endif
#endif

typedef uint8_t realGLboolean;

#if !defined(__gltypes_h_) && !defined(__gl_h_)
#  define __gltypes_h_
#  define __gl_h_

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;
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_
#    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
#  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;

// KHR_debug
typedef void(GLAPIENTRY* GLDEBUGPROC)(GLenum source, GLenum type, GLuint id,
                                      GLenum severity, GLsizei length,
                                      const GLchar* message,
                                      const GLvoid* userParam);

// EGL types
typedef void* EGLImage;
typedef int EGLint;
typedef unsigned int EGLBoolean;
typedef unsigned int EGLenum;
typedef intptr_t EGLAttrib;
typedef void* EGLConfig;
typedef void* EGLContext;
typedef void* EGLDisplay;
typedef void* EGLDeviceEXT;
typedef void* EGLSurface;
typedef void* EGLClientBuffer;
typedef void* EGLCastToRelevantPtr;
typedef void* EGLImage;
typedef void* EGLSync;
typedef void* EGLStreamKHR;
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)

#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;
#endif

#endif  // GLTYPES_H_