[Fix] (MG_Impl/GetProcAddress, Exporting): properly get proc address, clear reliance on dlsym

This commit is contained in:
2026-01-17 09:19:38 +08:00
parent 97cbb35dbd
commit 80bb46cbb9
15 changed files with 2144 additions and 35 deletions
+1
View File
@@ -168,6 +168,7 @@ set(SOURCE_FILES
MobileGL/MG_Impl/GLImpl/Sync/GL_Sync.cpp
MobileGL/MG_Impl/Init.cpp
MobileGL/MG_Impl/GetProcAddress.cpp
MobileGL/MG_Backend/Init.cpp
+3 -1
View File
@@ -52,8 +52,10 @@
#include <spirv_cross/spirv_cross_c.h>
// Include OpenGL and EGL headers
#include <GL/gl.h>
#include <EGL/egl.h>
#define GL_GLEXT_PROTOTYPES
#include <GL/glcorearb.h>
#undef GL_GLEXT_PROTOTYPES
#include <GL/glext.h>
#include <GLES3/gl32.h>
@@ -6,6 +6,9 @@
// End of Source File Header
#include "EGLWrapper.h"
#include "MG_Impl/GetProcAddress.h"
#include <Config.h>
#include <MG_Util/BackendLoaders/OpenGL/Loader.h>
@@ -96,20 +99,121 @@ namespace MobileGL {
return MG_External::EGL::eglCreatePbufferSurface(dpy, config, attrib_list);
}
EGLBoolean BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return MG_External::EGL::eglBindTexImage(dpy, surface, buffer);
}
EGLBoolean ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return MG_External::EGL::eglReleaseTexImage(dpy, surface, buffer);
}
EGLBoolean CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) {
return MG_External::EGL::eglCopyBuffers(dpy, surface, target);
}
EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
EGLConfig config, const EGLint* attrib_list) {
return MG_External::EGL::eglCreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
}
EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap,
const EGLint* attrib_list) {
return MG_External::EGL::eglCreatePixmapSurface(dpy, config, pixmap, attrib_list);
}
EGLBoolean GetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) {
return MG_External::EGL::eglGetConfigs(dpy, configs, config_size, num_config);
}
EGLDisplay GetCurrentDisplay(void) {
return MG_External::EGL::eglGetCurrentDisplay();
}
EGLenum QueryAPI(void) {
return MG_External::EGL::eglQueryAPI();
}
EGLBoolean QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value) {
return MG_External::EGL::eglQueryContext(dpy, ctx, attribute, value);
}
EGLBoolean SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) {
return MG_External::EGL::eglSurfaceAttrib(dpy, surface, attribute, value);
}
EGLBoolean WaitClient(void) {
return MG_External::EGL::eglWaitClient();
}
EGLBoolean WaitGL(void) {
return MG_External::EGL::eglWaitGL();
}
EGLBoolean WaitNative(EGLint engine) {
return MG_External::EGL::eglWaitNative(engine);
}
__eglMustCastToProperFunctionPointerType GetProcAddress(const char* name) {
MGLOG_D("eglGetProcAddress(%s)", name);
#if !defined(WIN32) && !defined(__APPLE__)
void* proc = dlsym(RTLD_DEFAULT, (const char*)name);
#else
void* proc = NULL;
#endif
void* proc = MG_Impl::GetProcAddress(name);
if (!proc) {
MGLOG_W("Failed to get function: %s", (const char*)name);
return nullptr;
}
return (__eglMustCastToProperFunctionPointerType)proc;
}
EGLSync CreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list) {
return MG_External::EGL::eglCreateSync(dpy, type, attrib_list);
}
EGLBoolean DestroySync(EGLDisplay dpy, EGLSync sync) {
return MG_External::EGL::eglDestroySync(dpy, sync);
}
EGLint ClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) {
return MG_External::EGL::eglClientWaitSync(dpy, sync, flags, timeout);
}
EGLBoolean GetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value) {
return MG_External::EGL::eglGetSyncAttrib(dpy, sync, attribute, value);
}
EGLImage CreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list) {
return MG_External::EGL::eglCreateImage(dpy, ctx, target, buffer, attrib_list);
}
EGLBoolean DestroyImage(EGLDisplay dpy, EGLImage image) {
return MG_External::EGL::eglDestroyImage(dpy, image);
}
EGLDisplay GetPlatformDisplay(EGLenum platform, void * native_display, const EGLAttrib * attrib_list) {
return MG_External::EGL::eglGetPlatformDisplay(platform, native_display, attrib_list);
}
EGLSurface CreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list) {
return MG_External::EGL::eglCreatePlatformWindowSurface(dpy, config, native_window, attrib_list);
}
EGLSurface CreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list) {
return MG_External::EGL::eglCreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list);
}
EGLBoolean WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) {
return MG_External::EGL::eglWaitSync(dpy, sync, flags);
}
} // namespace MG_Impl::EGLImpl
} // namespace MobileGL
#endif
#endif
@@ -103,3 +103,102 @@ MOBILEGL_EGL_API EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig co
MOBILEGL_EGL_API __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char* name) {
return MobileGL::MG_Impl::EGLImpl::GetProcAddress(name);
}
MOBILEGL_EGL_API EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return MobileGL::MG_Impl::EGLImpl::BindTexImage(dpy, surface, buffer);
}
MOBILEGL_EGL_API EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return MobileGL::MG_Impl::EGLImpl::ReleaseTexImage(dpy, surface, buffer);
}
MOBILEGL_EGL_API EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) {
return MobileGL::MG_Impl::EGLImpl::CopyBuffers(dpy, surface, target);
}
MOBILEGL_EGL_API EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype,
EGLClientBuffer buffer, EGLConfig config,
const EGLint* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreatePbufferFromClientBuffer(dpy, buftype, buffer, config, attrib_list);
}
MOBILEGL_EGL_API EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap,
const EGLint* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreatePixmapSurface(dpy, config, pixmap, attrib_list);
}
MOBILEGL_EGL_API EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) {
return MobileGL::MG_Impl::EGLImpl::GetConfigs(dpy, configs, config_size, num_config);
}
MOBILEGL_EGL_API EGLDisplay eglGetCurrentDisplay(void) {
return MobileGL::MG_Impl::EGLImpl::GetCurrentDisplay();
}
MOBILEGL_EGL_API EGLenum eglQueryAPI(void) {
return MobileGL::MG_Impl::EGLImpl::QueryAPI();
}
MOBILEGL_EGL_API EGLBoolean eglQueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value) {
return MobileGL::MG_Impl::EGLImpl::QueryContext(dpy, ctx, attribute, value);
}
MOBILEGL_EGL_API EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) {
return MobileGL::MG_Impl::EGLImpl::SurfaceAttrib(dpy, surface, attribute, value);
}
MOBILEGL_EGL_API EGLBoolean eglWaitClient(void) {
return MobileGL::MG_Impl::EGLImpl::WaitClient();
}
MOBILEGL_EGL_API EGLBoolean eglWaitGL(void) {
return MobileGL::MG_Impl::EGLImpl::WaitGL();
}
MOBILEGL_EGL_API EGLBoolean eglWaitNative(EGLint engine) {
return MobileGL::MG_Impl::EGLImpl::WaitNative(engine);
}
MOBILEGL_EGL_API EGLSync eglCreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreateSync(dpy, type, attrib_list);
}
MOBILEGL_EGL_API EGLBoolean eglDestroySync(EGLDisplay dpy, EGLSync sync) {
return MobileGL::MG_Impl::EGLImpl::DestroySync(dpy, sync);
}
MOBILEGL_EGL_API EGLint eglClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout) {
return MobileGL::MG_Impl::EGLImpl::ClientWaitSync(dpy, sync, flags, timeout);
}
MOBILEGL_EGL_API EGLBoolean eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib* value) {
return MobileGL::MG_Impl::EGLImpl::GetSyncAttrib(dpy, sync, attribute, value);
}
MOBILEGL_EGL_API EGLImage eglCreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer,
const EGLAttrib* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreateImage(dpy, ctx, target, buffer, attrib_list);
}
MOBILEGL_EGL_API EGLBoolean eglDestroyImage(EGLDisplay dpy, EGLImage image) {
return MobileGL::MG_Impl::EGLImpl::DestroyImage(dpy, image);
}
MOBILEGL_EGL_API EGLDisplay eglGetPlatformDisplay(EGLenum platform, void* native_display,
const EGLAttrib* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::GetPlatformDisplay(platform, native_display, attrib_list);
}
MOBILEGL_EGL_API EGLSurface eglCreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config, void* native_window,
const EGLAttrib* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreatePlatformWindowSurface(dpy, config, native_window, attrib_list);
}
MOBILEGL_EGL_API EGLSurface eglCreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig config, void* native_pixmap,
const EGLAttrib* attrib_list) {
return MobileGL::MG_Impl::EGLImpl::CreatePlatformPixmapSurface(dpy, config, native_pixmap, attrib_list);
}
MOBILEGL_EGL_API EGLBoolean eglWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags) {
return MobileGL::MG_Impl::EGLImpl::WaitSync(dpy, sync, flags);
}
@@ -113,6 +113,69 @@ namespace MobileGL {
return (EGLSurface)1;
}
EGLBoolean BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return EGL_TRUE;
}
EGLBoolean ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) {
return EGL_TRUE;
}
EGLBoolean CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) {
return EGL_TRUE;
}
EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
EGLConfig config, const EGLint* attrib_list) {
return (EGLSurface)1;
}
EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap,
const EGLint* attrib_list) {
return (EGLSurface)1;
}
EGLBoolean GetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config) {
if (num_config) {
*num_config = 1;
}
if (configs && config_size > 0) {
configs[0] = (EGLConfig)1;
}
return EGL_TRUE;
}
EGLDisplay GetCurrentDisplay(void) {
return (EGLDisplay)1;
}
EGLenum QueryAPI(void) {
return EGL_OPENGL_API;
}
EGLBoolean QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value) {
if (value) {
*value = 0;
}
return EGL_TRUE;
}
EGLBoolean SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) {
return EGL_TRUE;
}
EGLBoolean WaitClient(void) {
return EGL_TRUE;
}
EGLBoolean WaitGL(void) {
return EGL_TRUE;
}
EGLBoolean WaitNative(EGLint engine) {
return EGL_TRUE;
}
__eglMustCastToProperFunctionPointerType GetProcAddress(const char* name) {
MGLOG_D("eglGetProcAddress(%s)", name);
#if !defined(WIN32) && !defined(__APPLE__)
@@ -128,4 +191,4 @@ namespace MobileGL {
}
} // namespace MG_Impl::EGLImpl
} // namespace MobileGL
#endif
#endif
@@ -32,6 +32,31 @@ namespace MobileGL {
EGLBoolean SwapInterval(EGLDisplay dpy, EGLint interval);
EGLBoolean SwapBuffers(EGLDisplay dpy, EGLSurface draw);
EGLSurface CreatePbufferSurface(EGLDisplay dpy, EGLConfig config, const EGLint* attrib_list);
EGLBoolean BindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLBoolean ReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer);
EGLBoolean CopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target);
EGLSurface CreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
EGLConfig config, const EGLint* attrib_list);
EGLSurface CreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap,
const EGLint* attrib_list);
EGLBoolean GetConfigs(EGLDisplay dpy, EGLConfig* configs, EGLint config_size, EGLint* num_config);
EGLDisplay GetCurrentDisplay(void);
EGLenum QueryAPI(void);
EGLBoolean QueryContext(EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint* value);
EGLBoolean SurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value);
EGLBoolean WaitClient(void);
EGLBoolean WaitGL(void);
EGLBoolean WaitNative(EGLint engine);
__eglMustCastToProperFunctionPointerType GetProcAddress(const char* name);
EGLSync CreateSync(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list);
EGLBoolean DestroySync(EGLDisplay dpy, EGLSync sync);
EGLint ClientWaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
EGLBoolean GetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value);
EGLImage CreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list);
EGLBoolean DestroyImage(EGLDisplay dpy, EGLImage image);
EGLDisplay GetPlatformDisplay(EGLenum platform, void * native_display, const EGLAttrib * attrib_list);
EGLSurface CreatePlatformWindowSurface(EGLDisplay dpy, EGLConfig config, void * native_window, const EGLAttrib * attrib_list);
EGLSurface CreatePlatformPixmapSurface(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list);
EGLBoolean WaitSync(EGLDisplay dpy, EGLSync sync, EGLint flags);
} // namespace MG_Impl::EGLImpl
} // namespace MobileGL
} // namespace MobileGL
@@ -1107,6 +1107,7 @@ DECLARE_GL_FUNCTION_STUB_HEAD(void, SpecializeShader, GLuint shader, const GLcha
DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawArraysIndirectCount, GLenum mode, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawArraysIndirectCount, mode, indirect, drawcount, maxdrawcount, stride)
DECLARE_GL_FUNCTION_STUB_HEAD(void, MultiDrawElementsIndirectCount, GLenum mode, GLenum type, const void* indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MultiDrawElementsIndirectCount, mode, type, indirect, drawcount, maxdrawcount, stride)
DECLARE_GL_FUNCTION_STUB_HEAD(void, PolygonOffsetClamp, GLfloat factor, GLfloat units, GLfloat clamp) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, PolygonOffsetClamp, factor, units, clamp)
DECLARE_GL_FUNCTION_STUB_HEAD(void, PrimitiveBoundingBoxARB, GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) DECLARE_GL_FUNCTION_STUB_END(void, PrimitiveBoundingBoxARB, minX, minY, minZ, minW, maxX, maxY, maxZ, maxW)
DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureHandleARB, GLuint texture) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureHandleARB, texture)
DECLARE_GL_FUNCTION_STUB_HEAD(GLuint64, GetTextureSamplerHandleARB, GLuint texture, GLuint sampler) DECLARE_GL_FUNCTION_STUB_END(GLuint64, GetTextureSamplerHandleARB, texture, sampler)
DECLARE_GL_FUNCTION_STUB_HEAD(void, MakeTextureHandleResidentARB, GLuint64 handle) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, MakeTextureHandleResidentARB, handle)
@@ -2827,3 +2828,274 @@ DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fS
DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN, const GLuint* rc, const GLfloat* tc, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN, rc, tc, n, v)
DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, rc, s, t, r, g, b, a, nx, ny, nz, x, y, z)
DECLARE_GL_FUNCTION_STUB_HEAD(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN, const GLuint* rc, const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v) DECLARE_GL_FUNCTION_STUB_END_NO_RETURN(void, ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN, rc, tc, c, n, v)
MOBILEGL_GL_API void glDebugMessageControlARB(GLenum source, GLenum type, GLenum severity, GLsizei count,
const GLuint* ids, GLboolean enabled) {
glDebugMessageControl(source, type, severity, count, ids, enabled);
}
MOBILEGL_GL_API void glDebugMessageInsertARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length,
const GLchar* buf) {
glDebugMessageInsert(source, type, id, severity, length, buf);
}
MOBILEGL_GL_API void glDebugMessageCallbackARB(GLDEBUGPROC callback, const void* userParam) {
glDebugMessageCallback(callback, userParam);
}
MOBILEGL_GL_API GLuint glGetDebugMessageLogARB(GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types,
GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog) {
return glGetDebugMessageLog(count, bufSize, sources, types, ids, severities, lengths, messageLog);
}
MOBILEGL_GL_API void glDrawArraysInstancedARB(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) {
glDrawArraysInstanced(mode, first, count, instancecount);
}
MOBILEGL_GL_API void glDrawArraysInstancedEXT(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) {
glDrawArraysInstanced(mode, first, count, instancecount);
}
MOBILEGL_GL_API void glDrawElementsInstancedARB(GLenum mode, GLsizei count, GLenum type, const void* indices,
GLsizei instancecount) {
glDrawElementsInstanced(mode, count, type, indices, instancecount);
}
MOBILEGL_GL_API void glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void* indices,
GLsizei instancecount) {
glDrawElementsInstanced(mode, count, type, indices, instancecount);
}
MOBILEGL_GL_API void glFramebufferTextureARB(GLenum target, GLenum attachment, GLuint texture, GLint level) {
glFramebufferTexture(target, attachment, texture, level);
}
MOBILEGL_GL_API void glFramebufferTextureLayerARB(GLenum target, GLenum attachment, GLuint texture, GLint level,
GLint layer) {
glFramebufferTextureLayer(target, attachment, texture, level, layer);
}
MOBILEGL_GL_API void glGetFramebufferParameterivEXT(GLenum target, GLenum pname, GLint* params) {
glGetFramebufferParameteriv(target, pname, params);
}
MOBILEGL_GL_API GLenum glGetGraphicsResetStatusARB(void) {
return glGetGraphicsResetStatus();
}
MOBILEGL_GL_API void glGetnUniformfvARB(GLuint program, GLint location, GLsizei bufSize, GLfloat* params) {
glGetnUniformfv(program, location, bufSize, params);
}
MOBILEGL_GL_API void glGetnUniformivARB(GLuint program, GLint location, GLsizei bufSize, GLint* params) {
glGetnUniformiv(program, location, bufSize, params);
}
MOBILEGL_GL_API void glGetnUniformuivARB(GLuint program, GLint location, GLsizei bufSize, GLuint* params) {
glGetnUniformuiv(program, location, bufSize, params);
}
MOBILEGL_GL_API void glGetObjectLabelEXT(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length,
GLchar* label) {
glGetObjectLabel(identifier, name, bufSize, length, label);
}
MOBILEGL_GL_API void* glMapNamedBuffer(GLuint buffer, GLenum access) {
MGLOG_W("Stub function: %s(...)", __FUNCTION__);
return nullptr;
}
MOBILEGL_GL_API void* glMapNamedBufferEXT(GLuint buffer, GLenum access) {
return glMapNamedBuffer(buffer, access);
}
MOBILEGL_GL_API void* glMapNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) {
MGLOG_W("Stub function: %s(...)", __FUNCTION__);
return nullptr;
}
MOBILEGL_GL_API void* glMapNamedBufferRangeEXT(GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access) {
return glMapNamedBufferRange(buffer, offset, length, access);
}
MOBILEGL_GL_API void glMinSampleShadingARB(GLfloat value) {
glMinSampleShading(value);
}
MOBILEGL_GL_API void glProgramParameteriARB(GLuint program, GLenum pname, GLint value) {
glProgramParameteri(program, pname, value);
}
MOBILEGL_GL_API void glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) {
glProgramUniform1f(program, location, v0);
}
MOBILEGL_GL_API void glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) {
glProgramUniform1fv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform1iEXT(GLuint program, GLint location, GLint v0) {
glProgramUniform1i(program, location, v0);
}
MOBILEGL_GL_API void glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) {
glProgramUniform1iv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) {
glProgramUniform1ui(program, location, v0);
}
MOBILEGL_GL_API void glProgramUniform1uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) {
glProgramUniform1uiv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) {
glProgramUniform2f(program, location, v0, v1);
}
MOBILEGL_GL_API void glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) {
glProgramUniform2fv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) {
glProgramUniform2i(program, location, v0, v1);
}
MOBILEGL_GL_API void glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) {
glProgramUniform2iv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) {
glProgramUniform2ui(program, location, v0, v1);
}
MOBILEGL_GL_API void glProgramUniform2uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) {
glProgramUniform2uiv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) {
glProgramUniform3f(program, location, v0, v1, v2);
}
MOBILEGL_GL_API void glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) {
glProgramUniform3fv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) {
glProgramUniform3i(program, location, v0, v1, v2);
}
MOBILEGL_GL_API void glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) {
glProgramUniform3iv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) {
glProgramUniform3ui(program, location, v0, v1, v2);
}
MOBILEGL_GL_API void glProgramUniform3uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) {
glProgramUniform3uiv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform4fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
GLfloat v3) {
glProgramUniform4f(program, location, v0, v1, v2, v3);
}
MOBILEGL_GL_API void glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat* value) {
glProgramUniform4fv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) {
glProgramUniform4i(program, location, v0, v1, v2, v3);
}
MOBILEGL_GL_API void glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint* value) {
glProgramUniform4iv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2,
GLuint v3) {
glProgramUniform4ui(program, location, v0, v1, v2, v3);
}
MOBILEGL_GL_API void glProgramUniform4uivEXT(GLuint program, GLint location, GLsizei count, const GLuint* value) {
glProgramUniform4uiv(program, location, count, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix2fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix2x3fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix2x3fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix2x4fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix2x4fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix3fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix3x2fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix3x2fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix3x4fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix3x4fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix4fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix4x2fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix4x2fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glProgramUniformMatrix4x3fvEXT(GLuint program, GLint location, GLsizei count,
GLboolean transpose, const GLfloat* value) {
glProgramUniformMatrix4x3fv(program, location, count, transpose, value);
}
MOBILEGL_GL_API void glReadnPixelsARB(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type,
GLsizei bufSize, void* data) {
glReadnPixels(x, y, width, height, format, type, bufSize, data);
}
MOBILEGL_GL_API void glTexBufferARB(GLenum target, GLenum internalformat, GLuint buffer) {
glTexBuffer(target, internalformat, buffer);
}
MOBILEGL_GL_API void glTexStorage1D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
glTexStorage1DEXT(target, levels, internalformat, width);
}
MOBILEGL_GL_API void glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
GLsizei height) {
glTexStorage2D(target, levels, internalformat, width, height);
}
MOBILEGL_GL_API void glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width,
GLsizei height, GLsizei depth) {
glTexStorage3D(target, levels, internalformat, width, height, depth);
}
MOBILEGL_GL_API void glVertexAttribDivisorARB(GLuint index, GLuint divisor) {
glVertexAttribDivisor(index, divisor);
}
MOBILEGL_GL_API void glWindowRectanglesEXT(GLenum mode, GLsizei count, const GLint* box) {
MGLOG_W("Stub function: %s(...)", __FUNCTION__);
}
+1 -5
View File
@@ -12,11 +12,7 @@ namespace MG_Impl::GLXImpl {
void* GetProcAddress(const char* name) {
MGLOG_D("glXGetProcAddress(\"%s\")", name);
#if !defined(WIN32) && !defined(__APPLE__)
void* proc = dlsym(RTLD_DEFAULT, (const char*)name);
#else
void* proc = NULL;
#endif
void* proc = MobileGL::MG_Impl::GetProcAddress(name);
if (!proc) {
MGLOG_W("Failed to get function: %s", (const char*)name);
return nullptr;
+1
View File
@@ -7,6 +7,7 @@
#pragma once
#include <Includes.h>
#include "MG_Impl/GetProcAddress.h"
namespace MG_Impl {
namespace GLXImpl {
File diff suppressed because it is too large Load Diff
+15
View File
@@ -0,0 +1,15 @@
// MobileGL - MobileGL/MG_Impl/GetProcAddress.h
// Copyright (c) 2025-2026 MobileGL-Dev
// Licensed under the GNU Lesser General Public License v2.1:
// http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
// SPDX-License-Identifier: LGPL-2.1-only
// End of Source File Header
#pragma once
#include <Includes.h>
namespace MobileGL {
namespace MG_Impl {
void* GetProcAddress(const char* name);
} // namespace MG_Impl
} // namespace MobileGL
@@ -425,6 +425,14 @@ namespace MobileGL {
EGL_FUNC_DECL(eglWaitClient)
EGL_FUNC_DECL(eglWaitGL)
EGL_FUNC_DECL(eglWaitNative)
EGL_FUNC_DECL(eglCreateSync)
EGL_FUNC_DECL(eglDestroySync)
EGL_FUNC_DECL(eglClientWaitSync)
EGL_FUNC_DECL(eglGetSyncAttrib)
EGL_FUNC_DECL(eglCreateImage)
EGL_FUNC_DECL(eglDestroyImage)
EGL_FUNC_DECL(eglCreatePlatformPixmapSurface)
EGL_FUNC_DECL(eglWaitSync)
} // namespace EGL
} // namespace MG_External
@@ -911,6 +919,7 @@ namespace MobileGL {
INIT_EGL_FUNC(eglCreatePbufferFromClientBuffer)
INIT_EGL_FUNC(eglCreatePbufferSurface)
INIT_EGL_FUNC(eglCreatePixmapSurface)
INIT_EGL_FUNC(eglCreatePlatformPixmapSurface)
INIT_EGL_FUNC(eglCreatePlatformWindowSurface)
INIT_EGL_FUNC(eglCreateWindowSurface)
INIT_EGL_FUNC(eglDestroyContext)
@@ -941,6 +950,14 @@ namespace MobileGL {
INIT_EGL_FUNC(eglWaitClient)
INIT_EGL_FUNC(eglWaitGL)
INIT_EGL_FUNC(eglWaitNative)
INIT_EGL_FUNC(eglCreateSync)
INIT_EGL_FUNC(eglDestroySync)
INIT_EGL_FUNC(eglClientWaitSync)
INIT_EGL_FUNC(eglGetSyncAttrib)
INIT_EGL_FUNC(eglCreateImage)
INIT_EGL_FUNC(eglDestroyImage)
INIT_EGL_FUNC(eglGetPlatformDisplay)
INIT_EGL_FUNC(eglWaitSync)
EGLint configAttribs[] = {EGL_RED_SIZE,
8,
@@ -1037,4 +1054,4 @@ namespace MobileGL {
} // namespace BackendLoader::GLES
} // namespace MG_Util
} // namespace MobileGL
} // namespace MobileGL
@@ -473,7 +473,7 @@ namespace MobileGL {
typedef EGLSurface (*eglCreatePixmapSurface_PTR)(EGLDisplay dpy, EGLConfig config,
EGLNativePixmapType pixmap, const EGLint* attrib_list);
typedef EGLSurface (*eglCreatePlatformWindowSurface_PTR)(EGLDisplay display, EGLConfig config,
void* native_window, const EGLint* attrib_list);
void* native_window, const EGLAttrib* attrib_list);
typedef EGLSurface (*eglCreateWindowSurface_PTR)(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win,
const EGLint* attrib_list);
typedef EGLBoolean (*eglDestroyContext_PTR)(EGLDisplay dpy, EGLContext ctx);
@@ -487,7 +487,7 @@ namespace MobileGL {
typedef EGLSurface (*eglGetCurrentSurface_PTR)(EGLint readdraw);
typedef EGLDisplay (*eglGetDisplay_PTR)(EGLNativeDisplayType display_id);
typedef EGLDisplay (*eglGetPlatformDisplay_PTR)(EGLenum platform, void* native_display,
const EGLint* attrib_list);
const EGLAttrib* attrib_list);
typedef EGLint (*eglGetError_PTR)();
typedef __eglMustCastToProperFunctionPointerType (*eglGetProcAddress_PTR)(const char* procname);
typedef EGLBoolean (*eglInitialize_PTR)(EGLDisplay dpy, EGLint* major, EGLint* minor);
@@ -510,6 +510,15 @@ namespace MobileGL {
typedef EGLBoolean (*eglWaitClient_PTR)();
typedef EGLBoolean (*eglWaitGL_PTR)();
typedef EGLBoolean (*eglWaitNative_PTR)(EGLint engine);
typedef EGLSync (*eglCreateSync_PTR)(EGLDisplay dpy, EGLenum type, const EGLAttrib * attrib_list);
typedef EGLBoolean (*eglDestroySync_PTR)(EGLDisplay dpy, EGLSync sync);
typedef EGLint (*eglClientWaitSync_PTR)(EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout);
typedef EGLBoolean (*eglGetSyncAttrib_PTR)(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib * value);
typedef EGLImage (*eglCreateImage_PTR)(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib * attrib_list);
typedef EGLBoolean (*eglDestroyImage_PTR)(EGLDisplay dpy, EGLImage image);
typedef EGLSurface (*eglCreatePlatformPixmapSurface_PTR)(EGLDisplay dpy, EGLConfig config, void * native_pixmap, const EGLAttrib * attrib_list);
typedef EGLBoolean (*eglWaitSync_PTR)(EGLDisplay dpy, EGLSync sync, EGLint flags);
EGL_FUNC_DECL(eglBindAPI)
EGL_FUNC_DECL(eglBindTexImage)
@@ -549,6 +558,14 @@ namespace MobileGL {
EGL_FUNC_DECL(eglWaitClient)
EGL_FUNC_DECL(eglWaitGL)
EGL_FUNC_DECL(eglWaitNative)
EGL_FUNC_DECL(eglCreateSync)
EGL_FUNC_DECL(eglDestroySync)
EGL_FUNC_DECL(eglClientWaitSync)
EGL_FUNC_DECL(eglGetSyncAttrib)
EGL_FUNC_DECL(eglCreateImage)
EGL_FUNC_DECL(eglDestroyImage)
EGL_FUNC_DECL(eglCreatePlatformPixmapSurface)
EGL_FUNC_DECL(eglWaitSync)
}; // namespace EGL
@@ -957,4 +974,4 @@ namespace MobileGL {
} // namespace MobileGL
#define INIT_GLES_FUNC(name) \
{ MG_External::GLES::name = (name##_PTR)ProcAddress(libGLES, #name); }
{ MG_External::GLES::name = (name##_PTR)ProcAddress(libGLES, #name); }
@@ -6,6 +6,7 @@
// End of Source File Header
#include "GLEnumConverter.h"
#include <GL/gl.h>
namespace MobileGL {
namespace MG_Util {
+158 -17
View File
@@ -6,7 +6,7 @@ extern "C" {
#endif
/*
** Copyright 2013-2020 The Khronos Group Inc.
** Copyright 2013-2025 The Khronos Group Inc.
** SPDX-License-Identifier: MIT
**
** This header is generated from the Khronos OpenGL / OpenGL ES XML
@@ -32,10 +32,9 @@ extern "C" {
#define GLAPI extern
#endif
#define GL_GLEXT_VERSION 20220530
#define GL_GLEXT_VERSION 20251023
#include <KHR/khrplatform.h>
#include "gl.h"
/* Generated C header for:
* API: gl
@@ -5398,12 +5397,12 @@ typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severi
typedef void (APIENTRYP PFNGLDEBUGMESSAGEENABLEAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKAMDPROC) (GLDEBUGPROCAMD callback, void *userParam);
typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGAMDPROC) (GLuint count, GLsizei bufSize, GLenum *categories, GLenum *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDebugMessageEnableAMD (GLenum category, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
GLAPI void APIENTRY glDebugMessageInsertAMD (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar *buf);
GLAPI void APIENTRY glDebugMessageCallbackAMD (GLDEBUGPROCAMD callback, void *userParam);
GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufSize, GLenum *categories, GLuint *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
GLAPI GLuint APIENTRY glGetDebugMessageLogAMD (GLuint count, GLsizei bufSize, GLenum *categories, GLenum *severities, GLuint *ids, GLsizei *lengths, GLchar *message);
#endif
#endif /* GL_AMD_debug_output */
@@ -7359,6 +7358,47 @@ GLAPI void APIENTRY glFogCoordPointerEXT (GLenum type, GLsizei stride, const voi
#endif
#endif /* GL_EXT_fog_coord */
#ifndef GL_EXT_fragment_shading_rate
#define GL_EXT_fragment_shading_rate 1
#define GL_SHADING_RATE_1X1_PIXELS_EXT 0x96A6
#define GL_SHADING_RATE_1X2_PIXELS_EXT 0x96A7
#define GL_SHADING_RATE_2X1_PIXELS_EXT 0x96A8
#define GL_SHADING_RATE_2X2_PIXELS_EXT 0x96A9
#define GL_SHADING_RATE_1X4_PIXELS_EXT 0x96AA
#define GL_SHADING_RATE_4X1_PIXELS_EXT 0x96AB
#define GL_SHADING_RATE_4X2_PIXELS_EXT 0x96AC
#define GL_SHADING_RATE_2X4_PIXELS_EXT 0x96AD
#define GL_SHADING_RATE_4X4_PIXELS_EXT 0x96AE
#define GL_SHADING_RATE_EXT 0x96D0
#define GL_SHADING_RATE_ATTACHMENT_EXT 0x96D1
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_KEEP_EXT 0x96D2
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_REPLACE_EXT 0x96D3
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MIN_EXT 0x96D4
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MAX_EXT 0x96D5
#define GL_FRAGMENT_SHADING_RATE_COMBINER_OP_MUL_EXT 0x96D6
#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D7
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_WIDTH_EXT 0x96D8
#define GL_MIN_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96D9
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_HEIGHT_EXT 0x96DA
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_TEXEL_ASPECT_RATIO_EXT 0x96DB
#define GL_MAX_FRAGMENT_SHADING_RATE_ATTACHMENT_LAYERS_EXT 0x96DC
#define GL_FRAGMENT_SHADING_RATE_WITH_SHADER_DEPTH_STENCIL_WRITES_SUPPORTED_EXT 0x96DD
#define GL_FRAGMENT_SHADING_RATE_WITH_SAMPLE_MASK_SUPPORTED_EXT 0x96DE
#define GL_FRAGMENT_SHADING_RATE_ATTACHMENT_WITH_DEFAULT_FRAMEBUFFER_SUPPORTED_EXT 0x96DF
#define GL_FRAGMENT_SHADING_RATE_NON_TRIVIAL_COMBINERS_SUPPORTED_EXT 0x8F6F
#define GL_FRAGMENT_SHADING_RATE_PRIMITIVE_RATE_WITH_MULTI_VIEWPORT_SUPPORTED_EXT 0x9780
typedef void (APIENTRYP PFNGLGETFRAGMENTSHADINGRATESEXTPROC) (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
typedef void (APIENTRYP PFNGLSHADINGRATEEXTPROC) (GLenum rate);
typedef void (APIENTRYP PFNGLSHADINGRATECOMBINEROPSEXTPROC) (GLenum combinerOp0, GLenum combinerOp1);
typedef void (APIENTRYP PFNGLFRAMEBUFFERSHADINGRATEEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glGetFragmentShadingRatesEXT (GLsizei samples, GLsizei maxCount, GLsizei *count, GLenum *shadingRates);
GLAPI void APIENTRY glShadingRateEXT (GLenum rate);
GLAPI void APIENTRY glShadingRateCombinerOpsEXT (GLenum combinerOp0, GLenum combinerOp1);
GLAPI void APIENTRY glFramebufferShadingRateEXT (GLenum target, GLenum attachment, GLuint texture, GLint baseLayer, GLsizei numLayers, GLsizei texelWidth, GLsizei texelHeight);
#endif
#endif /* GL_EXT_fragment_shading_rate */
#ifndef GL_EXT_framebuffer_blit
#define GL_EXT_framebuffer_blit 1
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
@@ -7371,6 +7411,16 @@ GLAPI void APIENTRY glBlitFramebufferEXT (GLint srcX0, GLint srcY0, GLint srcX1,
#endif
#endif /* GL_EXT_framebuffer_blit */
#ifndef GL_EXT_framebuffer_blit_layers
#define GL_EXT_framebuffer_blit_layers 1
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERLAYERSEXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERLAYEREXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint srcLayer, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstLayer, GLbitfield mask, GLenum filter);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glBlitFramebufferLayersEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
GLAPI void APIENTRY glBlitFramebufferLayerEXT (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint srcLayer, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLint dstLayer, GLbitfield mask, GLenum filter);
#endif
#endif /* GL_EXT_framebuffer_blit_layers */
#ifndef GL_EXT_framebuffer_multisample
#define GL_EXT_framebuffer_multisample 1
#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
@@ -7807,6 +7857,86 @@ GLAPI void APIENTRY glImportMemoryWin32NameEXT (GLuint memory, GLuint64 size, GL
#endif
#endif /* GL_EXT_memory_object_win32 */
#ifndef GL_EXT_mesh_shader
#define GL_EXT_mesh_shader 1
#define GL_MESH_SHADER_EXT 0x9559
#define GL_TASK_SHADER_EXT 0x955A
#define GL_MAX_MESH_UNIFORM_BLOCKS_EXT 0x8E60
#define GL_MAX_MESH_TEXTURE_IMAGE_UNITS_EXT 0x8E61
#define GL_MAX_MESH_IMAGE_UNIFORMS_EXT 0x8E62
#define GL_MAX_MESH_UNIFORM_COMPONENTS_EXT 0x8E63
#define GL_MAX_MESH_ATOMIC_COUNTER_BUFFERS_EXT 0x8E64
#define GL_MAX_MESH_ATOMIC_COUNTERS_EXT 0x8E65
#define GL_MAX_MESH_SHADER_STORAGE_BLOCKS_EXT 0x8E66
#define GL_MAX_COMBINED_MESH_UNIFORM_COMPONENTS_EXT 0x8E67
#define GL_MAX_TASK_UNIFORM_BLOCKS_EXT 0x8E68
#define GL_MAX_TASK_TEXTURE_IMAGE_UNITS_EXT 0x8E69
#define GL_MAX_TASK_IMAGE_UNIFORMS_EXT 0x8E6A
#define GL_MAX_TASK_UNIFORM_COMPONENTS_EXT 0x8E6B
#define GL_MAX_TASK_ATOMIC_COUNTER_BUFFERS_EXT 0x8E6C
#define GL_MAX_TASK_ATOMIC_COUNTERS_EXT 0x8E6D
#define GL_MAX_TASK_SHADER_STORAGE_BLOCKS_EXT 0x8E6E
#define GL_MAX_COMBINED_TASK_UNIFORM_COMPONENTS_EXT 0x8E6F
#define GL_MAX_TASK_WORK_GROUP_TOTAL_COUNT_EXT 0x9740
#define GL_MAX_MESH_WORK_GROUP_TOTAL_COUNT_EXT 0x9741
#define GL_MAX_MESH_WORK_GROUP_INVOCATIONS_EXT 0x9757
#define GL_MAX_TASK_WORK_GROUP_INVOCATIONS_EXT 0x9759
#define GL_MAX_TASK_PAYLOAD_SIZE_EXT 0x9742
#define GL_MAX_TASK_SHARED_MEMORY_SIZE_EXT 0x9743
#define GL_MAX_MESH_SHARED_MEMORY_SIZE_EXT 0x9744
#define GL_MAX_TASK_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9745
#define GL_MAX_MESH_PAYLOAD_AND_SHARED_MEMORY_SIZE_EXT 0x9746
#define GL_MAX_MESH_OUTPUT_MEMORY_SIZE_EXT 0x9747
#define GL_MAX_MESH_PAYLOAD_AND_OUTPUT_MEMORY_SIZE_EXT 0x9748
#define GL_MAX_MESH_OUTPUT_VERTICES_EXT 0x9538
#define GL_MAX_MESH_OUTPUT_PRIMITIVES_EXT 0x9756
#define GL_MAX_MESH_OUTPUT_COMPONENTS_EXT 0x9749
#define GL_MAX_MESH_OUTPUT_LAYERS_EXT 0x974A
#define GL_MAX_MESH_MULTIVIEW_VIEW_COUNT_EXT 0x9557
#define GL_MESH_OUTPUT_PER_VERTEX_GRANULARITY_EXT 0x92DF
#define GL_MESH_OUTPUT_PER_PRIMITIVE_GRANULARITY_EXT 0x9543
#define GL_MAX_PREFERRED_TASK_WORK_GROUP_INVOCATIONS_EXT 0x974B
#define GL_MAX_PREFERRED_MESH_WORK_GROUP_INVOCATIONS_EXT 0x974C
#define GL_MESH_PREFERS_LOCAL_INVOCATION_VERTEX_OUTPUT_EXT 0x974D
#define GL_MESH_PREFERS_LOCAL_INVOCATION_PRIMITIVE_OUTPUT_EXT 0x974E
#define GL_MESH_PREFERS_COMPACT_VERTEX_OUTPUT_EXT 0x974F
#define GL_MESH_PREFERS_COMPACT_PRIMITIVE_OUTPUT_EXT 0x9750
#define GL_MAX_TASK_WORK_GROUP_COUNT_EXT 0x9751
#define GL_MAX_MESH_WORK_GROUP_COUNT_EXT 0x9752
#define GL_MAX_MESH_WORK_GROUP_SIZE_EXT 0x9758
#define GL_MAX_TASK_WORK_GROUP_SIZE_EXT 0x975A
#define GL_MESH_WORK_GROUP_SIZE_EXT 0x953E
#define GL_TASK_WORK_GROUP_SIZE_EXT 0x953F
#define GL_MESH_VERTICES_OUT_EXT 0x9579
#define GL_MESH_PRIMITIVES_OUT_EXT 0x957A
#define GL_MESH_OUTPUT_TYPE_EXT 0x957B
#define GL_UNIFORM_BLOCK_REFERENCED_BY_MESH_SHADER_EXT 0x959C
#define GL_UNIFORM_BLOCK_REFERENCED_BY_TASK_SHADER_EXT 0x959D
#define GL_REFERENCED_BY_MESH_SHADER_EXT 0x95A0
#define GL_REFERENCED_BY_TASK_SHADER_EXT 0x95A1
#define GL_TASK_SHADER_INVOCATIONS_EXT 0x9753
#define GL_MESH_SHADER_INVOCATIONS_EXT 0x9754
#define GL_MESH_PRIMITIVES_GENERATED_EXT 0x9755
#define GL_MESH_SHADER_BIT_EXT 0x00000040
#define GL_TASK_SHADER_BIT_EXT 0x00000080
#define GL_MESH_SUBROUTINE_EXT 0x957C
#define GL_TASK_SUBROUTINE_EXT 0x957D
#define GL_MESH_SUBROUTINE_UNIFORM_EXT 0x957E
#define GL_TASK_SUBROUTINE_UNIFORM_EXT 0x957F
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_MESH_SHADER_EXT 0x959E
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TASK_SHADER_EXT 0x959F
typedef void (APIENTRYP PFNGLDRAWMESHTASKSEXTPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
typedef void (APIENTRYP PFNGLDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect);
typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTEXTPROC) (GLintptr indirect, GLsizei drawcount, GLsizei stride);
typedef void (APIENTRYP PFNGLMULTIDRAWMESHTASKSINDIRECTCOUNTEXTPROC) (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glDrawMeshTasksEXT (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
GLAPI void APIENTRY glDrawMeshTasksIndirectEXT (GLintptr indirect);
GLAPI void APIENTRY glMultiDrawMeshTasksIndirectEXT (GLintptr indirect, GLsizei drawcount, GLsizei stride);
GLAPI void APIENTRY glMultiDrawMeshTasksIndirectCountEXT (GLintptr indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride);
#endif
#endif /* GL_EXT_mesh_shader */
#ifndef GL_EXT_misc_attribute
#define GL_EXT_misc_attribute 1
#endif /* GL_EXT_misc_attribute */
@@ -9395,6 +9525,11 @@ GLAPI void APIENTRY glResizeBuffersMESA (void);
#define GL_MESA_shader_integer_functions 1
#endif /* GL_MESA_shader_integer_functions */
#ifndef GL_MESA_texture_const_bandwidth
#define GL_MESA_texture_const_bandwidth 1
#define GL_CONST_BW_TILING_MESA 0x8BBE
#endif /* GL_MESA_texture_const_bandwidth */
#ifndef GL_MESA_tile_raster_order
#define GL_MESA_tile_raster_order 1
#define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8
@@ -10249,12 +10384,6 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD3HNVPROC) (GLenum target, GLhalfNV s,
typedef void (APIENTRYP PFNGLMULTITEXCOORD3HVNVPROC) (GLenum target, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4HNVPROC) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
typedef void (APIENTRYP PFNGLMULTITEXCOORD4HVNVPROC) (GLenum target, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1HNVPROC) (GLuint index, GLhalfNV x);
typedef void (APIENTRYP PFNGLVERTEXATTRIB1HVNVPROC) (GLuint index, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIB2HNVPROC) (GLuint index, GLhalfNV x, GLhalfNV y);
@@ -10267,6 +10396,12 @@ typedef void (APIENTRYP PFNGLVERTEXATTRIBS1HVNVPROC) (GLuint index, GLsizei n, c
typedef void (APIENTRYP PFNGLVERTEXATTRIBS2HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBS3HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLVERTEXATTRIBS4HVNVPROC) (GLuint index, GLsizei n, const GLhalfNV *v);
typedef void (APIENTRYP PFNGLFOGCOORDHNVPROC) (GLhalfNV fog);
typedef void (APIENTRYP PFNGLFOGCOORDHVNVPROC) (const GLhalfNV *fog);
typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HNVPROC) (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
typedef void (APIENTRYP PFNGLSECONDARYCOLOR3HVNVPROC) (const GLhalfNV *v);
typedef void (APIENTRYP PFNGLVERTEXWEIGHTHNVPROC) (GLhalfNV weight);
typedef void (APIENTRYP PFNGLVERTEXWEIGHTHVNVPROC) (const GLhalfNV *weight);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glVertex2hNV (GLhalfNV x, GLhalfNV y);
GLAPI void APIENTRY glVertex2hvNV (const GLhalfNV *v);
@@ -10296,12 +10431,6 @@ GLAPI void APIENTRY glMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t,
GLAPI void APIENTRY glMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v);
GLAPI void APIENTRY glMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q);
GLAPI void APIENTRY glMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v);
GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
GLAPI void APIENTRY glVertexAttrib1hNV (GLuint index, GLhalfNV x);
GLAPI void APIENTRY glVertexAttrib1hvNV (GLuint index, const GLhalfNV *v);
GLAPI void APIENTRY glVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y);
@@ -10314,6 +10443,12 @@ GLAPI void APIENTRY glVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfN
GLAPI void APIENTRY glVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
GLAPI void APIENTRY glVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
GLAPI void APIENTRY glVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v);
GLAPI void APIENTRY glFogCoordhNV (GLhalfNV fog);
GLAPI void APIENTRY glFogCoordhvNV (const GLhalfNV *fog);
GLAPI void APIENTRY glSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue);
GLAPI void APIENTRY glSecondaryColor3hvNV (const GLhalfNV *v);
GLAPI void APIENTRY glVertexWeighthNV (GLhalfNV weight);
GLAPI void APIENTRY glVertexWeighthvNV (const GLhalfNV *weight);
#endif
#endif /* GL_NV_half_float */
@@ -11450,6 +11585,10 @@ GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum mode, GLuint id);
#endif
#endif /* GL_NV_transform_feedback2 */
#ifndef GL_NV_uniform_buffer_std430_layout
#define GL_NV_uniform_buffer_std430_layout 1
#endif /* GL_NV_uniform_buffer_std430_layout */
#ifndef GL_NV_uniform_buffer_unified_memory
#define GL_NV_uniform_buffer_unified_memory 1
#define GL_UNIFORM_BUFFER_UNIFIED_NV 0x936E
@@ -11965,8 +12104,10 @@ GLAPI void APIENTRY glViewportSwizzleNV (GLuint index, GLenum swizzlex, GLenum s
#define GL_MAX_VIEWS_OVR 0x9631
#define GL_FRAMEBUFFER_INCOMPLETE_VIEW_TARGETS_OVR 0x9633
typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREMULTIVIEWOVRPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
#ifdef GL_GLEXT_PROTOTYPES
GLAPI void APIENTRY glFramebufferTextureMultiviewOVR (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
GLAPI void APIENTRY glNamedFramebufferTextureMultiviewOVR (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint baseViewIndex, GLsizei numViews);
#endif
#endif /* GL_OVR_multiview */