1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:07:36 +00:00

LibGL: Improve constants and types compatibility

When compiling with SDL_opengl, all kinds of differences between LibGL
and OpenGL constants and types popped up as redefinition warnings and
errors.

This fixes all LibGL-related warnings when compiling PrBoom+ :^)
This commit is contained in:
Jelle Raaijmakers 2022-09-01 13:27:11 +02:00 committed by Andreas Kling
parent 4d090487ac
commit f08411ba3f
5 changed files with 58 additions and 53 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Jelle Raaijmakers <jelle@gmta.nl>
* Copyright (c) 2021-2022, Jelle Raaijmakers <jelle@gmta.nl>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -21,7 +21,7 @@
// Defines types used by all OpenGL applications
// https://www.khronos.org/opengl/wiki/OpenGL_Type
typedef char GLchar;
typedef char GLbyte;
typedef signed char GLbyte;
typedef unsigned char GLuchar;
typedef unsigned char GLubyte;
typedef unsigned char GLboolean;
@ -30,8 +30,6 @@ typedef unsigned short GLushort;
typedef int GLint;
typedef unsigned int GLuint;
typedef int GLfixed;
typedef long long GLint64;
typedef unsigned long long GLuint64;
typedef int GLsizei;
typedef void GLvoid;
typedef float GLfloat;
@ -40,3 +38,11 @@ typedef float GLclampf;
typedef double GLdouble;
typedef unsigned int GLenum;
typedef unsigned int GLbitfield;
#if defined(__x86_64__) || defined(__aarch64__)
typedef long GLint64;
typedef unsigned long GLuint64;
#else
typedef long long GLint64;
typedef unsigned long long GLuint64;
#endif