Changeset View
Changeset View
Standalone View
Standalone View
source/lib/external_libraries/glext_funcs.h
/* Copyright (C) 2013 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
#define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING | #define GL_FRAMEBUFFER_BINDING_EXT GL_FRAMEBUFFER_BINDING | ||||
#define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE | #define GL_FRAMEBUFFER_COMPLETE_EXT GL_FRAMEBUFFER_COMPLETE | ||||
#define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER | #define GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER | ||||
#define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE // TODO: should fix code that relies on GL_CLAMP_TO_BORDER | #define GL_CLAMP_TO_BORDER GL_CLAMP_TO_EDGE // TODO: should fix code that relies on GL_CLAMP_TO_BORDER | ||||
typedef GLuint GLhandleARB; | typedef GLuint GLhandleARB; | ||||
// GL_KHR_debug / GLES3.2 | |||||
typedef void (GL_APIENTRY *GLDEBUGPROCKHR)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam); | |||||
vladislavbelov: Space and `*`. | |||||
FUNC2(void, glDebugMessageCallbackKHR, glDebugMessageCallback, "3.2", (GLDEBUGPROCKHR callback, const GLvoid* userParam)) | |||||
FUNC2(void, glDebugMessageControlKHR, glDebugMessageControl, "3.2", (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled)) | |||||
FUNC2(void, glPushDebugGroupKHR, glPushDebugGroup, "3.2", (GLenum source, GLuint id, GLsizei length, const GLchar* message)) | |||||
FUNC2(void, glPopDebugGroupKHR, glPopDebugGroup, "3.2", (void)) | |||||
FUNC2(void, glObjectLabelKHR, glObjectLabel, "3.2", (GLenum identifier, GLuint name, GLsizei length, const GLchar* label)) | |||||
#else | #else | ||||
Not Done Inline ActionsAdd the define after #else: #ifndef GL_APIENTRY #ifdef APIENTRY #define GL_APIENTRY APIENTRY #else #define GL_APIENTRY #endif vladislavbelov: Add the define after `#else`:
```lang=cpp
#ifndef GL_APIENTRY
#ifdef APIENTRY
#define… | |||||
// were these defined as real functions in gl.h already? | // were these defined as real functions in gl.h already? | ||||
// GL_KHR_debug / GL4.3 | |||||
vladislavbelovUnsubmitted Not Done Inline ActionsWe have increasing number of version, so I think it'd be better to put this section at the end of the #else - #endif section. Like it's done for GLES. vladislavbelov: We have increasing number of version, so I think it'd be better to put this section at the end… | |||||
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam); | |||||
FUNC2(void, glDebugMessageCallbackKHR, glDebugMessageCallback, "4.3", (GLDEBUGPROC callback, const GLvoid* userParam)) | |||||
FUNC2(void, glDebugMessageControlKHR, glDebugMessageControl, "4.3", (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint* ids, GLboolean enabled)) | |||||
FUNC2(void, glPushDebugGroupKHR, glPushDebugGroup, "4.3", (GLenum source, GLuint id, GLsizei length, const GLchar* message)) | |||||
FUNC2(void, glPopDebugGroupKHR, glPopDebugGroup, "4.3", (void)) | |||||
FUNC2(void, glObjectLabelKHR, glObjectLabel, "4.3", (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) | |||||
Not Done Inline ActionsSpace. vladislavbelov: Space. | |||||
Not Done Inline Actions* for types not for variables; APIENTRY > GL_APIENTRY. vladislavbelov: `*` for types not for variables; `APIENTRY` > `GL_APIENTRY`. | |||||
// GL_EXT_draw_range_elements / GL1.2: | // GL_EXT_draw_range_elements / GL1.2: | ||||
FUNC2(void, glDrawRangeElementsEXT, glDrawRangeElements, "1.2", (GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid*)) | FUNC2(void, glDrawRangeElementsEXT, glDrawRangeElements, "1.2", (GLenum, GLuint, GLuint, GLsizei, GLenum, GLvoid*)) | ||||
// GL_ARB_multitexture / GL1.3: | // GL_ARB_multitexture / GL1.3: | ||||
FUNC2(void, glMultiTexCoord2fARB, glMultiTexCoord2f, "1.3", (int, float, float)) | FUNC2(void, glMultiTexCoord2fARB, glMultiTexCoord2f, "1.3", (int, float, float)) | ||||
FUNC2(void, glMultiTexCoord3fARB, glMultiTexCoord3f, "1.3", (int, float, float, float)) | FUNC2(void, glMultiTexCoord3fARB, glMultiTexCoord3f, "1.3", (int, float, float, float)) | ||||
FUNC2(void, glActiveTextureARB, glActiveTexture, "1.3", (int)) | FUNC2(void, glActiveTextureARB, glActiveTexture, "1.3", (int)) | ||||
FUNC2(void, glClientActiveTextureARB, glClientActiveTexture, "1.3", (int)) | FUNC2(void, glClientActiveTextureARB, glClientActiveTexture, "1.3", (int)) | ||||
▲ Show 20 Lines • Show All 272 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Space and *.