From 1cb7bef6f4974f015a3e481145207e0586061efb Mon Sep 17 00:00:00 2001 From: Swung0x48 Date: Tue, 25 Feb 2025 14:01:23 +0800 Subject: [PATCH] fix(gl_stub): maintain C linkage on gl stubs --- src/main/cpp/gl/gl_stub.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/cpp/gl/gl_stub.cpp b/src/main/cpp/gl/gl_stub.cpp index 04681eb..4c79a2d 100644 --- a/src/main/cpp/gl/gl_stub.cpp +++ b/src/main/cpp/gl/gl_stub.cpp @@ -8,6 +8,11 @@ #include "../gles/loader.h" #include "mg.h" #define DEBUG false + +#ifdef __cplusplus +extern "C" { +#endif + /* * Miscellaneous */ @@ -2480,4 +2485,8 @@ STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fVertex3fvSUN,const GLuint* STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN, GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); STUB_FUNCTION_END_NO_RETURN(void, glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN,rc,s,t,nx,ny,nz,x,y,z) STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* n, const GLfloat* v); STUB_FUNCTION_END_NO_RETURN(void, glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN,rc,tc,n,v) STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, 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); STUB_FUNCTION_END_NO_RETURN(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN,rc,s,t,r,g,b,a,nx,ny,nz,x,y,z) -STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v); STUB_FUNCTION_END_NO_RETURN(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,rc,tc,c,n,v) \ No newline at end of file +STUB_FUNCTION_HEAD(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,const GLuint* rc, const GLfloat* tc, const GLfloat* c, const GLfloat* n, const GLfloat* v); STUB_FUNCTION_END_NO_RETURN(void, glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN,rc,tc,c,n,v) + +#ifdef __cplusplus +} +#endif